diff --git a/env/Lib/site-packages/aiogram-3.12.0.dist-info/INSTALLER b/env/Lib/site-packages/aiogram-3.12.0.dist-info/INSTALLER deleted file mode 100644 index a1b589e..0000000 --- a/env/Lib/site-packages/aiogram-3.12.0.dist-info/INSTALLER +++ /dev/null @@ -1 +0,0 @@ -pip diff --git a/env/Lib/site-packages/aiogram-3.12.0.dist-info/METADATA b/env/Lib/site-packages/aiogram-3.12.0.dist-info/METADATA deleted file mode 100644 index e0470f1..0000000 --- a/env/Lib/site-packages/aiogram-3.12.0.dist-info/METADATA +++ /dev/null @@ -1,163 +0,0 @@ -Metadata-Version: 2.3 -Name: aiogram -Version: 3.12.0 -Summary: Modern and fully asynchronous framework for Telegram Bot API -Project-URL: Homepage, https://aiogram.dev/ -Project-URL: Documentation, https://docs.aiogram.dev/ -Project-URL: Repository, https://github.com/aiogram/aiogram/ -Author-email: Alex Root Junior -Maintainer-email: Alex Root Junior -License-Expression: MIT -License-File: LICENSE -Keywords: api,asyncio,bot,framework,telegram,wrapper -Classifier: Development Status :: 5 - Production/Stable -Classifier: Environment :: Console -Classifier: Framework :: AsyncIO -Classifier: Intended Audience :: Developers -Classifier: Intended Audience :: System Administrators -Classifier: License :: OSI Approved :: MIT License -Classifier: Programming Language :: Python :: 3.8 -Classifier: Programming Language :: Python :: 3.9 -Classifier: Programming Language :: Python :: 3.10 -Classifier: Programming Language :: Python :: 3.11 -Classifier: Programming Language :: Python :: 3.12 -Classifier: Programming Language :: Python :: Implementation :: PyPy -Classifier: Topic :: Communications :: Chat -Classifier: Topic :: Software Development :: Libraries :: Application Frameworks -Classifier: Topic :: Software Development :: Libraries :: Python Modules -Classifier: Typing :: Typed -Requires-Python: >=3.8 -Requires-Dist: aiofiles~=23.2.1 -Requires-Dist: aiohttp<3.11,>=3.9.0 -Requires-Dist: certifi>=2023.7.22 -Requires-Dist: magic-filter<1.1,>=1.0.12 -Requires-Dist: pydantic<2.9,>=2.4.1 -Requires-Dist: typing-extensions<=5.0,>=4.7.0 -Provides-Extra: cli -Requires-Dist: aiogram-cli~=1.0.3; extra == 'cli' -Provides-Extra: dev -Requires-Dist: black~=24.4.2; extra == 'dev' -Requires-Dist: isort~=5.13.2; extra == 'dev' -Requires-Dist: motor-types~=1.0.0b4; extra == 'dev' -Requires-Dist: mypy~=1.10.0; extra == 'dev' -Requires-Dist: packaging~=24.1; extra == 'dev' -Requires-Dist: pre-commit~=3.5; extra == 'dev' -Requires-Dist: ruff~=0.5.1; extra == 'dev' -Requires-Dist: toml~=0.10.2; extra == 'dev' -Provides-Extra: docs -Requires-Dist: furo~=2023.9.10; extra == 'docs' -Requires-Dist: markdown-include~=0.8.1; extra == 'docs' -Requires-Dist: pygments~=2.16.1; extra == 'docs' -Requires-Dist: pymdown-extensions~=10.3; extra == 'docs' -Requires-Dist: sphinx-autobuild~=2021.3.14; extra == 'docs' -Requires-Dist: sphinx-copybutton~=0.5.2; extra == 'docs' -Requires-Dist: sphinx-intl~=2.1.0; extra == 'docs' -Requires-Dist: sphinx-substitution-extensions~=2022.2.16; extra == 'docs' -Requires-Dist: sphinxcontrib-towncrier~=0.4.0a0; extra == 'docs' -Requires-Dist: sphinx~=7.2.6; extra == 'docs' -Requires-Dist: towncrier~=24.7.1; extra == 'docs' -Provides-Extra: fast -Requires-Dist: aiodns>=3.0.0; extra == 'fast' -Requires-Dist: uvloop>=0.17.0; ((sys_platform == 'darwin' or sys_platform == 'linux') and platform_python_implementation != 'PyPy') and extra == 'fast' -Provides-Extra: i18n -Requires-Dist: babel~=2.13.0; extra == 'i18n' -Provides-Extra: mongo -Requires-Dist: motor~=3.3.2; extra == 'mongo' -Provides-Extra: proxy -Requires-Dist: aiohttp-socks~=0.8.3; extra == 'proxy' -Provides-Extra: redis -Requires-Dist: redis[hiredis]~=5.0.1; extra == 'redis' -Provides-Extra: test -Requires-Dist: aresponses~=2.1.6; extra == 'test' -Requires-Dist: pycryptodomex~=3.19.0; extra == 'test' -Requires-Dist: pytest-aiohttp~=1.0.5; extra == 'test' -Requires-Dist: pytest-asyncio~=0.21.1; extra == 'test' -Requires-Dist: pytest-cov~=4.1.0; extra == 'test' -Requires-Dist: pytest-html~=4.0.2; extra == 'test' -Requires-Dist: pytest-lazy-fixture~=0.6.3; extra == 'test' -Requires-Dist: pytest-mock~=3.12.0; extra == 'test' -Requires-Dist: pytest-mypy~=0.10.3; extra == 'test' -Requires-Dist: pytest~=7.4.2; extra == 'test' -Requires-Dist: pytz~=2023.3; extra == 'test' -Description-Content-Type: text/x-rst - -####### -aiogram -####### - -.. image:: https://img.shields.io/pypi/l/aiogram.svg?style=flat-square - :target: https://opensource.org/licenses/MIT - :alt: MIT License - -.. image:: https://img.shields.io/pypi/status/aiogram.svg?style=flat-square - :target: https://pypi.python.org/pypi/aiogram - :alt: PyPi status - -.. image:: https://img.shields.io/pypi/v/aiogram.svg?style=flat-square - :target: https://pypi.python.org/pypi/aiogram - :alt: PyPi Package Version - -.. image:: https://img.shields.io/pypi/dm/aiogram.svg?style=flat-square - :target: https://pypi.python.org/pypi/aiogram - :alt: Downloads - -.. image:: https://img.shields.io/pypi/pyversions/aiogram.svg?style=flat-square - :target: https://pypi.python.org/pypi/aiogram - :alt: Supported python versions - -.. image:: https://img.shields.io/badge/dynamic/json?color=blue&logo=telegram&label=Telegram%20Bot%20API&query=%24.api.version&url=https%3A%2F%2Fraw.githubusercontent.com%2Faiogram%2Faiogram%2Fdev-3.x%2F.butcher%2Fschema%2Fschema.json&style=flat-square - :target: https://core.telegram.org/bots/api - :alt: Telegram Bot API - -.. image:: https://img.shields.io/github/actions/workflow/status/aiogram/aiogram/tests.yml?branch=dev-3.x&style=flat-square - :target: https://github.com/aiogram/aiogram/actions - :alt: Tests - -.. image:: https://img.shields.io/codecov/c/github/aiogram/aiogram?style=flat-square - :target: https://app.codecov.io/gh/aiogram/aiogram - :alt: Codecov - -**aiogram** is a modern and fully asynchronous framework for -`Telegram Bot API `_ written in Python 3.8+ using -`asyncio `_ and -`aiohttp `_. - -Make your bots faster and more powerful! - -Documentation: - - 🇺🇸 `English `_ - - 🇺🇦 `Ukrainian `_ - - -Features -======== - -- Asynchronous (`asyncio docs `_, :pep:`492`) -- Has type hints (:pep:`484`) and can be used with `mypy `_ -- Supports `PyPy `_ -- Supports `Telegram Bot API 7.9 `_ and gets fast updates to the latest versions of the Bot API -- Telegram Bot API integration code was `autogenerated `_ and can be easily re-generated when API gets updated -- Updates router (Blueprints) -- Has Finite State Machine -- Uses powerful `magic filters `_ -- Middlewares (incoming updates and API calls) -- Provides `Replies into Webhook `_ -- Integrated I18n/L10n support with GNU Gettext (or Fluent) - - -.. warning:: - - It is strongly advised that you have prior experience working - with `asyncio `_ - before beginning to use **aiogram**. - - If you have any questions, you can visit our community chats on Telegram: - - - 🇺🇸 `@aiogram `_ - - 🇺🇦 `@aiogramua `_ - - 🇺🇿 `@aiogram_uz `_ - - 🇰🇿 `@aiogram_kz `_ - - 🇷🇺 `@aiogram_ru `_ - - 🇮🇷 `@aiogram_fa `_ - - 🇮🇹 `@aiogram_it `_ - - 🇧🇷 `@aiogram_br `_ diff --git a/env/Lib/site-packages/aiogram-3.12.0.dist-info/RECORD b/env/Lib/site-packages/aiogram-3.12.0.dist-info/RECORD deleted file mode 100644 index 4bcde9a..0000000 --- a/env/Lib/site-packages/aiogram-3.12.0.dist-info/RECORD +++ /dev/null @@ -1,961 +0,0 @@ -aiogram-3.12.0.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4 -aiogram-3.12.0.dist-info/METADATA,sha256=xLpro6MzAiOqnI3s9iwMQa4utDb-lP5628N1tsZdgN4,7344 -aiogram-3.12.0.dist-info/RECORD,, -aiogram-3.12.0.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 -aiogram-3.12.0.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87 -aiogram-3.12.0.dist-info/licenses/LICENSE,sha256=kTEqDVZ6fYSuFKAER9NvxX60epaWBKI_h-xGsoiU6Iw,1070 -aiogram/__init__.py,sha256=hzEKX_gFXmp5n4GXZEU80SJep1_FAH9owAnFTqd9nK0,948 -aiogram/__meta__.py,sha256=55lJQIAoSsYeR0jyyKdVygUQrmEXQxbAvKlsKTLaShU,47 -aiogram/__pycache__/__init__.cpython-311.pyc,, -aiogram/__pycache__/__meta__.cpython-311.pyc,, -aiogram/__pycache__/exceptions.cpython-311.pyc,, -aiogram/__pycache__/loggers.cpython-311.pyc,, -aiogram/client/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 -aiogram/client/__pycache__/__init__.cpython-311.pyc,, -aiogram/client/__pycache__/bot.cpython-311.pyc,, -aiogram/client/__pycache__/context_controller.cpython-311.pyc,, -aiogram/client/__pycache__/default.cpython-311.pyc,, -aiogram/client/__pycache__/telegram.cpython-311.pyc,, -aiogram/client/bot.py,sha256=gYy_a9F6Hass5YwsobSFeOu15mDrnR1u6N1x0YohQnA,262513 -aiogram/client/context_controller.py,sha256=rAminUBsB3K5FDyj-WQopkD1e94c7GrGVXNyaqPbXZ0,761 -aiogram/client/default.py,sha256=sqctTqHKsc69UBGh4sJeFbihGH5feDudb685CbMtdDU,2750 -aiogram/client/session/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 -aiogram/client/session/__pycache__/__init__.cpython-311.pyc,, -aiogram/client/session/__pycache__/aiohttp.cpython-311.pyc,, -aiogram/client/session/__pycache__/base.cpython-311.pyc,, -aiogram/client/session/aiohttp.py,sha256=q2OZLVEdz3LghDlEC5KfDEJJLtwYEbfJMXEmsVNnRcQ,7197 -aiogram/client/session/base.py,sha256=e3n5NrwL6L-pFhLetTgBg76uLJDxDP6jQqyxPgjtI_0,8335 -aiogram/client/session/middlewares/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 -aiogram/client/session/middlewares/__pycache__/__init__.cpython-311.pyc,, -aiogram/client/session/middlewares/__pycache__/base.cpython-311.pyc,, -aiogram/client/session/middlewares/__pycache__/manager.cpython-311.pyc,, -aiogram/client/session/middlewares/__pycache__/request_logging.cpython-311.pyc,, -aiogram/client/session/middlewares/base.py,sha256=ck8-iOnaYO2FHb3Yjq6E_TZwiPMg8w8THOXqyHDLjro,1394 -aiogram/client/session/middlewares/manager.py,sha256=c1CS6S_UvxYVAfCq6MZ4Laet6sxReEmQ915XltTJR5o,1903 -aiogram/client/session/middlewares/request_logging.py,sha256=_nUsciMnQeTZ-_nJw3A3NNBlGWzGqKMqYw2oJqJw3s8,1183 -aiogram/client/telegram.py,sha256=cu0HUZqwPzvZp-tMI3yewmnNZ78aTpFfEF0ZZVf0qAw,3080 -aiogram/dispatcher/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 -aiogram/dispatcher/__pycache__/__init__.cpython-311.pyc,, -aiogram/dispatcher/__pycache__/dispatcher.cpython-311.pyc,, -aiogram/dispatcher/__pycache__/flags.cpython-311.pyc,, -aiogram/dispatcher/__pycache__/router.cpython-311.pyc,, -aiogram/dispatcher/dispatcher.py,sha256=j3V5oi-nBUT1CBSBAs8lbCRQNIveZ9sVOJmUHnuJEqE,23205 -aiogram/dispatcher/event/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 -aiogram/dispatcher/event/__pycache__/__init__.cpython-311.pyc,, -aiogram/dispatcher/event/__pycache__/bases.cpython-311.pyc,, -aiogram/dispatcher/event/__pycache__/event.cpython-311.pyc,, -aiogram/dispatcher/event/__pycache__/handler.cpython-311.pyc,, -aiogram/dispatcher/event/__pycache__/telegram.cpython-311.pyc,, -aiogram/dispatcher/event/bases.py,sha256=Piod0CEyGvBOwEuE7e70JMQal4XFilFD3NMinR2bEyE,871 -aiogram/dispatcher/event/event.py,sha256=YXOroGX5Mj-5w6Jgl9oPf-muIp6ijeWjNJ3hEr2mA68,1352 -aiogram/dispatcher/event/handler.py,sha256=rgV8j1x2a8qpmWCue1-uQ3fRzrc8qDdhKNJBkBnFSYo,3631 -aiogram/dispatcher/event/telegram.py,sha256=BjptMwTbDVdpiIkngGyy8zY2b3i5__gwnuyA7uw9HoY,4767 -aiogram/dispatcher/flags.py,sha256=vEevCfweZKDCEW2tA5E3UbqMH-TjDBI0ujf7ktzsx9o,3479 -aiogram/dispatcher/middlewares/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 -aiogram/dispatcher/middlewares/__pycache__/__init__.cpython-311.pyc,, -aiogram/dispatcher/middlewares/__pycache__/base.cpython-311.pyc,, -aiogram/dispatcher/middlewares/__pycache__/error.cpython-311.pyc,, -aiogram/dispatcher/middlewares/__pycache__/manager.cpython-311.pyc,, -aiogram/dispatcher/middlewares/__pycache__/user_context.cpython-311.pyc,, -aiogram/dispatcher/middlewares/base.py,sha256=czbD9IDLoHb6pf6HisRGyG8pAQMLbC4R5k-iuTIWSNU,784 -aiogram/dispatcher/middlewares/error.py,sha256=xDfQxTo9PT1qXvE35OGesDi7WydeQeB4zgT07eXM5G4,1119 -aiogram/dispatcher/middlewares/manager.py,sha256=-ivUdff-Addpd_s_AlDA4RaVsMJmzgWwvt2DIqITnBw,2166 -aiogram/dispatcher/middlewares/user_context.py,sha256=kc2ONIgh_b4MlItGxH-7RkxZ6zCevY2sfplJl1keyVU,7115 -aiogram/dispatcher/router.py,sha256=vnAvQQANQ85JXE84s7JXkVo60uKUvyqg0bcIFGJ8we8,10512 -aiogram/enums/__init__.py,sha256=oQH8dIPtHKcgQwX6k6-EIda0PLM_HWyyPy5Oft1BSoY,2014 -aiogram/enums/__pycache__/__init__.cpython-311.pyc,, -aiogram/enums/__pycache__/bot_command_scope_type.cpython-311.pyc,, -aiogram/enums/__pycache__/chat_action.cpython-311.pyc,, -aiogram/enums/__pycache__/chat_boost_source_type.cpython-311.pyc,, -aiogram/enums/__pycache__/chat_member_status.cpython-311.pyc,, -aiogram/enums/__pycache__/chat_type.cpython-311.pyc,, -aiogram/enums/__pycache__/content_type.cpython-311.pyc,, -aiogram/enums/__pycache__/currency.cpython-311.pyc,, -aiogram/enums/__pycache__/dice_emoji.cpython-311.pyc,, -aiogram/enums/__pycache__/encrypted_passport_element.cpython-311.pyc,, -aiogram/enums/__pycache__/inline_query_result_type.cpython-311.pyc,, -aiogram/enums/__pycache__/input_media_type.cpython-311.pyc,, -aiogram/enums/__pycache__/input_paid_media_type.cpython-311.pyc,, -aiogram/enums/__pycache__/keyboard_button_poll_type_type.cpython-311.pyc,, -aiogram/enums/__pycache__/mask_position_point.cpython-311.pyc,, -aiogram/enums/__pycache__/menu_button_type.cpython-311.pyc,, -aiogram/enums/__pycache__/message_entity_type.cpython-311.pyc,, -aiogram/enums/__pycache__/message_origin_type.cpython-311.pyc,, -aiogram/enums/__pycache__/paid_media_type.cpython-311.pyc,, -aiogram/enums/__pycache__/parse_mode.cpython-311.pyc,, -aiogram/enums/__pycache__/passport_element_error_type.cpython-311.pyc,, -aiogram/enums/__pycache__/poll_type.cpython-311.pyc,, -aiogram/enums/__pycache__/reaction_type_type.cpython-311.pyc,, -aiogram/enums/__pycache__/revenue_withdrawal_state_type.cpython-311.pyc,, -aiogram/enums/__pycache__/sticker_format.cpython-311.pyc,, -aiogram/enums/__pycache__/sticker_type.cpython-311.pyc,, -aiogram/enums/__pycache__/topic_icon_color.cpython-311.pyc,, -aiogram/enums/__pycache__/transaction_partner_type.cpython-311.pyc,, -aiogram/enums/__pycache__/update_type.cpython-311.pyc,, -aiogram/enums/bot_command_scope_type.py,sha256=aPn5UKE6AN5BpK9kTH1ffJzG3qUOWFu5lyZOifMu5so,477 -aiogram/enums/chat_action.py,sha256=KKItRU_RQuNzFMrAtc67Pn0aT4rZuuynpH6-yXfBhRY,972 -aiogram/enums/chat_boost_source_type.py,sha256=80MfT0G_9-uv-7MsTs0lZjtJiA7EaUmqYd5b3vH6JtU,277 -aiogram/enums/chat_member_status.py,sha256=OLr5ZfkZocicy1t5i30g7ufR8kujBPHENzR5UHnsDpc,334 -aiogram/enums/chat_type.py,sha256=1Oi1TYITumT8jZritu1fgHNKDvK9otlAhPm4soyBKQQ,280 -aiogram/enums/content_type.py,sha256=sSTHtq4LqeYB4J3zFug1HkhVuORSdcT7g91ZQTjOZrE,2311 -aiogram/enums/currency.py,sha256=P5S_e7Y3wYmODiaK_8Fz0MHVwJXkt1P9Y3gd2SGo1iU,1563 -aiogram/enums/dice_emoji.py,sha256=9KlOPTQlgt-6d3myDEWWUTB9H8BrE_LRaOZvBM2ceWs,303 -aiogram/enums/encrypted_passport_element.py,sha256=m0-tAF9myf6FwPbsuJgj4AYvywzLMzzltUgrqWgGVws,704 -aiogram/enums/inline_query_result_type.py,sha256=HGNN5aOg_jZbE4NNfHs21M-xK5cj2rBar4-C77T73YI,465 -aiogram/enums/input_media_type.py,sha256=BfCDkzFOjrzJSo2syY2lq3E3JP8AdlGemp7qMnAupw0,291 -aiogram/enums/input_paid_media_type.py,sha256=KoqJo7AelAiY8pmS1mRBuQLz97hedWFImEEVFnEoMmY,247 -aiogram/enums/keyboard_button_poll_type_type.py,sha256=vPjequaOO5zySi7hiQjyVIfQl-jhtpgCGHYMR7DOYWY,324 -aiogram/enums/mask_position_point.py,sha256=lhlx8U-9gtGn_LPiSOHWBe1u8YTLZCERs5x8DRmUubM,290 -aiogram/enums/menu_button_type.py,sha256=4FDz7HKaVtfBlvXObCOVAUmyQQvRsyPi0Vu_Kc-HbDs,264 -aiogram/enums/message_entity_type.py,sha256=00ioN4bPLNUYvCL_nJzp7rNUPhIqNOqoWY3PjiC4ob8,703 -aiogram/enums/message_origin_type.py,sha256=qWHgXPzpuhsTcLx-huqNS1l36JSwqbsCY70_d20nreM,279 -aiogram/enums/paid_media_type.py,sha256=FrGQyXq9bimIb8_b0hpuqYG4mWVruoBYkSC6drd7hw4,261 -aiogram/enums/parse_mode.py,sha256=t5F3LaNLsUOaNQuYlQseWt36suA-oRgr_uScGEU8TKU,234 -aiogram/enums/passport_element_error_type.py,sha256=HCcvvc8DDUNRD-mdFgFqMEFlr_4pa5Us5_U6pO2wXsc,471 -aiogram/enums/poll_type.py,sha256=DluT-wQcOGqBgQimYLlO6OlTIIYnnbtHOmY9pjqVToo,200 -aiogram/enums/reaction_type_type.py,sha256=HfSXXZFcMXjIoD0Q8B_lZju6mPuB4jNIBbRyIfLYnEI,233 -aiogram/enums/revenue_withdrawal_state_type.py,sha256=ZVw59f9-RYG00TJdSHnZo_LTbdR_J8RmkhDCV4C8AFg,290 -aiogram/enums/sticker_format.py,sha256=UmbwulTvkG7TFwS2twsblqiBj89jeEWY-y7P7Ah2qgo,235 -aiogram/enums/sticker_type.py,sha256=XonGtnasf3tXwoD2DVRx5E16rHCE5VqgAFSfcFMIAGU,278 -aiogram/enums/topic_icon_color.py,sha256=q-DilvJsgVmz5VafMOxj1BKJcMoHzpRrbatTPE4inxk,399 -aiogram/enums/transaction_partner_type.py,sha256=VSLiUN_53Ggi9_YrrxoF8OeltgiLY2jJGkAYQJcaHWI,305 -aiogram/enums/update_type.py,sha256=WAXTSDLbOXyzjLanGn_22HsALq96OVdd5q8HunubdG8,1086 -aiogram/exceptions.py,sha256=Y6wDVG2fyoczPn15U5epm_nnTx8eTC3CgX19SzyiqOE,5153 -aiogram/filters/__init__.py,sha256=w7mWuJOIpLDZyUt1eznzMeF-o1UrstHQ-OYbBHHG6ek,1031 -aiogram/filters/__pycache__/__init__.cpython-311.pyc,, -aiogram/filters/__pycache__/base.cpython-311.pyc,, -aiogram/filters/__pycache__/callback_data.cpython-311.pyc,, -aiogram/filters/__pycache__/chat_member_updated.cpython-311.pyc,, -aiogram/filters/__pycache__/command.cpython-311.pyc,, -aiogram/filters/__pycache__/exception.cpython-311.pyc,, -aiogram/filters/__pycache__/logic.cpython-311.pyc,, -aiogram/filters/__pycache__/magic_data.cpython-311.pyc,, -aiogram/filters/__pycache__/state.cpython-311.pyc,, -aiogram/filters/base.py,sha256=6mCB2nSjqskDDl9mKCZ3SghhwQ1jryaSTd5PvWii3bM,2005 -aiogram/filters/callback_data.py,sha256=nxRCCPXX4iuk1bnVpg3MdLOCeGlmJFKIcS6yjPkM2V8,6225 -aiogram/filters/chat_member_updated.py,sha256=3VsiMYLK6L7AfLS7RQRWwjXThWGN7gj4NAYnR0Wdr8I,7484 -aiogram/filters/command.py,sha256=IXb54dwKHLz-Jaq2_HHn2si7r5iAr9pYW3sSxD8szCk,9957 -aiogram/filters/exception.py,sha256=HbJIOVrXHh0_LkID6b-yn8Xow-llmLqKYmK0_tqB4YA,1488 -aiogram/filters/logic.py,sha256=2M-fYY8m1ybX00wFn_8toRHj5alTfy4T6zkIkYrQZbM,2174 -aiogram/filters/magic_data.py,sha256=Y07K9NLDXpXV0EuFR7GR7Yq4SzCYaD3XJsvDH-6JFkQ,718 -aiogram/filters/state.py,sha256=A4GuSAo5KPdSZMetCC9crrfbJ-yghLunJUVYkOdBPTI,1448 -aiogram/fsm/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 -aiogram/fsm/__pycache__/__init__.cpython-311.pyc,, -aiogram/fsm/__pycache__/context.cpython-311.pyc,, -aiogram/fsm/__pycache__/middleware.cpython-311.pyc,, -aiogram/fsm/__pycache__/scene.cpython-311.pyc,, -aiogram/fsm/__pycache__/state.cpython-311.pyc,, -aiogram/fsm/__pycache__/strategy.cpython-311.pyc,, -aiogram/fsm/context.py,sha256=o0cKPtB43Z2S8DgSD9be5moF8FqOboBca8Wyd6qvUgU,1072 -aiogram/fsm/middleware.py,sha256=4MsKWzr93tzLTmv3dph3pKhznuX9EGsrhBhCb6mhzPo,3755 -aiogram/fsm/scene.py,sha256=7a5zMRvfE2vHQ-3zSCHiBDa93QedmOr6kgLs1svjHAg,31903 -aiogram/fsm/state.py,sha256=T0sPq1_JV5Jq1jVKu67bUQ0-y9Kqsk3hGpj7PgjpacQ,5640 -aiogram/fsm/storage/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 -aiogram/fsm/storage/__pycache__/__init__.cpython-311.pyc,, -aiogram/fsm/storage/__pycache__/base.cpython-311.pyc,, -aiogram/fsm/storage/__pycache__/memory.cpython-311.pyc,, -aiogram/fsm/storage/__pycache__/mongo.cpython-311.pyc,, -aiogram/fsm/storage/__pycache__/redis.cpython-311.pyc,, -aiogram/fsm/storage/base.py,sha256=5SVkAFfcCLN8uZkE1EX7DFFcGJ89p4fp3wB9R8FU2no,5023 -aiogram/fsm/storage/memory.py,sha256=xG3507DVY01GTntkGSG1-2fPlWkcDL48QUTIE5WFowQ,2133 -aiogram/fsm/storage/mongo.py,sha256=xGvz9rLr6ji8BhumZb1FTvQ5RvmlGquhLAPe1-vi9ms,4880 -aiogram/fsm/storage/redis.py,sha256=7ZyaB-AMNEITjdYVn24Bha28_MIFRPX41mn5_0sEtiY,5322 -aiogram/fsm/strategy.py,sha256=RUDc6kMae9ZFbyC1bdbAIRz6GoeaIHFzXCXRu8p3Kn0,1147 -aiogram/handlers/__init__.py,sha256=XVErtJHhSmg4ytiDTP9J5pQY0RwBN1TsjT5v-Ls7RE4,800 -aiogram/handlers/__pycache__/__init__.cpython-311.pyc,, -aiogram/handlers/__pycache__/base.cpython-311.pyc,, -aiogram/handlers/__pycache__/callback_query.cpython-311.pyc,, -aiogram/handlers/__pycache__/chat_member.cpython-311.pyc,, -aiogram/handlers/__pycache__/chosen_inline_result.cpython-311.pyc,, -aiogram/handlers/__pycache__/error.cpython-311.pyc,, -aiogram/handlers/__pycache__/inline_query.cpython-311.pyc,, -aiogram/handlers/__pycache__/message.cpython-311.pyc,, -aiogram/handlers/__pycache__/poll.cpython-311.pyc,, -aiogram/handlers/__pycache__/pre_checkout_query.cpython-311.pyc,, -aiogram/handlers/__pycache__/shipping_query.cpython-311.pyc,, -aiogram/handlers/base.py,sha256=SKLNknDSxAItRHwPMJanOPFztWakJQCun4myH9TBNik,1097 -aiogram/handlers/callback_query.py,sha256=XWGgkmyt2Bgnh1B_3ivIZ_jMRJIQUEXPeKSUO4VW_zg,1036 -aiogram/handlers/chat_member.py,sha256=TCr1m47duHFUpL92W56ok0hF1k0NN3Yk88-1zzEsYmw,322 -aiogram/handlers/chosen_inline_result.py,sha256=NjAPc5EgBb8V4p3WVpcPNPd8b1OApymvBN-I75EYMQo,410 -aiogram/handlers/error.py,sha256=86pedHPBgYxXYwrW00s0cadf_lRP6TeHEG0goJ6zNJk,352 -aiogram/handlers/inline_query.py,sha256=sOkT3uMuvamMnSTxct-cdQFng6GBqaOlSNV4aHUbVPQ,381 -aiogram/handlers/message.py,sha256=I6R4TJ8V6bbGVppmxmGSxIkCzeN9JMn1CDojywWrt50,721 -aiogram/handlers/poll.py,sha256=Bn075JIux1lNPjKWH3woV_OzMcvPgPvtkgp4W22mUX8,396 -aiogram/handlers/pre_checkout_query.py,sha256=ZO0iZFVwRz4CtBWIVLds8JoHhMPqCahz6lwOfR4dEkg,321 -aiogram/handlers/shipping_query.py,sha256=ku14YRYvddTbHeKoIwb2oDpfrpsetFC1m2BwIsNwoAs,314 -aiogram/loggers.py,sha256=3MCGSmwgXXsWbgtSaTc6bPSwVOIe8FkQZglc0QLVvsY,257 -aiogram/methods/__init__.py,sha256=v4-H0SB9W9Z7rY4Y_uF5Z86dUZje0aI0cafAxDbL2W0,9575 -aiogram/methods/__pycache__/__init__.cpython-311.pyc,, -aiogram/methods/__pycache__/add_sticker_to_set.cpython-311.pyc,, -aiogram/methods/__pycache__/answer_callback_query.cpython-311.pyc,, -aiogram/methods/__pycache__/answer_inline_query.cpython-311.pyc,, -aiogram/methods/__pycache__/answer_pre_checkout_query.cpython-311.pyc,, -aiogram/methods/__pycache__/answer_shipping_query.cpython-311.pyc,, -aiogram/methods/__pycache__/answer_web_app_query.cpython-311.pyc,, -aiogram/methods/__pycache__/approve_chat_join_request.cpython-311.pyc,, -aiogram/methods/__pycache__/ban_chat_member.cpython-311.pyc,, -aiogram/methods/__pycache__/ban_chat_sender_chat.cpython-311.pyc,, -aiogram/methods/__pycache__/base.cpython-311.pyc,, -aiogram/methods/__pycache__/close.cpython-311.pyc,, -aiogram/methods/__pycache__/close_forum_topic.cpython-311.pyc,, -aiogram/methods/__pycache__/close_general_forum_topic.cpython-311.pyc,, -aiogram/methods/__pycache__/copy_message.cpython-311.pyc,, -aiogram/methods/__pycache__/copy_messages.cpython-311.pyc,, -aiogram/methods/__pycache__/create_chat_invite_link.cpython-311.pyc,, -aiogram/methods/__pycache__/create_chat_subscription_invite_link.cpython-311.pyc,, -aiogram/methods/__pycache__/create_forum_topic.cpython-311.pyc,, -aiogram/methods/__pycache__/create_invoice_link.cpython-311.pyc,, -aiogram/methods/__pycache__/create_new_sticker_set.cpython-311.pyc,, -aiogram/methods/__pycache__/decline_chat_join_request.cpython-311.pyc,, -aiogram/methods/__pycache__/delete_chat_photo.cpython-311.pyc,, -aiogram/methods/__pycache__/delete_chat_sticker_set.cpython-311.pyc,, -aiogram/methods/__pycache__/delete_forum_topic.cpython-311.pyc,, -aiogram/methods/__pycache__/delete_message.cpython-311.pyc,, -aiogram/methods/__pycache__/delete_messages.cpython-311.pyc,, -aiogram/methods/__pycache__/delete_my_commands.cpython-311.pyc,, -aiogram/methods/__pycache__/delete_sticker_from_set.cpython-311.pyc,, -aiogram/methods/__pycache__/delete_sticker_set.cpython-311.pyc,, -aiogram/methods/__pycache__/delete_webhook.cpython-311.pyc,, -aiogram/methods/__pycache__/edit_chat_invite_link.cpython-311.pyc,, -aiogram/methods/__pycache__/edit_chat_subscription_invite_link.cpython-311.pyc,, -aiogram/methods/__pycache__/edit_forum_topic.cpython-311.pyc,, -aiogram/methods/__pycache__/edit_general_forum_topic.cpython-311.pyc,, -aiogram/methods/__pycache__/edit_message_caption.cpython-311.pyc,, -aiogram/methods/__pycache__/edit_message_live_location.cpython-311.pyc,, -aiogram/methods/__pycache__/edit_message_media.cpython-311.pyc,, -aiogram/methods/__pycache__/edit_message_reply_markup.cpython-311.pyc,, -aiogram/methods/__pycache__/edit_message_text.cpython-311.pyc,, -aiogram/methods/__pycache__/export_chat_invite_link.cpython-311.pyc,, -aiogram/methods/__pycache__/forward_message.cpython-311.pyc,, -aiogram/methods/__pycache__/forward_messages.cpython-311.pyc,, -aiogram/methods/__pycache__/get_business_connection.cpython-311.pyc,, -aiogram/methods/__pycache__/get_chat.cpython-311.pyc,, -aiogram/methods/__pycache__/get_chat_administrators.cpython-311.pyc,, -aiogram/methods/__pycache__/get_chat_member.cpython-311.pyc,, -aiogram/methods/__pycache__/get_chat_member_count.cpython-311.pyc,, -aiogram/methods/__pycache__/get_chat_menu_button.cpython-311.pyc,, -aiogram/methods/__pycache__/get_custom_emoji_stickers.cpython-311.pyc,, -aiogram/methods/__pycache__/get_file.cpython-311.pyc,, -aiogram/methods/__pycache__/get_forum_topic_icon_stickers.cpython-311.pyc,, -aiogram/methods/__pycache__/get_game_high_scores.cpython-311.pyc,, -aiogram/methods/__pycache__/get_me.cpython-311.pyc,, -aiogram/methods/__pycache__/get_my_commands.cpython-311.pyc,, -aiogram/methods/__pycache__/get_my_default_administrator_rights.cpython-311.pyc,, -aiogram/methods/__pycache__/get_my_description.cpython-311.pyc,, -aiogram/methods/__pycache__/get_my_name.cpython-311.pyc,, -aiogram/methods/__pycache__/get_my_short_description.cpython-311.pyc,, -aiogram/methods/__pycache__/get_star_transactions.cpython-311.pyc,, -aiogram/methods/__pycache__/get_sticker_set.cpython-311.pyc,, -aiogram/methods/__pycache__/get_updates.cpython-311.pyc,, -aiogram/methods/__pycache__/get_user_chat_boosts.cpython-311.pyc,, -aiogram/methods/__pycache__/get_user_profile_photos.cpython-311.pyc,, -aiogram/methods/__pycache__/get_webhook_info.cpython-311.pyc,, -aiogram/methods/__pycache__/hide_general_forum_topic.cpython-311.pyc,, -aiogram/methods/__pycache__/leave_chat.cpython-311.pyc,, -aiogram/methods/__pycache__/log_out.cpython-311.pyc,, -aiogram/methods/__pycache__/pin_chat_message.cpython-311.pyc,, -aiogram/methods/__pycache__/promote_chat_member.cpython-311.pyc,, -aiogram/methods/__pycache__/refund_star_payment.cpython-311.pyc,, -aiogram/methods/__pycache__/reopen_forum_topic.cpython-311.pyc,, -aiogram/methods/__pycache__/reopen_general_forum_topic.cpython-311.pyc,, -aiogram/methods/__pycache__/replace_sticker_in_set.cpython-311.pyc,, -aiogram/methods/__pycache__/restrict_chat_member.cpython-311.pyc,, -aiogram/methods/__pycache__/revoke_chat_invite_link.cpython-311.pyc,, -aiogram/methods/__pycache__/send_animation.cpython-311.pyc,, -aiogram/methods/__pycache__/send_audio.cpython-311.pyc,, -aiogram/methods/__pycache__/send_chat_action.cpython-311.pyc,, -aiogram/methods/__pycache__/send_contact.cpython-311.pyc,, -aiogram/methods/__pycache__/send_dice.cpython-311.pyc,, -aiogram/methods/__pycache__/send_document.cpython-311.pyc,, -aiogram/methods/__pycache__/send_game.cpython-311.pyc,, -aiogram/methods/__pycache__/send_invoice.cpython-311.pyc,, -aiogram/methods/__pycache__/send_location.cpython-311.pyc,, -aiogram/methods/__pycache__/send_media_group.cpython-311.pyc,, -aiogram/methods/__pycache__/send_message.cpython-311.pyc,, -aiogram/methods/__pycache__/send_paid_media.cpython-311.pyc,, -aiogram/methods/__pycache__/send_photo.cpython-311.pyc,, -aiogram/methods/__pycache__/send_poll.cpython-311.pyc,, -aiogram/methods/__pycache__/send_sticker.cpython-311.pyc,, -aiogram/methods/__pycache__/send_venue.cpython-311.pyc,, -aiogram/methods/__pycache__/send_video.cpython-311.pyc,, -aiogram/methods/__pycache__/send_video_note.cpython-311.pyc,, -aiogram/methods/__pycache__/send_voice.cpython-311.pyc,, -aiogram/methods/__pycache__/set_chat_administrator_custom_title.cpython-311.pyc,, -aiogram/methods/__pycache__/set_chat_description.cpython-311.pyc,, -aiogram/methods/__pycache__/set_chat_menu_button.cpython-311.pyc,, -aiogram/methods/__pycache__/set_chat_permissions.cpython-311.pyc,, -aiogram/methods/__pycache__/set_chat_photo.cpython-311.pyc,, -aiogram/methods/__pycache__/set_chat_sticker_set.cpython-311.pyc,, -aiogram/methods/__pycache__/set_chat_title.cpython-311.pyc,, -aiogram/methods/__pycache__/set_custom_emoji_sticker_set_thumbnail.cpython-311.pyc,, -aiogram/methods/__pycache__/set_game_score.cpython-311.pyc,, -aiogram/methods/__pycache__/set_message_reaction.cpython-311.pyc,, -aiogram/methods/__pycache__/set_my_commands.cpython-311.pyc,, -aiogram/methods/__pycache__/set_my_default_administrator_rights.cpython-311.pyc,, -aiogram/methods/__pycache__/set_my_description.cpython-311.pyc,, -aiogram/methods/__pycache__/set_my_name.cpython-311.pyc,, -aiogram/methods/__pycache__/set_my_short_description.cpython-311.pyc,, -aiogram/methods/__pycache__/set_passport_data_errors.cpython-311.pyc,, -aiogram/methods/__pycache__/set_sticker_emoji_list.cpython-311.pyc,, -aiogram/methods/__pycache__/set_sticker_keywords.cpython-311.pyc,, -aiogram/methods/__pycache__/set_sticker_mask_position.cpython-311.pyc,, -aiogram/methods/__pycache__/set_sticker_position_in_set.cpython-311.pyc,, -aiogram/methods/__pycache__/set_sticker_set_thumbnail.cpython-311.pyc,, -aiogram/methods/__pycache__/set_sticker_set_title.cpython-311.pyc,, -aiogram/methods/__pycache__/set_webhook.cpython-311.pyc,, -aiogram/methods/__pycache__/stop_message_live_location.cpython-311.pyc,, -aiogram/methods/__pycache__/stop_poll.cpython-311.pyc,, -aiogram/methods/__pycache__/unban_chat_member.cpython-311.pyc,, -aiogram/methods/__pycache__/unban_chat_sender_chat.cpython-311.pyc,, -aiogram/methods/__pycache__/unhide_general_forum_topic.cpython-311.pyc,, -aiogram/methods/__pycache__/unpin_all_chat_messages.cpython-311.pyc,, -aiogram/methods/__pycache__/unpin_all_forum_topic_messages.cpython-311.pyc,, -aiogram/methods/__pycache__/unpin_all_general_forum_topic_messages.cpython-311.pyc,, -aiogram/methods/__pycache__/unpin_chat_message.cpython-311.pyc,, -aiogram/methods/__pycache__/upload_sticker_file.cpython-311.pyc,, -aiogram/methods/add_sticker_to_set.py,sha256=PR2B-SDNNYLaH70oevadRNAoiUjFQXLffGSIhQ7uah4,1443 -aiogram/methods/answer_callback_query.py,sha256=YVozC3bMDE8YoH6x5TipzWiXCwdWLAU96GWOJTxf1AE,2903 -aiogram/methods/answer_inline_query.py,sha256=039jip6Ty3cdvEuYbfougTO-DZIzi1f5hisl6yRg8qw,6017 -aiogram/methods/answer_pre_checkout_query.py,sha256=5peOULN2DO0VoK3nEAnsN-E9RWAH5ab64UUc-4apRHk,2172 -aiogram/methods/answer_shipping_query.py,sha256=oiq-B_Go-J_sRalwvgyFjUUZDEF1MX5IGNKV6khU0N8,2254 -aiogram/methods/answer_web_app_query.py,sha256=AXM-hDf_xIarwburmGT27ZoKFoGsbcVbPNM_EHUHKVo,3676 -aiogram/methods/approve_chat_join_request.py,sha256=KUetMV7jHSB9_v702JlSI-CVlJMHUCNstvjUC0GU3i4,1281 -aiogram/methods/ban_chat_member.py,sha256=hfHkT_Ucg-26oVtvRQwGvijDMn7uaV84agEY7vIEp-E,2481 -aiogram/methods/ban_chat_sender_chat.py,sha256=rr77ixJufnD9bWevxTaSHCcJVh3lIf19JGLEctMMm7A,1569 -aiogram/methods/base.py,sha256=VH-3rKUGvNYoiQ9Tw78FujrzlJLs9smBhmI8ejx3-2Y,2734 -aiogram/methods/close.py,sha256=Bnzle__tO6tCMMLHkN1E00ypkrdQ0RjhkBNxhjDOq3k,593 -aiogram/methods/close_forum_topic.py,sha256=njPMjFb7CkLYbjEuNWPrSDh2HSpqlmO76B9Xs_Xahco,1475 -aiogram/methods/close_general_forum_topic.py,sha256=lLWx-ZgE4eV15D2yLXg1wWVECfcN7_1y2XA5vqr1d84,1223 -aiogram/methods/copy_message.py,sha256=jvPiwstYa8Lt0XNeI15_HyrwAvnPdgmi0KJZI3GuXOs,6109 -aiogram/methods/copy_messages.py,sha256=PbxTovACFr7NM8Te3iN2tq7VLLKvxGDzr_Gp8hrjukA,3293 -aiogram/methods/create_chat_invite_link.py,sha256=Snalw6e_zk5g5FI2wKB4Pr0qbGS1PbjIcq7567RC5YE,2545 -aiogram/methods/create_chat_subscription_invite_link.py,sha256=ulylrmNJXJa7hipKx7j_2wOeZSVgufPaW2h5JFO2OIw,2508 -aiogram/methods/create_forum_topic.py,sha256=FuJ8R-jkpfk7hPKe6pffiUQE21Hhh22G7cFMCFe5kok,2188 -aiogram/methods/create_invoice_link.py,sha256=PsgrJvP9W55DuTBmGut1puRNYQOuE6xvRHmblwv64lM,6655 -aiogram/methods/create_new_sticker_set.py,sha256=0LwiOVBGTo-sJLOd76Au3_G2-d6YtqFHfju6TU0A2vw,2928 -aiogram/methods/decline_chat_join_request.py,sha256=19Sj8OHe6erv3_E4p-Sw_y8XygNYOWrPI5S23CU5P1w,1281 -aiogram/methods/delete_chat_photo.py,sha256=0nrFbxWyO7R0pVMAWook7VRXAIU-AeEr_wpiFvyLssQ,1194 -aiogram/methods/delete_chat_sticker_set.py,sha256=KaRyvzLt1ystCbkptimtxqUM_4_RzpI7Sl91heSVlKc,1348 -aiogram/methods/delete_forum_topic.py,sha256=LrncMipGRW2Be4bYFzSYMjydvRijmPU5Owtmb61e374,1470 -aiogram/methods/delete_message.py,sha256=wCMd8oHwYETY1Nk2vP4DYhu-sdrm-LqhQBKPAgQQhSY,1956 -aiogram/methods/delete_messages.py,sha256=Hp9tfOVK4T9y3SuAAlfLo58_58CP83JWfpLnN3jkbiM,1401 -aiogram/methods/delete_my_commands.py,sha256=LiYVWXeqBxs_hUbq6pQ1h3zSKUyzw7ahdaXb1esAH8Q,2608 -aiogram/methods/delete_sticker_from_set.py,sha256=J2PsBRRTBks5TDlp4mlmubem7MSWKh8jzJMmLJQV9CI,944 -aiogram/methods/delete_sticker_set.py,sha256=csUT6RkdqmOy0K7vT2QXXR_YJfpQ78S31WYttFqEPY8,908 -aiogram/methods/delete_webhook.py,sha256=7kfmOOSlujfXV5JZEozbuQQzNrX5YV0f6nMvUo5aw_k,1155 -aiogram/methods/edit_chat_invite_link.py,sha256=N2RqH2DHbRK-zF97jtHlhMV2YykBgHgpqw_iDz8KQRw,2564 -aiogram/methods/edit_chat_subscription_invite_link.py,sha256=AvDlMClqa00KJnf4sXZkdOYGBErGtuwLMeHEM0AND5E,1610 -aiogram/methods/edit_forum_topic.py,sha256=hELFkBuB_6I3_y2xencOolPXPUjEK3xXCgfzC4lAuCA,2195 -aiogram/methods/edit_general_forum_topic.py,sha256=PK37qgJRVISQWhYAWlg3LNGmgneVdQxpJCa1dMiq_uY,1306 -aiogram/methods/edit_message_caption.py,sha256=wv-USNcfyHIjskv6PaSQAABE9yDK8lr9lgDS5yBfiVM,3995 -aiogram/methods/edit_message_live_location.py,sha256=akOy16TytMIR1ONYR8lu8W48HplUl9ugqW-tttrn2Zk,4205 -aiogram/methods/edit_message_media.py,sha256=fjDjBVQ6jbHoSDsxX3_19Q_TF-WzACaItS4gfdKtGuw,3529 -aiogram/methods/edit_message_reply_markup.py,sha256=H5elelToPCzLoOsGDDfOa7nXRQ10AMhxP13quMGRt1k,2658 -aiogram/methods/edit_message_text.py,sha256=IQPTgqWDn-xK5L7hjJ3FOhJqe8DJC9uRnnVWE-gmWcs,4345 -aiogram/methods/export_chat_invite_link.py,sha256=oC00_UAsmJ7icNtjmnCbQ9sYyJLoOujNJsLIRMyx9qg,1792 -aiogram/methods/forward_message.py,sha256=KM6v9CrqMnwC0YLgiIEVxTFBUmb5GhFfAMycrxY0IJ4,2655 -aiogram/methods/forward_messages.py,sha256=BIUEDoLp8jD5YglFN2pbHp6FtuhMFMB1VCSzMPhtOPs,2774 -aiogram/methods/get_business_connection.py,sha256=wJhKMcBoLcOXTxK1_xG8SR2h85e1sW1C4sWD6L6bTTM,1200 -aiogram/methods/get_chat.py,sha256=yOPjLV12HVZOk6ch2bUOfyrZBPIhyAXhhHEhiZKEdro,1145 -aiogram/methods/get_chat_administrators.py,sha256=uxzQWmNc0EJRJ-c0ecJmjLPWDOwlMD1KWDiOAnqofxs,1815 -aiogram/methods/get_chat_member.py,sha256=pltcJQL_aSljObA_XAVa9chzyC5saahC-jCA85U0Z_E,1857 -aiogram/methods/get_chat_member_count.py,sha256=phZ05LJUn3EAXBuH_7HqMFOuTg99nyVNjNEVWry1sto,1067 -aiogram/methods/get_chat_menu_button.py,sha256=Ko5U5PMvTP08x8SkCUddFASaGr-LbtP_4GhvbM-TP7c,1362 -aiogram/methods/get_custom_emoji_stickers.py,sha256=ob0rvnUFtuDlZ6GmNHlFZH2hNZNITf2k0mjBBvmeNY0,1201 -aiogram/methods/get_file.py,sha256=FutkpYaOz_xjdU_1FwGY75ZYZ-uqBCZapZBiE5K9sC0,1571 -aiogram/methods/get_forum_topic_icon_stickers.py,sha256=TUAX41OPjlluu3zxI-_lYCzBHzX-Wa_Fgde727H4llg,557 -aiogram/methods/get_game_high_scores.py,sha256=IhEZ81rRGOh_pkq54qGys0RGoywhTG7I5UdYikoVS8A,2156 -aiogram/methods/get_me.py,sha256=gA4vD-v3WYPpZaSTy6mpGZmsV5WXdSHv06EymV9ZQnU,439 -aiogram/methods/get_my_commands.py,sha256=67G3OlYrwZAnQZM8D2nQwNwEhPB1siDqOvMkc9saSgo,2464 -aiogram/methods/get_my_default_administrator_rights.py,sha256=dw1MnQACVfVsQeYs5ikZG1jThB15HR8Trv1xHg_oSLY,1359 -aiogram/methods/get_my_description.py,sha256=UzgJhr6sl4i4RD9LIYxvTx4z4V3cZMGQavCFucWwv1I,1156 -aiogram/methods/get_my_name.py,sha256=GGY2ZnZ_uXL5GqRKHJ2uXs5v_LUBqg6yx0NdrBLZoy8,1057 -aiogram/methods/get_my_short_description.py,sha256=yRQ0ertSdcbEy32FC07FAo12q7eyLEN04h0gkxzpmGE,1203 -aiogram/methods/get_star_transactions.py,sha256=kCp-vAuYCbogKN6PQ4_ulx4ByBatWbMwuXUTsMib22M,1374 -aiogram/methods/get_sticker_set.py,sha256=oh9jEInEgKDfOhAu58ex4rUYRCJCk-BTsOAvNa7GPMg,965 -aiogram/methods/get_updates.py,sha256=dMl44T18fGWKDG2ZK-GQ2OJu7PIYe3GJ93IzX26LXqs,3024 -aiogram/methods/get_user_chat_boosts.py,sha256=2HYUsuZMxrP-YdZO7S4rX0QItzjUN8H01mmwvm2SSkc,1255 -aiogram/methods/get_user_profile_photos.py,sha256=URseFqr69kRj4-gqNkSl4TsiEaAK78iAyjYrTv4tCpA,1507 -aiogram/methods/get_webhook_info.py,sha256=8h38GW1au2fAZau2qmXuOnmu-H6kIjXQEms3VKLJf5c,576 -aiogram/methods/hide_general_forum_topic.py,sha256=dKPkMB4okbduRG9K-Mah5hf6OsKzGg8NrtnTQdcVu78,1270 -aiogram/methods/leave_chat.py,sha256=m3F4mKwOmJaxk958rbBZqGIRcM7007JMce1S2zpEvPY,1063 -aiogram/methods/log_out.py,sha256=yBkCbabI7CRBkTHwhJ61KmqazMxiUuGRMhxlzl7BWB4,660 -aiogram/methods/pin_chat_message.py,sha256=njAbF_yEAZobt9b-0CqxblQpJ2M-jAgZHDpKdw_THAI,2143 -aiogram/methods/promote_chat_member.py,sha256=BDT9L1MIVTwWrmph-HUe0Rh7kKMPQt4bkMkICPiDfgE,5568 -aiogram/methods/refund_star_payment.py,sha256=s-eELWhpYoE8ubWNvlYc0dmPGCcBiATS0fU50IXXZ5g,1264 -aiogram/methods/reopen_forum_topic.py,sha256=TfJtX4zGVNYjjhivHRwBFV9sbWINhr8k_q5lXoLtITw,1480 -aiogram/methods/reopen_general_forum_topic.py,sha256=kxJtoOauJNWYxqesoT6qeDvXAJujUZvK-3QO5lnFEw8,1287 -aiogram/methods/replace_sticker_in_set.py,sha256=df80oQuwZsYrbmUixIPxtQ75iUqIMZXsiIyoMZHious,1858 -aiogram/methods/restrict_chat_member.py,sha256=KFAtkHVDqA4Ny4quy1jCnqH1mxf_5kSo8kDlA_ben4Q,2751 -aiogram/methods/revoke_chat_invite_link.py,sha256=RrIN4jcxTHaoThF0Dru3d4z7RGEQk0u0cTkNx13Do-s,1526 -aiogram/methods/send_animation.py,sha256=axQu7PxIUqpMtxCJH-7-5aUxzTl1UnUexDMkXXzRK3c,7678 -aiogram/methods/send_audio.py,sha256=6SrnsKd4smXuDLR3PfpgV9gf2TXBb42GtBxJGt6jeBY,7134 -aiogram/methods/send_chat_action.py,sha256=sOrGWv2bA9Przot-gPT1ksZ8UEhPpJeEsd7tPd-06gg,3187 -aiogram/methods/send_contact.py,sha256=zyup2lC1OQ94IXs1yW0Or4j8SaAqUe_a_AVTIE1rlJs,5053 -aiogram/methods/send_dice.py,sha256=v4j0-lETnu_rjj8oD3KdvOwMUh_IkXXcnWJW7jZmg-E,4823 -aiogram/methods/send_document.py,sha256=-ANAOHscFJhk3Y0LfmvAO_1_u3BUhEdBQ3YYafc5u64,6886 -aiogram/methods/send_game.py,sha256=gtcKxuwixa1N3JXOY8bLqCuvQ30QYrhi89VChwRTDmU,4243 -aiogram/methods/send_invoice.py,sha256=grSq2uQhWGWI4VLTCVBsuzbkrnrOkLAlBALUb8NLmbE,10135 -aiogram/methods/send_location.py,sha256=52UX5uvJBNfA80CEdmSEPTAmymurXXkYeEPXNitaY38,5851 -aiogram/methods/send_media_group.py,sha256=C67CTZUPPgqrDLGwP1mxzREridLXhBMpVKyfzL2wS-c,4430 -aiogram/methods/send_message.py,sha256=pMW81tP9p21i6iMo_KWYBhgy_uM2k_oa1_7kLQ81HN4,6112 -aiogram/methods/send_paid_media.py,sha256=Wf66l54kgMqWGTfMioVe0xdS-P3x2NQ4MpZkcHfson0,4658 -aiogram/methods/send_photo.py,sha256=2mN1S3ppYKaTzs6omllqGEZiRbd7Hx3XD5V1fxiOdwo,6492 -aiogram/methods/send_poll.py,sha256=_ATWrR7o6OeI8bllk83HRsG24-8w7TQzif3qpxFxYrs,8387 -aiogram/methods/send_sticker.py,sha256=mfqQAqLimwwNMhWwqokA7SQoNV17z1_cO-SiBBZFHAU,5284 -aiogram/methods/send_venue.py,sha256=rYIxNQbd_fZJybWLcFS4OmbE2EYvKrReqQyegMpNoxo,5820 -aiogram/methods/send_video.py,sha256=LfebSy4ucxxQi-euGGfTpXfLjWfn_AcCN7NkUh76tbk,7894 -aiogram/methods/send_video_note.py,sha256=dAXiWtv1hngrGQONybstfrC_Q29po0BpKHuVzGKx9I4,6038 -aiogram/methods/send_voice.py,sha256=Dk-oqbTfs_ZAHLpAyFgDlKd2sU0IVc8-8JAitlVNKRA,6282 -aiogram/methods/set_chat_administrator_custom_title.py,sha256=lOizk5Z8-tUh6EOiZ2hRyVSUrP2qQzDHlcKIbJCKgSg,1490 -aiogram/methods/set_chat_description.py,sha256=AvzTU_XRaTuI9s9iKX_hihCLpsH4F8du3dBQ-wrNZnU,1407 -aiogram/methods/set_chat_menu_button.py,sha256=5y8sOvgs6cH4sWBa_NuBnsRH7sE8ch0_s4YygG1PbZY,1622 -aiogram/methods/set_chat_permissions.py,sha256=x42Gmf910ycY0Nf5lCnM1Xe6z5bhjNqUMHA673X1J_A,2159 -aiogram/methods/set_chat_photo.py,sha256=kHjTl8U-i5B03KaFIEKxQnT8Sgl8CAa_F9kQeFUW_9M,1394 -aiogram/methods/set_chat_sticker_set.py,sha256=RFNtIcj8Lq8It6L6qoJLCk247RYVgGROdJM5UoF0HSQ,1571 -aiogram/methods/set_chat_title.py,sha256=X21F3pX37t3z13-4o6WJfQHKVfLPr8c_HGO-vNqI3k0,1275 -aiogram/methods/set_custom_emoji_sticker_set_thumbnail.py,sha256=E8zURRFNnJnjzxVnYchBta807eCrarjMzpKWp0R5Ypg,1309 -aiogram/methods/set_game_score.py,sha256=RDiYH61W1aN6WZoRLKI_vDQJz8-7V1I8tP__UbZLw1s,2626 -aiogram/methods/set_message_reaction.py,sha256=bEK822WDw3OqvO99WU3IV543yYI7tWpA-mIJVgv2rGg,2457 -aiogram/methods/set_my_commands.py,sha256=sjd1da-uPfDIH0OGTpuyZzBl8ARwbWPiMoAHenQc530,2803 -aiogram/methods/set_my_default_administrator_rights.py,sha256=DKX3KXLXbfv-heE5uJfPbcFXQRvNG6ps3ih1bQNa5RY,1750 -aiogram/methods/set_my_description.py,sha256=ww9IAjtC4X6Ti9cFlnE3dleZ_FKE6byjblGUYn2EqwI,1489 -aiogram/methods/set_my_name.py,sha256=xqSgEYS3Rgr2ETQlvBuD_VopBsuDX_DZY_MnbsOoJgs,1274 -aiogram/methods/set_my_short_description.py,sha256=ONiD6HfZxxnHRjPstEmuBqedjQVjZ-lSJPY14sTRPyc,1639 -aiogram/methods/set_passport_data_errors.py,sha256=Z4SjM_CHHzXw_SQ5TsIFXvsrI5GTrgx0xO0kKrtnE7c,2922 -aiogram/methods/set_sticker_emoji_list.py,sha256=rgUpD35X_QHAJmIbdgRBsXtF4p-wQcuRFFYmNBjDPpo,1201 -aiogram/methods/set_sticker_keywords.py,sha256=usS8uLY4YghFWwNyJnpG9C5X9eRQ1PzGWfIxSKhPTOg,1320 -aiogram/methods/set_sticker_mask_position.py,sha256=eoT5D9VmWuRNsUqyzrHlYWd_bVaK583o3hP_KsoevaI,1450 -aiogram/methods/set_sticker_position_in_set.py,sha256=QJI3x-tobyjpFoEThjcqGQLjXWdCZTd59ei49Gi2Mcg,1100 -aiogram/methods/set_sticker_set_thumbnail.py,sha256=l6hozWYpPQI-Y-QI2YxyXopG8ZXzGme-q2vdl4SUJvk,2891 -aiogram/methods/set_sticker_set_title.py,sha256=kf1H5K3capHR5wlu91DXmP6Q1G_TG_AEJeivppuM-58,1011 -aiogram/methods/set_webhook.py,sha256=5mPLVBDfSDbw2BEsSThw6wfErFTta_55UtyisYA4o1k,4476 -aiogram/methods/stop_message_live_location.py,sha256=ZvsRZ_qADXt3Oxxk8-6nvOAHT5b-yL2v4isAxNChE7M,2539 -aiogram/methods/stop_poll.py,sha256=xs5Bhzdwrny9CueVr1qfe6lOWjPqKoS8te9PYvpTZs4,1933 -aiogram/methods/unban_chat_member.py,sha256=kCOiIN03O3RZG4esxneAnt87-iC24TKqW4FeAOcBPCY,1919 -aiogram/methods/unban_chat_sender_chat.py,sha256=JwiCTYpl797vXH1iKEmHdvngNgmN3N5MzTM6Bd5QI3o,1376 -aiogram/methods/unhide_general_forum_topic.py,sha256=vDxVKNhnBifPmhBxDtIgEGq9DLw5U0E-HUPoIVOEL_I,1223 -aiogram/methods/unpin_all_chat_messages.py,sha256=1eYhMh4IsLV4x94XEC7oJkkFeiwe1LSpr_sj2ywyvUY,1303 -aiogram/methods/unpin_all_forum_topic_messages.py,sha256=RDUz0D8kSuayzY0DU0DVo6ez2dUH8VdqBmTSthCECCc,1489 -aiogram/methods/unpin_all_general_forum_topic_messages.py,sha256=O_PhZuwarHW9I2iFIHggOqgc7QfXtF1GEqZYweOH5PA,1248 -aiogram/methods/unpin_chat_message.py,sha256=9iiJcGt8sU1vYKKeMGpk7KgMvTXnLysywExpsjWckgs,1978 -aiogram/methods/upload_sticker_file.py,sha256=TgGArcP8fVpAOM7GRmpbk7GO3sKn2PfBEV--WOo0NKo,1951 -aiogram/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 -aiogram/types/__init__.py,sha256=YUQNYA592qPfHdhV_Lv90St1aCXLaMYyzOm-QQhLcNw,18420 -aiogram/types/__pycache__/__init__.cpython-311.pyc,, -aiogram/types/__pycache__/animation.cpython-311.pyc,, -aiogram/types/__pycache__/audio.cpython-311.pyc,, -aiogram/types/__pycache__/background_fill.cpython-311.pyc,, -aiogram/types/__pycache__/background_fill_freeform_gradient.cpython-311.pyc,, -aiogram/types/__pycache__/background_fill_gradient.cpython-311.pyc,, -aiogram/types/__pycache__/background_fill_solid.cpython-311.pyc,, -aiogram/types/__pycache__/background_type.cpython-311.pyc,, -aiogram/types/__pycache__/background_type_chat_theme.cpython-311.pyc,, -aiogram/types/__pycache__/background_type_fill.cpython-311.pyc,, -aiogram/types/__pycache__/background_type_pattern.cpython-311.pyc,, -aiogram/types/__pycache__/background_type_wallpaper.cpython-311.pyc,, -aiogram/types/__pycache__/base.cpython-311.pyc,, -aiogram/types/__pycache__/birthdate.cpython-311.pyc,, -aiogram/types/__pycache__/bot_command.cpython-311.pyc,, -aiogram/types/__pycache__/bot_command_scope.cpython-311.pyc,, -aiogram/types/__pycache__/bot_command_scope_all_chat_administrators.cpython-311.pyc,, -aiogram/types/__pycache__/bot_command_scope_all_group_chats.cpython-311.pyc,, -aiogram/types/__pycache__/bot_command_scope_all_private_chats.cpython-311.pyc,, -aiogram/types/__pycache__/bot_command_scope_chat.cpython-311.pyc,, -aiogram/types/__pycache__/bot_command_scope_chat_administrators.cpython-311.pyc,, -aiogram/types/__pycache__/bot_command_scope_chat_member.cpython-311.pyc,, -aiogram/types/__pycache__/bot_command_scope_default.cpython-311.pyc,, -aiogram/types/__pycache__/bot_description.cpython-311.pyc,, -aiogram/types/__pycache__/bot_name.cpython-311.pyc,, -aiogram/types/__pycache__/bot_short_description.cpython-311.pyc,, -aiogram/types/__pycache__/business_connection.cpython-311.pyc,, -aiogram/types/__pycache__/business_intro.cpython-311.pyc,, -aiogram/types/__pycache__/business_location.cpython-311.pyc,, -aiogram/types/__pycache__/business_messages_deleted.cpython-311.pyc,, -aiogram/types/__pycache__/business_opening_hours.cpython-311.pyc,, -aiogram/types/__pycache__/business_opening_hours_interval.cpython-311.pyc,, -aiogram/types/__pycache__/callback_game.cpython-311.pyc,, -aiogram/types/__pycache__/callback_query.cpython-311.pyc,, -aiogram/types/__pycache__/chat.cpython-311.pyc,, -aiogram/types/__pycache__/chat_administrator_rights.cpython-311.pyc,, -aiogram/types/__pycache__/chat_background.cpython-311.pyc,, -aiogram/types/__pycache__/chat_boost.cpython-311.pyc,, -aiogram/types/__pycache__/chat_boost_added.cpython-311.pyc,, -aiogram/types/__pycache__/chat_boost_removed.cpython-311.pyc,, -aiogram/types/__pycache__/chat_boost_source.cpython-311.pyc,, -aiogram/types/__pycache__/chat_boost_source_gift_code.cpython-311.pyc,, -aiogram/types/__pycache__/chat_boost_source_giveaway.cpython-311.pyc,, -aiogram/types/__pycache__/chat_boost_source_premium.cpython-311.pyc,, -aiogram/types/__pycache__/chat_boost_updated.cpython-311.pyc,, -aiogram/types/__pycache__/chat_full_info.cpython-311.pyc,, -aiogram/types/__pycache__/chat_invite_link.cpython-311.pyc,, -aiogram/types/__pycache__/chat_join_request.cpython-311.pyc,, -aiogram/types/__pycache__/chat_location.cpython-311.pyc,, -aiogram/types/__pycache__/chat_member.cpython-311.pyc,, -aiogram/types/__pycache__/chat_member_administrator.cpython-311.pyc,, -aiogram/types/__pycache__/chat_member_banned.cpython-311.pyc,, -aiogram/types/__pycache__/chat_member_left.cpython-311.pyc,, -aiogram/types/__pycache__/chat_member_member.cpython-311.pyc,, -aiogram/types/__pycache__/chat_member_owner.cpython-311.pyc,, -aiogram/types/__pycache__/chat_member_restricted.cpython-311.pyc,, -aiogram/types/__pycache__/chat_member_updated.cpython-311.pyc,, -aiogram/types/__pycache__/chat_permissions.cpython-311.pyc,, -aiogram/types/__pycache__/chat_photo.cpython-311.pyc,, -aiogram/types/__pycache__/chat_shared.cpython-311.pyc,, -aiogram/types/__pycache__/chosen_inline_result.cpython-311.pyc,, -aiogram/types/__pycache__/contact.cpython-311.pyc,, -aiogram/types/__pycache__/custom.cpython-311.pyc,, -aiogram/types/__pycache__/dice.cpython-311.pyc,, -aiogram/types/__pycache__/document.cpython-311.pyc,, -aiogram/types/__pycache__/downloadable.cpython-311.pyc,, -aiogram/types/__pycache__/encrypted_credentials.cpython-311.pyc,, -aiogram/types/__pycache__/encrypted_passport_element.cpython-311.pyc,, -aiogram/types/__pycache__/error_event.cpython-311.pyc,, -aiogram/types/__pycache__/external_reply_info.cpython-311.pyc,, -aiogram/types/__pycache__/file.cpython-311.pyc,, -aiogram/types/__pycache__/force_reply.cpython-311.pyc,, -aiogram/types/__pycache__/forum_topic.cpython-311.pyc,, -aiogram/types/__pycache__/forum_topic_closed.cpython-311.pyc,, -aiogram/types/__pycache__/forum_topic_created.cpython-311.pyc,, -aiogram/types/__pycache__/forum_topic_edited.cpython-311.pyc,, -aiogram/types/__pycache__/forum_topic_reopened.cpython-311.pyc,, -aiogram/types/__pycache__/game.cpython-311.pyc,, -aiogram/types/__pycache__/game_high_score.cpython-311.pyc,, -aiogram/types/__pycache__/general_forum_topic_hidden.cpython-311.pyc,, -aiogram/types/__pycache__/general_forum_topic_unhidden.cpython-311.pyc,, -aiogram/types/__pycache__/giveaway.cpython-311.pyc,, -aiogram/types/__pycache__/giveaway_completed.cpython-311.pyc,, -aiogram/types/__pycache__/giveaway_created.cpython-311.pyc,, -aiogram/types/__pycache__/giveaway_winners.cpython-311.pyc,, -aiogram/types/__pycache__/inaccessible_message.cpython-311.pyc,, -aiogram/types/__pycache__/inline_keyboard_button.cpython-311.pyc,, -aiogram/types/__pycache__/inline_keyboard_markup.cpython-311.pyc,, -aiogram/types/__pycache__/inline_query.cpython-311.pyc,, -aiogram/types/__pycache__/inline_query_result.cpython-311.pyc,, -aiogram/types/__pycache__/inline_query_result_article.cpython-311.pyc,, -aiogram/types/__pycache__/inline_query_result_audio.cpython-311.pyc,, -aiogram/types/__pycache__/inline_query_result_cached_audio.cpython-311.pyc,, -aiogram/types/__pycache__/inline_query_result_cached_document.cpython-311.pyc,, -aiogram/types/__pycache__/inline_query_result_cached_gif.cpython-311.pyc,, -aiogram/types/__pycache__/inline_query_result_cached_mpeg4_gif.cpython-311.pyc,, -aiogram/types/__pycache__/inline_query_result_cached_photo.cpython-311.pyc,, -aiogram/types/__pycache__/inline_query_result_cached_sticker.cpython-311.pyc,, -aiogram/types/__pycache__/inline_query_result_cached_video.cpython-311.pyc,, -aiogram/types/__pycache__/inline_query_result_cached_voice.cpython-311.pyc,, -aiogram/types/__pycache__/inline_query_result_contact.cpython-311.pyc,, -aiogram/types/__pycache__/inline_query_result_document.cpython-311.pyc,, -aiogram/types/__pycache__/inline_query_result_game.cpython-311.pyc,, -aiogram/types/__pycache__/inline_query_result_gif.cpython-311.pyc,, -aiogram/types/__pycache__/inline_query_result_location.cpython-311.pyc,, -aiogram/types/__pycache__/inline_query_result_mpeg4_gif.cpython-311.pyc,, -aiogram/types/__pycache__/inline_query_result_photo.cpython-311.pyc,, -aiogram/types/__pycache__/inline_query_result_venue.cpython-311.pyc,, -aiogram/types/__pycache__/inline_query_result_video.cpython-311.pyc,, -aiogram/types/__pycache__/inline_query_result_voice.cpython-311.pyc,, -aiogram/types/__pycache__/inline_query_results_button.cpython-311.pyc,, -aiogram/types/__pycache__/input_contact_message_content.cpython-311.pyc,, -aiogram/types/__pycache__/input_file.cpython-311.pyc,, -aiogram/types/__pycache__/input_invoice_message_content.cpython-311.pyc,, -aiogram/types/__pycache__/input_location_message_content.cpython-311.pyc,, -aiogram/types/__pycache__/input_media.cpython-311.pyc,, -aiogram/types/__pycache__/input_media_animation.cpython-311.pyc,, -aiogram/types/__pycache__/input_media_audio.cpython-311.pyc,, -aiogram/types/__pycache__/input_media_document.cpython-311.pyc,, -aiogram/types/__pycache__/input_media_photo.cpython-311.pyc,, -aiogram/types/__pycache__/input_media_video.cpython-311.pyc,, -aiogram/types/__pycache__/input_message_content.cpython-311.pyc,, -aiogram/types/__pycache__/input_paid_media.cpython-311.pyc,, -aiogram/types/__pycache__/input_paid_media_photo.cpython-311.pyc,, -aiogram/types/__pycache__/input_paid_media_video.cpython-311.pyc,, -aiogram/types/__pycache__/input_poll_option.cpython-311.pyc,, -aiogram/types/__pycache__/input_sticker.cpython-311.pyc,, -aiogram/types/__pycache__/input_text_message_content.cpython-311.pyc,, -aiogram/types/__pycache__/input_venue_message_content.cpython-311.pyc,, -aiogram/types/__pycache__/invoice.cpython-311.pyc,, -aiogram/types/__pycache__/keyboard_button.cpython-311.pyc,, -aiogram/types/__pycache__/keyboard_button_poll_type.cpython-311.pyc,, -aiogram/types/__pycache__/keyboard_button_request_chat.cpython-311.pyc,, -aiogram/types/__pycache__/keyboard_button_request_user.cpython-311.pyc,, -aiogram/types/__pycache__/keyboard_button_request_users.cpython-311.pyc,, -aiogram/types/__pycache__/labeled_price.cpython-311.pyc,, -aiogram/types/__pycache__/link_preview_options.cpython-311.pyc,, -aiogram/types/__pycache__/location.cpython-311.pyc,, -aiogram/types/__pycache__/login_url.cpython-311.pyc,, -aiogram/types/__pycache__/mask_position.cpython-311.pyc,, -aiogram/types/__pycache__/maybe_inaccessible_message.cpython-311.pyc,, -aiogram/types/__pycache__/menu_button.cpython-311.pyc,, -aiogram/types/__pycache__/menu_button_commands.cpython-311.pyc,, -aiogram/types/__pycache__/menu_button_default.cpython-311.pyc,, -aiogram/types/__pycache__/menu_button_web_app.cpython-311.pyc,, -aiogram/types/__pycache__/message.cpython-311.pyc,, -aiogram/types/__pycache__/message_auto_delete_timer_changed.cpython-311.pyc,, -aiogram/types/__pycache__/message_entity.cpython-311.pyc,, -aiogram/types/__pycache__/message_id.cpython-311.pyc,, -aiogram/types/__pycache__/message_origin.cpython-311.pyc,, -aiogram/types/__pycache__/message_origin_channel.cpython-311.pyc,, -aiogram/types/__pycache__/message_origin_chat.cpython-311.pyc,, -aiogram/types/__pycache__/message_origin_hidden_user.cpython-311.pyc,, -aiogram/types/__pycache__/message_origin_user.cpython-311.pyc,, -aiogram/types/__pycache__/message_reaction_count_updated.cpython-311.pyc,, -aiogram/types/__pycache__/message_reaction_updated.cpython-311.pyc,, -aiogram/types/__pycache__/order_info.cpython-311.pyc,, -aiogram/types/__pycache__/paid_media.cpython-311.pyc,, -aiogram/types/__pycache__/paid_media_info.cpython-311.pyc,, -aiogram/types/__pycache__/paid_media_photo.cpython-311.pyc,, -aiogram/types/__pycache__/paid_media_preview.cpython-311.pyc,, -aiogram/types/__pycache__/paid_media_video.cpython-311.pyc,, -aiogram/types/__pycache__/passport_data.cpython-311.pyc,, -aiogram/types/__pycache__/passport_element_error.cpython-311.pyc,, -aiogram/types/__pycache__/passport_element_error_data_field.cpython-311.pyc,, -aiogram/types/__pycache__/passport_element_error_file.cpython-311.pyc,, -aiogram/types/__pycache__/passport_element_error_files.cpython-311.pyc,, -aiogram/types/__pycache__/passport_element_error_front_side.cpython-311.pyc,, -aiogram/types/__pycache__/passport_element_error_reverse_side.cpython-311.pyc,, -aiogram/types/__pycache__/passport_element_error_selfie.cpython-311.pyc,, -aiogram/types/__pycache__/passport_element_error_translation_file.cpython-311.pyc,, -aiogram/types/__pycache__/passport_element_error_translation_files.cpython-311.pyc,, -aiogram/types/__pycache__/passport_element_error_unspecified.cpython-311.pyc,, -aiogram/types/__pycache__/passport_file.cpython-311.pyc,, -aiogram/types/__pycache__/photo_size.cpython-311.pyc,, -aiogram/types/__pycache__/poll.cpython-311.pyc,, -aiogram/types/__pycache__/poll_answer.cpython-311.pyc,, -aiogram/types/__pycache__/poll_option.cpython-311.pyc,, -aiogram/types/__pycache__/pre_checkout_query.cpython-311.pyc,, -aiogram/types/__pycache__/proximity_alert_triggered.cpython-311.pyc,, -aiogram/types/__pycache__/reaction_count.cpython-311.pyc,, -aiogram/types/__pycache__/reaction_type.cpython-311.pyc,, -aiogram/types/__pycache__/reaction_type_custom_emoji.cpython-311.pyc,, -aiogram/types/__pycache__/reaction_type_emoji.cpython-311.pyc,, -aiogram/types/__pycache__/reaction_type_paid.cpython-311.pyc,, -aiogram/types/__pycache__/refunded_payment.cpython-311.pyc,, -aiogram/types/__pycache__/reply_keyboard_markup.cpython-311.pyc,, -aiogram/types/__pycache__/reply_keyboard_remove.cpython-311.pyc,, -aiogram/types/__pycache__/reply_parameters.cpython-311.pyc,, -aiogram/types/__pycache__/response_parameters.cpython-311.pyc,, -aiogram/types/__pycache__/revenue_withdrawal_state.cpython-311.pyc,, -aiogram/types/__pycache__/revenue_withdrawal_state_failed.cpython-311.pyc,, -aiogram/types/__pycache__/revenue_withdrawal_state_pending.cpython-311.pyc,, -aiogram/types/__pycache__/revenue_withdrawal_state_succeeded.cpython-311.pyc,, -aiogram/types/__pycache__/sent_web_app_message.cpython-311.pyc,, -aiogram/types/__pycache__/shared_user.cpython-311.pyc,, -aiogram/types/__pycache__/shipping_address.cpython-311.pyc,, -aiogram/types/__pycache__/shipping_option.cpython-311.pyc,, -aiogram/types/__pycache__/shipping_query.cpython-311.pyc,, -aiogram/types/__pycache__/star_transaction.cpython-311.pyc,, -aiogram/types/__pycache__/star_transactions.cpython-311.pyc,, -aiogram/types/__pycache__/sticker.cpython-311.pyc,, -aiogram/types/__pycache__/sticker_set.cpython-311.pyc,, -aiogram/types/__pycache__/story.cpython-311.pyc,, -aiogram/types/__pycache__/successful_payment.cpython-311.pyc,, -aiogram/types/__pycache__/switch_inline_query_chosen_chat.cpython-311.pyc,, -aiogram/types/__pycache__/text_quote.cpython-311.pyc,, -aiogram/types/__pycache__/transaction_partner.cpython-311.pyc,, -aiogram/types/__pycache__/transaction_partner_fragment.cpython-311.pyc,, -aiogram/types/__pycache__/transaction_partner_other.cpython-311.pyc,, -aiogram/types/__pycache__/transaction_partner_telegram_ads.cpython-311.pyc,, -aiogram/types/__pycache__/transaction_partner_user.cpython-311.pyc,, -aiogram/types/__pycache__/update.cpython-311.pyc,, -aiogram/types/__pycache__/user.cpython-311.pyc,, -aiogram/types/__pycache__/user_chat_boosts.cpython-311.pyc,, -aiogram/types/__pycache__/user_profile_photos.cpython-311.pyc,, -aiogram/types/__pycache__/user_shared.cpython-311.pyc,, -aiogram/types/__pycache__/users_shared.cpython-311.pyc,, -aiogram/types/__pycache__/venue.cpython-311.pyc,, -aiogram/types/__pycache__/video.cpython-311.pyc,, -aiogram/types/__pycache__/video_chat_ended.cpython-311.pyc,, -aiogram/types/__pycache__/video_chat_participants_invited.cpython-311.pyc,, -aiogram/types/__pycache__/video_chat_scheduled.cpython-311.pyc,, -aiogram/types/__pycache__/video_chat_started.cpython-311.pyc,, -aiogram/types/__pycache__/video_note.cpython-311.pyc,, -aiogram/types/__pycache__/voice.cpython-311.pyc,, -aiogram/types/__pycache__/web_app_data.cpython-311.pyc,, -aiogram/types/__pycache__/web_app_info.cpython-311.pyc,, -aiogram/types/__pycache__/webhook_info.cpython-311.pyc,, -aiogram/types/__pycache__/write_access_allowed.cpython-311.pyc,, -aiogram/types/animation.py,sha256=W9LGC1-JeWGolCU3OI1a3dXjtD5pCnaOd_J7ulWhau8,2673 -aiogram/types/audio.py,sha256=2WPtZmAQfW6ewCb6ozlcfXXZACQEX7c1MYTEVMAy9Lw,2823 -aiogram/types/background_fill.py,sha256=sJj85JGxTXOJVd_dq0jpgH5TbBPlvRKFNjk2CNoM5Bw,513 -aiogram/types/background_fill_freeform_gradient.py,sha256=R74cAjirD-pqisj3KiMKuQj5uALD7ZY5DagTNYZ18Xk,1207 -aiogram/types/background_fill_gradient.py,sha256=bSkNQPDrdWCrSIoCSBE3iFI3NaOAk2cktmLOFUbX2qA,1434 -aiogram/types/background_fill_solid.py,sha256=cL3N_tRhRdpM3rGYjHqh1c05Ys1_w5Sn5RVFX4Kzrhc,1022 -aiogram/types/background_type.py,sha256=_UKdw_LQfpR4z7W8wdtEmKV38EUlsSCheh0l4O0d90Y,540 -aiogram/types/background_type_chat_theme.py,sha256=1mylq_KCHfLYikVuv2FVNHTK-FivuOc3fIN16ThxGX0,1077 -aiogram/types/background_type_fill.py,sha256=P3mjIBc_oZspRCYLZvep1Tjx2F2r3Gz8QnK3ZhBRXr0,1656 -aiogram/types/background_type_pattern.py,sha256=7y5N7vxg4EauwCLqAf_7VjfYGcdDLWt5P2wieNZl9i4,2514 -aiogram/types/background_type_wallpaper.py,sha256=6uYeiZ4xQBTmJY0jCTeUFAj65Q872NZL7D2-WMeSLac,1868 -aiogram/types/base.py,sha256=ZAKfSk-DVyoBoYdyyZUTkoIKzuaj0kJS0ophsohsdI4,1762 -aiogram/types/birthdate.py,sha256=ev957uyU2tG4cRqQ838h8LHW0uIPFUu0TdC1YfL0mnY,1056 -aiogram/types/bot_command.py,sha256=rJuwZroECtHDZxhyv92K2vyTUlXdieXdCEhewEsIPk0,1017 -aiogram/types/bot_command_scope.py,sha256=rs7YoyRACVLm4tMMEQ01LM6ckWbF7o81edYEAnWXoyY,951 -aiogram/types/bot_command_scope_all_chat_administrators.py,sha256=3wvcWAh_yZADVbqPQD09kd1hyjmDL_KuoYR8us7A0jI,1311 -aiogram/types/bot_command_scope_all_group_chats.py,sha256=BElN12t3RwjYAFgo__K4PSUA5Mf0Vgzx6lzrhO1_kOY,1225 -aiogram/types/bot_command_scope_all_private_chats.py,sha256=1Ww3HUSSJINy4qNSqF5lybQJwWHpflhMM2So6EMplyg,1226 -aiogram/types/bot_command_scope_chat.py,sha256=chjf7klLRhCM8AB1xwkfkPfUXcw-_vnQekRVkiIB1Rs,1327 -aiogram/types/bot_command_scope_chat_administrators.py,sha256=ezkiv48UyMIlKyZXvmlmsLi9cop5pk6cZW6FLgFJr-E,1518 -aiogram/types/bot_command_scope_chat_member.py,sha256=IvFP2cemuZtMFdIn7T7hfo4o4-35_1ZBTOHV5pARCQI,1513 -aiogram/types/bot_command_scope_default.py,sha256=Aqa5eiFS2_2rd8S19i7qfBPIk8TNPVdOEOMR1oSPMuI,1270 -aiogram/types/bot_description.py,sha256=daKHDJ4d2c9j7wCTKwDLgbXy1HNrjbYkZkwC9D7FiPQ,781 -aiogram/types/bot_name.py,sha256=ut3sf9j5LYd2xki-_pZ1lnVvN7HOUr6v37llIi75j6w,717 -aiogram/types/bot_short_description.py,sha256=UdHLoRvp1hdhEg-W1XYUoDwPeCxvuU2H430JrNDiY4U,849 -aiogram/types/business_connection.py,sha256=B3LuYw0bZwli2E2d6L9CGE_Rm1IvnzpD0RyCmZWxljU,2056 -aiogram/types/business_intro.py,sha256=TTTNSlPX-bvzbDqKd-YzwXaUjgznpZxnBDGtAKpmSBc,1303 -aiogram/types/business_location.py,sha256=OHFm2V3jLoRWJdXS3ubflMjFGd2Wo6sMhMhvsHbJUUY,1103 -aiogram/types/business_messages_deleted.py,sha256=AZvMF6tTIcq1pRoY2lHE8VPNJ26l5lgaeXLZ0rwZEq0,1478 -aiogram/types/business_opening_hours.py,sha256=R0il4hXIel_WWaB0DZUR3lgd816IDxXZFwmEi04glSE,1282 -aiogram/types/business_opening_hours_interval.py,sha256=NFi-_QWLEN_0D1fPpqqp2TlrdWBJ71Rz7c4P-lSWj9Y,1329 -aiogram/types/callback_game.py,sha256=AF-WqkqFcC6nG_tKoNX1sRjRiKEstbEFJfLy4NPKtRQ,298 -aiogram/types/callback_query.py,sha256=JBnbrz0j0C6zK1eMeCgQ7l28ytKVxxkExVbwDsc2u4Y,6017 -aiogram/types/chat.py,sha256=LnnFHYcYdWkXZ3KNIedhnXpqbt_d_jDoan2fQdATNpA,64452 -aiogram/types/chat_administrator_rights.py,sha256=xwIgM6y2daN5FSYNJagmhBtgEy88S9GTSQk_OWgrykU,4578 -aiogram/types/chat_background.py,sha256=tGylRgxxa5pMDsuQFkG2XrY7mKQCsA9lc-BsaArwXEE,1400 -aiogram/types/chat_boost.py,sha256=iAbDstYKPATDpf9C0UTaeeipi1kcFedXhiTC6INxEuQ,1879 -aiogram/types/chat_boost_added.py,sha256=4WPPng6cqzhb0qpepGeu4mAoga2ieA2vmqIxWQR5n-A,811 -aiogram/types/chat_boost_removed.py,sha256=phu1WXsR6noLlEuiwyF1S0HzlwDmFsk2vwc9TRJ00K0,1768 -aiogram/types/chat_boost_source.py,sha256=-s9Um1lFg4ab2MiQpb1SpJlKM2hJHZkpM43TQE6GEMo,476 -aiogram/types/chat_boost_source_gift_code.py,sha256=VkPQktCIZdyI7wvhR-c7hgDs8lI2XySv_tCX1IJoFDc,1378 -aiogram/types/chat_boost_source_giveaway.py,sha256=ncM8YI0ra6Jb_cDeOFFfm1l0sDwaZT4TNVGbFbas6Zo,1976 -aiogram/types/chat_boost_source_premium.py,sha256=nN3o9Kvt5JHXcp1RpYq1WDX8Szzn9so1-FgGR1Olf38,1278 -aiogram/types/chat_boost_updated.py,sha256=L0LKL6jutsHYPbCDQoXHaZVjIS5y7uIDXlacKNIFvE0,1002 -aiogram/types/chat_full_info.py,sha256=gYA2B-STpK5Iz3sGxlKYBdJ1tDJNNC_LgJbJGI47dlY,13713 -aiogram/types/chat_invite_link.py,sha256=BBsofu3IJb7dpZvZHnZNStaaVWYhb8Bn9AhMq6jc_d4,2638 -aiogram/types/chat_join_request.py,sha256=IeM2JRKIMVyVBXA1309TLoNuBo-ExjIbkNJL53YUYeU,171076 -aiogram/types/chat_location.py,sha256=qZUA9NnQBDCHRLvKDP1Oo0wDX5T5tw-j14-NX8tlXSM,1062 -aiogram/types/chat_member.py,sha256=sq0RhcwghiW4Gy9XJTskFA3dHxaol5EA5Oify1QJfz4,722 -aiogram/types/chat_member_administrator.py,sha256=d7se9Lm1AWDuZRNYGbK3ZLC2NkZVkSzegziJ0Lx66Qc,5453 -aiogram/types/chat_member_banned.py,sha256=bvvMSTPn4iNy6N5nGoPYoxR3pjqDZhFFqvGC_Jb1T3M,1500 -aiogram/types/chat_member_left.py,sha256=YhW1LjLUG5TDTARmj44DaJ0OyX2Gm8CW9-K6EA7LYgI,1254 -aiogram/types/chat_member_member.py,sha256=2AtZsJz3aICbn2eqCmG1p0UsBYSqlNLmN-wnqnC6uks,1482 -aiogram/types/chat_member_owner.py,sha256=2gV3f1ubns_eORZjJocWSuwH8IW_cv2j2I0MuHbVa68,1676 -aiogram/types/chat_member_restricted.py,sha256=7F40ERHf29ihfrB4tTc9JWL5w5xRBjqVLGoMWMgyWlg,4545 -aiogram/types/chat_member_updated.py,sha256=AS5_q6EXSBL2Wuy6lQXzn7gaXUPGZJWOWgGK1GCvx2c,87547 -aiogram/types/chat_permissions.py,sha256=A6I6DuCQGRWBqhQuVe8xMnRkd9i0iD7gOZm6Qg7m0LY,4382 -aiogram/types/chat_photo.py,sha256=BouKO-6NIn5d17fB9acX9iAbv_gjYzbeKuTqN3BcFD4,1872 -aiogram/types/chat_shared.py,sha256=O6taLjKlBX-z15XYZ6Hcp9SsUCYhBa9Sz7hKzAvi2as,2260 -aiogram/types/chosen_inline_result.py,sha256=VFMo9FklvYjWrPbwrxeIyHrDwLlRvnFObUV5EhaannU,2399 -aiogram/types/contact.py,sha256=jWvv9gc-4LyFyBLeAeucyr7A8yjBk7-sJQH10NKoydU,1848 -aiogram/types/custom.py,sha256=3Xqsx2Llx47Hu1v4hGEFOjbMzkgkdQ9lmKW87Atulp4,819 -aiogram/types/dice.py,sha256=QOFOqUx3jqVtqU_nwuWhhSthy5CBR_mNTMuIpwiD2KY,1165 -aiogram/types/document.py,sha256=6tKzYSPyON6BoWLn3F3tiXHUxaQNG1YNl6kC6bO-0ZE,2425 -aiogram/types/downloadable.py,sha256=FbRdIM3Cpw3tcDzZvwy__u98aSKqMMJn2kKh9mK62B0,77 -aiogram/types/encrypted_credentials.py,sha256=1ZC-Q3c84mEVZGEK_cXTkqzX4FzBujn0_necxJ1uSPc,1521 -aiogram/types/encrypted_passport_element.py,sha256=9RmD1xbkrWw-DFb8QCUCWENswXBKklGqy0G3SX_TB78,4733 -aiogram/types/error_event.py,sha256=m0QrLksRJ0-x0q5xpb6iyI4rqPfiz3XJom_Gh75CJ-8,714 -aiogram/types/external_reply_info.py,sha256=aYYuCYyyz5DL3zhDgdECSkdvf6HyiiHSTN61dyVMGmU,7185 -aiogram/types/file.py,sha256=52bE-c7RjZmTdXk8ij8PJ5fsx2-1IfgedM763PmzGnQ,2166 -aiogram/types/force_reply.py,sha256=YkTteaPMOUH544hl9h6VDypMxyiLIKFd9KXryouTmVM,3024 -aiogram/types/forum_topic.py,sha256=CchPMME1NgB8WT9FWLgQ5mYZ7uXFG2yuTmDMaDZ6kcU,1422 -aiogram/types/forum_topic_closed.py,sha256=aw1K6fIadwJtSTZnyTQq3xtEf7920vodFjK5lHeKVgs,309 -aiogram/types/forum_topic_created.py,sha256=OPYpne_Zz5tdOpzjYOXGplCxLhF1aeKnHFzpn3qXIRg,1321 -aiogram/types/forum_topic_edited.py,sha256=Fq8QDirNBsymOKbAxBYnFqhmXL52XuqKAQrLxePRyA8,1230 -aiogram/types/forum_topic_reopened.py,sha256=MloV3nhDpHSLe5VoVgmC99u7ch3IYahIHH2EokGCWgY,315 -aiogram/types/game.py,sha256=AUnwPfixbvWpzxfoHziedT7WJtoF02vxBNz791j0fro,2365 -aiogram/types/game_high_score.py,sha256=rwCyO24y4BkcTJSmoLPA7pGEsgfA6-_3i40uvCgxp6k,1203 -aiogram/types/general_forum_topic_hidden.py,sha256=QC3u0Qpt3nptdhl3dxqgNXVrptwSAdnEzI-OWP8QMMw,301 -aiogram/types/general_forum_topic_unhidden.py,sha256=W8HRGyB81eyooaucgD0ojeAzywD8AjnMnUf2hf7r5Nk,307 -aiogram/types/giveaway.py,sha256=N5k2AXEdBRKRaHfDbYl_YuRGARaIAiOP1S49cAkGgc4,3042 -aiogram/types/giveaway_completed.py,sha256=m6QrBVrfT5s2W4mt-LoJwvHodkV7eIc112HOHLf9Z3k,1515 -aiogram/types/giveaway_created.py,sha256=6HYs2dBo4V6OBZpfoOAB7CxlMZQB_jPb01rEAw3RLe8,275 -aiogram/types/giveaway_winners.py,sha256=t2b4tX6twU0wlOEJLvrTbD_PB2pAcL3LDSycXhvQNw0,3321 -aiogram/types/inaccessible_message.py,sha256=Wn3WocufH3a8g0BE0S0TIK1pUQrt3NQBPAm-_9HhjSs,1288 -aiogram/types/inline_keyboard_button.py,sha256=1AwstgKnWwqrt0dI57_bMZNQWXAuEP74gxpYtHKN024,4769 -aiogram/types/inline_keyboard_markup.py,sha256=b6dxsxzM93LZyG41mXHPX4JKyKlPr3bqc-8s4zuUCpk,1273 -aiogram/types/inline_query.py,sha256=XCXCRESvVpbepiIYiJLcF48rc35K8sKrmeFw8iciLf4,7410 -aiogram/types/inline_query_result.py,sha256=8Ve8Fe1Yf6O7NHWCYdTVIgnbawI6hIo5B0l2cV5ZN20,2189 -aiogram/types/inline_query_result_article.py,sha256=Keq9BuANquPGxWDw9D8Yra7_vNDSvYSRfqK5Ml9e9yE,3759 -aiogram/types/inline_query_result_audio.py,sha256=6r3mHQQ4tA0kouOznWvE4izEJ9NarZBP-40-BOdn0Mo,4367 -aiogram/types/inline_query_result_cached_audio.py,sha256=7oYplK6rrWZrDAcXQqZvpnKOW_Kuj1vQ1oa3sqj-VcQ,4018 -aiogram/types/inline_query_result_cached_document.py,sha256=qvNPpMWQfJ-i_SCLDIHWDvuuRqFqYLuxqdLuaVq0_Nk,4360 -aiogram/types/inline_query_result_cached_gif.py,sha256=Mawa0gyeGd4-MSjVAJ1Pm62pBSakp9SpvOsGXOhpQ7Q,4601 -aiogram/types/inline_query_result_cached_mpeg4_gif.py,sha256=UtOhg-YOQPO3H3JkJZeZcUloxXgDmoaHHOBOg6x-GO0,4699 -aiogram/types/inline_query_result_cached_photo.py,sha256=LQPdR2UW9hvnz68YOziipLaajVqCPzVzK8yhjHJZSxc,4769 -aiogram/types/inline_query_result_cached_sticker.py,sha256=hqZ8ZvEv0jA0rf7WDVa4SVkaX5khDncpdSPoH5LWEcU,3100 -aiogram/types/inline_query_result_cached_video.py,sha256=Uyr7rlAZO4djHXnhfyoEItN_Mu30W8NkooZICLN8LKk,4739 -aiogram/types/inline_query_result_cached_voice.py,sha256=kvsqjskDe_Aor7WZvrijUsfZnJdum-krGxMwYl4GEGQ,4144 -aiogram/types/inline_query_result_contact.py,sha256=vAmYCE49k7pWHNA-1-L0p7pD2TljNdzitFgsE_hrYDI,4111 -aiogram/types/inline_query_result_document.py,sha256=yYEqSbiWqW3zDl2xX7WNcf2oraOu8zp7hr1BIqLrUeo,5047 -aiogram/types/inline_query_result_game.py,sha256=9t2HzFgVgHjPW_pQZ4YBTeGptSbn9KOHcGsbEPpUwzQ,1758 -aiogram/types/inline_query_result_gif.py,sha256=MNmFu5R4Jz1MbiDoznpsI7GBdy7-BB83QhVnF16HyhM,5577 -aiogram/types/inline_query_result_location.py,sha256=FX_eYlVfcRkcTTxubrTu1m3jGFWbgLEyg0R0TFp3ybY,4961 -aiogram/types/inline_query_result_mpeg4_gif.py,sha256=uL9AGdWYTaUJf3mM1v4iR-An8ZtWt-8XVpZY03vmZRI,5645 -aiogram/types/inline_query_result_photo.py,sha256=zWHeeIKMYQWHYzdIg9li93ziZ8acH9m-MSDmOLAiJA4,5245 -aiogram/types/inline_query_result_venue.py,sha256=pln1TVUl5cLvgxTxR1PEYLA7K69L9ZGAGxR_YQ0eQyY,4904 -aiogram/types/inline_query_result_video.py,sha256=9u6L-4nZVtUspl4nomPe3d0AuQHDv7EA3H1CmZQaJs8,5842 -aiogram/types/inline_query_result_voice.py,sha256=LUGfZZgL66NH6wppO9kpVnBoiCbC_zV6SBV3PBIBQJQ,4310 -aiogram/types/inline_query_results_button.py,sha256=mcDUu9wvU35tBvH1BhICorSlJ25XUVbpJlh9BWE3HNQ,1878 -aiogram/types/input_contact_message_content.py,sha256=GR2RDpizrX7rlxjf05CKzRT3zmLEO1yJSpqbmxCLwQA,1599 -aiogram/types/input_file.py,sha256=oCElYrCtJgfP5_ck0MQxvGppVZyXW5BnsHcmSg1Ds1o,4672 -aiogram/types/input_invoice_message_content.py,sha256=L4QePd9Bw7Mqy9L6vFTLL6iRsyJDB-YfOGfKNfVs24k,6899 -aiogram/types/input_location_message_content.py,sha256=UmmTHtSm-0MbIp2pISbl6FoPo9rjKeBK0pKzKg66GvE,2374 -aiogram/types/input_media.py,sha256=2nTD1Wg9VX8x74KTAf2d6OjjGTwPTUXaQL5Ty5TxvYQ,619 -aiogram/types/input_media_animation.py,sha256=BLpBBGSBzSRKpG-K7mQwguiof4cR58ElSNPwH9PdefQ,4373 -aiogram/types/input_media_audio.py,sha256=615pBywXCgGPIoeiqGep4D8SiMwTa83kmhasp0qqgHE,3706 -aiogram/types/input_media_document.py,sha256=2Z89Foqhnh3LviuiMcaU9rWg2kCVPQdNMvL_KrGckFM,3628 -aiogram/types/input_media_photo.py,sha256=QGqJC6qCGyEzbBLHsX8vw6pbnsk3l7eYA8AKmKA6WY4,3127 -aiogram/types/input_media_video.py,sha256=Yugn-j1NmMjMFP7ztI8XQMJVDZ_2KV_xJYdOCFSBk2I,4509 -aiogram/types/input_message_content.py,sha256=wj0C4RyiLpVP4yz0LmmO4qMNNIwRMihjnoMrjBSxjDE,793 -aiogram/types/input_paid_media.py,sha256=z-STAz_0G590-eFlOYNTv_HP1LOWbACXM0XMYbEBXrg,380 -aiogram/types/input_paid_media_photo.py,sha256=AHnkA6yvhhxdt_ffpCplgOxtqeh0YiDZ0WjVYj0boSA,1498 -aiogram/types/input_paid_media_video.py,sha256=nKQwP5BtYARot0LjkAr-EOa7UfbL8DwtFqexwoTNIY4,2977 -aiogram/types/input_poll_option.py,sha256=ky4L3A9Z2PuNTJL-WxMJ3o2zysphXaV2OukDdhXrLM4,1791 -aiogram/types/input_sticker.py,sha256=8smkhrtpZraqVrA_v87UuO4uNqzK_9bvPPVvDRrmCuY,2438 -aiogram/types/input_text_message_content.py,sha256=Er1EsUzQKV_p-spafMGNKL1saWlvvOmu4IBqFk03BaA,2720 -aiogram/types/input_venue_message_content.py,sha256=CZsCPYQrFdP_BrYBzNJ_Ik39PlJ1VLOsvI5q9vRS0Ns,2411 -aiogram/types/invoice.py,sha256=gOiw5G9yXJ8ZkAVupt2ww-mcooYanTix6t7KarSni9Y,1932 -aiogram/types/keyboard_button.py,sha256=L0cHsJEsKQziqK3zJN6laQL9drC36AhbhMOG20vhzcE,4352 -aiogram/types/keyboard_button_poll_type.py,sha256=tPGlW_jRXaDxZML1_vK080sp6BO86DO5cbBP-TEOf4Q,1153 -aiogram/types/keyboard_button_request_chat.py,sha256=N8UBPPlrQ07OSCO-33mfP5lKJ744sugaS86dYWpxMRQ,4448 -aiogram/types/keyboard_button_request_user.py,sha256=89efkQPnTYrtpBozhTvXp00YE8uKqgJInVUafJV7nkI,1990 -aiogram/types/keyboard_button_request_users.py,sha256=bhj4_scIdCcKxWeuC8f8guU_tcWTvwrbISe_PycG-XE,2747 -aiogram/types/labeled_price.py,sha256=7kRZPTy8HgJG4FYrix21xGfhgT_u93fROUBOj1wB4Rk,1330 -aiogram/types/link_preview_options.py,sha256=xv8Z-qE_NBfojELQHSlgegmsXso661AL8562z8i0dls,2747 -aiogram/types/location.py,sha256=0X9SBlANNn_ODEByFE0oDiJxpKtGEQ6OI6fDXB_1loA,2115 -aiogram/types/login_url.py,sha256=VxZTVG1LbmKeon_spDg17HJiPh1l1buOI5eFBNLu1Rk,2771 -aiogram/types/mask_position.py,sha256=ZH0pNJ8u4Xlos2MwCtsnSzMNfhgGvacCGdJ42qFp9no,1627 -aiogram/types/maybe_inaccessible_message.py,sha256=TbxUHEoW88w4nWer6zhQhWaAjTqr2Xi3H9-ZJRfvA9Q,388 -aiogram/types/menu_button.py,sha256=4Q2I_AlbnRe2fQ0f1a-LNl0toGOHI73ehjhMQmLngV4,2103 -aiogram/types/menu_button_commands.py,sha256=NMmH1S0jcEivjXmzRfMTLJAO4UBKVhFuo8wS4ONgZwc,1038 -aiogram/types/menu_button_default.py,sha256=FnjUz1-aXR3-0oHPv0pNU5yi1M86wnzwCbNnzEMu094,1027 -aiogram/types/menu_button_web_app.py,sha256=G-yWLPg91mgaMP672VRj6xmB8_UqDpMeH2iePvY0rw0,1715 -aiogram/types/message.py,sha256=AlHRfaN9KyEJjT887Jv6P52WLaMZvOKx_SgBEMcP7eM,240867 -aiogram/types/message_auto_delete_timer_changed.py,sha256=D9GoK5tOtxWTksB_yaIKthfiHWJhOI6SUBWWpW_PRTY,1020 -aiogram/types/message_entity.py,sha256=q_dWKJhMNVg8zGzIUy40b0viRNnBaZSPT_7ySANbwDw,3287 -aiogram/types/message_id.py,sha256=4I7m_laQsIwLiTOVG3B59BJLvlzGTkf0gai9aazqs0I,805 -aiogram/types/message_origin.py,sha256=uSs6n9q5JhIzaV42ldMJJL_8nAx_aCQ3xNqrRVMJsWg,518 -aiogram/types/message_origin_channel.py,sha256=tgCfiuS81A0oWD9EY90F0P3B9s-Avsm0FJlw5ra8umA,1795 -aiogram/types/message_origin_chat.py,sha256=_EE8lVR8Kp745dHTlT1zHYXEDImbGhq_nuZgteu9lbc,1725 -aiogram/types/message_origin_hidden_user.py,sha256=N8WXMNcBlWSuDMRYUxsUiZubnOxsDFOr7GyYQKRrij4,1377 -aiogram/types/message_origin_user.py,sha256=FTu0wnkg8AElOQtMjy2Ee-ApL2eX57a5qMrudWMWf90,1349 -aiogram/types/message_reaction_count_updated.py,sha256=TKCPGGl2hKGFg4hizjdclB8hMzLjDsVP_48-uk_pKmI,1521 -aiogram/types/message_reaction_updated.py,sha256=_-QSyiZFNlEy9s-aZp61AFq8yRUT3Kp_T1x7SDbKv34,2616 -aiogram/types/order_info.py,sha256=ECWERhAIl3kkclMOwnNN9NHGQLUtW0B6oElkLubPPr4,1516 -aiogram/types/paid_media.py,sha256=gw3vvGNuZugsvlWpqxuZs1Q81ALL9MTZ6RVP5EFMbmk,399 -aiogram/types/paid_media_info.py,sha256=vCXLSVj5f9BHeI5t60EWllCMZykOtWFaVOglXZQKzC0,1327 -aiogram/types/paid_media_photo.py,sha256=uRakDZNVUOHpvLoxMPxI0eKdfp1_x-hs1KEMvDriSEc,1130 -aiogram/types/paid_media_preview.py,sha256=9ZIG6wR-De8VPU2y5Rn77czZFOdLcW_JxKXQeYsiycw,1522 -aiogram/types/paid_media_video.py,sha256=afHhTgBEXuyms9V1FaGqJutjveZeHjESmYvav3D3_ck,1095 -aiogram/types/passport_data.py,sha256=PT4TKdMo9drK6LeK_FgGS98wE8c-kCwHkB7HcjthguQ,1318 -aiogram/types/passport_element_error.py,sha256=0MooyVK2Yoz-6MTnBDqbyiR9o-cYM5GoM6HC-p6X9jQ,1214 -aiogram/types/passport_element_error_data_field.py,sha256=NQXIJOOjXP56vbMTgKl2z9QqTs7FyHlxURO2xSOMQI0,1850 -aiogram/types/passport_element_error_file.py,sha256=tlUpJBAJFPUzHnCgd07gIS1c_HvFXFTpQWlB6Kipo_w,1619 -aiogram/types/passport_element_error_files.py,sha256=UKY3feWaWnV7E0gVs2nTys43bbYmB-C3flQ2j0DbAdg,1734 -aiogram/types/passport_element_error_front_side.py,sha256=669dn7UWwY4GnNnmaUBipHj8U22PahkJFmzLVerAGXk,1721 -aiogram/types/passport_element_error_reverse_side.py,sha256=ZVfTzKDmrZqzwcOBNuzsSwfEUip8hHCzeRk2jyiWDak,1704 -aiogram/types/passport_element_error_selfie.py,sha256=KR-TG1DguG1w9Kv1rIJRf7qkI_L7euSwr9h5IC8DAJU,1623 -aiogram/types/passport_element_error_translation_file.py,sha256=Zm4DzT7yQoHHdANCgq0uW6kmskULr56hwjv0GFPWTGI,1843 -aiogram/types/passport_element_error_translation_files.py,sha256=I_i-u15lAHxpCzhzj7Iiu8aTdbwyhQJfGeYp9p3woIs,1952 -aiogram/types/passport_element_error_unspecified.py,sha256=KqvSPstDlkcEJRDA-JkFX5JK97uO9R4Nqx_Sbp5iW4Q,1651 -aiogram/types/passport_file.py,sha256=tN7IbA6M4Zk6WH4CpVeI0exfi_UKoKOUiz1iT1e1epo,1599 -aiogram/types/photo_size.py,sha256=J1rOX1QxScCjA0LPm4KgdLZBpsAQfscAaDfuocE4cC0,1664 -aiogram/types/poll.py,sha256=dgCODf8MlNQKh74LfWuwfdOXli-N55kqwRWS3wl1pcg,3737 -aiogram/types/poll_answer.py,sha256=HZoZQ4SiytyywLPa3ACX617QJ4zy3REXG_puRmtJdww,1614 -aiogram/types/poll_option.py,sha256=KhsgOD64wZu2RCD6F6gsuT9z-5RKnOWMOFs-Cjwdnh4,1445 -aiogram/types/pre_checkout_query.py,sha256=CaYsF1zvPb1k5cgka1GC12VMS3eZc3RWVba7VmRr6L4,4410 -aiogram/types/proximity_alert_triggered.py,sha256=b2zF9r0sjf-cp6Gj-pyTIJq9x5a_JBjdp-DseDGpM_0,1253 -aiogram/types/reaction_count.py,sha256=wmMH5iR_tOJ3ieSezjBzRCPQyt7RhH3Lbw8emodaxqE,1332 -aiogram/types/reaction_type.py,sha256=EBHvWnPblOe2T6ey0_V9m6vReAX8VcHX4wuzKLVMR0w,442 -aiogram/types/reaction_type_custom_emoji.py,sha256=dzZSLhEtBke35GtTgfSxrijMu9jQzob6drdFkYReR7w,1150 -aiogram/types/reaction_type_emoji.py,sha256=F5WoRrUm9tOV3YJVNh8quD4D2OfsU53Y-mbqggbnm-w,1682 -aiogram/types/reaction_type_paid.py,sha256=zXzhLH6g8HeyIOO1dhsZwG4_Mh52Yw5sC5mucpffnTY,854 -aiogram/types/refunded_payment.py,sha256=yaj69LD-j7ffwtTk69ozl0MXz3r2kUlBTgOuWEqvxto,2180 -aiogram/types/reply_keyboard_markup.py,sha256=Ey04kT-CDRoFk4Ofqe-U6-SUi_SYaXtYQ72NqzNwgq4,3373 -aiogram/types/reply_keyboard_remove.py,sha256=vt2LTPCyoNO1SzO7JLJAUTLxfcyVh5eVKTkFmjQVvag,2093 -aiogram/types/reply_parameters.py,sha256=2DWrO4V2Vxdc42OnEuHjfLS60PaNO01rtcvlt-H4aCY,3502 -aiogram/types/response_parameters.py,sha256=qPu3C079bJZRdUIQwr-r9WIcW6yYW7rdWJlraZQbw-M,1550 -aiogram/types/revenue_withdrawal_state.py,sha256=rUzcoQ2Nbmm-2EwkoD-g_xWUp9o3mIsthyE2ZWrg0ZY,585 -aiogram/types/revenue_withdrawal_state_failed.py,sha256=uhCBqAV8SpbCkL364ygkvGg7TzarISQ6NniBeHvn3HE,1133 -aiogram/types/revenue_withdrawal_state_pending.py,sha256=rVieabsj2ayXpzN7yW8uGN-8p6Qy_lQyrKYFSKH5qmw,1115 -aiogram/types/revenue_withdrawal_state_succeeded.py,sha256=d2cBJbxXEPhtSLWb-TzyDy-iumMWkG7G6LWNRBmH7oI,1409 -aiogram/types/sent_web_app_message.py,sha256=1p2Xr_3czwPbZd8PpylTSo31ZgeAEBLnlnlRcBY31xc,1168 -aiogram/types/shared_user.py,sha256=L_PyLNJ0I75E9OykdQA5Nk5j56QjmwEgD8jPIYxFGYA,2340 -aiogram/types/shipping_address.py,sha256=9JTEnZoNaPa-T1p_YolL1ErIGWJol8lAU4F8ycsQ8ZY,1550 -aiogram/types/shipping_option.py,sha256=5jI1LADtNbe2oZC0a2G3f7Fh6J8CZ0wfCBqVFOUlqIw,1098 -aiogram/types/shipping_query.py,sha256=22pK3KfuxTTkZm-GFxrgphBmldqT4iIifVY-6vmF-qk,3458 -aiogram/types/star_transaction.py,sha256=zGrNLgJeDuv4AWfr8tiCWLHM_KgNO-d9rYiiaiUe8A8,3087 -aiogram/types/star_transactions.py,sha256=n4NDZK71RgvVbuiCAzdjKBc5p6PyezzYQFjJkiewunw,954 -aiogram/types/sticker.py,sha256=Tcz8iqKzCbfvP7MdV3NVwUEt9u27EmB7_R-N_BxSd6M,5902 -aiogram/types/sticker_set.py,sha256=OGKkpMzsQxRcuAGLt9ZJOaLwv9IKndmTaaKl5fyiNLo,2388 -aiogram/types/story.py,sha256=2Bm9ZHpfr4_yeBPWFgwnqTs-y4xFgKqW8NLRVWzMdqM,884 -aiogram/types/successful_payment.py,sha256=nNUteKAYhz_PI3EuoDkd8zX1dDal_NLMSy08fnwjC98,2574 -aiogram/types/switch_inline_query_chosen_chat.py,sha256=KH9p_x5aY6XxQn71LRa92cVQMl8glZKdc2m2935i_Yo,2002 -aiogram/types/text_quote.py,sha256=2bmMetBcRCIUu5GPlGUC8IpRLqPEAOmirvpsmzOPrrA,1863 -aiogram/types/transaction_partner.py,sha256=WtOmiGbZhHF_1vidNsULzjypaypxdHfif3nGcOwNIjg,625 -aiogram/types/transaction_partner_fragment.py,sha256=sHfiApYXz8E4Jr40pb0szs4b94aAp0UTE6UGQ1xFFdo,1962 -aiogram/types/transaction_partner_other.py,sha256=iHViDYZ62dQS3z6k1YkMOqFELyBM4wpAkGzRlif-_xw,1104 -aiogram/types/transaction_partner_telegram_ads.py,sha256=QmVjyRZUGNTpxRIFZF4F_pAPj9i4224E1PsnA9GS8YU,1185 -aiogram/types/transaction_partner_user.py,sha256=rslWGfJ7C-ptPRXACLyB3vxrbDyu1yd9LJX0pTNiLV8,1979 -aiogram/types/update.py,sha256=5FVm6IcFT8INyU3GPNVBxL0s3-g7cJpeO3vUUogzoo4,11481 -aiogram/types/user.py,sha256=DW0Xg1Lld2oB5wwOZtBIJggt-WiNLKOY-4HHSpU_t1k,6001 -aiogram/types/user_chat_boosts.py,sha256=Qpvrxc-BGYuyKbC8kLIrmQqNpfYi3jXXYY_234NWb0M,946 -aiogram/types/user_profile_photos.py,sha256=VKpZMznwuIUQ4sWxjDgNv3tSr6AW2fwG4AIwgztwL-w,1124 -aiogram/types/user_shared.py,sha256=1yGKAO67fshHSOCtVl3dO_oD1-VOyzPBC4Ak-hflMOQ,1534 -aiogram/types/users_shared.py,sha256=Fdjww27YYlWMVzYOhpBp54RL_N_Zh7_meWgpqBxfkjQ,1986 -aiogram/types/venue.py,sha256=wEmGfGAiqdhDhTskRoxOKiNVliUaPpPOxBmohfDlL5I,2147 -aiogram/types/video.py,sha256=e-uI5iQSKAdhPK-vVz5kiQCIV22kaxmylzN8gzmtwnk,2575 -aiogram/types/video_chat_ended.py,sha256=eL3ZSR0WfVcHEEpXrdLm1mvuogXS7RAoxLwX2AwMdeg,839 -aiogram/types/video_chat_participants_invited.py,sha256=zV4sR4Mi_BmHeS60I4C-KzrAhOAh2weIFuEE8CmhmZI,943 -aiogram/types/video_chat_scheduled.py,sha256=G-a24czeK7NVzJ88SKFNutPd_SGnRgTBLy85rHozNLo,990 -aiogram/types/video_chat_started.py,sha256=FYHVcH-a5knoXIYMmCQThFt8hjjPwAiZ8QvGLNVWgl4,309 -aiogram/types/video_note.py,sha256=Hwa8uTCnyb9yT9eGikFwyVfk6X779md3DNAPbav6VrM,2059 -aiogram/types/voice.py,sha256=AMyEJovxyDl2TRVpEfpHLMSmsXNjXIrNDH73HxQUxqg,1932 -aiogram/types/web_app_data.py,sha256=CzkuU2VwVYQ7WBkFA6Zh8BL-qUKQeB__mcmhmVZnT2A,1107 -aiogram/types/web_app_info.py,sha256=aPH4uLFFLKNLEF3RUm3uYCkg9Hk545kMoUvrkg4TUds,931 -aiogram/types/webhook_info.py,sha256=TAfcO66tpfH5XolOI90pg_sHowUkV4hHjzp3tWhpj_w,2992 -aiogram/types/write_access_allowed.py,sha256=3GiPknn_fKHAJ53FROE4AK4MtpwluNlAuZvFuOP6diA,1912 -aiogram/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 -aiogram/utils/__pycache__/__init__.cpython-311.pyc,, -aiogram/utils/__pycache__/auth_widget.cpython-311.pyc,, -aiogram/utils/__pycache__/backoff.cpython-311.pyc,, -aiogram/utils/__pycache__/callback_answer.cpython-311.pyc,, -aiogram/utils/__pycache__/chat_action.cpython-311.pyc,, -aiogram/utils/__pycache__/chat_member.cpython-311.pyc,, -aiogram/utils/__pycache__/deep_linking.cpython-311.pyc,, -aiogram/utils/__pycache__/formatting.cpython-311.pyc,, -aiogram/utils/__pycache__/keyboard.cpython-311.pyc,, -aiogram/utils/__pycache__/link.cpython-311.pyc,, -aiogram/utils/__pycache__/magic_filter.cpython-311.pyc,, -aiogram/utils/__pycache__/markdown.cpython-311.pyc,, -aiogram/utils/__pycache__/media_group.cpython-311.pyc,, -aiogram/utils/__pycache__/mixins.cpython-311.pyc,, -aiogram/utils/__pycache__/mypy_hacks.cpython-311.pyc,, -aiogram/utils/__pycache__/payload.cpython-311.pyc,, -aiogram/utils/__pycache__/serialization.cpython-311.pyc,, -aiogram/utils/__pycache__/text_decorations.cpython-311.pyc,, -aiogram/utils/__pycache__/token.cpython-311.pyc,, -aiogram/utils/__pycache__/warnings.cpython-311.pyc,, -aiogram/utils/__pycache__/web_app.cpython-311.pyc,, -aiogram/utils/auth_widget.py,sha256=kcNMXu7hA4kWHw_PeZsGFaeC0m0Sbtbd2-8Q9rWfkHg,981 -aiogram/utils/backoff.py,sha256=D_d7z94PyR5USzeoIednnCgW07qQgwQNgVdPGkgrmJM,2123 -aiogram/utils/callback_answer.py,sha256=_NHsLMjfZBKOXtyCSHBh4s9V3go-U8Wsk5JqpMh-O4c,6573 -aiogram/utils/chat_action.py,sha256=3GW2mDqQQ5fv6LMpeqB0j-J1d1blml2aF4q7vqlnMBQ,12201 -aiogram/utils/chat_member.py,sha256=WwMEi__6DYeF55TFuLxPS-OQaDdTa0I2f-yJkt3Dio0,942 -aiogram/utils/deep_linking.py,sha256=D89nv29pnL63_N_E_ZfLjiarTQZhg0oq6RnRdWRDSTE,2980 -aiogram/utils/formatting.py,sha256=7je7KplskUsRgo4DFVWwnN0g4C8JMBYC4tTVxw-3zr4,16902 -aiogram/utils/i18n/__init__.py,sha256=mwTwSL1cuXYi3a3LBICqoH66y4kHVML24YNPbGlZ55M,440 -aiogram/utils/i18n/__pycache__/__init__.cpython-311.pyc,, -aiogram/utils/i18n/__pycache__/context.cpython-311.pyc,, -aiogram/utils/i18n/__pycache__/core.cpython-311.pyc,, -aiogram/utils/i18n/__pycache__/lazy_proxy.cpython-311.pyc,, -aiogram/utils/i18n/__pycache__/middleware.cpython-311.pyc,, -aiogram/utils/i18n/context.py,sha256=fhLzDZvxqRMvPu2-lEUrH7n09oHl-H0qo2mLFyKzCJk,549 -aiogram/utils/i18n/core.py,sha256=XX_iuwylDTfrfCrafnqiFq28LDr-bvoO4Qnkhy81d_M,3542 -aiogram/utils/i18n/lazy_proxy.py,sha256=0yHtyrejG9wG4yzLl1cDEsFomww2nyR7KFSbFyp7_NA,472 -aiogram/utils/i18n/middleware.py,sha256=lqeui9-x7ztMQPI0IeQeRawe6orMjpsg2EtvXTzAQj4,5874 -aiogram/utils/keyboard.py,sha256=zxXdpmRr5x-4kaczAGWvlElMoWzRKF5PvDyxSJ9_4HY,13234 -aiogram/utils/link.py,sha256=z7Zp5uk5z3iNO26-wZrhoCDNLt1N0KjbPYhthOq-50o,2261 -aiogram/utils/magic_filter.py,sha256=WGHOC9k2acxrcpkFF-ViQv3LbzRAKtJj5MRv7IEi75c,666 -aiogram/utils/markdown.py,sha256=3T1UVSzaAwnYnTNNq6pklq-TTs6Y6zINp-LIWgwrAyU,4481 -aiogram/utils/media_group.py,sha256=E28oJhPoTQ4iKXr0QUx5W1nd7VPHAJf0PQz0MeqG46E,14804 -aiogram/utils/mixins.py,sha256=ox0Q6BlxcyTfAtzLVMEY9eUfXXhnXtkkLBQlUQ6uL4o,2923 -aiogram/utils/mypy_hacks.py,sha256=cm5_tBzfrkG5OOIs2m5U4JfQKohj1KkmCRXNLTJFDy0,433 -aiogram/utils/payload.py,sha256=mGJdQryRHL07VbSjdzGbN1NbYzd_mN2MGY1RiY3_KX4,2942 -aiogram/utils/serialization.py,sha256=SMiqv2TQed_GOhvhWoaABFM65jjIiXqBJTRRdMQ9nXY,2765 -aiogram/utils/text_decorations.py,sha256=tJwFV-zefED_z70wQsGWXIhD85m8Ee12mk3VrWN8Koo,8248 -aiogram/utils/token.py,sha256=iFfmK-pHGyPsF4ekWWcOlfH4OR9xGNAyCIavND8Ykrc,936 -aiogram/utils/warnings.py,sha256=xGsQcxrMXtdZfLOGRCqKRIJbw80DA39COcctikBfYAE,89 -aiogram/utils/web_app.py,sha256=pYFAohjk8OW3qRQkJebMtKaFJ7vOL4OJivUEh171kkI,7105 -aiogram/webhook/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 -aiogram/webhook/__pycache__/__init__.cpython-311.pyc,, -aiogram/webhook/__pycache__/aiohttp_server.cpython-311.pyc,, -aiogram/webhook/__pycache__/security.cpython-311.pyc,, -aiogram/webhook/aiohttp_server.py,sha256=3uto1_vwf6h73SXFNSoDxGt49gFHFYDI1wf4uRcxWUg,10454 -aiogram/webhook/security.py,sha256=ifd2TrPSOlXfutYyAmRh0LT3hJkB4o79XmEV1lo6fv0,1350 diff --git a/env/Lib/site-packages/aiogram-3.12.0.dist-info/REQUESTED b/env/Lib/site-packages/aiogram-3.12.0.dist-info/REQUESTED deleted file mode 100644 index e69de29..0000000 diff --git a/env/Lib/site-packages/aiogram-3.12.0.dist-info/WHEEL b/env/Lib/site-packages/aiogram-3.12.0.dist-info/WHEEL deleted file mode 100644 index cdd68a4..0000000 --- a/env/Lib/site-packages/aiogram-3.12.0.dist-info/WHEEL +++ /dev/null @@ -1,4 +0,0 @@ -Wheel-Version: 1.0 -Generator: hatchling 1.25.0 -Root-Is-Purelib: true -Tag: py3-none-any diff --git a/env/Lib/site-packages/aiogram-3.12.0.dist-info/licenses/LICENSE b/env/Lib/site-packages/aiogram-3.12.0.dist-info/licenses/LICENSE deleted file mode 100644 index caa060c..0000000 --- a/env/Lib/site-packages/aiogram-3.12.0.dist-info/licenses/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -Copyright (c) 2017 - present Alex Root Junior - -Permission is hereby granted, free of charge, to any person obtaining a copy of this -software and associated documentation files (the "Software"), to deal in the Software -without restriction, including without limitation the rights to use, copy, modify, -merge, publish, distribute, sublicense, and/or sell copies of the Software, -and to permit persons to whom the Software is furnished to do so, subject to the -following conditions: - -The above copyright notice and this permission notice shall be included in all copies -or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, -INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR -PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS -BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE -OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/env/Lib/site-packages/aiogram/__init__.py b/env/Lib/site-packages/aiogram/__init__.py deleted file mode 100644 index 1fbee0e..0000000 --- a/env/Lib/site-packages/aiogram/__init__.py +++ /dev/null @@ -1,41 +0,0 @@ -import asyncio as _asyncio -from contextlib import suppress - -from aiogram.dispatcher.flags import FlagGenerator - -from . import enums, methods, types -from .__meta__ import __api_version__, __version__ -from .client import session -from .client.bot import Bot -from .dispatcher.dispatcher import Dispatcher -from .dispatcher.middlewares.base import BaseMiddleware -from .dispatcher.router import Router -from .utils.magic_filter import MagicFilter -from .utils.text_decorations import html_decoration as html -from .utils.text_decorations import markdown_decoration as md - -with suppress(ImportError): - import uvloop as _uvloop - - _asyncio.set_event_loop_policy(_uvloop.EventLoopPolicy()) - - -F = MagicFilter() -flags = FlagGenerator() - -__all__ = ( - "__api_version__", - "__version__", - "types", - "methods", - "enums", - "Bot", - "session", - "Dispatcher", - "Router", - "BaseMiddleware", - "F", - "html", - "md", - "flags", -) diff --git a/env/Lib/site-packages/aiogram/__meta__.py b/env/Lib/site-packages/aiogram/__meta__.py deleted file mode 100644 index c36e738..0000000 --- a/env/Lib/site-packages/aiogram/__meta__.py +++ /dev/null @@ -1,2 +0,0 @@ -__version__ = "3.12.0" -__api_version__ = "7.9" diff --git a/env/Lib/site-packages/aiogram/__pycache__/__init__.cpython-311.pyc b/env/Lib/site-packages/aiogram/__pycache__/__init__.cpython-311.pyc deleted file mode 100644 index 84bce6d..0000000 Binary files a/env/Lib/site-packages/aiogram/__pycache__/__init__.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/__pycache__/__meta__.cpython-311.pyc b/env/Lib/site-packages/aiogram/__pycache__/__meta__.cpython-311.pyc deleted file mode 100644 index d1b1a9c..0000000 Binary files a/env/Lib/site-packages/aiogram/__pycache__/__meta__.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/__pycache__/exceptions.cpython-311.pyc b/env/Lib/site-packages/aiogram/__pycache__/exceptions.cpython-311.pyc deleted file mode 100644 index 328a5d3..0000000 Binary files a/env/Lib/site-packages/aiogram/__pycache__/exceptions.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/__pycache__/loggers.cpython-311.pyc b/env/Lib/site-packages/aiogram/__pycache__/loggers.cpython-311.pyc deleted file mode 100644 index ba3d0c1..0000000 Binary files a/env/Lib/site-packages/aiogram/__pycache__/loggers.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/client/__init__.py b/env/Lib/site-packages/aiogram/client/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/env/Lib/site-packages/aiogram/client/__pycache__/__init__.cpython-311.pyc b/env/Lib/site-packages/aiogram/client/__pycache__/__init__.cpython-311.pyc deleted file mode 100644 index 0f57daf..0000000 Binary files a/env/Lib/site-packages/aiogram/client/__pycache__/__init__.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/client/__pycache__/bot.cpython-311.pyc b/env/Lib/site-packages/aiogram/client/__pycache__/bot.cpython-311.pyc deleted file mode 100644 index 4ee2c62..0000000 Binary files a/env/Lib/site-packages/aiogram/client/__pycache__/bot.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/client/__pycache__/context_controller.cpython-311.pyc b/env/Lib/site-packages/aiogram/client/__pycache__/context_controller.cpython-311.pyc deleted file mode 100644 index d74dc5d..0000000 Binary files a/env/Lib/site-packages/aiogram/client/__pycache__/context_controller.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/client/__pycache__/default.cpython-311.pyc b/env/Lib/site-packages/aiogram/client/__pycache__/default.cpython-311.pyc deleted file mode 100644 index 685d80f..0000000 Binary files a/env/Lib/site-packages/aiogram/client/__pycache__/default.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/client/__pycache__/telegram.cpython-311.pyc b/env/Lib/site-packages/aiogram/client/__pycache__/telegram.cpython-311.pyc deleted file mode 100644 index 8f13551..0000000 Binary files a/env/Lib/site-packages/aiogram/client/__pycache__/telegram.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/client/bot.py b/env/Lib/site-packages/aiogram/client/bot.py deleted file mode 100644 index 397e1a1..0000000 --- a/env/Lib/site-packages/aiogram/client/bot.py +++ /dev/null @@ -1,4761 +0,0 @@ -from __future__ import annotations - -import datetime -import io -import pathlib -from contextlib import asynccontextmanager -from types import TracebackType -from typing import ( - Any, - AsyncGenerator, - AsyncIterator, - BinaryIO, - List, - Optional, - Type, - TypeVar, - Union, - cast, -) - -import aiofiles - -from aiogram.utils.token import extract_bot_id, validate_token - -from ..methods import ( - AddStickerToSet, - AnswerCallbackQuery, - AnswerInlineQuery, - AnswerPreCheckoutQuery, - AnswerShippingQuery, - AnswerWebAppQuery, - ApproveChatJoinRequest, - BanChatMember, - BanChatSenderChat, - Close, - CloseForumTopic, - CloseGeneralForumTopic, - CopyMessage, - CopyMessages, - CreateChatInviteLink, - CreateChatSubscriptionInviteLink, - CreateForumTopic, - CreateInvoiceLink, - CreateNewStickerSet, - DeclineChatJoinRequest, - DeleteChatPhoto, - DeleteChatStickerSet, - DeleteForumTopic, - DeleteMessage, - DeleteMessages, - DeleteMyCommands, - DeleteStickerFromSet, - DeleteStickerSet, - DeleteWebhook, - EditChatInviteLink, - EditChatSubscriptionInviteLink, - EditForumTopic, - EditGeneralForumTopic, - EditMessageCaption, - EditMessageLiveLocation, - EditMessageMedia, - EditMessageReplyMarkup, - EditMessageText, - ExportChatInviteLink, - ForwardMessage, - ForwardMessages, - GetBusinessConnection, - GetChat, - GetChatAdministrators, - GetChatMember, - GetChatMemberCount, - GetChatMenuButton, - GetCustomEmojiStickers, - GetFile, - GetForumTopicIconStickers, - GetGameHighScores, - GetMe, - GetMyCommands, - GetMyDefaultAdministratorRights, - GetMyDescription, - GetMyName, - GetMyShortDescription, - GetStarTransactions, - GetStickerSet, - GetUpdates, - GetUserChatBoosts, - GetUserProfilePhotos, - GetWebhookInfo, - HideGeneralForumTopic, - LeaveChat, - LogOut, - PinChatMessage, - PromoteChatMember, - RefundStarPayment, - ReopenForumTopic, - ReopenGeneralForumTopic, - ReplaceStickerInSet, - RestrictChatMember, - RevokeChatInviteLink, - SendAnimation, - SendAudio, - SendChatAction, - SendContact, - SendDice, - SendDocument, - SendGame, - SendInvoice, - SendLocation, - SendMediaGroup, - SendMessage, - SendPaidMedia, - SendPhoto, - SendPoll, - SendSticker, - SendVenue, - SendVideo, - SendVideoNote, - SendVoice, - SetChatAdministratorCustomTitle, - SetChatDescription, - SetChatMenuButton, - SetChatPermissions, - SetChatPhoto, - SetChatStickerSet, - SetChatTitle, - SetCustomEmojiStickerSetThumbnail, - SetGameScore, - SetMessageReaction, - SetMyCommands, - SetMyDefaultAdministratorRights, - SetMyDescription, - SetMyName, - SetMyShortDescription, - SetPassportDataErrors, - SetStickerEmojiList, - SetStickerKeywords, - SetStickerMaskPosition, - SetStickerPositionInSet, - SetStickerSetThumbnail, - SetStickerSetTitle, - SetWebhook, - StopMessageLiveLocation, - StopPoll, - TelegramMethod, - UnbanChatMember, - UnbanChatSenderChat, - UnhideGeneralForumTopic, - UnpinAllChatMessages, - UnpinAllForumTopicMessages, - UnpinAllGeneralForumTopicMessages, - UnpinChatMessage, - UploadStickerFile, -) -from ..types import ( - BotCommand, - BotCommandScopeAllChatAdministrators, - BotCommandScopeAllGroupChats, - BotCommandScopeAllPrivateChats, - BotCommandScopeChat, - BotCommandScopeChatAdministrators, - BotCommandScopeChatMember, - BotCommandScopeDefault, - BotDescription, - BotName, - BotShortDescription, - BusinessConnection, - ChatAdministratorRights, - ChatFullInfo, - ChatInviteLink, - ChatMemberAdministrator, - ChatMemberBanned, - ChatMemberLeft, - ChatMemberMember, - ChatMemberOwner, - ChatMemberRestricted, - ChatPermissions, - Downloadable, - File, - ForceReply, - ForumTopic, - GameHighScore, - InlineKeyboardMarkup, - InlineQueryResultArticle, - InlineQueryResultAudio, - InlineQueryResultCachedAudio, - InlineQueryResultCachedDocument, - InlineQueryResultCachedGif, - InlineQueryResultCachedMpeg4Gif, - InlineQueryResultCachedPhoto, - InlineQueryResultCachedSticker, - InlineQueryResultCachedVideo, - InlineQueryResultCachedVoice, - InlineQueryResultContact, - InlineQueryResultDocument, - InlineQueryResultGame, - InlineQueryResultGif, - InlineQueryResultLocation, - InlineQueryResultMpeg4Gif, - InlineQueryResultPhoto, - InlineQueryResultsButton, - InlineQueryResultVenue, - InlineQueryResultVideo, - InlineQueryResultVoice, - InputFile, - InputMediaAnimation, - InputMediaAudio, - InputMediaDocument, - InputMediaPhoto, - InputMediaVideo, - InputPaidMediaPhoto, - InputPaidMediaVideo, - InputPollOption, - InputSticker, - LabeledPrice, - LinkPreviewOptions, - MaskPosition, - MenuButtonCommands, - MenuButtonDefault, - MenuButtonWebApp, - Message, - MessageEntity, - MessageId, - PassportElementErrorDataField, - PassportElementErrorFile, - PassportElementErrorFiles, - PassportElementErrorFrontSide, - PassportElementErrorReverseSide, - PassportElementErrorSelfie, - PassportElementErrorTranslationFile, - PassportElementErrorTranslationFiles, - PassportElementErrorUnspecified, - Poll, - ReactionTypeCustomEmoji, - ReactionTypeEmoji, - ReactionTypePaid, - ReplyKeyboardMarkup, - ReplyKeyboardRemove, - ReplyParameters, - SentWebAppMessage, - ShippingOption, - StarTransactions, - Sticker, - StickerSet, - Update, - User, - UserChatBoosts, - UserProfilePhotos, - WebhookInfo, -) -from .default import Default, DefaultBotProperties -from .session.aiohttp import AiohttpSession -from .session.base import BaseSession - -T = TypeVar("T") - - -class Bot: - def __init__( - self, - token: str, - session: Optional[BaseSession] = None, - default: Optional[DefaultBotProperties] = None, - **kwargs: Any, - ) -> None: - """ - Bot class - - :param token: Telegram Bot token `Obtained from @BotFather `_ - :param session: HTTP Client session (For example AiohttpSession). - If not specified it will be automatically created. - :param default: Default bot properties. - If specified it will be propagated into the API methods at runtime. - :raise TokenValidationError: When token has invalid format this exception will be raised - """ - - validate_token(token) - - if session is None: - session = AiohttpSession() - if default is None: - default = DefaultBotProperties() - - self.session = session - - # Few arguments are completely removed in 3.7.0 version - # Temporary solution to raise an error if user passed these arguments - # with explanation how to fix it - parse_mode = kwargs.get("parse_mode", None) - link_preview_is_disabled = kwargs.get("disable_web_page_preview", None) - protect_content = kwargs.get("protect_content", None) - if ( - parse_mode is not None - or link_preview_is_disabled is not None - or protect_content is not None - ): - example_kwargs = { - "parse_mode": parse_mode, - "link_preview_is_disabled": link_preview_is_disabled, - "protect_content": protect_content, - } - replacement_spec = ", ".join( - f"{k}={v!r}" for k, v in example_kwargs.items() if v is not None - ) - raise TypeError( - "Passing `parse_mode`, `disable_web_page_preview` or `protect_content` " - "to Bot initializer is not supported anymore. These arguments have been removed " - f"in 3.7.0 version. Use `default=DefaultBotProperties({replacement_spec})` argument instead." - ) - - self.default = default - - self.__token = token - self._me: Optional[User] = None - - async def __aenter__(self) -> "Bot": - return self - - async def __aexit__( - self, - exc_type: Optional[Type[BaseException]], - exc_value: Optional[BaseException], - traceback: Optional[TracebackType], - ) -> None: - await self.session.close() - - @property - def token(self) -> str: - return self.__token - - @property - def id(self) -> int: - """ - Get bot ID from token - - :return: - """ - return extract_bot_id(self.__token) - - @asynccontextmanager - async def context(self, auto_close: bool = True) -> AsyncIterator[Bot]: - """ - Generate bot context - - :param auto_close: close session on exit - :return: - """ - try: - yield self - finally: - if auto_close: - await self.session.close() - - async def me(self) -> User: - """ - Cached alias for getMe method - - :return: - """ - if self._me is None: # pragma: no cover - self._me = await self.get_me() - return self._me - - @classmethod - async def __download_file_binary_io( - cls, destination: BinaryIO, seek: bool, stream: AsyncGenerator[bytes, None] - ) -> BinaryIO: - async for chunk in stream: - destination.write(chunk) - destination.flush() - if seek is True: - destination.seek(0) - return destination - - @classmethod - async def __download_file( - cls, destination: Union[str, pathlib.Path], stream: AsyncGenerator[bytes, None] - ) -> None: - async with aiofiles.open(destination, "wb") as f: - async for chunk in stream: - await f.write(chunk) - - @classmethod - async def __aiofiles_reader( - cls, file: str, chunk_size: int = 65536 - ) -> AsyncGenerator[bytes, None]: - async with aiofiles.open(file, "rb") as f: - while chunk := await f.read(chunk_size): - yield chunk - - async def download_file( - self, - file_path: str, - destination: Optional[Union[BinaryIO, pathlib.Path, str]] = None, - timeout: int = 30, - chunk_size: int = 65536, - seek: bool = True, - ) -> Optional[BinaryIO]: - """ - Download file by file_path to destination. - - If you want to automatically create destination (:class:`io.BytesIO`) use default - value of destination and handle result of this method. - - :param file_path: File path on Telegram server (You can get it from :obj:`aiogram.types.File`) - :param destination: Filename, file path or instance of :class:`io.IOBase`. For e.g. :class:`io.BytesIO`, defaults to None - :param timeout: Total timeout in seconds, defaults to 30 - :param chunk_size: File chunks size, defaults to 64 kb - :param seek: Go to start of file when downloading is finished. Used only for destination with :class:`typing.BinaryIO` type, defaults to True - """ - if destination is None: - destination = io.BytesIO() - - close_stream = False - if self.session.api.is_local: - stream = self.__aiofiles_reader( - str(self.session.api.wrap_local_file.to_local(file_path)), chunk_size=chunk_size - ) - close_stream = True - else: - url = self.session.api.file_url(self.__token, file_path) - stream = self.session.stream_content( - url=url, - timeout=timeout, - chunk_size=chunk_size, - raise_for_status=True, - ) - - try: - if isinstance(destination, (str, pathlib.Path)): - await self.__download_file(destination=destination, stream=stream) - return None - return await self.__download_file_binary_io( - destination=destination, seek=seek, stream=stream - ) - finally: - if close_stream: - await stream.aclose() - - async def download( - self, - file: Union[str, Downloadable], - destination: Optional[Union[BinaryIO, pathlib.Path, str]] = None, - timeout: int = 30, - chunk_size: int = 65536, - seek: bool = True, - ) -> Optional[BinaryIO]: - """ - Download file by file_id or Downloadable object to destination. - - If you want to automatically create destination (:class:`io.BytesIO`) use default - value of destination and handle result of this method. - - :param file: file_id or Downloadable object - :param destination: Filename, file path or instance of :class:`io.IOBase`. For e.g. :class:`io.BytesIO`, defaults to None - :param timeout: Total timeout in seconds, defaults to 30 - :param chunk_size: File chunks size, defaults to 64 kb - :param seek: Go to start of file when downloading is finished. Used only for destination with :class:`typing.BinaryIO` type, defaults to True - """ - if isinstance(file, str): - file_id = file - else: - # type is ignored in due to: - # Incompatible types in assignment (expression has type "Optional[Any]", variable has type "str") - file_id = getattr(file, "file_id", None) # type: ignore - if file_id is None: - raise TypeError("file can only be of the string or Downloadable type") - - file_ = await self.get_file(file_id) - - # `file_path` can be None for large files but this files can't be downloaded - # So we need to do type-cast - # https://github.com/aiogram/aiogram/pull/282/files#r394110017 - file_path = cast(str, file_.file_path) - - return await self.download_file( - file_path, destination=destination, timeout=timeout, chunk_size=chunk_size, seek=seek - ) - - async def __call__( - self, method: TelegramMethod[T], request_timeout: Optional[int] = None - ) -> T: - """ - Call API method - - :param method: - :return: - """ - return await self.session(self, method, timeout=request_timeout) - - def __hash__(self) -> int: - """ - Get hash for the token - - :return: - """ - return hash(self.__token) - - def __eq__(self, other: Any) -> bool: - """ - Compare current bot with another bot instance - - :param other: - :return: - """ - if not isinstance(other, Bot): - return False - return hash(self) == hash(other) - - async def add_sticker_to_set( - self, - user_id: int, - name: str, - sticker: InputSticker, - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to add a new sticker to a set created by the bot. Emoji sticker sets can have up to 200 stickers. Other sticker sets can have up to 120 stickers. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#addstickertoset - - :param user_id: User identifier of sticker set owner - :param name: Sticker set name - :param sticker: A JSON-serialized object with information about the added sticker. If exactly the same sticker had already been added to the set, then the set isn't changed. - :param request_timeout: Request timeout - :return: Returns :code:`True` on success. - """ - - call = AddStickerToSet( - user_id=user_id, - name=name, - sticker=sticker, - ) - return await self(call, request_timeout=request_timeout) - - async def answer_callback_query( - self, - callback_query_id: str, - text: Optional[str] = None, - show_alert: Optional[bool] = None, - url: Optional[str] = None, - cache_time: Optional[int] = None, - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to send answers to callback queries sent from `inline keyboards `_. The answer will be displayed to the user as a notification at the top of the chat screen or as an alert. On success, :code:`True` is returned. - - Alternatively, the user can be redirected to the specified Game URL. For this option to work, you must first create a game for your bot via `@BotFather `_ and accept the terms. Otherwise, you may use links like :code:`t.me/your_bot?start=XXXX` that open your bot with a parameter. - - Source: https://core.telegram.org/bots/api#answercallbackquery - - :param callback_query_id: Unique identifier for the query to be answered - :param text: Text of the notification. If not specified, nothing will be shown to the user, 0-200 characters - :param show_alert: If :code:`True`, an alert will be shown by the client instead of a notification at the top of the chat screen. Defaults to *false*. - :param url: URL that will be opened by the user's client. If you have created a :class:`aiogram.types.game.Game` and accepted the conditions via `@BotFather `_, specify the URL that opens your game - note that this will only work if the query comes from a `https://core.telegram.org/bots/api#inlinekeyboardbutton `_ *callback_game* button. - :param cache_time: The maximum amount of time in seconds that the result of the callback query may be cached client-side. Telegram apps will support caching starting in version 3.14. Defaults to 0. - :param request_timeout: Request timeout - :return: Otherwise, you may use links like :code:`t.me/your_bot?start=XXXX` that open your bot with a parameter. - """ - - call = AnswerCallbackQuery( - callback_query_id=callback_query_id, - text=text, - show_alert=show_alert, - url=url, - cache_time=cache_time, - ) - return await self(call, request_timeout=request_timeout) - - async def answer_inline_query( - self, - inline_query_id: str, - results: List[ - Union[ - InlineQueryResultCachedAudio, - InlineQueryResultCachedDocument, - InlineQueryResultCachedGif, - InlineQueryResultCachedMpeg4Gif, - InlineQueryResultCachedPhoto, - InlineQueryResultCachedSticker, - InlineQueryResultCachedVideo, - InlineQueryResultCachedVoice, - InlineQueryResultArticle, - InlineQueryResultAudio, - InlineQueryResultContact, - InlineQueryResultGame, - InlineQueryResultDocument, - InlineQueryResultGif, - InlineQueryResultLocation, - InlineQueryResultMpeg4Gif, - InlineQueryResultPhoto, - InlineQueryResultVenue, - InlineQueryResultVideo, - InlineQueryResultVoice, - ] - ], - cache_time: Optional[int] = None, - is_personal: Optional[bool] = None, - next_offset: Optional[str] = None, - button: Optional[InlineQueryResultsButton] = None, - switch_pm_parameter: Optional[str] = None, - switch_pm_text: Optional[str] = None, - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to send answers to an inline query. On success, :code:`True` is returned. - - No more than **50** results per query are allowed. - - Source: https://core.telegram.org/bots/api#answerinlinequery - - :param inline_query_id: Unique identifier for the answered query - :param results: A JSON-serialized array of results for the inline query - :param cache_time: The maximum amount of time in seconds that the result of the inline query may be cached on the server. Defaults to 300. - :param is_personal: Pass :code:`True` 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. - :param next_offset: 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. - :param button: A JSON-serialized object describing a button to be shown above inline query results - :param switch_pm_parameter: `Deep-linking `_ parameter for the /start message sent to the bot when user presses the switch button. 1-64 characters, only :code:`A-Z`, :code:`a-z`, :code:`0-9`, :code:`_` and :code:`-` are allowed. - :param switch_pm_text: If passed, clients will display a button with specified text that switches the user to a private chat with the bot and sends the bot a start message with the parameter *switch_pm_parameter* - :param request_timeout: Request timeout - :return: On success, :code:`True` is returned. - """ - - call = AnswerInlineQuery( - inline_query_id=inline_query_id, - results=results, - cache_time=cache_time, - is_personal=is_personal, - next_offset=next_offset, - button=button, - switch_pm_parameter=switch_pm_parameter, - switch_pm_text=switch_pm_text, - ) - return await self(call, request_timeout=request_timeout) - - async def answer_pre_checkout_query( - self, - pre_checkout_query_id: str, - ok: bool, - error_message: Optional[str] = None, - request_timeout: Optional[int] = None, - ) -> bool: - """ - Once the user has confirmed their payment and shipping details, the Bot API sends the final confirmation in the form of an :class:`aiogram.types.update.Update` with the field *pre_checkout_query*. Use this method to respond to such pre-checkout queries. On success, :code:`True` is returned. **Note:** The Bot API must receive an answer within 10 seconds after the pre-checkout query was sent. - - Source: https://core.telegram.org/bots/api#answerprecheckoutquery - - :param pre_checkout_query_id: Unique identifier for the query to be answered - :param ok: Specify :code:`True` if everything is alright (goods are available, etc.) and the bot is ready to proceed with the order. Use :code:`False` if there are any problems. - :param error_message: Required if *ok* is :code:`False`. 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. - :param request_timeout: Request timeout - :return: **Note:** The Bot API must receive an answer within 10 seconds after the pre-checkout query was sent. - """ - - call = AnswerPreCheckoutQuery( - pre_checkout_query_id=pre_checkout_query_id, - ok=ok, - error_message=error_message, - ) - return await self(call, request_timeout=request_timeout) - - async def answer_shipping_query( - self, - shipping_query_id: str, - ok: bool, - shipping_options: Optional[List[ShippingOption]] = None, - error_message: Optional[str] = None, - request_timeout: Optional[int] = None, - ) -> bool: - """ - If you sent an invoice requesting a shipping address and the parameter *is_flexible* was specified, the Bot API will send an :class:`aiogram.types.update.Update` with a *shipping_query* field to the bot. Use this method to reply to shipping queries. On success, :code:`True` is returned. - - Source: https://core.telegram.org/bots/api#answershippingquery - - :param shipping_query_id: Unique identifier for the query to be answered - :param ok: Pass :code:`True` if delivery to the specified address is possible and :code:`False` if there are any problems (for example, if delivery to the specified address is not possible) - :param shipping_options: Required if *ok* is :code:`True`. A JSON-serialized array of available shipping options. - :param error_message: Required if *ok* is :code:`False`. 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. - :param request_timeout: Request timeout - :return: On success, :code:`True` is returned. - """ - - call = AnswerShippingQuery( - shipping_query_id=shipping_query_id, - ok=ok, - shipping_options=shipping_options, - error_message=error_message, - ) - return await self(call, request_timeout=request_timeout) - - async def answer_web_app_query( - self, - web_app_query_id: str, - result: Union[ - InlineQueryResultCachedAudio, - InlineQueryResultCachedDocument, - InlineQueryResultCachedGif, - InlineQueryResultCachedMpeg4Gif, - InlineQueryResultCachedPhoto, - InlineQueryResultCachedSticker, - InlineQueryResultCachedVideo, - InlineQueryResultCachedVoice, - InlineQueryResultArticle, - InlineQueryResultAudio, - InlineQueryResultContact, - InlineQueryResultGame, - InlineQueryResultDocument, - InlineQueryResultGif, - InlineQueryResultLocation, - InlineQueryResultMpeg4Gif, - InlineQueryResultPhoto, - InlineQueryResultVenue, - InlineQueryResultVideo, - InlineQueryResultVoice, - ], - request_timeout: Optional[int] = None, - ) -> SentWebAppMessage: - """ - Use this method to set the result of an interaction with a `Web App `_ and send a corresponding message on behalf of the user to the chat from which the query originated. On success, a :class:`aiogram.types.sent_web_app_message.SentWebAppMessage` object is returned. - - Source: https://core.telegram.org/bots/api#answerwebappquery - - :param web_app_query_id: Unique identifier for the query to be answered - :param result: A JSON-serialized object describing the message to be sent - :param request_timeout: Request timeout - :return: On success, a :class:`aiogram.types.sent_web_app_message.SentWebAppMessage` object is returned. - """ - - call = AnswerWebAppQuery( - web_app_query_id=web_app_query_id, - result=result, - ) - return await self(call, request_timeout=request_timeout) - - async def approve_chat_join_request( - self, - chat_id: Union[int, str], - user_id: int, - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to approve a chat join request. The bot must be an administrator in the chat for this to work and must have the *can_invite_users* administrator right. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#approvechatjoinrequest - - :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param user_id: Unique identifier of the target user - :param request_timeout: Request timeout - :return: Returns :code:`True` on success. - """ - - call = ApproveChatJoinRequest( - chat_id=chat_id, - user_id=user_id, - ) - return await self(call, request_timeout=request_timeout) - - async def ban_chat_member( - self, - chat_id: Union[int, str], - user_id: int, - until_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None, - revoke_messages: Optional[bool] = None, - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to ban a user in a group, a supergroup or a channel. In the case of supergroups and channels, the user will not be able to return to the chat on their own using invite links, etc., unless `unbanned `_ first. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#banchatmember - - :param chat_id: Unique identifier for the target group or username of the target supergroup or channel (in the format :code:`@channelusername`) - :param user_id: Unique identifier of the target user - :param until_date: Date when the user will be unbanned; Unix time. If user is banned for more than 366 days or less than 30 seconds from the current time they are considered to be banned forever. Applied for supergroups and channels only. - :param revoke_messages: Pass :code:`True` to delete all messages from the chat for the user that is being removed. If :code:`False`, the user will be able to see messages in the group that were sent before the user was removed. Always :code:`True` for supergroups and channels. - :param request_timeout: Request timeout - :return: Returns :code:`True` on success. - """ - - call = BanChatMember( - chat_id=chat_id, - user_id=user_id, - until_date=until_date, - revoke_messages=revoke_messages, - ) - return await self(call, request_timeout=request_timeout) - - async def ban_chat_sender_chat( - self, - chat_id: Union[int, str], - sender_chat_id: int, - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to ban a channel chat in a supergroup or a channel. Until the chat is `unbanned `_, the owner of the banned chat won't be able to send messages on behalf of **any of their channels**. The bot must be an administrator in the supergroup or channel for this to work and must have the appropriate administrator rights. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#banchatsenderchat - - :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param sender_chat_id: Unique identifier of the target sender chat - :param request_timeout: Request timeout - :return: Returns :code:`True` on success. - """ - - call = BanChatSenderChat( - chat_id=chat_id, - sender_chat_id=sender_chat_id, - ) - return await self(call, request_timeout=request_timeout) - - async def close( - self, - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to close the bot instance before moving it from one local server to another. You need to delete the webhook before calling this method to ensure that the bot isn't launched again after server restart. The method will return error 429 in the first 10 minutes after the bot is launched. Returns :code:`True` on success. Requires no parameters. - - Source: https://core.telegram.org/bots/api#close - - :param request_timeout: Request timeout - :return: Requires no parameters. - """ - - call = Close() - return await self(call, request_timeout=request_timeout) - - async def close_forum_topic( - self, - chat_id: Union[int, str], - message_thread_id: int, - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to close an open topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the *can_manage_topics* administrator rights, unless it is the creator of the topic. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#closeforumtopic - - :param chat_id: Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`) - :param message_thread_id: Unique identifier for the target message thread of the forum topic - :param request_timeout: Request timeout - :return: Returns :code:`True` on success. - """ - - call = CloseForumTopic( - chat_id=chat_id, - message_thread_id=message_thread_id, - ) - return await self(call, request_timeout=request_timeout) - - async def copy_message( - self, - chat_id: Union[int, str], - from_chat_id: Union[int, str], - message_id: int, - message_thread_id: Optional[int] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - show_caption_above_media: Optional[Union[bool, Default]] = Default( - "show_caption_above_media" - ), - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - request_timeout: Optional[int] = None, - ) -> MessageId: - """ - Use this method to copy messages of any kind. Service messages, paid media messages, giveaway messages, giveaway winners messages, and invoice messages can't be copied. A quiz :class:`aiogram.methods.poll.Poll` can be copied only if the value of the field *correct_option_id* is known to the bot. The method is analogous to the method :class:`aiogram.methods.forward_message.ForwardMessage`, but the copied message doesn't have a link to the original message. Returns the :class:`aiogram.types.message_id.MessageId` of the sent message on success. - - Source: https://core.telegram.org/bots/api#copymessage - - :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param from_chat_id: Unique identifier for the chat where the original message was sent (or channel username in the format :code:`@channelusername`) - :param message_id: Message identifier in the chat specified in *from_chat_id* - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only - :param caption: New caption for media, 0-1024 characters after entities parsing. If not specified, the original caption is kept - :param parse_mode: Mode for parsing entities in the new caption. See `formatting options `_ for more details. - :param caption_entities: A JSON-serialized list of special entities that appear in the new caption, which can be specified instead of *parse_mode* - :param show_caption_above_media: Pass :code:`True`, if the caption must be shown above the message media. Ignored if a new caption isn't specified. - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param reply_to_message_id: If the message is a reply, ID of the original message - :param request_timeout: Request timeout - :return: Returns the :class:`aiogram.types.message_id.MessageId` of the sent message on success. - """ - - call = CopyMessage( - chat_id=chat_id, - from_chat_id=from_chat_id, - message_id=message_id, - message_thread_id=message_thread_id, - caption=caption, - parse_mode=parse_mode, - caption_entities=caption_entities, - show_caption_above_media=show_caption_above_media, - disable_notification=disable_notification, - protect_content=protect_content, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - reply_to_message_id=reply_to_message_id, - ) - return await self(call, request_timeout=request_timeout) - - async def create_chat_invite_link( - self, - chat_id: Union[int, str], - name: Optional[str] = None, - expire_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None, - member_limit: Optional[int] = None, - creates_join_request: Optional[bool] = None, - request_timeout: Optional[int] = None, - ) -> ChatInviteLink: - """ - Use this method to create an additional invite link for a chat. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. The link can be revoked using the method :class:`aiogram.methods.revoke_chat_invite_link.RevokeChatInviteLink`. Returns the new invite link as :class:`aiogram.types.chat_invite_link.ChatInviteLink` object. - - Source: https://core.telegram.org/bots/api#createchatinvitelink - - :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param name: Invite link name; 0-32 characters - :param expire_date: Point in time (Unix timestamp) when the link will expire - :param member_limit: The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999 - :param creates_join_request: :code:`True`, if users joining the chat via the link need to be approved by chat administrators. If :code:`True`, *member_limit* can't be specified - :param request_timeout: Request timeout - :return: Returns the new invite link as :class:`aiogram.types.chat_invite_link.ChatInviteLink` object. - """ - - call = CreateChatInviteLink( - chat_id=chat_id, - name=name, - expire_date=expire_date, - member_limit=member_limit, - creates_join_request=creates_join_request, - ) - return await self(call, request_timeout=request_timeout) - - async def create_forum_topic( - self, - chat_id: Union[int, str], - name: str, - icon_color: Optional[int] = None, - icon_custom_emoji_id: Optional[str] = None, - request_timeout: Optional[int] = None, - ) -> ForumTopic: - """ - Use this method to create a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the *can_manage_topics* administrator rights. Returns information about the created topic as a :class:`aiogram.types.forum_topic.ForumTopic` object. - - Source: https://core.telegram.org/bots/api#createforumtopic - - :param chat_id: Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`) - :param name: Topic name, 1-128 characters - :param icon_color: Color of the topic icon in RGB format. Currently, must be one of 7322096 (0x6FB9F0), 16766590 (0xFFD67E), 13338331 (0xCB86DB), 9367192 (0x8EEE98), 16749490 (0xFF93B2), or 16478047 (0xFB6F5F) - :param icon_custom_emoji_id: Unique identifier of the custom emoji shown as the topic icon. Use :class:`aiogram.methods.get_forum_topic_icon_stickers.GetForumTopicIconStickers` to get all allowed custom emoji identifiers. - :param request_timeout: Request timeout - :return: Returns information about the created topic as a :class:`aiogram.types.forum_topic.ForumTopic` object. - """ - - call = CreateForumTopic( - chat_id=chat_id, - name=name, - icon_color=icon_color, - icon_custom_emoji_id=icon_custom_emoji_id, - ) - return await self(call, request_timeout=request_timeout) - - async def create_invoice_link( - self, - title: str, - description: str, - payload: str, - currency: str, - prices: List[LabeledPrice], - provider_token: Optional[str] = None, - max_tip_amount: Optional[int] = None, - suggested_tip_amounts: Optional[List[int]] = None, - provider_data: Optional[str] = None, - photo_url: Optional[str] = None, - photo_size: Optional[int] = None, - photo_width: Optional[int] = None, - photo_height: Optional[int] = None, - need_name: Optional[bool] = None, - need_phone_number: Optional[bool] = None, - need_email: Optional[bool] = None, - need_shipping_address: Optional[bool] = None, - send_phone_number_to_provider: Optional[bool] = None, - send_email_to_provider: Optional[bool] = None, - is_flexible: Optional[bool] = None, - request_timeout: Optional[int] = None, - ) -> str: - """ - Use this method to create a link for an invoice. Returns the created invoice link as *String* on success. - - Source: https://core.telegram.org/bots/api#createinvoicelink - - :param title: Product name, 1-32 characters - :param description: Product description, 1-255 characters - :param payload: Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes. - :param currency: Three-letter ISO 4217 currency code, see `more on currencies `_. Pass 'XTR' for payments in `Telegram Stars `_. - :param prices: Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.). Must contain exactly one item for payments in `Telegram Stars `_. - :param provider_token: Payment provider token, obtained via `@BotFather `_. Pass an empty string for payments in `Telegram Stars `_. - :param max_tip_amount: The maximum accepted amount for tips in the *smallest units* of the currency (integer, **not** float/double). For example, for a maximum tip of :code:`US$ 1.45` pass :code:`max_tip_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). Defaults to 0. Not supported for payments in `Telegram Stars `_. - :param suggested_tip_amounts: A JSON-serialized array 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*. - :param provider_data: JSON-serialized 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. - :param photo_url: URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service. - :param photo_size: Photo size in bytes - :param photo_width: Photo width - :param photo_height: Photo height - :param need_name: Pass :code:`True` if you require the user's full name to complete the order. Ignored for payments in `Telegram Stars `_. - :param need_phone_number: Pass :code:`True` if you require the user's phone number to complete the order. Ignored for payments in `Telegram Stars `_. - :param need_email: Pass :code:`True` if you require the user's email address to complete the order. Ignored for payments in `Telegram Stars `_. - :param need_shipping_address: Pass :code:`True` if you require the user's shipping address to complete the order. Ignored for payments in `Telegram Stars `_. - :param send_phone_number_to_provider: Pass :code:`True` if the user's phone number should be sent to the provider. Ignored for payments in `Telegram Stars `_. - :param send_email_to_provider: Pass :code:`True` if the user's email address should be sent to the provider. Ignored for payments in `Telegram Stars `_. - :param is_flexible: Pass :code:`True` if the final price depends on the shipping method. Ignored for payments in `Telegram Stars `_. - :param request_timeout: Request timeout - :return: Returns the created invoice link as *String* on success. - """ - - call = CreateInvoiceLink( - title=title, - description=description, - payload=payload, - currency=currency, - prices=prices, - provider_token=provider_token, - max_tip_amount=max_tip_amount, - suggested_tip_amounts=suggested_tip_amounts, - provider_data=provider_data, - photo_url=photo_url, - photo_size=photo_size, - photo_width=photo_width, - photo_height=photo_height, - need_name=need_name, - need_phone_number=need_phone_number, - need_email=need_email, - need_shipping_address=need_shipping_address, - send_phone_number_to_provider=send_phone_number_to_provider, - send_email_to_provider=send_email_to_provider, - is_flexible=is_flexible, - ) - return await self(call, request_timeout=request_timeout) - - async def create_new_sticker_set( - self, - user_id: int, - name: str, - title: str, - stickers: List[InputSticker], - sticker_type: Optional[str] = None, - needs_repainting: Optional[bool] = None, - sticker_format: Optional[str] = None, - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to create a new sticker set owned by a user. The bot will be able to edit the sticker set thus created. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#createnewstickerset - - :param user_id: User identifier of created sticker set owner - :param name: Short name of sticker set, to be used in :code:`t.me/addstickers/` URLs (e.g., *animals*). Can contain only English letters, digits and underscores. Must begin with a letter, can't contain consecutive underscores and must end in :code:`"_by_"`. :code:`` is case insensitive. 1-64 characters. - :param title: Sticker set title, 1-64 characters - :param stickers: A JSON-serialized list of 1-50 initial stickers to be added to the sticker set - :param sticker_type: Type of stickers in the set, pass 'regular', 'mask', or 'custom_emoji'. By default, a regular sticker set is created. - :param needs_repainting: Pass :code:`True` if stickers in the sticker set must be repainted to the color of text 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 sticker sets only - :param sticker_format: Format of stickers in the set, must be one of 'static', 'animated', 'video' - :param request_timeout: Request timeout - :return: Returns :code:`True` on success. - """ - - call = CreateNewStickerSet( - user_id=user_id, - name=name, - title=title, - stickers=stickers, - sticker_type=sticker_type, - needs_repainting=needs_repainting, - sticker_format=sticker_format, - ) - return await self(call, request_timeout=request_timeout) - - async def decline_chat_join_request( - self, - chat_id: Union[int, str], - user_id: int, - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to decline a chat join request. The bot must be an administrator in the chat for this to work and must have the *can_invite_users* administrator right. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#declinechatjoinrequest - - :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param user_id: Unique identifier of the target user - :param request_timeout: Request timeout - :return: Returns :code:`True` on success. - """ - - call = DeclineChatJoinRequest( - chat_id=chat_id, - user_id=user_id, - ) - return await self(call, request_timeout=request_timeout) - - async def delete_chat_photo( - self, - chat_id: Union[int, str], - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to delete a chat photo. Photos can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#deletechatphoto - - :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param request_timeout: Request timeout - :return: Returns :code:`True` on success. - """ - - call = DeleteChatPhoto( - chat_id=chat_id, - ) - return await self(call, request_timeout=request_timeout) - - async def delete_chat_sticker_set( - self, - chat_id: Union[int, str], - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to delete a group sticker set from a supergroup. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Use the field *can_set_sticker_set* optionally returned in :class:`aiogram.methods.get_chat.GetChat` requests to check if the bot can use this method. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#deletechatstickerset - - :param chat_id: Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`) - :param request_timeout: Request timeout - :return: Returns :code:`True` on success. - """ - - call = DeleteChatStickerSet( - chat_id=chat_id, - ) - return await self(call, request_timeout=request_timeout) - - async def delete_forum_topic( - self, - chat_id: Union[int, str], - message_thread_id: int, - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to delete a forum topic along with all its messages in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the *can_delete_messages* administrator rights. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#deleteforumtopic - - :param chat_id: Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`) - :param message_thread_id: Unique identifier for the target message thread of the forum topic - :param request_timeout: Request timeout - :return: Returns :code:`True` on success. - """ - - call = DeleteForumTopic( - chat_id=chat_id, - message_thread_id=message_thread_id, - ) - return await self(call, request_timeout=request_timeout) - - async def delete_message( - self, - chat_id: Union[int, str], - message_id: int, - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to delete a message, including service messages, with the following limitations: - - - A message can only be deleted if it was sent less than 48 hours ago. - - - Service messages about a supergroup, channel, or forum topic creation can't be deleted. - - - A dice message in a private chat can only be deleted if it was sent more than 24 hours ago. - - - Bots can delete outgoing messages in private chats, groups, and supergroups. - - - Bots can delete incoming messages in private chats. - - - Bots granted *can_post_messages* permissions can delete outgoing messages in channels. - - - If the bot is an administrator of a group, it can delete any message there. - - - If the bot has *can_delete_messages* permission in a supergroup or a channel, it can delete any message there. - - Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#deletemessage - - :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param message_id: Identifier of the message to delete - :param request_timeout: Request timeout - :return: Use this method to delete a message, including service messages, with the following limitations: - """ - - call = DeleteMessage( - chat_id=chat_id, - message_id=message_id, - ) - return await self(call, request_timeout=request_timeout) - - async def delete_my_commands( - self, - scope: Optional[ - Union[ - BotCommandScopeDefault, - BotCommandScopeAllPrivateChats, - BotCommandScopeAllGroupChats, - BotCommandScopeAllChatAdministrators, - BotCommandScopeChat, - BotCommandScopeChatAdministrators, - BotCommandScopeChatMember, - ] - ] = None, - language_code: Optional[str] = None, - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to delete the list of the bot's commands for the given scope and user language. After deletion, `higher level commands `_ will be shown to affected users. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#deletemycommands - - :param scope: A JSON-serialized object, describing scope of users for which the commands are relevant. Defaults to :class:`aiogram.types.bot_command_scope_default.BotCommandScopeDefault`. - :param language_code: A two-letter ISO 639-1 language code. If empty, commands will be applied to all users from the given scope, for whose language there are no dedicated commands - :param request_timeout: Request timeout - :return: Returns :code:`True` on success. - """ - - call = DeleteMyCommands( - scope=scope, - language_code=language_code, - ) - return await self(call, request_timeout=request_timeout) - - async def delete_sticker_from_set( - self, - sticker: str, - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to delete a sticker from a set created by the bot. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#deletestickerfromset - - :param sticker: File identifier of the sticker - :param request_timeout: Request timeout - :return: Returns :code:`True` on success. - """ - - call = DeleteStickerFromSet( - sticker=sticker, - ) - return await self(call, request_timeout=request_timeout) - - async def delete_webhook( - self, - drop_pending_updates: Optional[bool] = None, - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to remove webhook integration if you decide to switch back to :class:`aiogram.methods.get_updates.GetUpdates`. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#deletewebhook - - :param drop_pending_updates: Pass :code:`True` to drop all pending updates - :param request_timeout: Request timeout - :return: Returns :code:`True` on success. - """ - - call = DeleteWebhook( - drop_pending_updates=drop_pending_updates, - ) - return await self(call, request_timeout=request_timeout) - - async def edit_chat_invite_link( - self, - chat_id: Union[int, str], - invite_link: str, - name: Optional[str] = None, - expire_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None, - member_limit: Optional[int] = None, - creates_join_request: Optional[bool] = None, - request_timeout: Optional[int] = None, - ) -> ChatInviteLink: - """ - Use this method to edit a non-primary invite link created by the bot. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the edited invite link as a :class:`aiogram.types.chat_invite_link.ChatInviteLink` object. - - Source: https://core.telegram.org/bots/api#editchatinvitelink - - :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param invite_link: The invite link to edit - :param name: Invite link name; 0-32 characters - :param expire_date: Point in time (Unix timestamp) when the link will expire - :param member_limit: The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999 - :param creates_join_request: :code:`True`, if users joining the chat via the link need to be approved by chat administrators. If :code:`True`, *member_limit* can't be specified - :param request_timeout: Request timeout - :return: Returns the edited invite link as a :class:`aiogram.types.chat_invite_link.ChatInviteLink` object. - """ - - call = EditChatInviteLink( - chat_id=chat_id, - invite_link=invite_link, - name=name, - expire_date=expire_date, - member_limit=member_limit, - creates_join_request=creates_join_request, - ) - return await self(call, request_timeout=request_timeout) - - async def edit_forum_topic( - self, - chat_id: Union[int, str], - message_thread_id: int, - name: Optional[str] = None, - icon_custom_emoji_id: Optional[str] = None, - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to edit name and icon of a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the *can_manage_topics* administrator rights, unless it is the creator of the topic. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#editforumtopic - - :param chat_id: Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`) - :param message_thread_id: Unique identifier for the target message thread of the forum topic - :param name: New topic name, 0-128 characters. If not specified or empty, the current name of the topic will be kept - :param icon_custom_emoji_id: New unique identifier of the custom emoji shown as the topic icon. Use :class:`aiogram.methods.get_forum_topic_icon_stickers.GetForumTopicIconStickers` to get all allowed custom emoji identifiers. Pass an empty string to remove the icon. If not specified, the current icon will be kept - :param request_timeout: Request timeout - :return: Returns :code:`True` on success. - """ - - call = EditForumTopic( - chat_id=chat_id, - message_thread_id=message_thread_id, - name=name, - icon_custom_emoji_id=icon_custom_emoji_id, - ) - return await self(call, request_timeout=request_timeout) - - async def edit_message_caption( - self, - business_connection_id: Optional[str] = None, - chat_id: Optional[Union[int, str]] = None, - message_id: Optional[int] = None, - inline_message_id: Optional[str] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - show_caption_above_media: Optional[Union[bool, Default]] = Default( - "show_caption_above_media" - ), - reply_markup: Optional[InlineKeyboardMarkup] = None, - request_timeout: Optional[int] = None, - ) -> Union[Message, bool]: - """ - Use this method to edit captions of messages. On success, if the edited message is not an inline message, the edited :class:`aiogram.types.message.Message` is returned, otherwise :code:`True` is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within **48 hours** from the time they were sent. - - Source: https://core.telegram.org/bots/api#editmessagecaption - - :param business_connection_id: Unique identifier of the business connection on behalf of which the message to be edited was sent - :param chat_id: Required if *inline_message_id* is not specified. Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param message_id: Required if *inline_message_id* is not specified. Identifier of the message to edit - :param inline_message_id: Required if *chat_id* and *message_id* are not specified. Identifier of the inline message - :param caption: New caption of the message, 0-1024 characters after entities parsing - :param parse_mode: Mode for parsing entities in the message caption. See `formatting options `_ for more details. - :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode* - :param show_caption_above_media: Pass :code:`True`, if the caption must be shown above the message media. Supported only for animation, photo and video messages. - :param reply_markup: A JSON-serialized object for an `inline keyboard `_. - :param request_timeout: Request timeout - :return: Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within **48 hours** from the time they were sent. - """ - - call = EditMessageCaption( - business_connection_id=business_connection_id, - chat_id=chat_id, - message_id=message_id, - inline_message_id=inline_message_id, - caption=caption, - parse_mode=parse_mode, - caption_entities=caption_entities, - show_caption_above_media=show_caption_above_media, - reply_markup=reply_markup, - ) - return await self(call, request_timeout=request_timeout) - - async def edit_message_live_location( - self, - latitude: float, - longitude: float, - business_connection_id: Optional[str] = None, - chat_id: Optional[Union[int, str]] = None, - message_id: Optional[int] = None, - inline_message_id: Optional[str] = None, - live_period: Optional[int] = None, - horizontal_accuracy: Optional[float] = None, - heading: Optional[int] = None, - proximity_alert_radius: Optional[int] = None, - reply_markup: Optional[InlineKeyboardMarkup] = None, - request_timeout: Optional[int] = None, - ) -> Union[Message, bool]: - """ - Use this method to edit live location messages. A location can be edited until its *live_period* expires or editing is explicitly disabled by a call to :class:`aiogram.methods.stop_message_live_location.StopMessageLiveLocation`. On success, if the edited message is not an inline message, the edited :class:`aiogram.types.message.Message` is returned, otherwise :code:`True` is returned. - - Source: https://core.telegram.org/bots/api#editmessagelivelocation - - :param latitude: Latitude of new location - :param longitude: Longitude of new location - :param business_connection_id: Unique identifier of the business connection on behalf of which the message to be edited was sent - :param chat_id: Required if *inline_message_id* is not specified. Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param message_id: Required if *inline_message_id* is not specified. Identifier of the message to edit - :param inline_message_id: Required if *chat_id* and *message_id* are not specified. Identifier of the inline message - :param live_period: New period in seconds during which the location can be updated, starting from the message send date. If 0x7FFFFFFF is specified, then the location can be updated forever. Otherwise, the new value must not exceed the current *live_period* by more than a day, and the live location expiration date must remain within the next 90 days. If not specified, then *live_period* remains unchanged - :param horizontal_accuracy: The radius of uncertainty for the location, measured in meters; 0-1500 - :param heading: Direction in which the user is moving, in degrees. Must be between 1 and 360 if specified. - :param proximity_alert_radius: The maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified. - :param reply_markup: A JSON-serialized object for a new `inline keyboard `_. - :param request_timeout: Request timeout - :return: On success, if the edited message is not an inline message, the edited :class:`aiogram.types.message.Message` is returned, otherwise :code:`True` is returned. - """ - - call = EditMessageLiveLocation( - latitude=latitude, - longitude=longitude, - business_connection_id=business_connection_id, - chat_id=chat_id, - message_id=message_id, - inline_message_id=inline_message_id, - live_period=live_period, - horizontal_accuracy=horizontal_accuracy, - heading=heading, - proximity_alert_radius=proximity_alert_radius, - reply_markup=reply_markup, - ) - return await self(call, request_timeout=request_timeout) - - async def edit_message_media( - self, - media: Union[ - InputMediaAnimation, - InputMediaDocument, - InputMediaAudio, - InputMediaPhoto, - InputMediaVideo, - ], - business_connection_id: Optional[str] = None, - chat_id: Optional[Union[int, str]] = None, - message_id: Optional[int] = None, - inline_message_id: Optional[str] = None, - reply_markup: Optional[InlineKeyboardMarkup] = None, - request_timeout: Optional[int] = None, - ) -> Union[Message, bool]: - """ - Use this method to edit animation, audio, document, photo, or video messages. If a message is part of a message album, then it can be edited only to an audio for audio albums, only to a document for document albums and to a photo or a video otherwise. When an inline message is edited, a new file can't be uploaded; use a previously uploaded file via its file_id or specify a URL. On success, if the edited message is not an inline message, the edited :class:`aiogram.types.message.Message` is returned, otherwise :code:`True` is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within **48 hours** from the time they were sent. - - Source: https://core.telegram.org/bots/api#editmessagemedia - - :param media: A JSON-serialized object for a new media content of the message - :param business_connection_id: Unique identifier of the business connection on behalf of which the message to be edited was sent - :param chat_id: Required if *inline_message_id* is not specified. Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param message_id: Required if *inline_message_id* is not specified. Identifier of the message to edit - :param inline_message_id: Required if *chat_id* and *message_id* are not specified. Identifier of the inline message - :param reply_markup: A JSON-serialized object for a new `inline keyboard `_. - :param request_timeout: Request timeout - :return: Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within **48 hours** from the time they were sent. - """ - - call = EditMessageMedia( - media=media, - business_connection_id=business_connection_id, - chat_id=chat_id, - message_id=message_id, - inline_message_id=inline_message_id, - reply_markup=reply_markup, - ) - return await self(call, request_timeout=request_timeout) - - async def edit_message_reply_markup( - self, - business_connection_id: Optional[str] = None, - chat_id: Optional[Union[int, str]] = None, - message_id: Optional[int] = None, - inline_message_id: Optional[str] = None, - reply_markup: Optional[InlineKeyboardMarkup] = None, - request_timeout: Optional[int] = None, - ) -> Union[Message, bool]: - """ - Use this method to edit only the reply markup of messages. On success, if the edited message is not an inline message, the edited :class:`aiogram.types.message.Message` is returned, otherwise :code:`True` is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within **48 hours** from the time they were sent. - - Source: https://core.telegram.org/bots/api#editmessagereplymarkup - - :param business_connection_id: Unique identifier of the business connection on behalf of which the message to be edited was sent - :param chat_id: Required if *inline_message_id* is not specified. Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param message_id: Required if *inline_message_id* is not specified. Identifier of the message to edit - :param inline_message_id: Required if *chat_id* and *message_id* are not specified. Identifier of the inline message - :param reply_markup: A JSON-serialized object for an `inline keyboard `_. - :param request_timeout: Request timeout - :return: Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within **48 hours** from the time they were sent. - """ - - call = EditMessageReplyMarkup( - business_connection_id=business_connection_id, - chat_id=chat_id, - message_id=message_id, - inline_message_id=inline_message_id, - reply_markup=reply_markup, - ) - return await self(call, request_timeout=request_timeout) - - async def edit_message_text( - self, - text: str, - business_connection_id: Optional[str] = None, - chat_id: Optional[Union[int, str]] = None, - message_id: Optional[int] = None, - inline_message_id: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - entities: Optional[List[MessageEntity]] = None, - link_preview_options: Optional[LinkPreviewOptions] = None, - reply_markup: Optional[InlineKeyboardMarkup] = None, - disable_web_page_preview: Optional[Union[bool, Default]] = Default( - "link_preview_is_disabled" - ), - request_timeout: Optional[int] = None, - ) -> Union[Message, bool]: - """ - Use this method to edit text and `game `_ messages. On success, if the edited message is not an inline message, the edited :class:`aiogram.types.message.Message` is returned, otherwise :code:`True` is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within **48 hours** from the time they were sent. - - Source: https://core.telegram.org/bots/api#editmessagetext - - :param text: New text of the message, 1-4096 characters after entities parsing - :param business_connection_id: Unique identifier of the business connection on behalf of which the message to be edited was sent - :param chat_id: Required if *inline_message_id* is not specified. Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param message_id: Required if *inline_message_id* is not specified. Identifier of the message to edit - :param inline_message_id: Required if *chat_id* and *message_id* are not specified. Identifier of the inline message - :param parse_mode: Mode for parsing entities in the message text. See `formatting options `_ for more details. - :param entities: A JSON-serialized list of special entities that appear in message text, which can be specified instead of *parse_mode* - :param link_preview_options: Link preview generation options for the message - :param reply_markup: A JSON-serialized object for an `inline keyboard `_. - :param disable_web_page_preview: Disables link previews for links in this message - :param request_timeout: Request timeout - :return: Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within **48 hours** from the time they were sent. - """ - - call = EditMessageText( - text=text, - business_connection_id=business_connection_id, - chat_id=chat_id, - message_id=message_id, - inline_message_id=inline_message_id, - parse_mode=parse_mode, - entities=entities, - link_preview_options=link_preview_options, - reply_markup=reply_markup, - disable_web_page_preview=disable_web_page_preview, - ) - return await self(call, request_timeout=request_timeout) - - async def export_chat_invite_link( - self, - chat_id: Union[int, str], - request_timeout: Optional[int] = None, - ) -> str: - """ - Use this method to generate a new primary invite link for a chat; any previously generated primary link is revoked. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the new invite link as *String* on success. - - Note: Each administrator in a chat generates their own invite links. Bots can't use invite links generated by other administrators. If you want your bot to work with invite links, it will need to generate its own link using :class:`aiogram.methods.export_chat_invite_link.ExportChatInviteLink` or by calling the :class:`aiogram.methods.get_chat.GetChat` method. If your bot needs to generate a new primary invite link replacing its previous one, use :class:`aiogram.methods.export_chat_invite_link.ExportChatInviteLink` again. - - Source: https://core.telegram.org/bots/api#exportchatinvitelink - - :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param request_timeout: Request timeout - :return: If your bot needs to generate a new primary invite link replacing its previous one, use :class:`aiogram.methods.export_chat_invite_link.ExportChatInviteLink` again. - """ - - call = ExportChatInviteLink( - chat_id=chat_id, - ) - return await self(call, request_timeout=request_timeout) - - async def forward_message( - self, - chat_id: Union[int, str], - from_chat_id: Union[int, str], - message_id: int, - message_thread_id: Optional[int] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - request_timeout: Optional[int] = None, - ) -> Message: - """ - Use this method to forward messages of any kind. Service messages and messages with protected content can't be forwarded. On success, the sent :class:`aiogram.types.message.Message` is returned. - - Source: https://core.telegram.org/bots/api#forwardmessage - - :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param from_chat_id: Unique identifier for the chat where the original message was sent (or channel username in the format :code:`@channelusername`) - :param message_id: Message identifier in the chat specified in *from_chat_id* - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the forwarded message from forwarding and saving - :param request_timeout: Request timeout - :return: On success, the sent :class:`aiogram.types.message.Message` is returned. - """ - - call = ForwardMessage( - chat_id=chat_id, - from_chat_id=from_chat_id, - message_id=message_id, - message_thread_id=message_thread_id, - disable_notification=disable_notification, - protect_content=protect_content, - ) - return await self(call, request_timeout=request_timeout) - - async def get_chat( - self, - chat_id: Union[int, str], - request_timeout: Optional[int] = None, - ) -> ChatFullInfo: - """ - Use this method to get up-to-date information about the chat. Returns a :class:`aiogram.types.chat_full_info.ChatFullInfo` object on success. - - Source: https://core.telegram.org/bots/api#getchat - - :param chat_id: Unique identifier for the target chat or username of the target supergroup or channel (in the format :code:`@channelusername`) - :param request_timeout: Request timeout - :return: Returns a :class:`aiogram.types.chat_full_info.ChatFullInfo` object on success. - """ - - call = GetChat( - chat_id=chat_id, - ) - return await self(call, request_timeout=request_timeout) - - async def get_chat_administrators( - self, - chat_id: Union[int, str], - request_timeout: Optional[int] = None, - ) -> List[ - Union[ - ChatMemberOwner, - ChatMemberAdministrator, - ChatMemberMember, - ChatMemberRestricted, - ChatMemberLeft, - ChatMemberBanned, - ] - ]: - """ - Use this method to get a list of administrators in a chat, which aren't bots. Returns an Array of :class:`aiogram.types.chat_member.ChatMember` objects. - - Source: https://core.telegram.org/bots/api#getchatadministrators - - :param chat_id: Unique identifier for the target chat or username of the target supergroup or channel (in the format :code:`@channelusername`) - :param request_timeout: Request timeout - :return: Returns an Array of :class:`aiogram.types.chat_member.ChatMember` objects. - """ - - call = GetChatAdministrators( - chat_id=chat_id, - ) - return await self(call, request_timeout=request_timeout) - - async def get_chat_member( - self, - chat_id: Union[int, str], - user_id: int, - request_timeout: Optional[int] = None, - ) -> Union[ - ChatMemberOwner, - ChatMemberAdministrator, - ChatMemberMember, - ChatMemberRestricted, - ChatMemberLeft, - ChatMemberBanned, - ]: - """ - Use this method to get information about a member of a chat. The method is only guaranteed to work for other users if the bot is an administrator in the chat. Returns a :class:`aiogram.types.chat_member.ChatMember` object on success. - - Source: https://core.telegram.org/bots/api#getchatmember - - :param chat_id: Unique identifier for the target chat or username of the target supergroup or channel (in the format :code:`@channelusername`) - :param user_id: Unique identifier of the target user - :param request_timeout: Request timeout - :return: Returns a :class:`aiogram.types.chat_member.ChatMember` object on success. - """ - - call = GetChatMember( - chat_id=chat_id, - user_id=user_id, - ) - return await self(call, request_timeout=request_timeout) - - async def get_chat_member_count( - self, - chat_id: Union[int, str], - request_timeout: Optional[int] = None, - ) -> int: - """ - Use this method to get the number of members in a chat. Returns *Int* on success. - - Source: https://core.telegram.org/bots/api#getchatmembercount - - :param chat_id: Unique identifier for the target chat or username of the target supergroup or channel (in the format :code:`@channelusername`) - :param request_timeout: Request timeout - :return: Returns *Int* on success. - """ - - call = GetChatMemberCount( - chat_id=chat_id, - ) - return await self(call, request_timeout=request_timeout) - - async def get_chat_menu_button( - self, - chat_id: Optional[int] = None, - request_timeout: Optional[int] = None, - ) -> Union[MenuButtonDefault, MenuButtonWebApp, MenuButtonCommands]: - """ - Use this method to get the current value of the bot's menu button in a private chat, or the default menu button. Returns :class:`aiogram.types.menu_button.MenuButton` on success. - - Source: https://core.telegram.org/bots/api#getchatmenubutton - - :param chat_id: Unique identifier for the target private chat. If not specified, default bot's menu button will be returned - :param request_timeout: Request timeout - :return: Returns :class:`aiogram.types.menu_button.MenuButton` on success. - """ - - call = GetChatMenuButton( - chat_id=chat_id, - ) - return await self(call, request_timeout=request_timeout) - - async def get_custom_emoji_stickers( - self, - custom_emoji_ids: List[str], - request_timeout: Optional[int] = None, - ) -> List[Sticker]: - """ - Use this method to get information about custom emoji stickers by their identifiers. Returns an Array of :class:`aiogram.types.sticker.Sticker` objects. - - Source: https://core.telegram.org/bots/api#getcustomemojistickers - - :param custom_emoji_ids: A JSON-serialized list of custom emoji identifiers. At most 200 custom emoji identifiers can be specified. - :param request_timeout: Request timeout - :return: Returns an Array of :class:`aiogram.types.sticker.Sticker` objects. - """ - - call = GetCustomEmojiStickers( - custom_emoji_ids=custom_emoji_ids, - ) - return await self(call, request_timeout=request_timeout) - - async def get_file( - self, - file_id: str, - request_timeout: Optional[int] = None, - ) -> File: - """ - Use this method to get basic information about a file and prepare it for downloading. For the moment, bots can download files of up to 20MB in size. On success, a :class:`aiogram.types.file.File` object is returned. The file can then be downloaded via the link :code:`https://api.telegram.org/file/bot/`, where :code:`` is taken from the response. It is guaranteed that the link will be valid for at least 1 hour. When the link expires, a new one can be requested by calling :class:`aiogram.methods.get_file.GetFile` again. - **Note:** This function may not preserve the original file name and MIME type. You should save the file's MIME type and name (if available) when the File object is received. - - Source: https://core.telegram.org/bots/api#getfile - - :param file_id: File identifier to get information about - :param request_timeout: Request timeout - :return: You should save the file's MIME type and name (if available) when the File object is received. - """ - - call = GetFile( - file_id=file_id, - ) - return await self(call, request_timeout=request_timeout) - - async def get_forum_topic_icon_stickers( - self, - request_timeout: Optional[int] = None, - ) -> List[Sticker]: - """ - Use this method to get custom emoji stickers, which can be used as a forum topic icon by any user. Requires no parameters. Returns an Array of :class:`aiogram.types.sticker.Sticker` objects. - - Source: https://core.telegram.org/bots/api#getforumtopiciconstickers - - :param request_timeout: Request timeout - :return: Returns an Array of :class:`aiogram.types.sticker.Sticker` objects. - """ - - call = GetForumTopicIconStickers() - return await self(call, request_timeout=request_timeout) - - async def get_game_high_scores( - self, - user_id: int, - chat_id: Optional[int] = None, - message_id: Optional[int] = None, - inline_message_id: Optional[str] = None, - request_timeout: Optional[int] = None, - ) -> List[GameHighScore]: - """ - Use this method to get data for high score tables. Will return the score of the specified user and several of their neighbors in a game. Returns an Array of :class:`aiogram.types.game_high_score.GameHighScore` objects. - - This method will currently return scores for the target user, plus two of their closest neighbors on each side. Will also return the top three users if the user and their neighbors are not among them. Please note that this behavior is subject to change. - - Source: https://core.telegram.org/bots/api#getgamehighscores - - :param user_id: Target user id - :param chat_id: Required if *inline_message_id* is not specified. Unique identifier for the target chat - :param message_id: Required if *inline_message_id* is not specified. Identifier of the sent message - :param inline_message_id: Required if *chat_id* and *message_id* are not specified. Identifier of the inline message - :param request_timeout: Request timeout - :return: Please note that this behavior is subject to change. - """ - - call = GetGameHighScores( - user_id=user_id, - chat_id=chat_id, - message_id=message_id, - inline_message_id=inline_message_id, - ) - return await self(call, request_timeout=request_timeout) - - async def get_me( - self, - request_timeout: Optional[int] = None, - ) -> User: - """ - A simple method for testing your bot's authentication token. Requires no parameters. Returns basic information about the bot in form of a :class:`aiogram.types.user.User` object. - - Source: https://core.telegram.org/bots/api#getme - - :param request_timeout: Request timeout - :return: Returns basic information about the bot in form of a :class:`aiogram.types.user.User` object. - """ - - call = GetMe() - return await self(call, request_timeout=request_timeout) - - async def get_my_commands( - self, - scope: Optional[ - Union[ - BotCommandScopeDefault, - BotCommandScopeAllPrivateChats, - BotCommandScopeAllGroupChats, - BotCommandScopeAllChatAdministrators, - BotCommandScopeChat, - BotCommandScopeChatAdministrators, - BotCommandScopeChatMember, - ] - ] = None, - language_code: Optional[str] = None, - request_timeout: Optional[int] = None, - ) -> List[BotCommand]: - """ - Use this method to get the current list of the bot's commands for the given scope and user language. Returns an Array of :class:`aiogram.types.bot_command.BotCommand` objects. If commands aren't set, an empty list is returned. - - Source: https://core.telegram.org/bots/api#getmycommands - - :param scope: A JSON-serialized object, describing scope of users. Defaults to :class:`aiogram.types.bot_command_scope_default.BotCommandScopeDefault`. - :param language_code: A two-letter ISO 639-1 language code or an empty string - :param request_timeout: Request timeout - :return: If commands aren't set, an empty list is returned. - """ - - call = GetMyCommands( - scope=scope, - language_code=language_code, - ) - return await self(call, request_timeout=request_timeout) - - async def get_my_default_administrator_rights( - self, - for_channels: Optional[bool] = None, - request_timeout: Optional[int] = None, - ) -> ChatAdministratorRights: - """ - Use this method to get the current default administrator rights of the bot. Returns :class:`aiogram.types.chat_administrator_rights.ChatAdministratorRights` on success. - - Source: https://core.telegram.org/bots/api#getmydefaultadministratorrights - - :param for_channels: Pass :code:`True` to get default administrator rights of the bot in channels. Otherwise, default administrator rights of the bot for groups and supergroups will be returned. - :param request_timeout: Request timeout - :return: Returns :class:`aiogram.types.chat_administrator_rights.ChatAdministratorRights` on success. - """ - - call = GetMyDefaultAdministratorRights( - for_channels=for_channels, - ) - return await self(call, request_timeout=request_timeout) - - async def get_sticker_set( - self, - name: str, - request_timeout: Optional[int] = None, - ) -> StickerSet: - """ - Use this method to get a sticker set. On success, a :class:`aiogram.types.sticker_set.StickerSet` object is returned. - - Source: https://core.telegram.org/bots/api#getstickerset - - :param name: Name of the sticker set - :param request_timeout: Request timeout - :return: On success, a :class:`aiogram.types.sticker_set.StickerSet` object is returned. - """ - - call = GetStickerSet( - name=name, - ) - return await self(call, request_timeout=request_timeout) - - async def get_updates( - self, - offset: Optional[int] = None, - limit: Optional[int] = None, - timeout: Optional[int] = None, - allowed_updates: Optional[List[str]] = None, - request_timeout: Optional[int] = None, - ) -> List[Update]: - """ - Use this method to receive incoming updates using long polling (`wiki `_). Returns an Array of :class:`aiogram.types.update.Update` objects. - - **Notes** - - **1.** This method will not work if an outgoing webhook is set up. - - **2.** In order to avoid getting duplicate updates, recalculate *offset* after each server response. - - Source: https://core.telegram.org/bots/api#getupdates - - :param offset: Identifier of the first update to be returned. Must be greater by one than the highest among the identifiers of previously received updates. By default, updates starting with the earliest unconfirmed update are returned. An update is considered confirmed as soon as :class:`aiogram.methods.get_updates.GetUpdates` is called with an *offset* higher than its *update_id*. The negative offset can be specified to retrieve updates starting from *-offset* update from the end of the updates queue. All previous updates will be forgotten. - :param limit: Limits the number of updates to be retrieved. Values between 1-100 are accepted. Defaults to 100. - :param timeout: Timeout in seconds for long polling. Defaults to 0, i.e. usual short polling. Should be positive, short polling should be used for testing purposes only. - :param allowed_updates: A JSON-serialized list of the update types you want your bot to receive. For example, specify :code:`["message", "edited_channel_post", "callback_query"]` to only receive updates of these types. See :class:`aiogram.types.update.Update` for a complete list of available update types. Specify an empty list to receive all update types except *chat_member*, *message_reaction*, and *message_reaction_count* (default). If not specified, the previous setting will be used. - :param request_timeout: Request timeout - :return: Returns an Array of :class:`aiogram.types.update.Update` objects. - """ - - call = GetUpdates( - offset=offset, - limit=limit, - timeout=timeout, - allowed_updates=allowed_updates, - ) - return await self(call, request_timeout=request_timeout) - - async def get_user_profile_photos( - self, - user_id: int, - offset: Optional[int] = None, - limit: Optional[int] = None, - request_timeout: Optional[int] = None, - ) -> UserProfilePhotos: - """ - Use this method to get a list of profile pictures for a user. Returns a :class:`aiogram.types.user_profile_photos.UserProfilePhotos` object. - - Source: https://core.telegram.org/bots/api#getuserprofilephotos - - :param user_id: Unique identifier of the target user - :param offset: Sequential number of the first photo to be returned. By default, all photos are returned. - :param limit: Limits the number of photos to be retrieved. Values between 1-100 are accepted. Defaults to 100. - :param request_timeout: Request timeout - :return: Returns a :class:`aiogram.types.user_profile_photos.UserProfilePhotos` object. - """ - - call = GetUserProfilePhotos( - user_id=user_id, - offset=offset, - limit=limit, - ) - return await self(call, request_timeout=request_timeout) - - async def get_webhook_info( - self, - request_timeout: Optional[int] = None, - ) -> WebhookInfo: - """ - Use this method to get current webhook status. Requires no parameters. On success, returns a :class:`aiogram.types.webhook_info.WebhookInfo` object. If the bot is using :class:`aiogram.methods.get_updates.GetUpdates`, will return an object with the *url* field empty. - - Source: https://core.telegram.org/bots/api#getwebhookinfo - - :param request_timeout: Request timeout - :return: If the bot is using :class:`aiogram.methods.get_updates.GetUpdates`, will return an object with the *url* field empty. - """ - - call = GetWebhookInfo() - return await self(call, request_timeout=request_timeout) - - async def leave_chat( - self, - chat_id: Union[int, str], - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method for your bot to leave a group, supergroup or channel. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#leavechat - - :param chat_id: Unique identifier for the target chat or username of the target supergroup or channel (in the format :code:`@channelusername`) - :param request_timeout: Request timeout - :return: Returns :code:`True` on success. - """ - - call = LeaveChat( - chat_id=chat_id, - ) - return await self(call, request_timeout=request_timeout) - - async def log_out( - self, - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to log out from the cloud Bot API server before launching the bot locally. You **must** log out the bot before running it locally, otherwise there is no guarantee that the bot will receive updates. After a successful call, you can immediately log in on a local server, but will not be able to log in back to the cloud Bot API server for 10 minutes. Returns :code:`True` on success. Requires no parameters. - - Source: https://core.telegram.org/bots/api#logout - - :param request_timeout: Request timeout - :return: Requires no parameters. - """ - - call = LogOut() - return await self(call, request_timeout=request_timeout) - - async def pin_chat_message( - self, - chat_id: Union[int, str], - message_id: int, - business_connection_id: Optional[str] = None, - disable_notification: Optional[bool] = None, - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to add a message to the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#pinchatmessage - - :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param message_id: Identifier of a message to pin - :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be pinned - :param disable_notification: Pass :code:`True` if it is not necessary to send a notification to all chat members about the new pinned message. Notifications are always disabled in channels and private chats. - :param request_timeout: Request timeout - :return: Returns :code:`True` on success. - """ - - call = PinChatMessage( - chat_id=chat_id, - message_id=message_id, - business_connection_id=business_connection_id, - disable_notification=disable_notification, - ) - return await self(call, request_timeout=request_timeout) - - async def promote_chat_member( - self, - chat_id: Union[int, str], - user_id: int, - is_anonymous: Optional[bool] = None, - can_manage_chat: Optional[bool] = None, - can_delete_messages: Optional[bool] = None, - can_manage_video_chats: Optional[bool] = None, - can_restrict_members: Optional[bool] = None, - can_promote_members: Optional[bool] = None, - can_change_info: Optional[bool] = None, - can_invite_users: Optional[bool] = None, - can_post_stories: Optional[bool] = None, - can_edit_stories: Optional[bool] = None, - can_delete_stories: Optional[bool] = None, - can_post_messages: Optional[bool] = None, - can_edit_messages: Optional[bool] = None, - can_pin_messages: Optional[bool] = None, - can_manage_topics: Optional[bool] = None, - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to promote or demote a user in a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Pass :code:`False` for all boolean parameters to demote a user. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#promotechatmember - - :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param user_id: Unique identifier of the target user - :param is_anonymous: Pass :code:`True` if the administrator's presence in the chat is hidden - :param can_manage_chat: Pass :code:`True` if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages and ignore slow mode. Implied by any other administrator privilege. - :param can_delete_messages: Pass :code:`True` if the administrator can delete messages of other users - :param can_manage_video_chats: Pass :code:`True` if the administrator can manage video chats - :param can_restrict_members: Pass :code:`True` if the administrator can restrict, ban or unban chat members, or access supergroup statistics - :param can_promote_members: Pass :code:`True` if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have promoted, directly or indirectly (promoted by administrators that were appointed by him) - :param can_change_info: Pass :code:`True` if the administrator can change chat title, photo and other settings - :param can_invite_users: Pass :code:`True` if the administrator can invite new users to the chat - :param can_post_stories: Pass :code:`True` if the administrator can post stories to the chat - :param can_edit_stories: Pass :code:`True` if the administrator can edit stories posted by other users, post stories to the chat page, pin chat stories, and access the chat's story archive - :param can_delete_stories: Pass :code:`True` if the administrator can delete stories posted by other users - :param can_post_messages: Pass :code:`True` if the administrator can post messages in the channel, or access channel statistics; for channels only - :param can_edit_messages: Pass :code:`True` if the administrator can edit messages of other users and can pin messages; for channels only - :param can_pin_messages: Pass :code:`True` if the administrator can pin messages; for supergroups only - :param can_manage_topics: Pass :code:`True` if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only - :param request_timeout: Request timeout - :return: Returns :code:`True` on success. - """ - - call = PromoteChatMember( - chat_id=chat_id, - user_id=user_id, - is_anonymous=is_anonymous, - can_manage_chat=can_manage_chat, - can_delete_messages=can_delete_messages, - can_manage_video_chats=can_manage_video_chats, - can_restrict_members=can_restrict_members, - can_promote_members=can_promote_members, - can_change_info=can_change_info, - can_invite_users=can_invite_users, - can_post_stories=can_post_stories, - can_edit_stories=can_edit_stories, - can_delete_stories=can_delete_stories, - can_post_messages=can_post_messages, - can_edit_messages=can_edit_messages, - can_pin_messages=can_pin_messages, - can_manage_topics=can_manage_topics, - ) - return await self(call, request_timeout=request_timeout) - - async def reopen_forum_topic( - self, - chat_id: Union[int, str], - message_thread_id: int, - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to reopen a closed topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the *can_manage_topics* administrator rights, unless it is the creator of the topic. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#reopenforumtopic - - :param chat_id: Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`) - :param message_thread_id: Unique identifier for the target message thread of the forum topic - :param request_timeout: Request timeout - :return: Returns :code:`True` on success. - """ - - call = ReopenForumTopic( - chat_id=chat_id, - message_thread_id=message_thread_id, - ) - return await self(call, request_timeout=request_timeout) - - async def restrict_chat_member( - self, - chat_id: Union[int, str], - user_id: int, - permissions: ChatPermissions, - use_independent_chat_permissions: Optional[bool] = None, - until_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None, - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to restrict a user in a supergroup. The bot must be an administrator in the supergroup for this to work and must have the appropriate administrator rights. Pass :code:`True` for all permissions to lift restrictions from a user. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#restrictchatmember - - :param chat_id: Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`) - :param user_id: Unique identifier of the target user - :param permissions: A JSON-serialized object for new user permissions - :param use_independent_chat_permissions: Pass :code:`True` if chat permissions are set independently. Otherwise, the *can_send_other_messages* and *can_add_web_page_previews* permissions will imply the *can_send_messages*, *can_send_audios*, *can_send_documents*, *can_send_photos*, *can_send_videos*, *can_send_video_notes*, and *can_send_voice_notes* permissions; the *can_send_polls* permission will imply the *can_send_messages* permission. - :param until_date: Date when restrictions will be lifted for the user; Unix time. If user is restricted for more than 366 days or less than 30 seconds from the current time, they are considered to be restricted forever - :param request_timeout: Request timeout - :return: Returns :code:`True` on success. - """ - - call = RestrictChatMember( - chat_id=chat_id, - user_id=user_id, - permissions=permissions, - use_independent_chat_permissions=use_independent_chat_permissions, - until_date=until_date, - ) - return await self(call, request_timeout=request_timeout) - - async def revoke_chat_invite_link( - self, - chat_id: Union[int, str], - invite_link: str, - request_timeout: Optional[int] = None, - ) -> ChatInviteLink: - """ - Use this method to revoke an invite link created by the bot. If the primary link is revoked, a new link is automatically generated. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the revoked invite link as :class:`aiogram.types.chat_invite_link.ChatInviteLink` object. - - Source: https://core.telegram.org/bots/api#revokechatinvitelink - - :param chat_id: Unique identifier of the target chat or username of the target channel (in the format :code:`@channelusername`) - :param invite_link: The invite link to revoke - :param request_timeout: Request timeout - :return: Returns the revoked invite link as :class:`aiogram.types.chat_invite_link.ChatInviteLink` object. - """ - - call = RevokeChatInviteLink( - chat_id=chat_id, - invite_link=invite_link, - ) - return await self(call, request_timeout=request_timeout) - - async def send_animation( - self, - chat_id: Union[int, str], - animation: Union[InputFile, str], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - duration: Optional[int] = None, - width: Optional[int] = None, - height: Optional[int] = None, - thumbnail: Optional[InputFile] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - show_caption_above_media: Optional[Union[bool, Default]] = Default( - "show_caption_above_media" - ), - has_spoiler: Optional[bool] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - request_timeout: Optional[int] = None, - ) -> Message: - """ - Use this method to send animation files (GIF or H.264/MPEG-4 AVC video without sound). On success, the sent :class:`aiogram.types.message.Message` is returned. Bots can currently send animation files of up to 50 MB in size, this limit may be changed in the future. - - Source: https://core.telegram.org/bots/api#sendanimation - - :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param animation: Animation to send. Pass a file_id as String to send an animation that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an animation from the Internet, or upload a new animation using multipart/form-data. :ref:`More information on Sending Files » ` - :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only - :param duration: Duration of sent animation in seconds - :param width: Animation width - :param height: Animation height - :param thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More information on Sending Files » ` - :param caption: Animation caption (may also be used when resending animation by *file_id*), 0-1024 characters after entities parsing - :param parse_mode: Mode for parsing entities in the animation caption. See `formatting options `_ for more details. - :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode* - :param show_caption_above_media: Pass :code:`True`, if the caption must be shown above the message media - :param has_spoiler: Pass :code:`True` if the animation needs to be covered with a spoiler animation - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param reply_to_message_id: If the message is a reply, ID of the original message - :param request_timeout: Request timeout - :return: Bots can currently send animation files of up to 50 MB in size, this limit may be changed in the future. - """ - - call = SendAnimation( - chat_id=chat_id, - animation=animation, - business_connection_id=business_connection_id, - message_thread_id=message_thread_id, - duration=duration, - width=width, - height=height, - thumbnail=thumbnail, - caption=caption, - parse_mode=parse_mode, - caption_entities=caption_entities, - show_caption_above_media=show_caption_above_media, - has_spoiler=has_spoiler, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - reply_to_message_id=reply_to_message_id, - ) - return await self(call, request_timeout=request_timeout) - - async def send_audio( - self, - chat_id: Union[int, str], - audio: Union[InputFile, str], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - duration: Optional[int] = None, - performer: Optional[str] = None, - title: Optional[str] = None, - thumbnail: Optional[InputFile] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - request_timeout: Optional[int] = None, - ) -> Message: - """ - Use this method to send audio files, if you want Telegram clients to display them in the music player. Your audio must be in the .MP3 or .M4A format. On success, the sent :class:`aiogram.types.message.Message` is returned. Bots can currently send audio files of up to 50 MB in size, this limit may be changed in the future. - For sending voice messages, use the :class:`aiogram.methods.send_voice.SendVoice` method instead. - - Source: https://core.telegram.org/bots/api#sendaudio - - :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param audio: Audio file to send. Pass a file_id as String to send an audio file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an audio file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » ` - :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only - :param caption: Audio caption, 0-1024 characters after entities parsing - :param parse_mode: Mode for parsing entities in the audio caption. See `formatting options `_ for more details. - :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode* - :param duration: Duration of the audio in seconds - :param performer: Performer - :param title: Track name - :param thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More information on Sending Files » ` - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param reply_to_message_id: If the message is a reply, ID of the original message - :param request_timeout: Request timeout - :return: Bots can currently send audio files of up to 50 MB in size, this limit may be changed in the future. - """ - - call = SendAudio( - chat_id=chat_id, - audio=audio, - business_connection_id=business_connection_id, - message_thread_id=message_thread_id, - caption=caption, - parse_mode=parse_mode, - caption_entities=caption_entities, - duration=duration, - performer=performer, - title=title, - thumbnail=thumbnail, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - reply_to_message_id=reply_to_message_id, - ) - return await self(call, request_timeout=request_timeout) - - async def send_chat_action( - self, - chat_id: Union[int, str], - action: str, - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method when you need to tell the user that something is happening on the bot's side. The status is set for 5 seconds or less (when a message arrives from your bot, Telegram clients clear its typing status). Returns :code:`True` on success. - - Example: The `ImageBot `_ needs some time to process a request and upload the image. Instead of sending a text message along the lines of 'Retrieving image, please wait…', the bot may use :class:`aiogram.methods.send_chat_action.SendChatAction` with *action* = *upload_photo*. The user will see a 'sending photo' status for the bot. - - We only recommend using this method when a response from the bot will take a **noticeable** amount of time to arrive. - - Source: https://core.telegram.org/bots/api#sendchataction - - :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param action: Type of action to broadcast. Choose one, depending on what the user is about to receive: *typing* for `text messages `_, *upload_photo* for `photos `_, *record_video* or *upload_video* for `videos `_, *record_voice* or *upload_voice* for `voice notes `_, *upload_document* for `general files `_, *choose_sticker* for `stickers `_, *find_location* for `location data `_, *record_video_note* or *upload_video_note* for `video notes `_. - :param business_connection_id: Unique identifier of the business connection on behalf of which the action will be sent - :param message_thread_id: Unique identifier for the target message thread; for supergroups only - :param request_timeout: Request timeout - :return: The user will see a 'sending photo' status for the bot. - """ - - call = SendChatAction( - chat_id=chat_id, - action=action, - business_connection_id=business_connection_id, - message_thread_id=message_thread_id, - ) - return await self(call, request_timeout=request_timeout) - - async def send_contact( - self, - chat_id: Union[int, str], - phone_number: str, - first_name: str, - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - last_name: Optional[str] = None, - vcard: Optional[str] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - request_timeout: Optional[int] = None, - ) -> Message: - """ - Use this method to send phone contacts. On success, the sent :class:`aiogram.types.message.Message` is returned. - - Source: https://core.telegram.org/bots/api#sendcontact - - :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param phone_number: Contact's phone number - :param first_name: Contact's first name - :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only - :param last_name: Contact's last name - :param vcard: Additional data about the contact in the form of a `vCard `_, 0-2048 bytes - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param reply_to_message_id: If the message is a reply, ID of the original message - :param request_timeout: Request timeout - :return: On success, the sent :class:`aiogram.types.message.Message` is returned. - """ - - call = SendContact( - chat_id=chat_id, - phone_number=phone_number, - first_name=first_name, - business_connection_id=business_connection_id, - message_thread_id=message_thread_id, - last_name=last_name, - vcard=vcard, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - reply_to_message_id=reply_to_message_id, - ) - return await self(call, request_timeout=request_timeout) - - async def send_dice( - self, - chat_id: Union[int, str], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - emoji: Optional[str] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - request_timeout: Optional[int] = None, - ) -> Message: - """ - Use this method to send an animated emoji that will display a random value. On success, the sent :class:`aiogram.types.message.Message` is returned. - - Source: https://core.telegram.org/bots/api#senddice - - :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only - :param emoji: Emoji on which the dice throw animation is based. Currently, must be one of '🎲', '🎯', '🏀', '⚽', '🎳', or '🎰'. Dice can have values 1-6 for '🎲', '🎯' and '🎳', values 1-5 for '🏀' and '⚽', and values 1-64 for '🎰'. Defaults to '🎲' - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param reply_to_message_id: If the message is a reply, ID of the original message - :param request_timeout: Request timeout - :return: On success, the sent :class:`aiogram.types.message.Message` is returned. - """ - - call = SendDice( - chat_id=chat_id, - business_connection_id=business_connection_id, - message_thread_id=message_thread_id, - emoji=emoji, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - reply_to_message_id=reply_to_message_id, - ) - return await self(call, request_timeout=request_timeout) - - async def send_document( - self, - chat_id: Union[int, str], - document: Union[InputFile, str], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - thumbnail: Optional[InputFile] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - disable_content_type_detection: Optional[bool] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - request_timeout: Optional[int] = None, - ) -> Message: - """ - Use this method to send general files. On success, the sent :class:`aiogram.types.message.Message` is returned. Bots can currently send files of any type of up to 50 MB in size, this limit may be changed in the future. - - Source: https://core.telegram.org/bots/api#senddocument - - :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param document: File to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » ` - :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only - :param thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More information on Sending Files » ` - :param caption: Document caption (may also be used when resending documents by *file_id*), 0-1024 characters after entities parsing - :param parse_mode: Mode for parsing entities in the document caption. See `formatting options `_ for more details. - :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode* - :param disable_content_type_detection: Disables automatic server-side content type detection for files uploaded using multipart/form-data - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param reply_to_message_id: If the message is a reply, ID of the original message - :param request_timeout: Request timeout - :return: Bots can currently send files of any type of up to 50 MB in size, this limit may be changed in the future. - """ - - call = SendDocument( - chat_id=chat_id, - document=document, - business_connection_id=business_connection_id, - message_thread_id=message_thread_id, - thumbnail=thumbnail, - caption=caption, - parse_mode=parse_mode, - caption_entities=caption_entities, - disable_content_type_detection=disable_content_type_detection, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - reply_to_message_id=reply_to_message_id, - ) - return await self(call, request_timeout=request_timeout) - - async def send_game( - self, - chat_id: int, - game_short_name: str, - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[InlineKeyboardMarkup] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - request_timeout: Optional[int] = None, - ) -> Message: - """ - Use this method to send a game. On success, the sent :class:`aiogram.types.message.Message` is returned. - - Source: https://core.telegram.org/bots/api#sendgame - - :param chat_id: Unique identifier for the target chat - :param game_short_name: Short name of the game, serves as the unique identifier for the game. Set up your games via `@BotFather `_. - :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_parameters: Description of the message to reply to - :param reply_markup: A JSON-serialized object for an `inline keyboard `_. If empty, one 'Play game_title' button will be shown. If not empty, the first button must launch the game. - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param reply_to_message_id: If the message is a reply, ID of the original message - :param request_timeout: Request timeout - :return: On success, the sent :class:`aiogram.types.message.Message` is returned. - """ - - call = SendGame( - chat_id=chat_id, - game_short_name=game_short_name, - business_connection_id=business_connection_id, - message_thread_id=message_thread_id, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - reply_to_message_id=reply_to_message_id, - ) - return await self(call, request_timeout=request_timeout) - - async def send_invoice( - self, - chat_id: Union[int, str], - title: str, - description: str, - payload: str, - currency: str, - prices: List[LabeledPrice], - message_thread_id: Optional[int] = None, - provider_token: Optional[str] = None, - max_tip_amount: Optional[int] = None, - suggested_tip_amounts: Optional[List[int]] = None, - start_parameter: Optional[str] = None, - provider_data: Optional[str] = None, - photo_url: Optional[str] = None, - photo_size: Optional[int] = None, - photo_width: Optional[int] = None, - photo_height: Optional[int] = None, - need_name: Optional[bool] = None, - need_phone_number: Optional[bool] = None, - need_email: Optional[bool] = None, - need_shipping_address: Optional[bool] = None, - send_phone_number_to_provider: Optional[bool] = None, - send_email_to_provider: Optional[bool] = None, - is_flexible: Optional[bool] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[InlineKeyboardMarkup] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - request_timeout: Optional[int] = None, - ) -> Message: - """ - Use this method to send invoices. On success, the sent :class:`aiogram.types.message.Message` is returned. - - Source: https://core.telegram.org/bots/api#sendinvoice - - :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param title: Product name, 1-32 characters - :param description: Product description, 1-255 characters - :param payload: Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes. - :param currency: Three-letter ISO 4217 currency code, see `more on currencies `_. Pass 'XTR' for payments in `Telegram Stars `_. - :param prices: Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.). Must contain exactly one item for payments in `Telegram Stars `_. - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only - :param provider_token: Payment provider token, obtained via `@BotFather `_. Pass an empty string for payments in `Telegram Stars `_. - :param max_tip_amount: The maximum accepted amount for tips in the *smallest units* of the currency (integer, **not** float/double). For example, for a maximum tip of :code:`US$ 1.45` pass :code:`max_tip_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). Defaults to 0. Not supported for payments in `Telegram Stars `_. - :param suggested_tip_amounts: A JSON-serialized array 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*. - :param start_parameter: Unique deep-linking parameter. If left empty, **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. If non-empty, 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 - :param provider_data: JSON-serialized 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. - :param photo_url: 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. - :param photo_size: Photo size in bytes - :param photo_width: Photo width - :param photo_height: Photo height - :param need_name: Pass :code:`True` if you require the user's full name to complete the order. Ignored for payments in `Telegram Stars `_. - :param need_phone_number: Pass :code:`True` if you require the user's phone number to complete the order. Ignored for payments in `Telegram Stars `_. - :param need_email: Pass :code:`True` if you require the user's email address to complete the order. Ignored for payments in `Telegram Stars `_. - :param need_shipping_address: Pass :code:`True` if you require the user's shipping address to complete the order. Ignored for payments in `Telegram Stars `_. - :param send_phone_number_to_provider: Pass :code:`True` if the user's phone number should be sent to the provider. Ignored for payments in `Telegram Stars `_. - :param send_email_to_provider: Pass :code:`True` if the user's email address should be sent to the provider. Ignored for payments in `Telegram Stars `_. - :param is_flexible: Pass :code:`True` if the final price depends on the shipping method. Ignored for payments in `Telegram Stars `_. - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_parameters: Description of the message to reply to - :param reply_markup: A JSON-serialized object for an `inline keyboard `_. If empty, one 'Pay :code:`total price`' button will be shown. If not empty, the first button must be a Pay button. - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param reply_to_message_id: If the message is a reply, ID of the original message - :param request_timeout: Request timeout - :return: On success, the sent :class:`aiogram.types.message.Message` is returned. - """ - - call = SendInvoice( - chat_id=chat_id, - title=title, - description=description, - payload=payload, - currency=currency, - prices=prices, - message_thread_id=message_thread_id, - provider_token=provider_token, - max_tip_amount=max_tip_amount, - suggested_tip_amounts=suggested_tip_amounts, - start_parameter=start_parameter, - provider_data=provider_data, - photo_url=photo_url, - photo_size=photo_size, - photo_width=photo_width, - photo_height=photo_height, - need_name=need_name, - need_phone_number=need_phone_number, - need_email=need_email, - need_shipping_address=need_shipping_address, - send_phone_number_to_provider=send_phone_number_to_provider, - send_email_to_provider=send_email_to_provider, - is_flexible=is_flexible, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - reply_to_message_id=reply_to_message_id, - ) - return await self(call, request_timeout=request_timeout) - - async def send_location( - self, - chat_id: Union[int, str], - latitude: float, - longitude: float, - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - horizontal_accuracy: Optional[float] = None, - live_period: Optional[int] = None, - heading: Optional[int] = None, - proximity_alert_radius: Optional[int] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - request_timeout: Optional[int] = None, - ) -> Message: - """ - Use this method to send point on the map. On success, the sent :class:`aiogram.types.message.Message` is returned. - - Source: https://core.telegram.org/bots/api#sendlocation - - :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param latitude: Latitude of the location - :param longitude: Longitude of the location - :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only - :param horizontal_accuracy: The radius of uncertainty for the location, measured in meters; 0-1500 - :param live_period: Period in seconds during which the location will be updated (see `Live Locations `_, should be between 60 and 86400, or 0x7FFFFFFF for live locations that can be edited indefinitely. - :param heading: For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified. - :param proximity_alert_radius: For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified. - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param reply_to_message_id: If the message is a reply, ID of the original message - :param request_timeout: Request timeout - :return: On success, the sent :class:`aiogram.types.message.Message` is returned. - """ - - call = SendLocation( - chat_id=chat_id, - latitude=latitude, - longitude=longitude, - business_connection_id=business_connection_id, - message_thread_id=message_thread_id, - horizontal_accuracy=horizontal_accuracy, - live_period=live_period, - heading=heading, - proximity_alert_radius=proximity_alert_radius, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - reply_to_message_id=reply_to_message_id, - ) - return await self(call, request_timeout=request_timeout) - - async def send_media_group( - self, - chat_id: Union[int, str], - media: List[Union[InputMediaAudio, InputMediaDocument, InputMediaPhoto, InputMediaVideo]], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - request_timeout: Optional[int] = None, - ) -> List[Message]: - """ - Use this method to send a group of photos, videos, documents or audios as an album. Documents and audio files can be only grouped in an album with messages of the same type. On success, an array of `Messages `_ that were sent is returned. - - Source: https://core.telegram.org/bots/api#sendmediagroup - - :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param media: A JSON-serialized array describing messages to be sent, must include 2-10 items - :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only - :param disable_notification: Sends messages `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent messages from forwarding and saving - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_parameters: Description of the message to reply to - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param reply_to_message_id: If the messages are a reply, ID of the original message - :param request_timeout: Request timeout - :return: On success, an array of `Messages `_ that were sent is returned. - """ - - call = SendMediaGroup( - chat_id=chat_id, - media=media, - business_connection_id=business_connection_id, - message_thread_id=message_thread_id, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - allow_sending_without_reply=allow_sending_without_reply, - reply_to_message_id=reply_to_message_id, - ) - return await self(call, request_timeout=request_timeout) - - async def send_message( - self, - chat_id: Union[int, str], - text: str, - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - entities: Optional[List[MessageEntity]] = None, - link_preview_options: Optional[Union[LinkPreviewOptions, Default]] = Default( - "link_preview" - ), - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - disable_web_page_preview: Optional[Union[bool, Default]] = Default( - "link_preview_is_disabled" - ), - reply_to_message_id: Optional[int] = None, - request_timeout: Optional[int] = None, - ) -> Message: - """ - Use this method to send text messages. On success, the sent :class:`aiogram.types.message.Message` is returned. - - Source: https://core.telegram.org/bots/api#sendmessage - - :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param text: Text of the message to be sent, 1-4096 characters after entities parsing - :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only - :param parse_mode: Mode for parsing entities in the message text. See `formatting options `_ for more details. - :param entities: A JSON-serialized list of special entities that appear in message text, which can be specified instead of *parse_mode* - :param link_preview_options: Link preview generation options for the message - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param disable_web_page_preview: Disables link previews for links in this message - :param reply_to_message_id: If the message is a reply, ID of the original message - :param request_timeout: Request timeout - :return: On success, the sent :class:`aiogram.types.message.Message` is returned. - """ - - call = SendMessage( - chat_id=chat_id, - text=text, - business_connection_id=business_connection_id, - message_thread_id=message_thread_id, - parse_mode=parse_mode, - entities=entities, - link_preview_options=link_preview_options, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - disable_web_page_preview=disable_web_page_preview, - reply_to_message_id=reply_to_message_id, - ) - return await self(call, request_timeout=request_timeout) - - async def send_photo( - self, - chat_id: Union[int, str], - photo: Union[InputFile, str], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - show_caption_above_media: Optional[Union[bool, Default]] = Default( - "show_caption_above_media" - ), - has_spoiler: Optional[bool] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - request_timeout: Optional[int] = None, - ) -> Message: - """ - Use this method to send photos. On success, the sent :class:`aiogram.types.message.Message` is returned. - - Source: https://core.telegram.org/bots/api#sendphoto - - :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param photo: Photo to send. Pass a file_id as String to send a photo that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a photo from the Internet, or upload a new photo using multipart/form-data. The photo must be at most 10 MB in size. The photo's width and height must not exceed 10000 in total. Width and height ratio must be at most 20. :ref:`More information on Sending Files » ` - :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only - :param caption: Photo caption (may also be used when resending photos by *file_id*), 0-1024 characters after entities parsing - :param parse_mode: Mode for parsing entities in the photo caption. See `formatting options `_ for more details. - :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode* - :param show_caption_above_media: Pass :code:`True`, if the caption must be shown above the message media - :param has_spoiler: Pass :code:`True` if the photo needs to be covered with a spoiler animation - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param reply_to_message_id: If the message is a reply, ID of the original message - :param request_timeout: Request timeout - :return: On success, the sent :class:`aiogram.types.message.Message` is returned. - """ - - call = SendPhoto( - chat_id=chat_id, - photo=photo, - business_connection_id=business_connection_id, - message_thread_id=message_thread_id, - caption=caption, - parse_mode=parse_mode, - caption_entities=caption_entities, - show_caption_above_media=show_caption_above_media, - has_spoiler=has_spoiler, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - reply_to_message_id=reply_to_message_id, - ) - return await self(call, request_timeout=request_timeout) - - async def send_poll( - self, - chat_id: Union[int, str], - question: str, - options: List[Union[InputPollOption, str]], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - question_parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - question_entities: Optional[List[MessageEntity]] = None, - is_anonymous: Optional[bool] = None, - type: Optional[str] = None, - allows_multiple_answers: Optional[bool] = None, - correct_option_id: Optional[int] = None, - explanation: Optional[str] = None, - explanation_parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - explanation_entities: Optional[List[MessageEntity]] = None, - open_period: Optional[int] = None, - close_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None, - is_closed: Optional[bool] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - request_timeout: Optional[int] = None, - ) -> Message: - """ - Use this method to send a native poll. On success, the sent :class:`aiogram.types.message.Message` is returned. - - Source: https://core.telegram.org/bots/api#sendpoll - - :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param question: Poll question, 1-300 characters - :param options: A JSON-serialized list of 2-10 answer options - :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only - :param question_parse_mode: Mode for parsing entities in the question. See `formatting options `_ for more details. Currently, only custom emoji entities are allowed - :param question_entities: A JSON-serialized list of special entities that appear in the poll question. It can be specified instead of *question_parse_mode* - :param is_anonymous: :code:`True`, if the poll needs to be anonymous, defaults to :code:`True` - :param type: Poll type, 'quiz' or 'regular', defaults to 'regular' - :param allows_multiple_answers: :code:`True`, if the poll allows multiple answers, ignored for polls in quiz mode, defaults to :code:`False` - :param correct_option_id: 0-based identifier of the correct answer option, required for polls in quiz mode - :param explanation: Text that is shown when a user chooses an incorrect answer or taps on the lamp icon in a quiz-style poll, 0-200 characters with at most 2 line feeds after entities parsing - :param explanation_parse_mode: Mode for parsing entities in the explanation. See `formatting options `_ for more details. - :param explanation_entities: A JSON-serialized list of special entities that appear in the poll explanation. It can be specified instead of *explanation_parse_mode* - :param open_period: Amount of time in seconds the poll will be active after creation, 5-600. Can't be used together with *close_date*. - :param close_date: 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 *open_period*. - :param is_closed: Pass :code:`True` if the poll needs to be immediately closed. This can be useful for poll preview. - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param reply_to_message_id: If the message is a reply, ID of the original message - :param request_timeout: Request timeout - :return: On success, the sent :class:`aiogram.types.message.Message` is returned. - """ - - call = SendPoll( - chat_id=chat_id, - question=question, - options=options, - business_connection_id=business_connection_id, - message_thread_id=message_thread_id, - question_parse_mode=question_parse_mode, - question_entities=question_entities, - is_anonymous=is_anonymous, - type=type, - allows_multiple_answers=allows_multiple_answers, - correct_option_id=correct_option_id, - explanation=explanation, - explanation_parse_mode=explanation_parse_mode, - explanation_entities=explanation_entities, - open_period=open_period, - close_date=close_date, - is_closed=is_closed, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - reply_to_message_id=reply_to_message_id, - ) - return await self(call, request_timeout=request_timeout) - - async def send_sticker( - self, - chat_id: Union[int, str], - sticker: Union[InputFile, str], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - emoji: Optional[str] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - request_timeout: Optional[int] = None, - ) -> Message: - """ - Use this method to send static .WEBP, `animated `_ .TGS, or `video `_ .WEBM stickers. On success, the sent :class:`aiogram.types.message.Message` is returned. - - Source: https://core.telegram.org/bots/api#sendsticker - - :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param sticker: Sticker to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a .WEBP sticker from the Internet, or upload a new .WEBP, .TGS, or .WEBM sticker using multipart/form-data. :ref:`More information on Sending Files » `. Video and animated stickers can't be sent via an HTTP URL. - :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only - :param emoji: Emoji associated with the sticker; only for just uploaded stickers - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param reply_to_message_id: If the message is a reply, ID of the original message - :param request_timeout: Request timeout - :return: On success, the sent :class:`aiogram.types.message.Message` is returned. - """ - - call = SendSticker( - chat_id=chat_id, - sticker=sticker, - business_connection_id=business_connection_id, - message_thread_id=message_thread_id, - emoji=emoji, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - reply_to_message_id=reply_to_message_id, - ) - return await self(call, request_timeout=request_timeout) - - async def send_venue( - self, - chat_id: Union[int, str], - latitude: float, - longitude: float, - title: str, - address: str, - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - foursquare_id: Optional[str] = None, - foursquare_type: Optional[str] = None, - google_place_id: Optional[str] = None, - google_place_type: Optional[str] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - request_timeout: Optional[int] = None, - ) -> Message: - """ - Use this method to send information about a venue. On success, the sent :class:`aiogram.types.message.Message` is returned. - - Source: https://core.telegram.org/bots/api#sendvenue - - :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param latitude: Latitude of the venue - :param longitude: Longitude of the venue - :param title: Name of the venue - :param address: Address of the venue - :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only - :param foursquare_id: Foursquare identifier of the venue - :param foursquare_type: Foursquare type of the venue, if known. (For example, 'arts_entertainment/default', 'arts_entertainment/aquarium' or 'food/icecream'.) - :param google_place_id: Google Places identifier of the venue - :param google_place_type: Google Places type of the venue. (See `supported types `_.) - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param reply_to_message_id: If the message is a reply, ID of the original message - :param request_timeout: Request timeout - :return: On success, the sent :class:`aiogram.types.message.Message` is returned. - """ - - call = SendVenue( - chat_id=chat_id, - latitude=latitude, - longitude=longitude, - title=title, - address=address, - business_connection_id=business_connection_id, - message_thread_id=message_thread_id, - foursquare_id=foursquare_id, - foursquare_type=foursquare_type, - google_place_id=google_place_id, - google_place_type=google_place_type, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - reply_to_message_id=reply_to_message_id, - ) - return await self(call, request_timeout=request_timeout) - - async def send_video( - self, - chat_id: Union[int, str], - video: Union[InputFile, str], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - duration: Optional[int] = None, - width: Optional[int] = None, - height: Optional[int] = None, - thumbnail: Optional[InputFile] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - show_caption_above_media: Optional[Union[bool, Default]] = Default( - "show_caption_above_media" - ), - has_spoiler: Optional[bool] = None, - supports_streaming: Optional[bool] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - request_timeout: Optional[int] = None, - ) -> Message: - """ - Use this method to send video files, Telegram clients support MPEG4 videos (other formats may be sent as :class:`aiogram.types.document.Document`). On success, the sent :class:`aiogram.types.message.Message` is returned. Bots can currently send video files of up to 50 MB in size, this limit may be changed in the future. - - Source: https://core.telegram.org/bots/api#sendvideo - - :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param video: Video to send. Pass a file_id as String to send a video that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a video from the Internet, or upload a new video using multipart/form-data. :ref:`More information on Sending Files » ` - :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only - :param duration: Duration of sent video in seconds - :param width: Video width - :param height: Video height - :param thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More information on Sending Files » ` - :param caption: Video caption (may also be used when resending videos by *file_id*), 0-1024 characters after entities parsing - :param parse_mode: Mode for parsing entities in the video caption. See `formatting options `_ for more details. - :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode* - :param show_caption_above_media: Pass :code:`True`, if the caption must be shown above the message media - :param has_spoiler: Pass :code:`True` if the video needs to be covered with a spoiler animation - :param supports_streaming: Pass :code:`True` if the uploaded video is suitable for streaming - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param reply_to_message_id: If the message is a reply, ID of the original message - :param request_timeout: Request timeout - :return: Bots can currently send video files of up to 50 MB in size, this limit may be changed in the future. - """ - - call = SendVideo( - chat_id=chat_id, - video=video, - business_connection_id=business_connection_id, - message_thread_id=message_thread_id, - duration=duration, - width=width, - height=height, - thumbnail=thumbnail, - caption=caption, - parse_mode=parse_mode, - caption_entities=caption_entities, - show_caption_above_media=show_caption_above_media, - has_spoiler=has_spoiler, - supports_streaming=supports_streaming, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - reply_to_message_id=reply_to_message_id, - ) - return await self(call, request_timeout=request_timeout) - - async def send_video_note( - self, - chat_id: Union[int, str], - video_note: Union[InputFile, str], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - duration: Optional[int] = None, - length: Optional[int] = None, - thumbnail: Optional[InputFile] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - request_timeout: Optional[int] = None, - ) -> Message: - """ - As of `v.4.0 `_, Telegram clients support rounded square MPEG4 videos of up to 1 minute long. Use this method to send video messages. On success, the sent :class:`aiogram.types.message.Message` is returned. - - Source: https://core.telegram.org/bots/api#sendvideonote - - :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param video_note: Video note to send. Pass a file_id as String to send a video note that exists on the Telegram servers (recommended) or upload a new video using multipart/form-data. :ref:`More information on Sending Files » `. Sending video notes by a URL is currently unsupported - :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only - :param duration: Duration of sent video in seconds - :param length: Video width and height, i.e. diameter of the video message - :param thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More information on Sending Files » ` - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param reply_to_message_id: If the message is a reply, ID of the original message - :param request_timeout: Request timeout - :return: On success, the sent :class:`aiogram.types.message.Message` is returned. - """ - - call = SendVideoNote( - chat_id=chat_id, - video_note=video_note, - business_connection_id=business_connection_id, - message_thread_id=message_thread_id, - duration=duration, - length=length, - thumbnail=thumbnail, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - reply_to_message_id=reply_to_message_id, - ) - return await self(call, request_timeout=request_timeout) - - async def send_voice( - self, - chat_id: Union[int, str], - voice: Union[InputFile, str], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - duration: Optional[int] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - request_timeout: Optional[int] = None, - ) -> Message: - """ - Use this method to send audio files, if you want Telegram clients to display the file as a playable voice message. For this to work, your audio must be in an .OGG file encoded with OPUS, or in .MP3 format, or in .M4A format (other formats may be sent as :class:`aiogram.types.audio.Audio` or :class:`aiogram.types.document.Document`). On success, the sent :class:`aiogram.types.message.Message` is returned. Bots can currently send voice messages of up to 50 MB in size, this limit may be changed in the future. - - Source: https://core.telegram.org/bots/api#sendvoice - - :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param voice: Audio file to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » ` - :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only - :param caption: Voice message caption, 0-1024 characters after entities parsing - :param parse_mode: Mode for parsing entities in the voice message caption. See `formatting options `_ for more details. - :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode* - :param duration: Duration of the voice message in seconds - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param reply_to_message_id: If the message is a reply, ID of the original message - :param request_timeout: Request timeout - :return: Bots can currently send voice messages of up to 50 MB in size, this limit may be changed in the future. - """ - - call = SendVoice( - chat_id=chat_id, - voice=voice, - business_connection_id=business_connection_id, - message_thread_id=message_thread_id, - caption=caption, - parse_mode=parse_mode, - caption_entities=caption_entities, - duration=duration, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - reply_to_message_id=reply_to_message_id, - ) - return await self(call, request_timeout=request_timeout) - - async def set_chat_administrator_custom_title( - self, - chat_id: Union[int, str], - user_id: int, - custom_title: str, - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to set a custom title for an administrator in a supergroup promoted by the bot. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#setchatadministratorcustomtitle - - :param chat_id: Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`) - :param user_id: Unique identifier of the target user - :param custom_title: New custom title for the administrator; 0-16 characters, emoji are not allowed - :param request_timeout: Request timeout - :return: Returns :code:`True` on success. - """ - - call = SetChatAdministratorCustomTitle( - chat_id=chat_id, - user_id=user_id, - custom_title=custom_title, - ) - return await self(call, request_timeout=request_timeout) - - async def set_chat_description( - self, - chat_id: Union[int, str], - description: Optional[str] = None, - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to change the description of a group, a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#setchatdescription - - :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param description: New chat description, 0-255 characters - :param request_timeout: Request timeout - :return: Returns :code:`True` on success. - """ - - call = SetChatDescription( - chat_id=chat_id, - description=description, - ) - return await self(call, request_timeout=request_timeout) - - async def set_chat_menu_button( - self, - chat_id: Optional[int] = None, - menu_button: Optional[ - Union[MenuButtonCommands, MenuButtonWebApp, MenuButtonDefault] - ] = None, - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to change the bot's menu button in a private chat, or the default menu button. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#setchatmenubutton - - :param chat_id: Unique identifier for the target private chat. If not specified, default bot's menu button will be changed - :param menu_button: A JSON-serialized object for the bot's new menu button. Defaults to :class:`aiogram.types.menu_button_default.MenuButtonDefault` - :param request_timeout: Request timeout - :return: Returns :code:`True` on success. - """ - - call = SetChatMenuButton( - chat_id=chat_id, - menu_button=menu_button, - ) - return await self(call, request_timeout=request_timeout) - - async def set_chat_permissions( - self, - chat_id: Union[int, str], - permissions: ChatPermissions, - use_independent_chat_permissions: Optional[bool] = None, - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to set default chat permissions for all members. The bot must be an administrator in the group or a supergroup for this to work and must have the *can_restrict_members* administrator rights. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#setchatpermissions - - :param chat_id: Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`) - :param permissions: A JSON-serialized object for new default chat permissions - :param use_independent_chat_permissions: Pass :code:`True` if chat permissions are set independently. Otherwise, the *can_send_other_messages* and *can_add_web_page_previews* permissions will imply the *can_send_messages*, *can_send_audios*, *can_send_documents*, *can_send_photos*, *can_send_videos*, *can_send_video_notes*, and *can_send_voice_notes* permissions; the *can_send_polls* permission will imply the *can_send_messages* permission. - :param request_timeout: Request timeout - :return: Returns :code:`True` on success. - """ - - call = SetChatPermissions( - chat_id=chat_id, - permissions=permissions, - use_independent_chat_permissions=use_independent_chat_permissions, - ) - return await self(call, request_timeout=request_timeout) - - async def set_chat_photo( - self, - chat_id: Union[int, str], - photo: InputFile, - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to set a new profile photo for the chat. Photos can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#setchatphoto - - :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param photo: New chat photo, uploaded using multipart/form-data - :param request_timeout: Request timeout - :return: Returns :code:`True` on success. - """ - - call = SetChatPhoto( - chat_id=chat_id, - photo=photo, - ) - return await self(call, request_timeout=request_timeout) - - async def set_chat_sticker_set( - self, - chat_id: Union[int, str], - sticker_set_name: str, - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to set a new group sticker set for a supergroup. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Use the field *can_set_sticker_set* optionally returned in :class:`aiogram.methods.get_chat.GetChat` requests to check if the bot can use this method. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#setchatstickerset - - :param chat_id: Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`) - :param sticker_set_name: Name of the sticker set to be set as the group sticker set - :param request_timeout: Request timeout - :return: Returns :code:`True` on success. - """ - - call = SetChatStickerSet( - chat_id=chat_id, - sticker_set_name=sticker_set_name, - ) - return await self(call, request_timeout=request_timeout) - - async def set_chat_title( - self, - chat_id: Union[int, str], - title: str, - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to change the title of a chat. Titles can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#setchattitle - - :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param title: New chat title, 1-128 characters - :param request_timeout: Request timeout - :return: Returns :code:`True` on success. - """ - - call = SetChatTitle( - chat_id=chat_id, - title=title, - ) - return await self(call, request_timeout=request_timeout) - - async def set_game_score( - self, - user_id: int, - score: int, - force: Optional[bool] = None, - disable_edit_message: Optional[bool] = None, - chat_id: Optional[int] = None, - message_id: Optional[int] = None, - inline_message_id: Optional[str] = None, - request_timeout: Optional[int] = None, - ) -> Union[Message, bool]: - """ - Use this method to set the score of the specified user in a game message. On success, if the message is not an inline message, the :class:`aiogram.types.message.Message` is returned, otherwise :code:`True` is returned. Returns an error, if the new score is not greater than the user's current score in the chat and *force* is :code:`False`. - - Source: https://core.telegram.org/bots/api#setgamescore - - :param user_id: User identifier - :param score: New score, must be non-negative - :param force: Pass :code:`True` if the high score is allowed to decrease. This can be useful when fixing mistakes or banning cheaters - :param disable_edit_message: Pass :code:`True` if the game message should not be automatically edited to include the current scoreboard - :param chat_id: Required if *inline_message_id* is not specified. Unique identifier for the target chat - :param message_id: Required if *inline_message_id* is not specified. Identifier of the sent message - :param inline_message_id: Required if *chat_id* and *message_id* are not specified. Identifier of the inline message - :param request_timeout: Request timeout - :return: Returns an error, if the new score is not greater than the user's current score in the chat and *force* is :code:`False`. - """ - - call = SetGameScore( - user_id=user_id, - score=score, - force=force, - disable_edit_message=disable_edit_message, - chat_id=chat_id, - message_id=message_id, - inline_message_id=inline_message_id, - ) - return await self(call, request_timeout=request_timeout) - - async def set_my_commands( - self, - commands: List[BotCommand], - scope: Optional[ - Union[ - BotCommandScopeDefault, - BotCommandScopeAllPrivateChats, - BotCommandScopeAllGroupChats, - BotCommandScopeAllChatAdministrators, - BotCommandScopeChat, - BotCommandScopeChatAdministrators, - BotCommandScopeChatMember, - ] - ] = None, - language_code: Optional[str] = None, - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to change the list of the bot's commands. See `this manual `_ for more details about bot commands. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#setmycommands - - :param commands: A JSON-serialized list of bot commands to be set as the list of the bot's commands. At most 100 commands can be specified. - :param scope: A JSON-serialized object, describing scope of users for which the commands are relevant. Defaults to :class:`aiogram.types.bot_command_scope_default.BotCommandScopeDefault`. - :param language_code: A two-letter ISO 639-1 language code. If empty, commands will be applied to all users from the given scope, for whose language there are no dedicated commands - :param request_timeout: Request timeout - :return: Returns :code:`True` on success. - """ - - call = SetMyCommands( - commands=commands, - scope=scope, - language_code=language_code, - ) - return await self(call, request_timeout=request_timeout) - - async def set_my_default_administrator_rights( - self, - rights: Optional[ChatAdministratorRights] = None, - for_channels: Optional[bool] = None, - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to change the default administrator rights requested by the bot when it's added as an administrator to groups or channels. These rights will be suggested to users, but they are free to modify the list before adding the bot. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#setmydefaultadministratorrights - - :param rights: A JSON-serialized object describing new default administrator rights. If not specified, the default administrator rights will be cleared. - :param for_channels: Pass :code:`True` to change the default administrator rights of the bot in channels. Otherwise, the default administrator rights of the bot for groups and supergroups will be changed. - :param request_timeout: Request timeout - :return: Returns :code:`True` on success. - """ - - call = SetMyDefaultAdministratorRights( - rights=rights, - for_channels=for_channels, - ) - return await self(call, request_timeout=request_timeout) - - async def set_passport_data_errors( - self, - user_id: int, - errors: List[ - Union[ - PassportElementErrorDataField, - PassportElementErrorFrontSide, - PassportElementErrorReverseSide, - PassportElementErrorSelfie, - PassportElementErrorFile, - PassportElementErrorFiles, - PassportElementErrorTranslationFile, - PassportElementErrorTranslationFiles, - PassportElementErrorUnspecified, - ] - ], - request_timeout: Optional[int] = None, - ) -> bool: - """ - Informs a user that some of the Telegram Passport elements they provided contains errors. The user will not be able to re-submit their Passport to you until the errors are fixed (the contents of the field for which you returned the error must change). Returns :code:`True` on success. - Use this if the data submitted by the user doesn't satisfy the standards your service requires for any reason. For example, if a birthday date seems invalid, a submitted document is blurry, a scan shows evidence of tampering, etc. Supply some details in the error message to make sure the user knows how to correct the issues. - - Source: https://core.telegram.org/bots/api#setpassportdataerrors - - :param user_id: User identifier - :param errors: A JSON-serialized array describing the errors - :param request_timeout: Request timeout - :return: Supply some details in the error message to make sure the user knows how to correct the issues. - """ - - call = SetPassportDataErrors( - user_id=user_id, - errors=errors, - ) - return await self(call, request_timeout=request_timeout) - - async def set_sticker_position_in_set( - self, - sticker: str, - position: int, - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to move a sticker in a set created by the bot to a specific position. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#setstickerpositioninset - - :param sticker: File identifier of the sticker - :param position: New sticker position in the set, zero-based - :param request_timeout: Request timeout - :return: Returns :code:`True` on success. - """ - - call = SetStickerPositionInSet( - sticker=sticker, - position=position, - ) - return await self(call, request_timeout=request_timeout) - - async def set_webhook( - self, - url: str, - certificate: Optional[InputFile] = None, - ip_address: Optional[str] = None, - max_connections: Optional[int] = None, - allowed_updates: Optional[List[str]] = None, - drop_pending_updates: Optional[bool] = None, - secret_token: Optional[str] = None, - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to specify a URL and receive incoming updates via an outgoing webhook. Whenever there is an update for the bot, we will send an HTTPS POST request to the specified URL, containing a JSON-serialized :class:`aiogram.types.update.Update`. In case of an unsuccessful request, we will give up after a reasonable amount of attempts. Returns :code:`True` on success. - If you'd like to make sure that the webhook was set by you, you can specify secret data in the parameter *secret_token*. If specified, the request will contain a header 'X-Telegram-Bot-Api-Secret-Token' with the secret token as content. - - **Notes** - - **1.** You will not be able to receive updates using :class:`aiogram.methods.get_updates.GetUpdates` for as long as an outgoing webhook is set up. - - **2.** To use a self-signed certificate, you need to upload your `public key certificate `_ using *certificate* parameter. Please upload as InputFile, sending a String will not work. - - **3.** Ports currently supported *for webhooks*: **443, 80, 88, 8443**. - If you're having any trouble setting up webhooks, please check out this `amazing guide to webhooks `_. - - Source: https://core.telegram.org/bots/api#setwebhook - - :param url: HTTPS URL to send updates to. Use an empty string to remove webhook integration - :param certificate: Upload your public key certificate so that the root certificate in use can be checked. See our `self-signed guide `_ for details. - :param ip_address: The fixed IP address which will be used to send webhook requests instead of the IP address resolved through DNS - :param max_connections: The maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery, 1-100. Defaults to *40*. Use lower values to limit the load on your bot's server, and higher values to increase your bot's throughput. - :param allowed_updates: A JSON-serialized list of the update types you want your bot to receive. For example, specify :code:`["message", "edited_channel_post", "callback_query"]` to only receive updates of these types. See :class:`aiogram.types.update.Update` for a complete list of available update types. Specify an empty list to receive all update types except *chat_member*, *message_reaction*, and *message_reaction_count* (default). If not specified, the previous setting will be used. - :param drop_pending_updates: Pass :code:`True` to drop all pending updates - :param secret_token: A secret token to be sent in a header 'X-Telegram-Bot-Api-Secret-Token' in every webhook request, 1-256 characters. Only characters :code:`A-Z`, :code:`a-z`, :code:`0-9`, :code:`_` and :code:`-` are allowed. The header is useful to ensure that the request comes from a webhook set by you. - :param request_timeout: Request timeout - :return: Please upload as InputFile, sending a String will not work. - """ - - call = SetWebhook( - url=url, - certificate=certificate, - ip_address=ip_address, - max_connections=max_connections, - allowed_updates=allowed_updates, - drop_pending_updates=drop_pending_updates, - secret_token=secret_token, - ) - return await self(call, request_timeout=request_timeout) - - async def stop_message_live_location( - self, - business_connection_id: Optional[str] = None, - chat_id: Optional[Union[int, str]] = None, - message_id: Optional[int] = None, - inline_message_id: Optional[str] = None, - reply_markup: Optional[InlineKeyboardMarkup] = None, - request_timeout: Optional[int] = None, - ) -> Union[Message, bool]: - """ - Use this method to stop updating a live location message before *live_period* expires. On success, if the message is not an inline message, the edited :class:`aiogram.types.message.Message` is returned, otherwise :code:`True` is returned. - - Source: https://core.telegram.org/bots/api#stopmessagelivelocation - - :param business_connection_id: Unique identifier of the business connection on behalf of which the message to be edited was sent - :param chat_id: Required if *inline_message_id* is not specified. Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param message_id: Required if *inline_message_id* is not specified. Identifier of the message with live location to stop - :param inline_message_id: Required if *chat_id* and *message_id* are not specified. Identifier of the inline message - :param reply_markup: A JSON-serialized object for a new `inline keyboard `_. - :param request_timeout: Request timeout - :return: On success, if the message is not an inline message, the edited :class:`aiogram.types.message.Message` is returned, otherwise :code:`True` is returned. - """ - - call = StopMessageLiveLocation( - business_connection_id=business_connection_id, - chat_id=chat_id, - message_id=message_id, - inline_message_id=inline_message_id, - reply_markup=reply_markup, - ) - return await self(call, request_timeout=request_timeout) - - async def stop_poll( - self, - chat_id: Union[int, str], - message_id: int, - business_connection_id: Optional[str] = None, - reply_markup: Optional[InlineKeyboardMarkup] = None, - request_timeout: Optional[int] = None, - ) -> Poll: - """ - Use this method to stop a poll which was sent by the bot. On success, the stopped :class:`aiogram.types.poll.Poll` is returned. - - Source: https://core.telegram.org/bots/api#stoppoll - - :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param message_id: Identifier of the original message with the poll - :param business_connection_id: Unique identifier of the business connection on behalf of which the message to be edited was sent - :param reply_markup: A JSON-serialized object for a new message `inline keyboard `_. - :param request_timeout: Request timeout - :return: On success, the stopped :class:`aiogram.types.poll.Poll` is returned. - """ - - call = StopPoll( - chat_id=chat_id, - message_id=message_id, - business_connection_id=business_connection_id, - reply_markup=reply_markup, - ) - return await self(call, request_timeout=request_timeout) - - async def unban_chat_member( - self, - chat_id: Union[int, str], - user_id: int, - only_if_banned: Optional[bool] = None, - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to unban a previously banned user in a supergroup or channel. The user will **not** return to the group or channel automatically, but will be able to join via link, etc. The bot must be an administrator for this to work. By default, this method guarantees that after the call the user is not a member of the chat, but will be able to join it. So if the user is a member of the chat they will also be **removed** from the chat. If you don't want this, use the parameter *only_if_banned*. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#unbanchatmember - - :param chat_id: Unique identifier for the target group or username of the target supergroup or channel (in the format :code:`@channelusername`) - :param user_id: Unique identifier of the target user - :param only_if_banned: Do nothing if the user is not banned - :param request_timeout: Request timeout - :return: Returns :code:`True` on success. - """ - - call = UnbanChatMember( - chat_id=chat_id, - user_id=user_id, - only_if_banned=only_if_banned, - ) - return await self(call, request_timeout=request_timeout) - - async def unban_chat_sender_chat( - self, - chat_id: Union[int, str], - sender_chat_id: int, - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to unban a previously banned channel chat in a supergroup or channel. The bot must be an administrator for this to work and must have the appropriate administrator rights. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#unbanchatsenderchat - - :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param sender_chat_id: Unique identifier of the target sender chat - :param request_timeout: Request timeout - :return: Returns :code:`True` on success. - """ - - call = UnbanChatSenderChat( - chat_id=chat_id, - sender_chat_id=sender_chat_id, - ) - return await self(call, request_timeout=request_timeout) - - async def unpin_all_chat_messages( - self, - chat_id: Union[int, str], - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to clear the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#unpinallchatmessages - - :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param request_timeout: Request timeout - :return: Returns :code:`True` on success. - """ - - call = UnpinAllChatMessages( - chat_id=chat_id, - ) - return await self(call, request_timeout=request_timeout) - - async def unpin_all_forum_topic_messages( - self, - chat_id: Union[int, str], - message_thread_id: int, - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to clear the list of pinned messages in a forum topic. The bot must be an administrator in the chat for this to work and must have the *can_pin_messages* administrator right in the supergroup. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#unpinallforumtopicmessages - - :param chat_id: Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`) - :param message_thread_id: Unique identifier for the target message thread of the forum topic - :param request_timeout: Request timeout - :return: Returns :code:`True` on success. - """ - - call = UnpinAllForumTopicMessages( - chat_id=chat_id, - message_thread_id=message_thread_id, - ) - return await self(call, request_timeout=request_timeout) - - async def unpin_chat_message( - self, - chat_id: Union[int, str], - business_connection_id: Optional[str] = None, - message_id: Optional[int] = None, - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to remove a message from the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#unpinchatmessage - - :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be unpinned - :param message_id: Identifier of the message to unpin. Required if *business_connection_id* is specified. If not specified, the most recent pinned message (by sending date) will be unpinned. - :param request_timeout: Request timeout - :return: Returns :code:`True` on success. - """ - - call = UnpinChatMessage( - chat_id=chat_id, - business_connection_id=business_connection_id, - message_id=message_id, - ) - return await self(call, request_timeout=request_timeout) - - async def upload_sticker_file( - self, - user_id: int, - sticker: InputFile, - sticker_format: str, - request_timeout: Optional[int] = None, - ) -> File: - """ - Use this method to upload a file with a sticker for later use in the :class:`aiogram.methods.create_new_sticker_set.CreateNewStickerSet`, :class:`aiogram.methods.add_sticker_to_set.AddStickerToSet`, or :class:`aiogram.methods.replace_sticker_in_set.ReplaceStickerInSet` methods (the file can be used multiple times). Returns the uploaded :class:`aiogram.types.file.File` on success. - - Source: https://core.telegram.org/bots/api#uploadstickerfile - - :param user_id: User identifier of sticker file owner - :param sticker: A file with the sticker in .WEBP, .PNG, .TGS, or .WEBM format. See `https://core.telegram.org/stickers `_`https://core.telegram.org/stickers `_ for technical requirements. :ref:`More information on Sending Files » ` - :param sticker_format: Format of the sticker, must be one of 'static', 'animated', 'video' - :param request_timeout: Request timeout - :return: Returns the uploaded :class:`aiogram.types.file.File` on success. - """ - - call = UploadStickerFile( - user_id=user_id, - sticker=sticker, - sticker_format=sticker_format, - ) - return await self(call, request_timeout=request_timeout) - - async def close_general_forum_topic( - self, - chat_id: Union[int, str], - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to close an open 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the *can_manage_topics* administrator rights. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#closegeneralforumtopic - - :param chat_id: Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`) - :param request_timeout: Request timeout - :return: Returns :code:`True` on success. - """ - - call = CloseGeneralForumTopic( - chat_id=chat_id, - ) - return await self(call, request_timeout=request_timeout) - - async def edit_general_forum_topic( - self, - chat_id: Union[int, str], - name: str, - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to edit the name of the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the *can_manage_topics* administrator rights. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#editgeneralforumtopic - - :param chat_id: Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`) - :param name: New topic name, 1-128 characters - :param request_timeout: Request timeout - :return: Returns :code:`True` on success. - """ - - call = EditGeneralForumTopic( - chat_id=chat_id, - name=name, - ) - return await self(call, request_timeout=request_timeout) - - async def hide_general_forum_topic( - self, - chat_id: Union[int, str], - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to hide the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the *can_manage_topics* administrator rights. The topic will be automatically closed if it was open. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#hidegeneralforumtopic - - :param chat_id: Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`) - :param request_timeout: Request timeout - :return: Returns :code:`True` on success. - """ - - call = HideGeneralForumTopic( - chat_id=chat_id, - ) - return await self(call, request_timeout=request_timeout) - - async def reopen_general_forum_topic( - self, - chat_id: Union[int, str], - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to reopen a closed 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the *can_manage_topics* administrator rights. The topic will be automatically unhidden if it was hidden. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#reopengeneralforumtopic - - :param chat_id: Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`) - :param request_timeout: Request timeout - :return: Returns :code:`True` on success. - """ - - call = ReopenGeneralForumTopic( - chat_id=chat_id, - ) - return await self(call, request_timeout=request_timeout) - - async def unhide_general_forum_topic( - self, - chat_id: Union[int, str], - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to unhide the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the *can_manage_topics* administrator rights. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#unhidegeneralforumtopic - - :param chat_id: Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`) - :param request_timeout: Request timeout - :return: Returns :code:`True` on success. - """ - - call = UnhideGeneralForumTopic( - chat_id=chat_id, - ) - return await self(call, request_timeout=request_timeout) - - async def delete_sticker_set( - self, - name: str, - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to delete a sticker set that was created by the bot. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#deletestickerset - - :param name: Sticker set name - :param request_timeout: Request timeout - :return: Returns :code:`True` on success. - """ - - call = DeleteStickerSet( - name=name, - ) - return await self(call, request_timeout=request_timeout) - - async def get_my_description( - self, - language_code: Optional[str] = None, - request_timeout: Optional[int] = None, - ) -> BotDescription: - """ - Use this method to get the current bot description for the given user language. Returns :class:`aiogram.types.bot_description.BotDescription` on success. - - Source: https://core.telegram.org/bots/api#getmydescription - - :param language_code: A two-letter ISO 639-1 language code or an empty string - :param request_timeout: Request timeout - :return: Returns :class:`aiogram.types.bot_description.BotDescription` on success. - """ - - call = GetMyDescription( - language_code=language_code, - ) - return await self(call, request_timeout=request_timeout) - - async def get_my_short_description( - self, - language_code: Optional[str] = None, - request_timeout: Optional[int] = None, - ) -> BotShortDescription: - """ - Use this method to get the current bot short description for the given user language. Returns :class:`aiogram.types.bot_short_description.BotShortDescription` on success. - - Source: https://core.telegram.org/bots/api#getmyshortdescription - - :param language_code: A two-letter ISO 639-1 language code or an empty string - :param request_timeout: Request timeout - :return: Returns :class:`aiogram.types.bot_short_description.BotShortDescription` on success. - """ - - call = GetMyShortDescription( - language_code=language_code, - ) - return await self(call, request_timeout=request_timeout) - - async def set_custom_emoji_sticker_set_thumbnail( - self, - name: str, - custom_emoji_id: Optional[str] = None, - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to set the thumbnail of a custom emoji sticker set. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#setcustomemojistickersetthumbnail - - :param name: Sticker set name - :param custom_emoji_id: Custom emoji identifier of a sticker from the sticker set; pass an empty string to drop the thumbnail and use the first sticker as the thumbnail. - :param request_timeout: Request timeout - :return: Returns :code:`True` on success. - """ - - call = SetCustomEmojiStickerSetThumbnail( - name=name, - custom_emoji_id=custom_emoji_id, - ) - return await self(call, request_timeout=request_timeout) - - async def set_my_description( - self, - description: Optional[str] = None, - language_code: Optional[str] = None, - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to change the bot's description, which is shown in the chat with the bot if the chat is empty. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#setmydescription - - :param description: New bot description; 0-512 characters. Pass an empty string to remove the dedicated description for the given language. - :param language_code: A two-letter ISO 639-1 language code. If empty, the description will be applied to all users for whose language there is no dedicated description. - :param request_timeout: Request timeout - :return: Returns :code:`True` on success. - """ - - call = SetMyDescription( - description=description, - language_code=language_code, - ) - return await self(call, request_timeout=request_timeout) - - async def set_my_short_description( - self, - short_description: Optional[str] = None, - language_code: Optional[str] = None, - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to change the bot's short description, which is shown on the bot's profile page and is sent together with the link when users share the bot. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#setmyshortdescription - - :param short_description: New short description for the bot; 0-120 characters. Pass an empty string to remove the dedicated short description for the given language. - :param language_code: A two-letter ISO 639-1 language code. If empty, the short description will be applied to all users for whose language there is no dedicated short description. - :param request_timeout: Request timeout - :return: Returns :code:`True` on success. - """ - - call = SetMyShortDescription( - short_description=short_description, - language_code=language_code, - ) - return await self(call, request_timeout=request_timeout) - - async def set_sticker_emoji_list( - self, - sticker: str, - emoji_list: List[str], - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to change the list of emoji assigned to a regular or custom emoji sticker. The sticker must belong to a sticker set created by the bot. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#setstickeremojilist - - :param sticker: File identifier of the sticker - :param emoji_list: A JSON-serialized list of 1-20 emoji associated with the sticker - :param request_timeout: Request timeout - :return: Returns :code:`True` on success. - """ - - call = SetStickerEmojiList( - sticker=sticker, - emoji_list=emoji_list, - ) - return await self(call, request_timeout=request_timeout) - - async def set_sticker_keywords( - self, - sticker: str, - keywords: Optional[List[str]] = None, - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to change search keywords assigned to a regular or custom emoji sticker. The sticker must belong to a sticker set created by the bot. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#setstickerkeywords - - :param sticker: File identifier of the sticker - :param keywords: A JSON-serialized list of 0-20 search keywords for the sticker with total length of up to 64 characters - :param request_timeout: Request timeout - :return: Returns :code:`True` on success. - """ - - call = SetStickerKeywords( - sticker=sticker, - keywords=keywords, - ) - return await self(call, request_timeout=request_timeout) - - async def set_sticker_mask_position( - self, - sticker: str, - mask_position: Optional[MaskPosition] = None, - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to change the `mask position `_ of a mask sticker. The sticker must belong to a sticker set that was created by the bot. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#setstickermaskposition - - :param sticker: File identifier of the sticker - :param mask_position: A JSON-serialized object with the position where the mask should be placed on faces. Omit the parameter to remove the mask position. - :param request_timeout: Request timeout - :return: Returns :code:`True` on success. - """ - - call = SetStickerMaskPosition( - sticker=sticker, - mask_position=mask_position, - ) - return await self(call, request_timeout=request_timeout) - - async def set_sticker_set_thumbnail( - self, - name: str, - user_id: int, - format: str, - thumbnail: Optional[Union[InputFile, str]] = None, - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to set the thumbnail of a regular or mask sticker set. The format of the thumbnail file must match the format of the stickers in the set. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#setstickersetthumbnail - - :param name: Sticker set name - :param user_id: User identifier of the sticker set owner - :param format: Format of the thumbnail, must be one of 'static' for a **.WEBP** or **.PNG** image, 'animated' for a **.TGS** animation, or 'video' for a **WEBM** video - :param thumbnail: A **.WEBP** or **.PNG** image with the thumbnail, must be up to 128 kilobytes in size and have a width and height of exactly 100px, or a **.TGS** animation with a thumbnail up to 32 kilobytes in size (see `https://core.telegram.org/stickers#animation-requirements `_`https://core.telegram.org/stickers#animation-requirements `_ for animated sticker technical requirements), or a **WEBM** video with the thumbnail up to 32 kilobytes in size; see `https://core.telegram.org/stickers#video-requirements `_`https://core.telegram.org/stickers#video-requirements `_ for video sticker technical requirements. Pass a *file_id* as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » `. Animated and video sticker set thumbnails can't be uploaded via HTTP URL. If omitted, then the thumbnail is dropped and the first sticker is used as the thumbnail. - :param request_timeout: Request timeout - :return: Returns :code:`True` on success. - """ - - call = SetStickerSetThumbnail( - name=name, - user_id=user_id, - format=format, - thumbnail=thumbnail, - ) - return await self(call, request_timeout=request_timeout) - - async def set_sticker_set_title( - self, - name: str, - title: str, - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to set the title of a created sticker set. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#setstickersettitle - - :param name: Sticker set name - :param title: Sticker set title, 1-64 characters - :param request_timeout: Request timeout - :return: Returns :code:`True` on success. - """ - - call = SetStickerSetTitle( - name=name, - title=title, - ) - return await self(call, request_timeout=request_timeout) - - async def get_my_name( - self, - language_code: Optional[str] = None, - request_timeout: Optional[int] = None, - ) -> BotName: - """ - Use this method to get the current bot name for the given user language. Returns :class:`aiogram.types.bot_name.BotName` on success. - - Source: https://core.telegram.org/bots/api#getmyname - - :param language_code: A two-letter ISO 639-1 language code or an empty string - :param request_timeout: Request timeout - :return: Returns :class:`aiogram.types.bot_name.BotName` on success. - """ - - call = GetMyName( - language_code=language_code, - ) - return await self(call, request_timeout=request_timeout) - - async def set_my_name( - self, - name: Optional[str] = None, - language_code: Optional[str] = None, - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to change the bot's name. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#setmyname - - :param name: New bot name; 0-64 characters. Pass an empty string to remove the dedicated name for the given language. - :param language_code: A two-letter ISO 639-1 language code. If empty, the name will be shown to all users for whose language there is no dedicated name. - :param request_timeout: Request timeout - :return: Returns :code:`True` on success. - """ - - call = SetMyName( - name=name, - language_code=language_code, - ) - return await self(call, request_timeout=request_timeout) - - async def unpin_all_general_forum_topic_messages( - self, - chat_id: Union[int, str], - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to clear the list of pinned messages in a General forum topic. The bot must be an administrator in the chat for this to work and must have the *can_pin_messages* administrator right in the supergroup. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#unpinallgeneralforumtopicmessages - - :param chat_id: Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`) - :param request_timeout: Request timeout - :return: Returns :code:`True` on success. - """ - - call = UnpinAllGeneralForumTopicMessages( - chat_id=chat_id, - ) - return await self(call, request_timeout=request_timeout) - - async def copy_messages( - self, - chat_id: Union[int, str], - from_chat_id: Union[int, str], - message_ids: List[int], - message_thread_id: Optional[int] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[bool] = None, - remove_caption: Optional[bool] = None, - request_timeout: Optional[int] = None, - ) -> List[MessageId]: - """ - Use this method to copy messages of any kind. If some of the specified messages can't be found or copied, they are skipped. Service messages, paid media messages, giveaway messages, giveaway winners messages, and invoice messages can't be copied. A quiz :class:`aiogram.methods.poll.Poll` can be copied only if the value of the field *correct_option_id* is known to the bot. The method is analogous to the method :class:`aiogram.methods.forward_messages.ForwardMessages`, but the copied messages don't have a link to the original message. Album grouping is kept for copied messages. On success, an array of :class:`aiogram.types.message_id.MessageId` of the sent messages is returned. - - Source: https://core.telegram.org/bots/api#copymessages - - :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param from_chat_id: Unique identifier for the chat where the original messages were sent (or channel username in the format :code:`@channelusername`) - :param message_ids: A JSON-serialized list of 1-100 identifiers of messages in the chat *from_chat_id* to copy. The identifiers must be specified in a strictly increasing order. - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only - :param disable_notification: Sends the messages `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent messages from forwarding and saving - :param remove_caption: Pass :code:`True` to copy the messages without their captions - :param request_timeout: Request timeout - :return: On success, an array of :class:`aiogram.types.message_id.MessageId` of the sent messages is returned. - """ - - call = CopyMessages( - chat_id=chat_id, - from_chat_id=from_chat_id, - message_ids=message_ids, - message_thread_id=message_thread_id, - disable_notification=disable_notification, - protect_content=protect_content, - remove_caption=remove_caption, - ) - return await self(call, request_timeout=request_timeout) - - async def delete_messages( - self, - chat_id: Union[int, str], - message_ids: List[int], - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to delete multiple messages simultaneously. If some of the specified messages can't be found, they are skipped. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#deletemessages - - :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param message_ids: A JSON-serialized list of 1-100 identifiers of messages to delete. See :class:`aiogram.methods.delete_message.DeleteMessage` for limitations on which messages can be deleted - :param request_timeout: Request timeout - :return: Returns :code:`True` on success. - """ - - call = DeleteMessages( - chat_id=chat_id, - message_ids=message_ids, - ) - return await self(call, request_timeout=request_timeout) - - async def forward_messages( - self, - chat_id: Union[int, str], - from_chat_id: Union[int, str], - message_ids: List[int], - message_thread_id: Optional[int] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[bool] = None, - request_timeout: Optional[int] = None, - ) -> List[MessageId]: - """ - Use this method to forward multiple messages of any kind. If some of the specified messages can't be found or forwarded, they are skipped. Service messages and messages with protected content can't be forwarded. Album grouping is kept for forwarded messages. On success, an array of :class:`aiogram.types.message_id.MessageId` of the sent messages is returned. - - Source: https://core.telegram.org/bots/api#forwardmessages - - :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param from_chat_id: Unique identifier for the chat where the original messages were sent (or channel username in the format :code:`@channelusername`) - :param message_ids: A JSON-serialized list of 1-100 identifiers of messages in the chat *from_chat_id* to forward. The identifiers must be specified in a strictly increasing order. - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only - :param disable_notification: Sends the messages `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the forwarded messages from forwarding and saving - :param request_timeout: Request timeout - :return: On success, an array of :class:`aiogram.types.message_id.MessageId` of the sent messages is returned. - """ - - call = ForwardMessages( - chat_id=chat_id, - from_chat_id=from_chat_id, - message_ids=message_ids, - message_thread_id=message_thread_id, - disable_notification=disable_notification, - protect_content=protect_content, - ) - return await self(call, request_timeout=request_timeout) - - async def get_user_chat_boosts( - self, - chat_id: Union[int, str], - user_id: int, - request_timeout: Optional[int] = None, - ) -> UserChatBoosts: - """ - Use this method to get the list of boosts added to a chat by a user. Requires administrator rights in the chat. Returns a :class:`aiogram.types.user_chat_boosts.UserChatBoosts` object. - - Source: https://core.telegram.org/bots/api#getuserchatboosts - - :param chat_id: Unique identifier for the chat or username of the channel (in the format :code:`@channelusername`) - :param user_id: Unique identifier of the target user - :param request_timeout: Request timeout - :return: Returns a :class:`aiogram.types.user_chat_boosts.UserChatBoosts` object. - """ - - call = GetUserChatBoosts( - chat_id=chat_id, - user_id=user_id, - ) - return await self(call, request_timeout=request_timeout) - - async def set_message_reaction( - self, - chat_id: Union[int, str], - message_id: int, - reaction: Optional[ - List[Union[ReactionTypeEmoji, ReactionTypeCustomEmoji, ReactionTypePaid]] - ] = None, - is_big: Optional[bool] = None, - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to change the chosen reactions on a message. Service messages can't be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. Bots can't use paid reactions. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#setmessagereaction - - :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param message_id: Identifier of the target message. If the message belongs to a media group, the reaction is set to the first non-deleted message in the group instead. - :param reaction: A JSON-serialized list of reaction types to set on the message. Currently, as non-premium users, bots can set up to one reaction per message. A custom emoji reaction can be used if it is either already present on the message or explicitly allowed by chat administrators. Paid reactions can't be used by bots. - :param is_big: Pass :code:`True` to set the reaction with a big animation - :param request_timeout: Request timeout - :return: Returns :code:`True` on success. - """ - - call = SetMessageReaction( - chat_id=chat_id, - message_id=message_id, - reaction=reaction, - is_big=is_big, - ) - return await self(call, request_timeout=request_timeout) - - async def get_business_connection( - self, - business_connection_id: str, - request_timeout: Optional[int] = None, - ) -> BusinessConnection: - """ - Use this method to get information about the connection of the bot with a business account. Returns a :class:`aiogram.types.business_connection.BusinessConnection` object on success. - - Source: https://core.telegram.org/bots/api#getbusinessconnection - - :param business_connection_id: Unique identifier of the business connection - :param request_timeout: Request timeout - :return: Returns a :class:`aiogram.types.business_connection.BusinessConnection` object on success. - """ - - call = GetBusinessConnection( - business_connection_id=business_connection_id, - ) - return await self(call, request_timeout=request_timeout) - - async def replace_sticker_in_set( - self, - user_id: int, - name: str, - old_sticker: str, - sticker: InputSticker, - request_timeout: Optional[int] = None, - ) -> bool: - """ - Use this method to replace an existing sticker in a sticker set with a new one. The method is equivalent to calling :class:`aiogram.methods.delete_sticker_from_set.DeleteStickerFromSet`, then :class:`aiogram.methods.add_sticker_to_set.AddStickerToSet`, then :class:`aiogram.methods.set_sticker_position_in_set.SetStickerPositionInSet`. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#replacestickerinset - - :param user_id: User identifier of the sticker set owner - :param name: Sticker set name - :param old_sticker: File identifier of the replaced sticker - :param sticker: A JSON-serialized object with information about the added sticker. If exactly the same sticker had already been added to the set, then the set remains unchanged. - :param request_timeout: Request timeout - :return: Returns :code:`True` on success. - """ - - call = ReplaceStickerInSet( - user_id=user_id, - name=name, - old_sticker=old_sticker, - sticker=sticker, - ) - return await self(call, request_timeout=request_timeout) - - async def refund_star_payment( - self, - user_id: int, - telegram_payment_charge_id: str, - request_timeout: Optional[int] = None, - ) -> bool: - """ - Refunds a successful payment in `Telegram Stars `_. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#refundstarpayment - - :param user_id: Identifier of the user whose payment will be refunded - :param telegram_payment_charge_id: Telegram payment identifier - :param request_timeout: Request timeout - :return: Returns :code:`True` on success. - """ - - call = RefundStarPayment( - user_id=user_id, - telegram_payment_charge_id=telegram_payment_charge_id, - ) - return await self(call, request_timeout=request_timeout) - - async def get_star_transactions( - self, - offset: Optional[int] = None, - limit: Optional[int] = None, - request_timeout: Optional[int] = None, - ) -> StarTransactions: - """ - Returns the bot's Telegram Star transactions in chronological order. On success, returns a :class:`aiogram.types.star_transactions.StarTransactions` object. - - Source: https://core.telegram.org/bots/api#getstartransactions - - :param offset: Number of transactions to skip in the response - :param limit: The maximum number of transactions to be retrieved. Values between 1-100 are accepted. Defaults to 100. - :param request_timeout: Request timeout - :return: On success, returns a :class:`aiogram.types.star_transactions.StarTransactions` object. - """ - - call = GetStarTransactions( - offset=offset, - limit=limit, - ) - return await self(call, request_timeout=request_timeout) - - async def send_paid_media( - self, - chat_id: Union[int, str], - star_count: int, - media: List[Union[InputPaidMediaPhoto, InputPaidMediaVideo]], - business_connection_id: Optional[str] = None, - caption: Optional[str] = None, - parse_mode: Optional[str] = None, - caption_entities: Optional[List[MessageEntity]] = None, - show_caption_above_media: Optional[bool] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[bool] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - request_timeout: Optional[int] = None, - ) -> Message: - """ - Use this method to send paid media. On success, the sent :class:`aiogram.types.message.Message` is returned. - - Source: https://core.telegram.org/bots/api#sendpaidmedia - - :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`). If the chat is a channel, all Telegram Star proceeds from this media will be credited to the chat's balance. Otherwise, they will be credited to the bot's balance. - :param star_count: The number of Telegram Stars that must be paid to buy access to the media - :param media: A JSON-serialized array describing the media to be sent; up to 10 items - :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param caption: Media caption, 0-1024 characters after entities parsing - :param parse_mode: Mode for parsing entities in the media caption. See `formatting options `_ for more details. - :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode* - :param show_caption_above_media: Pass :code:`True`, if the caption must be shown above the message media - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user - :param request_timeout: Request timeout - :return: On success, the sent :class:`aiogram.types.message.Message` is returned. - """ - - call = SendPaidMedia( - chat_id=chat_id, - star_count=star_count, - media=media, - business_connection_id=business_connection_id, - caption=caption, - parse_mode=parse_mode, - caption_entities=caption_entities, - show_caption_above_media=show_caption_above_media, - disable_notification=disable_notification, - protect_content=protect_content, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - ) - return await self(call, request_timeout=request_timeout) - - async def create_chat_subscription_invite_link( - self, - chat_id: Union[int, str], - subscription_period: Union[datetime.datetime, datetime.timedelta, int], - subscription_price: int, - name: Optional[str] = None, - request_timeout: Optional[int] = None, - ) -> ChatInviteLink: - """ - Use this method to create a `subscription invite link `_ for a channel chat. The bot must have the *can_invite_users* administrator rights. The link can be edited using the method :class:`aiogram.methods.edit_chat_subscription_invite_link.EditChatSubscriptionInviteLink` or revoked using the method :class:`aiogram.methods.revoke_chat_invite_link.RevokeChatInviteLink`. Returns the new invite link as a :class:`aiogram.types.chat_invite_link.ChatInviteLink` object. - - Source: https://core.telegram.org/bots/api#createchatsubscriptioninvitelink - - :param chat_id: Unique identifier for the target channel chat or username of the target channel (in the format :code:`@channelusername`) - :param subscription_period: The number of seconds the subscription will be active for before the next payment. Currently, it must always be 2592000 (30 days). - :param subscription_price: The amount of Telegram Stars a user must pay initially and after each subsequent subscription period to be a member of the chat; 1-2500 - :param name: Invite link name; 0-32 characters - :param request_timeout: Request timeout - :return: Returns the new invite link as a :class:`aiogram.types.chat_invite_link.ChatInviteLink` object. - """ - - call = CreateChatSubscriptionInviteLink( - chat_id=chat_id, - subscription_period=subscription_period, - subscription_price=subscription_price, - name=name, - ) - return await self(call, request_timeout=request_timeout) - - async def edit_chat_subscription_invite_link( - self, - chat_id: Union[int, str], - invite_link: str, - name: Optional[str] = None, - request_timeout: Optional[int] = None, - ) -> ChatInviteLink: - """ - Use this method to edit a subscription invite link created by the bot. The bot must have the *can_invite_users* administrator rights. Returns the edited invite link as a :class:`aiogram.types.chat_invite_link.ChatInviteLink` object. - - Source: https://core.telegram.org/bots/api#editchatsubscriptioninvitelink - - :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param invite_link: The invite link to edit - :param name: Invite link name; 0-32 characters - :param request_timeout: Request timeout - :return: Returns the edited invite link as a :class:`aiogram.types.chat_invite_link.ChatInviteLink` object. - """ - - call = EditChatSubscriptionInviteLink( - chat_id=chat_id, - invite_link=invite_link, - name=name, - ) - return await self(call, request_timeout=request_timeout) diff --git a/env/Lib/site-packages/aiogram/client/context_controller.py b/env/Lib/site-packages/aiogram/client/context_controller.py deleted file mode 100644 index 97795a7..0000000 --- a/env/Lib/site-packages/aiogram/client/context_controller.py +++ /dev/null @@ -1,33 +0,0 @@ -from typing import TYPE_CHECKING, Any, Optional - -from pydantic import BaseModel, PrivateAttr -from typing_extensions import Self - -if TYPE_CHECKING: - from aiogram.client.bot import Bot - - -class BotContextController(BaseModel): - _bot: Optional["Bot"] = PrivateAttr() - - def model_post_init(self, __context: Any) -> None: - self._bot = __context.get("bot") if __context else None - - def as_(self, bot: Optional["Bot"]) -> Self: - """ - Bind object to a bot instance. - - :param bot: Bot instance - :return: self - """ - self._bot = bot - return self - - @property - def bot(self) -> Optional["Bot"]: - """ - Get bot instance. - - :return: Bot instance - """ - return self._bot diff --git a/env/Lib/site-packages/aiogram/client/default.py b/env/Lib/site-packages/aiogram/client/default.py deleted file mode 100644 index 6c857be..0000000 --- a/env/Lib/site-packages/aiogram/client/default.py +++ /dev/null @@ -1,85 +0,0 @@ -from __future__ import annotations - -import sys -from dataclasses import dataclass -from typing import TYPE_CHECKING, Any, Dict, Optional - -if TYPE_CHECKING: - from aiogram.types import LinkPreviewOptions - - -# @dataclass ?? -class Default: - # Is not a dataclass because of JSON serialization. - - __slots__ = ("_name",) - - def __init__(self, name: str) -> None: - self._name = name - - @property - def name(self) -> str: - return self._name - - def __str__(self) -> str: - return f"Default({self._name!r})" - - def __repr__(self) -> str: - return f"<{self}>" - - -_dataclass_properties: Dict[str, Any] = {} -if sys.version_info >= (3, 10): - # Speedup attribute access for dataclasses in Python 3.10+ - _dataclass_properties.update({"slots": True, "kw_only": True}) - - -@dataclass(**_dataclass_properties) -class DefaultBotProperties: - """ - Default bot properties. - """ - - parse_mode: Optional[str] = None - """Default parse mode for messages.""" - disable_notification: Optional[bool] = None - """Sends the message silently. Users will receive a notification with no sound.""" - protect_content: Optional[bool] = None - """Protects content from copying.""" - allow_sending_without_reply: Optional[bool] = None - """Allows to send messages without reply.""" - link_preview: Optional[LinkPreviewOptions] = None - """Link preview settings.""" - link_preview_is_disabled: Optional[bool] = None - """Disables link preview.""" - link_preview_prefer_small_media: Optional[bool] = None - """Prefer small media in link preview.""" - link_preview_prefer_large_media: Optional[bool] = None - """Prefer large media in link preview.""" - link_preview_show_above_text: Optional[bool] = None - """Show link preview above text.""" - show_caption_above_media: Optional[bool] = None - """Show caption above media.""" - - def __post_init__(self) -> None: - has_any_link_preview_option = any( - ( - self.link_preview_is_disabled, - self.link_preview_prefer_small_media, - self.link_preview_prefer_large_media, - self.link_preview_show_above_text, - ) - ) - - if has_any_link_preview_option and self.link_preview is None: - from ..types import LinkPreviewOptions - - self.link_preview = LinkPreviewOptions( - is_disabled=self.link_preview_is_disabled, - prefer_small_media=self.link_preview_prefer_small_media, - prefer_large_media=self.link_preview_prefer_large_media, - show_above_text=self.link_preview_show_above_text, - ) - - def __getitem__(self, item: str) -> Any: - return getattr(self, item, None) diff --git a/env/Lib/site-packages/aiogram/client/session/__init__.py b/env/Lib/site-packages/aiogram/client/session/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/env/Lib/site-packages/aiogram/client/session/__pycache__/__init__.cpython-311.pyc b/env/Lib/site-packages/aiogram/client/session/__pycache__/__init__.cpython-311.pyc deleted file mode 100644 index b9e3c26..0000000 Binary files a/env/Lib/site-packages/aiogram/client/session/__pycache__/__init__.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/client/session/__pycache__/aiohttp.cpython-311.pyc b/env/Lib/site-packages/aiogram/client/session/__pycache__/aiohttp.cpython-311.pyc deleted file mode 100644 index 1f1da0f..0000000 Binary files a/env/Lib/site-packages/aiogram/client/session/__pycache__/aiohttp.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/client/session/__pycache__/base.cpython-311.pyc b/env/Lib/site-packages/aiogram/client/session/__pycache__/base.cpython-311.pyc deleted file mode 100644 index 4140596..0000000 Binary files a/env/Lib/site-packages/aiogram/client/session/__pycache__/base.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/client/session/aiohttp.py b/env/Lib/site-packages/aiogram/client/session/aiohttp.py deleted file mode 100644 index 69f36bf..0000000 --- a/env/Lib/site-packages/aiogram/client/session/aiohttp.py +++ /dev/null @@ -1,215 +0,0 @@ -from __future__ import annotations - -import asyncio -import ssl -from typing import ( - TYPE_CHECKING, - Any, - AsyncGenerator, - Dict, - Iterable, - List, - Optional, - Tuple, - Type, - Union, - cast, -) - -import certifi -from aiohttp import BasicAuth, ClientError, ClientSession, FormData, TCPConnector -from aiohttp.hdrs import USER_AGENT -from aiohttp.http import SERVER_SOFTWARE - -from aiogram.__meta__ import __version__ -from aiogram.methods import TelegramMethod - -from ...exceptions import TelegramNetworkError -from ...methods.base import TelegramType -from ...types import InputFile -from .base import BaseSession - -if TYPE_CHECKING: - from ..bot import Bot - -_ProxyBasic = Union[str, Tuple[str, BasicAuth]] -_ProxyChain = Iterable[_ProxyBasic] -_ProxyType = Union[_ProxyChain, _ProxyBasic] - - -def _retrieve_basic(basic: _ProxyBasic) -> Dict[str, Any]: - from aiohttp_socks.utils import parse_proxy_url # type: ignore - - proxy_auth: Optional[BasicAuth] = None - - if isinstance(basic, str): - proxy_url = basic - else: - proxy_url, proxy_auth = basic - - proxy_type, host, port, username, password = parse_proxy_url(proxy_url) - if isinstance(proxy_auth, BasicAuth): - username = proxy_auth.login - password = proxy_auth.password - - return { - "proxy_type": proxy_type, - "host": host, - "port": port, - "username": username, - "password": password, - "rdns": True, - } - - -def _prepare_connector(chain_or_plain: _ProxyType) -> Tuple[Type["TCPConnector"], Dict[str, Any]]: - from aiohttp_socks import ( # type: ignore - ChainProxyConnector, - ProxyConnector, - ProxyInfo, - ) - - # since tuple is Iterable(compatible with _ProxyChain) object, we assume that - # user wants chained proxies if tuple is a pair of string(url) and BasicAuth - if isinstance(chain_or_plain, str) or ( - isinstance(chain_or_plain, tuple) and len(chain_or_plain) == 2 - ): - chain_or_plain = cast(_ProxyBasic, chain_or_plain) - return ProxyConnector, _retrieve_basic(chain_or_plain) - - chain_or_plain = cast(_ProxyChain, chain_or_plain) - infos: List[ProxyInfo] = [] - for basic in chain_or_plain: - infos.append(ProxyInfo(**_retrieve_basic(basic))) - - return ChainProxyConnector, {"proxy_infos": infos} - - -class AiohttpSession(BaseSession): - def __init__( - self, proxy: Optional[_ProxyType] = None, limit: int = 100, **kwargs: Any - ) -> None: - """ - Client session based on aiohttp. - - :param proxy: The proxy to be used for requests. Default is None. - :param limit: The total number of simultaneous connections. Default is 100. - :param kwargs: Additional keyword arguments. - """ - super().__init__(**kwargs) - - self._session: Optional[ClientSession] = None - self._connector_type: Type[TCPConnector] = TCPConnector - self._connector_init: Dict[str, Any] = { - "ssl": ssl.create_default_context(cafile=certifi.where()), - "limit": limit, - "ttl_dns_cache": 3600, # Workaround for https://github.com/aiogram/aiogram/issues/1500 - } - self._should_reset_connector = True # flag determines connector state - self._proxy: Optional[_ProxyType] = None - - if proxy is not None: - try: - self._setup_proxy_connector(proxy) - except ImportError as exc: # pragma: no cover - raise RuntimeError( - "In order to use aiohttp client for proxy requests, install " - "https://pypi.org/project/aiohttp-socks/" - ) from exc - - def _setup_proxy_connector(self, proxy: _ProxyType) -> None: - self._connector_type, self._connector_init = _prepare_connector(proxy) - self._proxy = proxy - - @property - def proxy(self) -> Optional[_ProxyType]: - return self._proxy - - @proxy.setter - def proxy(self, proxy: _ProxyType) -> None: - self._setup_proxy_connector(proxy) - self._should_reset_connector = True - - async def create_session(self) -> ClientSession: - if self._should_reset_connector: - await self.close() - - if self._session is None or self._session.closed: - self._session = ClientSession( - connector=self._connector_type(**self._connector_init), - headers={ - USER_AGENT: f"{SERVER_SOFTWARE} aiogram/{__version__}", - }, - ) - self._should_reset_connector = False - - return self._session - - async def close(self) -> None: - if self._session is not None and not self._session.closed: - await self._session.close() - - # Wait 250 ms for the underlying SSL connections to close - # https://docs.aiohttp.org/en/stable/client_advanced.html#graceful-shutdown - await asyncio.sleep(0.25) - - def build_form_data(self, bot: Bot, method: TelegramMethod[TelegramType]) -> FormData: - form = FormData(quote_fields=False) - files: Dict[str, InputFile] = {} - for key, value in method.model_dump(warnings=False).items(): - value = self.prepare_value(value, bot=bot, files=files) - if not value: - continue - form.add_field(key, value) - for key, value in files.items(): - form.add_field( - key, - value.read(bot), - filename=value.filename or key, - ) - return form - - async def make_request( - self, bot: Bot, method: TelegramMethod[TelegramType], timeout: Optional[int] = None - ) -> TelegramType: - session = await self.create_session() - - url = self.api.api_url(token=bot.token, method=method.__api_method__) - form = self.build_form_data(bot=bot, method=method) - - try: - async with session.post( - url, data=form, timeout=self.timeout if timeout is None else timeout - ) as resp: - raw_result = await resp.text() - except asyncio.TimeoutError: - raise TelegramNetworkError(method=method, message="Request timeout error") - except ClientError as e: - raise TelegramNetworkError(method=method, message=f"{type(e).__name__}: {e}") - response = self.check_response( - bot=bot, method=method, status_code=resp.status, content=raw_result - ) - return cast(TelegramType, response.result) - - async def stream_content( - self, - url: str, - headers: Optional[Dict[str, Any]] = None, - timeout: int = 30, - chunk_size: int = 65536, - raise_for_status: bool = True, - ) -> AsyncGenerator[bytes, None]: - if headers is None: - headers = {} - - session = await self.create_session() - - async with session.get( - url, timeout=timeout, headers=headers, raise_for_status=raise_for_status - ) as resp: - async for chunk in resp.content.iter_chunked(chunk_size): - yield chunk - - async def __aenter__(self) -> AiohttpSession: - await self.create_session() - return self diff --git a/env/Lib/site-packages/aiogram/client/session/base.py b/env/Lib/site-packages/aiogram/client/session/base.py deleted file mode 100644 index 82ec469..0000000 --- a/env/Lib/site-packages/aiogram/client/session/base.py +++ /dev/null @@ -1,265 +0,0 @@ -from __future__ import annotations - -import abc -import datetime -import json -import secrets -from enum import Enum -from http import HTTPStatus -from types import TracebackType -from typing import ( - TYPE_CHECKING, - Any, - AsyncGenerator, - Callable, - Dict, - Final, - Optional, - Type, - cast, -) - -from pydantic import ValidationError - -from aiogram.exceptions import ( - ClientDecodeError, - RestartingTelegram, - TelegramAPIError, - TelegramBadRequest, - TelegramConflictError, - TelegramEntityTooLarge, - TelegramForbiddenError, - TelegramMigrateToChat, - TelegramNotFound, - TelegramRetryAfter, - TelegramServerError, - TelegramUnauthorizedError, -) - -from ...methods import Response, TelegramMethod -from ...methods.base import TelegramType -from ...types import InputFile, TelegramObject -from ..default import Default -from ..telegram import PRODUCTION, TelegramAPIServer -from .middlewares.manager import RequestMiddlewareManager - -if TYPE_CHECKING: - from ..bot import Bot - -_JsonLoads = Callable[..., Any] -_JsonDumps = Callable[..., str] - -DEFAULT_TIMEOUT: Final[float] = 60.0 - - -class BaseSession(abc.ABC): - """ - This is base class for all HTTP sessions in aiogram. - - If you want to create your own session, you must inherit from this class. - """ - - def __init__( - self, - api: TelegramAPIServer = PRODUCTION, - json_loads: _JsonLoads = json.loads, - json_dumps: _JsonDumps = json.dumps, - timeout: float = DEFAULT_TIMEOUT, - ) -> None: - """ - - :param api: Telegram Bot API URL patterns - :param json_loads: JSON loader - :param json_dumps: JSON dumper - :param timeout: Session scope request timeout - """ - self.api = api - self.json_loads = json_loads - self.json_dumps = json_dumps - self.timeout = timeout - - self.middleware = RequestMiddlewareManager() - - def check_response( - self, bot: Bot, method: TelegramMethod[TelegramType], status_code: int, content: str - ) -> Response[TelegramType]: - """ - Check response status - """ - try: - json_data = self.json_loads(content) - except Exception as e: - # Handled error type can't be classified as specific error - # in due to decoder can be customized and raise any exception - - raise ClientDecodeError("Failed to decode object", e, content) - - try: - response_type = Response[method.__returning__] # type: ignore - response = response_type.model_validate(json_data, context={"bot": bot}) - except ValidationError as e: - raise ClientDecodeError("Failed to deserialize object", e, json_data) - - if HTTPStatus.OK <= status_code <= HTTPStatus.IM_USED and response.ok: - return response - - description = cast(str, response.description) - - if parameters := response.parameters: - if parameters.retry_after: - raise TelegramRetryAfter( - method=method, message=description, retry_after=parameters.retry_after - ) - if parameters.migrate_to_chat_id: - raise TelegramMigrateToChat( - method=method, - message=description, - migrate_to_chat_id=parameters.migrate_to_chat_id, - ) - if status_code == HTTPStatus.BAD_REQUEST: - raise TelegramBadRequest(method=method, message=description) - if status_code == HTTPStatus.NOT_FOUND: - raise TelegramNotFound(method=method, message=description) - if status_code == HTTPStatus.CONFLICT: - raise TelegramConflictError(method=method, message=description) - if status_code == HTTPStatus.UNAUTHORIZED: - raise TelegramUnauthorizedError(method=method, message=description) - if status_code == HTTPStatus.FORBIDDEN: - raise TelegramForbiddenError(method=method, message=description) - if status_code == HTTPStatus.REQUEST_ENTITY_TOO_LARGE: - raise TelegramEntityTooLarge(method=method, message=description) - if status_code >= HTTPStatus.INTERNAL_SERVER_ERROR: - if "restart" in description: - raise RestartingTelegram(method=method, message=description) - raise TelegramServerError(method=method, message=description) - - raise TelegramAPIError( - method=method, - message=description, - ) - - @abc.abstractmethod - async def close(self) -> None: # pragma: no cover - """ - Close client session - """ - pass - - @abc.abstractmethod - async def make_request( - self, - bot: Bot, - method: TelegramMethod[TelegramType], - timeout: Optional[int] = None, - ) -> TelegramType: # pragma: no cover - """ - Make request to Telegram Bot API - - :param bot: Bot instance - :param method: Method instance - :param timeout: Request timeout - :return: - :raise TelegramApiError: - """ - pass - - @abc.abstractmethod - async def stream_content( - self, - url: str, - headers: Optional[Dict[str, Any]] = None, - timeout: int = 30, - chunk_size: int = 65536, - raise_for_status: bool = True, - ) -> AsyncGenerator[bytes, None]: # pragma: no cover - """ - Stream reader - """ - yield b"" - - def prepare_value( - self, - value: Any, - bot: Bot, - files: Dict[str, Any], - _dumps_json: bool = True, - ) -> Any: - """ - Prepare value before send - """ - if value is None: - return None - if isinstance(value, str): - return value - if isinstance(value, Default): - default_value = bot.default[value.name] - return self.prepare_value(default_value, bot=bot, files=files, _dumps_json=_dumps_json) - if isinstance(value, InputFile): - key = secrets.token_urlsafe(10) - files[key] = value - return f"attach://{key}" - if isinstance(value, dict): - value = { - key: prepared_item - for key, item in value.items() - if ( - prepared_item := self.prepare_value( - item, bot=bot, files=files, _dumps_json=False - ) - ) - is not None - } - if _dumps_json: - return self.json_dumps(value) - return value - if isinstance(value, list): - value = [ - prepared_item - for item in value - if ( - prepared_item := self.prepare_value( - item, bot=bot, files=files, _dumps_json=False - ) - ) - is not None - ] - if _dumps_json: - return self.json_dumps(value) - return value - if isinstance(value, datetime.timedelta): - now = datetime.datetime.now() - return str(round((now + value).timestamp())) - if isinstance(value, datetime.datetime): - return str(round(value.timestamp())) - if isinstance(value, Enum): - return self.prepare_value(value.value, bot=bot, files=files) - if isinstance(value, TelegramObject): - return self.prepare_value( - value.model_dump(warnings=False), - bot=bot, - files=files, - _dumps_json=_dumps_json, - ) - if _dumps_json: - return self.json_dumps(value) - return value - - async def __call__( - self, - bot: Bot, - method: TelegramMethod[TelegramType], - timeout: Optional[int] = None, - ) -> TelegramType: - middleware = self.middleware.wrap_middlewares(self.make_request, timeout=timeout) - return cast(TelegramType, await middleware(bot, method)) - - async def __aenter__(self) -> BaseSession: - return self - - async def __aexit__( - self, - exc_type: Optional[Type[BaseException]], - exc_value: Optional[BaseException], - traceback: Optional[TracebackType], - ) -> None: - await self.close() diff --git a/env/Lib/site-packages/aiogram/client/session/middlewares/__init__.py b/env/Lib/site-packages/aiogram/client/session/middlewares/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/env/Lib/site-packages/aiogram/client/session/middlewares/__pycache__/__init__.cpython-311.pyc b/env/Lib/site-packages/aiogram/client/session/middlewares/__pycache__/__init__.cpython-311.pyc deleted file mode 100644 index e13aa3e..0000000 Binary files a/env/Lib/site-packages/aiogram/client/session/middlewares/__pycache__/__init__.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/client/session/middlewares/__pycache__/base.cpython-311.pyc b/env/Lib/site-packages/aiogram/client/session/middlewares/__pycache__/base.cpython-311.pyc deleted file mode 100644 index 1ecc3ee..0000000 Binary files a/env/Lib/site-packages/aiogram/client/session/middlewares/__pycache__/base.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/client/session/middlewares/__pycache__/manager.cpython-311.pyc b/env/Lib/site-packages/aiogram/client/session/middlewares/__pycache__/manager.cpython-311.pyc deleted file mode 100644 index f5fe65b..0000000 Binary files a/env/Lib/site-packages/aiogram/client/session/middlewares/__pycache__/manager.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/client/session/middlewares/__pycache__/request_logging.cpython-311.pyc b/env/Lib/site-packages/aiogram/client/session/middlewares/__pycache__/request_logging.cpython-311.pyc deleted file mode 100644 index 1a91f75..0000000 Binary files a/env/Lib/site-packages/aiogram/client/session/middlewares/__pycache__/request_logging.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/client/session/middlewares/base.py b/env/Lib/site-packages/aiogram/client/session/middlewares/base.py deleted file mode 100644 index c5f3e7c..0000000 --- a/env/Lib/site-packages/aiogram/client/session/middlewares/base.py +++ /dev/null @@ -1,53 +0,0 @@ -from __future__ import annotations - -from abc import ABC, abstractmethod -from typing import TYPE_CHECKING, Protocol - -from aiogram.methods import Response, TelegramMethod -from aiogram.methods.base import TelegramType - -if TYPE_CHECKING: - from ...bot import Bot - - -class NextRequestMiddlewareType(Protocol[TelegramType]): # pragma: no cover - async def __call__( - self, - bot: "Bot", - method: TelegramMethod[TelegramType], - ) -> Response[TelegramType]: - pass - - -class RequestMiddlewareType(Protocol): # pragma: no cover - async def __call__( - self, - make_request: NextRequestMiddlewareType[TelegramType], - bot: "Bot", - method: TelegramMethod[TelegramType], - ) -> Response[TelegramType]: - pass - - -class BaseRequestMiddleware(ABC): - """ - Generic middleware class - """ - - @abstractmethod - async def __call__( - self, - make_request: NextRequestMiddlewareType[TelegramType], - bot: "Bot", - method: TelegramMethod[TelegramType], - ) -> Response[TelegramType]: - """ - Execute middleware - - :param make_request: Wrapped make_request in middlewares chain - :param bot: bot for request making - :param method: Request method (Subclass of :class:`aiogram.methods.base.TelegramMethod`) - - :return: :class:`aiogram.methods.Response` - """ - pass diff --git a/env/Lib/site-packages/aiogram/client/session/middlewares/manager.py b/env/Lib/site-packages/aiogram/client/session/middlewares/manager.py deleted file mode 100644 index 2346715..0000000 --- a/env/Lib/site-packages/aiogram/client/session/middlewares/manager.py +++ /dev/null @@ -1,62 +0,0 @@ -from __future__ import annotations - -from functools import partial -from typing import Any, Callable, List, Optional, Sequence, Union, cast, overload - -from aiogram.client.session.middlewares.base import ( - NextRequestMiddlewareType, - RequestMiddlewareType, -) -from aiogram.methods.base import TelegramType - - -class RequestMiddlewareManager(Sequence[RequestMiddlewareType]): - def __init__(self) -> None: - self._middlewares: List[RequestMiddlewareType] = [] - - def register( - self, - middleware: RequestMiddlewareType, - ) -> RequestMiddlewareType: - self._middlewares.append(middleware) - return middleware - - def unregister(self, middleware: RequestMiddlewareType) -> None: - self._middlewares.remove(middleware) - - def __call__( - self, - middleware: Optional[RequestMiddlewareType] = None, - ) -> Union[ - Callable[[RequestMiddlewareType], RequestMiddlewareType], - RequestMiddlewareType, - ]: - if middleware is None: - return self.register - return self.register(middleware) - - @overload - def __getitem__(self, item: int) -> RequestMiddlewareType: - pass - - @overload - def __getitem__(self, item: slice) -> Sequence[RequestMiddlewareType]: - pass - - def __getitem__( - self, item: Union[int, slice] - ) -> Union[RequestMiddlewareType, Sequence[RequestMiddlewareType]]: - return self._middlewares[item] - - def __len__(self) -> int: - return len(self._middlewares) - - def wrap_middlewares( - self, - callback: NextRequestMiddlewareType[TelegramType], - **kwargs: Any, - ) -> NextRequestMiddlewareType[TelegramType]: - middleware = partial(callback, **kwargs) - for m in reversed(self._middlewares): - middleware = partial(m, middleware) - return cast(NextRequestMiddlewareType[TelegramType], middleware) diff --git a/env/Lib/site-packages/aiogram/client/session/middlewares/request_logging.py b/env/Lib/site-packages/aiogram/client/session/middlewares/request_logging.py deleted file mode 100644 index af7b9d6..0000000 --- a/env/Lib/site-packages/aiogram/client/session/middlewares/request_logging.py +++ /dev/null @@ -1,37 +0,0 @@ -import logging -from typing import TYPE_CHECKING, Any, List, Optional, Type - -from aiogram import loggers -from aiogram.methods import TelegramMethod -from aiogram.methods.base import Response, TelegramType - -from .base import BaseRequestMiddleware, NextRequestMiddlewareType - -if TYPE_CHECKING: - from ...bot import Bot - -logger = logging.getLogger(__name__) - - -class RequestLogging(BaseRequestMiddleware): - def __init__(self, ignore_methods: Optional[List[Type[TelegramMethod[Any]]]] = None): - """ - Middleware for logging outgoing requests - - :param ignore_methods: methods to ignore in logging middleware - """ - self.ignore_methods = ignore_methods if ignore_methods else [] - - async def __call__( - self, - make_request: NextRequestMiddlewareType[TelegramType], - bot: "Bot", - method: TelegramMethod[TelegramType], - ) -> Response[TelegramType]: - if type(method) not in self.ignore_methods: - loggers.middlewares.info( - "Make request with method=%r by bot id=%d", - type(method).__name__, - bot.id, - ) - return await make_request(bot, method) diff --git a/env/Lib/site-packages/aiogram/client/telegram.py b/env/Lib/site-packages/aiogram/client/telegram.py deleted file mode 100644 index 5e29722..0000000 --- a/env/Lib/site-packages/aiogram/client/telegram.py +++ /dev/null @@ -1,103 +0,0 @@ -from abc import ABC, abstractmethod -from dataclasses import dataclass -from pathlib import Path -from typing import Any, Union - - -class FilesPathWrapper(ABC): - @abstractmethod - def to_local(self, path: Union[Path, str]) -> Union[Path, str]: - pass - - @abstractmethod - def to_server(self, path: Union[Path, str]) -> Union[Path, str]: - pass - - -class BareFilesPathWrapper(FilesPathWrapper): - def to_local(self, path: Union[Path, str]) -> Union[Path, str]: - return path - - def to_server(self, path: Union[Path, str]) -> Union[Path, str]: - return path - - -class SimpleFilesPathWrapper(FilesPathWrapper): - def __init__(self, server_path: Path, local_path: Path) -> None: - self.server_path = server_path - self.local_path = local_path - - @classmethod - def _resolve( - cls, base1: Union[Path, str], base2: Union[Path, str], value: Union[Path, str] - ) -> Path: - relative = Path(value).relative_to(base1) - return base2 / relative - - def to_local(self, path: Union[Path, str]) -> Union[Path, str]: - return self._resolve(base1=self.server_path, base2=self.local_path, value=path) - - def to_server(self, path: Union[Path, str]) -> Union[Path, str]: - return self._resolve(base1=self.local_path, base2=self.server_path, value=path) - - -@dataclass(frozen=True) -class TelegramAPIServer: - """ - Base config for API Endpoints - """ - - base: str - """Base URL""" - file: str - """Files URL""" - is_local: bool = False - """Mark this server is - in `local mode `_.""" - wrap_local_file: FilesPathWrapper = BareFilesPathWrapper() - """Callback to wrap files path in local mode""" - - def api_url(self, token: str, method: str) -> str: - """ - Generate URL for API methods - - :param token: Bot token - :param method: API method name (case insensitive) - :return: URL - """ - return self.base.format(token=token, method=method) - - def file_url(self, token: str, path: str) -> str: - """ - Generate URL for downloading files - - :param token: Bot token - :param path: file path - :return: URL - """ - return self.file.format(token=token, path=path) - - @classmethod - def from_base(cls, base: str, **kwargs: Any) -> "TelegramAPIServer": - """ - Use this method to auto-generate TelegramAPIServer instance from base URL - - :param base: Base URL - :return: instance of :class:`TelegramAPIServer` - """ - base = base.rstrip("/") - return cls( - base=f"{base}/bot{{token}}/{{method}}", - file=f"{base}/file/bot{{token}}/{{path}}", - **kwargs, - ) - - -PRODUCTION = TelegramAPIServer( - base="https://api.telegram.org/bot{token}/{method}", - file="https://api.telegram.org/file/bot{token}/{path}", -) -TEST = TelegramAPIServer( - base="https://api.telegram.org/bot{token}/test/{method}", - file="https://api.telegram.org/file/bot{token}/test/{path}", -) diff --git a/env/Lib/site-packages/aiogram/dispatcher/__init__.py b/env/Lib/site-packages/aiogram/dispatcher/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/env/Lib/site-packages/aiogram/dispatcher/__pycache__/__init__.cpython-311.pyc b/env/Lib/site-packages/aiogram/dispatcher/__pycache__/__init__.cpython-311.pyc deleted file mode 100644 index f299e3c..0000000 Binary files a/env/Lib/site-packages/aiogram/dispatcher/__pycache__/__init__.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/dispatcher/__pycache__/dispatcher.cpython-311.pyc b/env/Lib/site-packages/aiogram/dispatcher/__pycache__/dispatcher.cpython-311.pyc deleted file mode 100644 index 75a1afa..0000000 Binary files a/env/Lib/site-packages/aiogram/dispatcher/__pycache__/dispatcher.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/dispatcher/__pycache__/flags.cpython-311.pyc b/env/Lib/site-packages/aiogram/dispatcher/__pycache__/flags.cpython-311.pyc deleted file mode 100644 index cc8a68e..0000000 Binary files a/env/Lib/site-packages/aiogram/dispatcher/__pycache__/flags.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/dispatcher/__pycache__/router.cpython-311.pyc b/env/Lib/site-packages/aiogram/dispatcher/__pycache__/router.cpython-311.pyc deleted file mode 100644 index 3956fa5..0000000 Binary files a/env/Lib/site-packages/aiogram/dispatcher/__pycache__/router.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/dispatcher/dispatcher.py b/env/Lib/site-packages/aiogram/dispatcher/dispatcher.py deleted file mode 100644 index 8b6987c..0000000 --- a/env/Lib/site-packages/aiogram/dispatcher/dispatcher.py +++ /dev/null @@ -1,598 +0,0 @@ -from __future__ import annotations - -import asyncio -import contextvars -import signal -import warnings -from asyncio import CancelledError, Event, Future, Lock -from contextlib import suppress -from typing import Any, AsyncGenerator, Dict, List, Optional, Set, Union - -from .. import loggers -from ..client.bot import Bot -from ..exceptions import TelegramAPIError -from ..fsm.middleware import FSMContextMiddleware -from ..fsm.storage.base import BaseEventIsolation, BaseStorage -from ..fsm.storage.memory import DisabledEventIsolation, MemoryStorage -from ..fsm.strategy import FSMStrategy -from ..methods import GetUpdates, TelegramMethod -from ..methods.base import TelegramType -from ..types import Update, User -from ..types.base import UNSET, UNSET_TYPE -from ..types.update import UpdateTypeLookupError -from ..utils.backoff import Backoff, BackoffConfig -from .event.bases import UNHANDLED, SkipHandler -from .event.telegram import TelegramEventObserver -from .middlewares.error import ErrorsMiddleware -from .middlewares.user_context import UserContextMiddleware -from .router import Router - -DEFAULT_BACKOFF_CONFIG = BackoffConfig(min_delay=1.0, max_delay=5.0, factor=1.3, jitter=0.1) - - -class Dispatcher(Router): - """ - Root router - """ - - def __init__( - self, - *, # * - Preventing to pass instance of Bot to the FSM storage - storage: Optional[BaseStorage] = None, - fsm_strategy: FSMStrategy = FSMStrategy.USER_IN_CHAT, - events_isolation: Optional[BaseEventIsolation] = None, - disable_fsm: bool = False, - name: Optional[str] = None, - **kwargs: Any, - ) -> None: - """ - Root router - - :param storage: Storage for FSM - :param fsm_strategy: FSM strategy - :param events_isolation: Events isolation - :param disable_fsm: Disable FSM, note that if you disable FSM - then you should not use storage and events isolation - :param kwargs: Other arguments, will be passed as keyword arguments to handlers - """ - super(Dispatcher, self).__init__(name=name) - - if storage and not isinstance(storage, BaseStorage): - raise TypeError( - f"FSM storage should be instance of 'BaseStorage' not {type(storage).__name__}" - ) - - # Telegram API provides originally only one event type - Update - # For making easily interactions with events here is registered handler which helps - # to separate Update to different event types like Message, CallbackQuery etc. - self.update = self.observers["update"] = TelegramEventObserver( - router=self, event_name="update" - ) - self.update.register(self._listen_update) - - # Error handlers should work is out of all other functions - # and should be registered before all others middlewares - self.update.outer_middleware(ErrorsMiddleware(self)) - - # User context middleware makes small optimization for all other builtin - # middlewares via caching the user and chat instances in the event context - self.update.outer_middleware(UserContextMiddleware()) - - # FSM middleware should always be registered after User context middleware - # because here is used context from previous step - self.fsm = FSMContextMiddleware( - storage=storage or MemoryStorage(), - strategy=fsm_strategy, - events_isolation=events_isolation or DisabledEventIsolation(), - ) - if not disable_fsm: - # Note that when FSM middleware is disabled, the event isolation is also disabled - # Because the isolation mechanism is a part of the FSM - self.update.outer_middleware(self.fsm) - self.shutdown.register(self.fsm.close) - - self.workflow_data: Dict[str, Any] = kwargs - self._running_lock = Lock() - self._stop_signal: Optional[Event] = None - self._stopped_signal: Optional[Event] = None - self._handle_update_tasks: Set[asyncio.Task[Any]] = set() - - def __getitem__(self, item: str) -> Any: - return self.workflow_data[item] - - def __setitem__(self, key: str, value: Any) -> None: - self.workflow_data[key] = value - - def __delitem__(self, key: str) -> None: - del self.workflow_data[key] - - def get(self, key: str, /, default: Optional[Any] = None) -> Optional[Any]: - return self.workflow_data.get(key, default) - - @property - def storage(self) -> BaseStorage: - return self.fsm.storage - - @property - def parent_router(self) -> Optional[Router]: - """ - Dispatcher has no parent router and can't be included to any other routers or dispatchers - - :return: - """ - return None # noqa: RET501 - - @parent_router.setter - def parent_router(self, value: Router) -> None: - """ - Dispatcher is root Router then configuring parent router is not allowed - - :param value: - :return: - """ - raise RuntimeError("Dispatcher can not be attached to another Router.") - - async def feed_update(self, bot: Bot, update: Update, **kwargs: Any) -> Any: - """ - Main entry point for incoming updates - Response of this method can be used as Webhook response - - :param bot: - :param update: - """ - loop = asyncio.get_running_loop() - handled = False - start_time = loop.time() - - if update.bot != bot: - # Re-mounting update to the current bot instance for making possible to - # use it in shortcuts. - # Here is update is re-created because we need to propagate context to - # all nested objects and attributes of the Update, but it - # is impossible without roundtrip to JSON :( - # The preferred way is that pass already mounted Bot instance to this update - # before call feed_update method - update = Update.model_validate(update.model_dump(), context={"bot": bot}) - - try: - response = await self.update.wrap_outer_middleware( - self.update.trigger, - update, - { - **self.workflow_data, - **kwargs, - "bot": bot, - }, - ) - handled = response is not UNHANDLED - return response - finally: - finish_time = loop.time() - duration = (finish_time - start_time) * 1000 - loggers.event.info( - "Update id=%s is %s. Duration %d ms by bot id=%d", - update.update_id, - "handled" if handled else "not handled", - duration, - bot.id, - ) - - async def feed_raw_update(self, bot: Bot, update: Dict[str, Any], **kwargs: Any) -> Any: - """ - Main entry point for incoming updates with automatic Dict->Update serializer - - :param bot: - :param update: - :param kwargs: - """ - parsed_update = Update.model_validate(update, context={"bot": bot}) - return await self._feed_webhook_update(bot=bot, update=parsed_update, **kwargs) - - @classmethod - async def _listen_updates( - cls, - bot: Bot, - polling_timeout: int = 30, - backoff_config: BackoffConfig = DEFAULT_BACKOFF_CONFIG, - allowed_updates: Optional[List[str]] = None, - ) -> AsyncGenerator[Update, None]: - """ - Endless updates reader with correctly handling any server-side or connection errors. - - So you may not worry that the polling will stop working. - """ - backoff = Backoff(config=backoff_config) - get_updates = GetUpdates(timeout=polling_timeout, allowed_updates=allowed_updates) - kwargs = {} - if bot.session.timeout: - # Request timeout can be lower than session timeout and that's OK. - # To prevent false-positive TimeoutError we should wait longer than polling timeout - kwargs["request_timeout"] = int(bot.session.timeout + polling_timeout) - failed = False - while True: - try: - updates = await bot(get_updates, **kwargs) - except Exception as e: - failed = True - # In cases when Telegram Bot API was inaccessible don't need to stop polling - # process because some developers can't make auto-restarting of the script - loggers.dispatcher.error("Failed to fetch updates - %s: %s", type(e).__name__, e) - # And also backoff timeout is best practice to retry any network activity - loggers.dispatcher.warning( - "Sleep for %f seconds and try again... (tryings = %d, bot id = %d)", - backoff.next_delay, - backoff.counter, - bot.id, - ) - await backoff.asleep() - continue - - # In case when network connection was fixed let's reset the backoff - # to initial value and then process updates - if failed: - loggers.dispatcher.info( - "Connection established (tryings = %d, bot id = %d)", - backoff.counter, - bot.id, - ) - backoff.reset() - failed = False - - for update in updates: - yield update - # The getUpdates method returns the earliest 100 unconfirmed updates. - # To confirm an update, use the offset parameter when calling getUpdates - # All updates with update_id less than or equal to offset will be marked - # as confirmed on the server and will no longer be returned. - get_updates.offset = update.update_id + 1 - - async def _listen_update(self, update: Update, **kwargs: Any) -> Any: - """ - Main updates listener - - Workflow: - - Detect content type and propagate to observers in current router - - If no one filter is pass - propagate update to child routers as Update - - :param update: - :param kwargs: - :return: - """ - try: - update_type = update.event_type - event = update.event - except UpdateTypeLookupError as e: - warnings.warn( - "Detected unknown update type.\n" - "Seems like Telegram Bot API was updated and you have " - "installed not latest version of aiogram framework" - f"\nUpdate: {update.model_dump_json(exclude_unset=True)}", - RuntimeWarning, - ) - raise SkipHandler() from e - - kwargs.update(event_update=update) - - return await self.propagate_event(update_type=update_type, event=event, **kwargs) - - @classmethod - async def silent_call_request(cls, bot: Bot, result: TelegramMethod[Any]) -> None: - """ - Simulate answer into WebHook - - :param bot: - :param result: - :return: - """ - try: - await bot(result) - except TelegramAPIError as e: - # In due to WebHook mechanism doesn't allow getting response for - # requests called in answer to WebHook request. - # Need to skip unsuccessful responses. - # For debugging here is added logging. - loggers.event.error("Failed to make answer: %s: %s", e.__class__.__name__, e) - - async def _process_update( - self, bot: Bot, update: Update, call_answer: bool = True, **kwargs: Any - ) -> bool: - """ - Propagate update to event listeners - - :param bot: instance of Bot - :param update: instance of Update - :param call_answer: need to execute response as Telegram method (like answer into webhook) - :param kwargs: contextual data for middlewares, filters and handlers - :return: status - """ - try: - response = await self.feed_update(bot, update, **kwargs) - if call_answer and isinstance(response, TelegramMethod): - await self.silent_call_request(bot=bot, result=response) - return response is not UNHANDLED - - except Exception as e: - loggers.event.exception( - "Cause exception while process update id=%d by bot id=%d\n%s: %s", - update.update_id, - bot.id, - e.__class__.__name__, - e, - ) - return True # because update was processed but unsuccessful - - async def _polling( - self, - bot: Bot, - polling_timeout: int = 30, - handle_as_tasks: bool = True, - backoff_config: BackoffConfig = DEFAULT_BACKOFF_CONFIG, - allowed_updates: Optional[List[str]] = None, - **kwargs: Any, - ) -> None: - """ - Internal polling process - - :param bot: - :param kwargs: - :return: - """ - user: User = await bot.me() - loggers.dispatcher.info( - "Run polling for bot @%s id=%d - %r", user.username, bot.id, user.full_name - ) - try: - async for update in self._listen_updates( - bot, - polling_timeout=polling_timeout, - backoff_config=backoff_config, - allowed_updates=allowed_updates, - ): - handle_update = self._process_update(bot=bot, update=update, **kwargs) - if handle_as_tasks: - handle_update_task = asyncio.create_task(handle_update) - self._handle_update_tasks.add(handle_update_task) - handle_update_task.add_done_callback(self._handle_update_tasks.discard) - else: - await handle_update - finally: - loggers.dispatcher.info( - "Polling stopped for bot @%s id=%d - %r", user.username, bot.id, user.full_name - ) - - async def _feed_webhook_update(self, bot: Bot, update: Update, **kwargs: Any) -> Any: - """ - The same with `Dispatcher.process_update()` but returns real response instead of bool - """ - try: - return await self.feed_update(bot, update, **kwargs) - except Exception as e: - loggers.event.exception( - "Cause exception while process update id=%d by bot id=%d\n%s: %s", - update.update_id, - bot.id, - e.__class__.__name__, - e, - ) - raise - - async def feed_webhook_update( - self, bot: Bot, update: Union[Update, Dict[str, Any]], _timeout: float = 55, **kwargs: Any - ) -> Optional[TelegramMethod[TelegramType]]: - if not isinstance(update, Update): # Allow to use raw updates - update = Update.model_validate(update, context={"bot": bot}) - - ctx = contextvars.copy_context() - loop = asyncio.get_running_loop() - waiter = loop.create_future() - - def release_waiter(*_: Any) -> None: - if not waiter.done(): - waiter.set_result(None) - - timeout_handle = loop.call_later(_timeout, release_waiter) - - process_updates: Future[Any] = asyncio.ensure_future( - self._feed_webhook_update(bot=bot, update=update, **kwargs) - ) - process_updates.add_done_callback(release_waiter, context=ctx) - - def process_response(task: Future[Any]) -> None: - warnings.warn( - "Detected slow response into webhook.\n" - "Telegram is waiting for response only first 60 seconds and then re-send update.\n" - "For preventing this situation response into webhook returned immediately " - "and handler is moved to background and still processing update.", - RuntimeWarning, - ) - try: - result = task.result() - except Exception as e: - raise e - if isinstance(result, TelegramMethod): - asyncio.ensure_future(self.silent_call_request(bot=bot, result=result)) - - try: - try: - await waiter - except CancelledError: # pragma: no cover - process_updates.remove_done_callback(release_waiter) - process_updates.cancel() - raise - - if process_updates.done(): - # TODO: handle exceptions - response: Any = process_updates.result() - if isinstance(response, TelegramMethod): - return response - - else: - process_updates.remove_done_callback(release_waiter) - process_updates.add_done_callback(process_response, context=ctx) - - finally: - timeout_handle.cancel() - - return None - - async def stop_polling(self) -> None: - """ - Execute this method if you want to stop polling programmatically - - :return: - """ - if not self._running_lock.locked(): - raise RuntimeError("Polling is not started") - if not self._stop_signal or not self._stopped_signal: - return - self._stop_signal.set() - await self._stopped_signal.wait() - - def _signal_stop_polling(self, sig: signal.Signals) -> None: - if not self._running_lock.locked(): - return - - loggers.dispatcher.warning("Received %s signal", sig.name) - if not self._stop_signal: - return - self._stop_signal.set() - - async def start_polling( - self, - *bots: Bot, - polling_timeout: int = 10, - handle_as_tasks: bool = True, - backoff_config: BackoffConfig = DEFAULT_BACKOFF_CONFIG, - allowed_updates: Optional[Union[List[str], UNSET_TYPE]] = UNSET, - handle_signals: bool = True, - close_bot_session: bool = True, - **kwargs: Any, - ) -> None: - """ - Polling runner - - :param bots: Bot instances (one or more) - :param polling_timeout: Long-polling wait time - :param handle_as_tasks: Run task for each event and no wait result - :param backoff_config: backoff-retry config - :param allowed_updates: List of the update types you want your bot to receive - By default, all used update types are enabled (resolved from handlers) - :param handle_signals: handle signals (SIGINT/SIGTERM) - :param close_bot_session: close bot sessions on shutdown - :param kwargs: contextual data - :return: - """ - if not bots: - raise ValueError("At least one bot instance is required to start polling") - if "bot" in kwargs: - raise ValueError( - "Keyword argument 'bot' is not acceptable, " - "the bot instance should be passed as positional argument" - ) - - async with self._running_lock: # Prevent to run this method twice at a once - if self._stop_signal is None: - self._stop_signal = Event() - if self._stopped_signal is None: - self._stopped_signal = Event() - - if allowed_updates is UNSET: - allowed_updates = self.resolve_used_update_types() - - self._stop_signal.clear() - self._stopped_signal.clear() - - if handle_signals: - loop = asyncio.get_running_loop() - with suppress(NotImplementedError): # pragma: no cover - # Signals handling is not supported on Windows - # It also can't be covered on Windows - loop.add_signal_handler( - signal.SIGTERM, self._signal_stop_polling, signal.SIGTERM - ) - loop.add_signal_handler( - signal.SIGINT, self._signal_stop_polling, signal.SIGINT - ) - - workflow_data = { - "dispatcher": self, - "bots": bots, - **self.workflow_data, - **kwargs, - } - if "bot" in workflow_data: - workflow_data.pop("bot") - - await self.emit_startup(bot=bots[-1], **workflow_data) - loggers.dispatcher.info("Start polling") - try: - tasks: List[asyncio.Task[Any]] = [ - asyncio.create_task( - self._polling( - bot=bot, - handle_as_tasks=handle_as_tasks, - polling_timeout=polling_timeout, - backoff_config=backoff_config, - allowed_updates=allowed_updates, - **workflow_data, - ) - ) - for bot in bots - ] - tasks.append(asyncio.create_task(self._stop_signal.wait())) - done, pending = await asyncio.wait(tasks, return_when=asyncio.FIRST_COMPLETED) - - for task in pending: - # (mostly) Graceful shutdown unfinished tasks - task.cancel() - with suppress(CancelledError): - await task - # Wait finished tasks to propagate unhandled exceptions - await asyncio.gather(*done) - - finally: - loggers.dispatcher.info("Polling stopped") - try: - await self.emit_shutdown(bot=bots[-1], **workflow_data) - finally: - if close_bot_session: - await asyncio.gather(*(bot.session.close() for bot in bots)) - self._stopped_signal.set() - - def run_polling( - self, - *bots: Bot, - polling_timeout: int = 10, - handle_as_tasks: bool = True, - backoff_config: BackoffConfig = DEFAULT_BACKOFF_CONFIG, - allowed_updates: Optional[Union[List[str], UNSET_TYPE]] = UNSET, - handle_signals: bool = True, - close_bot_session: bool = True, - **kwargs: Any, - ) -> None: - """ - Run many bots with polling - - :param bots: Bot instances (one or more) - :param polling_timeout: Long-polling wait time - :param handle_as_tasks: Run task for each event and no wait result - :param backoff_config: backoff-retry config - :param allowed_updates: List of the update types you want your bot to receive - :param handle_signals: handle signals (SIGINT/SIGTERM) - :param close_bot_session: close bot sessions on shutdown - :param kwargs: contextual data - :return: - """ - with suppress(KeyboardInterrupt): - return asyncio.run( - self.start_polling( - *bots, - **kwargs, - polling_timeout=polling_timeout, - handle_as_tasks=handle_as_tasks, - backoff_config=backoff_config, - allowed_updates=allowed_updates, - handle_signals=handle_signals, - close_bot_session=close_bot_session, - ) - ) diff --git a/env/Lib/site-packages/aiogram/dispatcher/event/__init__.py b/env/Lib/site-packages/aiogram/dispatcher/event/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/env/Lib/site-packages/aiogram/dispatcher/event/__pycache__/__init__.cpython-311.pyc b/env/Lib/site-packages/aiogram/dispatcher/event/__pycache__/__init__.cpython-311.pyc deleted file mode 100644 index 86e914c..0000000 Binary files a/env/Lib/site-packages/aiogram/dispatcher/event/__pycache__/__init__.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/dispatcher/event/__pycache__/bases.cpython-311.pyc b/env/Lib/site-packages/aiogram/dispatcher/event/__pycache__/bases.cpython-311.pyc deleted file mode 100644 index b11bc82..0000000 Binary files a/env/Lib/site-packages/aiogram/dispatcher/event/__pycache__/bases.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/dispatcher/event/__pycache__/event.cpython-311.pyc b/env/Lib/site-packages/aiogram/dispatcher/event/__pycache__/event.cpython-311.pyc deleted file mode 100644 index 4e1b355..0000000 Binary files a/env/Lib/site-packages/aiogram/dispatcher/event/__pycache__/event.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/dispatcher/event/__pycache__/handler.cpython-311.pyc b/env/Lib/site-packages/aiogram/dispatcher/event/__pycache__/handler.cpython-311.pyc deleted file mode 100644 index f389527..0000000 Binary files a/env/Lib/site-packages/aiogram/dispatcher/event/__pycache__/handler.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/dispatcher/event/__pycache__/telegram.cpython-311.pyc b/env/Lib/site-packages/aiogram/dispatcher/event/__pycache__/telegram.cpython-311.pyc deleted file mode 100644 index eb29919..0000000 Binary files a/env/Lib/site-packages/aiogram/dispatcher/event/__pycache__/telegram.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/dispatcher/event/bases.py b/env/Lib/site-packages/aiogram/dispatcher/event/bases.py deleted file mode 100644 index 1765683..0000000 --- a/env/Lib/site-packages/aiogram/dispatcher/event/bases.py +++ /dev/null @@ -1,35 +0,0 @@ -from __future__ import annotations - -from typing import Any, Awaitable, Callable, Dict, NoReturn, Optional, TypeVar, Union -from unittest.mock import sentinel - -from ...types import TelegramObject -from ..middlewares.base import BaseMiddleware - -MiddlewareEventType = TypeVar("MiddlewareEventType", bound=TelegramObject) -NextMiddlewareType = Callable[[MiddlewareEventType, Dict[str, Any]], Awaitable[Any]] -MiddlewareType = Union[ - BaseMiddleware, - Callable[ - [NextMiddlewareType[MiddlewareEventType], MiddlewareEventType, Dict[str, Any]], - Awaitable[Any], - ], -] - -UNHANDLED = sentinel.UNHANDLED -REJECTED = sentinel.REJECTED - - -class SkipHandler(Exception): - pass - - -class CancelHandler(Exception): - pass - - -def skip(message: Optional[str] = None) -> NoReturn: - """ - Raise an SkipHandler - """ - raise SkipHandler(message or "Event skipped") diff --git a/env/Lib/site-packages/aiogram/dispatcher/event/event.py b/env/Lib/site-packages/aiogram/dispatcher/event/event.py deleted file mode 100644 index 3cbcffe..0000000 --- a/env/Lib/site-packages/aiogram/dispatcher/event/event.py +++ /dev/null @@ -1,53 +0,0 @@ -from __future__ import annotations - -from typing import Any, Callable, List - -from .handler import CallbackType, HandlerObject - - -class EventObserver: - """ - Simple events observer - - Is used for managing events is not related with Telegram - (For example startup/shutdown processes) - - Handlers can be registered via decorator or method - - .. code-block:: python - - .register(my_handler) - - .. code-block:: python - - @() - async def my_handler(*args, **kwargs): ... - """ - - def __init__(self) -> None: - self.handlers: List[HandlerObject] = [] - - def register(self, callback: CallbackType) -> None: - """ - Register callback with filters - """ - self.handlers.append(HandlerObject(callback=callback)) - - async def trigger(self, *args: Any, **kwargs: Any) -> None: - """ - Propagate event to handlers. - Handler will be called when all its filters is pass. - """ - for handler in self.handlers: - await handler.call(*args, **kwargs) - - def __call__(self) -> Callable[[CallbackType], CallbackType]: - """ - Decorator for registering event handlers - """ - - def wrapper(callback: CallbackType) -> CallbackType: - self.register(callback) - return callback - - return wrapper diff --git a/env/Lib/site-packages/aiogram/dispatcher/event/handler.py b/env/Lib/site-packages/aiogram/dispatcher/event/handler.py deleted file mode 100644 index 8c283dd..0000000 --- a/env/Lib/site-packages/aiogram/dispatcher/event/handler.py +++ /dev/null @@ -1,99 +0,0 @@ -import asyncio -import contextvars -import inspect -import warnings -from dataclasses import dataclass, field -from functools import partial -from typing import Any, Callable, Dict, List, Optional, Set, Tuple - -from magic_filter.magic import MagicFilter as OriginalMagicFilter - -from aiogram.dispatcher.flags import extract_flags_from_object -from aiogram.filters.base import Filter -from aiogram.handlers import BaseHandler -from aiogram.utils.magic_filter import MagicFilter -from aiogram.utils.warnings import Recommendation - -CallbackType = Callable[..., Any] - - -@dataclass -class CallableObject: - callback: CallbackType - awaitable: bool = field(init=False) - params: Set[str] = field(init=False) - varkw: bool = field(init=False) - - def __post_init__(self) -> None: - callback = inspect.unwrap(self.callback) - self.awaitable = inspect.isawaitable(callback) or inspect.iscoroutinefunction(callback) - spec = inspect.getfullargspec(callback) - self.params = {*spec.args, *spec.kwonlyargs} - self.varkw = spec.varkw is not None - - def _prepare_kwargs(self, kwargs: Dict[str, Any]) -> Dict[str, Any]: - if self.varkw: - return kwargs - - return {k: kwargs[k] for k in self.params if k in kwargs} - - async def call(self, *args: Any, **kwargs: Any) -> Any: - wrapped = partial(self.callback, *args, **self._prepare_kwargs(kwargs)) - if self.awaitable: - return await wrapped() - - loop = asyncio.get_event_loop() - context = contextvars.copy_context() - wrapped = partial(context.run, wrapped) - return await loop.run_in_executor(None, wrapped) - - -@dataclass -class FilterObject(CallableObject): - magic: Optional[MagicFilter] = None - - def __post_init__(self) -> None: - if isinstance(self.callback, OriginalMagicFilter): - # MagicFilter instance is callable but generates - # only "CallOperation" instead of applying the filter - self.magic = self.callback - self.callback = self.callback.resolve - if not isinstance(self.magic, MagicFilter): - # Issue: https://github.com/aiogram/aiogram/issues/990 - warnings.warn( - category=Recommendation, - message="You are using F provided by magic_filter package directly, " - "but it lacks `.as_()` extension." - "\n Please change the import statement: from `from magic_filter import F` " - "to `from aiogram import F` to silence this warning.", - stacklevel=6, - ) - - super(FilterObject, self).__post_init__() - - if isinstance(self.callback, Filter): - self.awaitable = True - - -@dataclass -class HandlerObject(CallableObject): - filters: Optional[List[FilterObject]] = None - flags: Dict[str, Any] = field(default_factory=dict) - - def __post_init__(self) -> None: - super(HandlerObject, self).__post_init__() - callback = inspect.unwrap(self.callback) - if inspect.isclass(callback) and issubclass(callback, BaseHandler): - self.awaitable = True - self.flags.update(extract_flags_from_object(callback)) - - async def check(self, *args: Any, **kwargs: Any) -> Tuple[bool, Dict[str, Any]]: - if not self.filters: - return True, kwargs - for event_filter in self.filters: - check = await event_filter.call(*args, **kwargs) - if not check: - return False, kwargs - if isinstance(check, dict): - kwargs.update(check) - return True, kwargs diff --git a/env/Lib/site-packages/aiogram/dispatcher/event/telegram.py b/env/Lib/site-packages/aiogram/dispatcher/event/telegram.py deleted file mode 100644 index afa8938..0000000 --- a/env/Lib/site-packages/aiogram/dispatcher/event/telegram.py +++ /dev/null @@ -1,141 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Callable, Dict, List, Optional - -from aiogram.dispatcher.middlewares.manager import MiddlewareManager - -from ...exceptions import UnsupportedKeywordArgument -from ...filters.base import Filter -from ...types import TelegramObject -from .bases import REJECTED, UNHANDLED, MiddlewareType, SkipHandler -from .handler import CallbackType, FilterObject, HandlerObject - -if TYPE_CHECKING: - from aiogram.dispatcher.router import Router - - -class TelegramEventObserver: - """ - Event observer for Telegram events - - Here you can register handler with filter. - This observer will stop event propagation when first handler is pass. - """ - - def __init__(self, router: Router, event_name: str) -> None: - self.router: Router = router - self.event_name: str = event_name - - self.handlers: List[HandlerObject] = [] - - self.middleware = MiddlewareManager() - self.outer_middleware = MiddlewareManager() - - # Re-used filters check method from already implemented handler object - # with dummy callback which never will be used - self._handler = HandlerObject(callback=lambda: True, filters=[]) - - def filter(self, *filters: CallbackType) -> None: - """ - Register filter for all handlers of this event observer - - :param filters: positional filters - """ - if self._handler.filters is None: - self._handler.filters = [] - self._handler.filters.extend([FilterObject(filter_) for filter_ in filters]) - - def _resolve_middlewares(self) -> List[MiddlewareType[TelegramObject]]: - middlewares: List[MiddlewareType[TelegramObject]] = [] - for router in reversed(tuple(self.router.chain_head)): - observer = router.observers.get(self.event_name) - if observer: - middlewares.extend(observer.middleware) - - return middlewares - - def register( - self, - callback: CallbackType, - *filters: CallbackType, - flags: Optional[Dict[str, Any]] = None, - **kwargs: Any, - ) -> CallbackType: - """ - Register event handler - """ - if kwargs: - raise UnsupportedKeywordArgument( - "Passing any additional keyword arguments to the registrar method " - "is not supported.\n" - "This error may be caused when you are trying to register filters like in 2.x " - "version of this framework, if it's true just look at correspoding " - "documentation pages.\n" - f"Please remove the {set(kwargs.keys())} arguments from this call.\n" - ) - - if flags is None: - flags = {} - - for item in filters: - if isinstance(item, Filter): - item.update_handler_flags(flags=flags) - - self.handlers.append( - HandlerObject( - callback=callback, - filters=[FilterObject(filter_) for filter_ in filters], - flags=flags, - ) - ) - - return callback - - def wrap_outer_middleware( - self, callback: Any, event: TelegramObject, data: Dict[str, Any] - ) -> Any: - wrapped_outer = self.middleware.wrap_middlewares( - self.outer_middleware, - callback, - ) - return wrapped_outer(event, data) - - def check_root_filters(self, event: TelegramObject, **kwargs: Any) -> Any: - return self._handler.check(event, **kwargs) - - async def trigger(self, event: TelegramObject, **kwargs: Any) -> Any: - """ - Propagate event to handlers and stops propagation on first match. - Handler will be called when all its filters are pass. - """ - for handler in self.handlers: - kwargs["handler"] = handler - result, data = await handler.check(event, **kwargs) - if result: - kwargs.update(data) - try: - wrapped_inner = self.outer_middleware.wrap_middlewares( - self._resolve_middlewares(), - handler.call, - ) - return await wrapped_inner(event, kwargs) - except SkipHandler: - continue - - return UNHANDLED - - def __call__( - self, - *filters: CallbackType, - flags: Optional[Dict[str, Any]] = None, - **kwargs: Any, - ) -> Callable[[CallbackType], CallbackType]: - """ - Decorator for registering event handlers - """ - - def wrapper(callback: CallbackType) -> CallbackType: - self.register(callback, *filters, flags=flags, **kwargs) - return callback - - return wrapper diff --git a/env/Lib/site-packages/aiogram/dispatcher/flags.py b/env/Lib/site-packages/aiogram/dispatcher/flags.py deleted file mode 100644 index aad8a29..0000000 --- a/env/Lib/site-packages/aiogram/dispatcher/flags.py +++ /dev/null @@ -1,127 +0,0 @@ -from dataclasses import dataclass -from typing import TYPE_CHECKING, Any, Callable, Dict, Optional, Union, cast, overload - -from magic_filter import AttrDict, MagicFilter - -if TYPE_CHECKING: - from aiogram.dispatcher.event.handler import HandlerObject - - -@dataclass(frozen=True) -class Flag: - name: str - value: Any - - -@dataclass(frozen=True) -class FlagDecorator: - flag: Flag - - @classmethod - def _with_flag(cls, flag: Flag) -> "FlagDecorator": - return cls(flag) - - def _with_value(self, value: Any) -> "FlagDecorator": - new_flag = Flag(self.flag.name, value) - return self._with_flag(new_flag) - - @overload - def __call__(self, value: Callable[..., Any], /) -> Callable[..., Any]: # type: ignore - pass - - @overload - def __call__(self, value: Any, /) -> "FlagDecorator": - pass - - @overload - def __call__(self, **kwargs: Any) -> "FlagDecorator": - pass - - def __call__( - self, - value: Optional[Any] = None, - **kwargs: Any, - ) -> Union[Callable[..., Any], "FlagDecorator"]: - if value and kwargs: - raise ValueError("The arguments `value` and **kwargs can not be used together") - - if value is not None and callable(value): - value.aiogram_flag = { - **extract_flags_from_object(value), - self.flag.name: self.flag.value, - } - return cast(Callable[..., Any], value) - return self._with_value(AttrDict(kwargs) if value is None else value) - - -if TYPE_CHECKING: - - class _ChatActionFlagProtocol(FlagDecorator): - def __call__( # type: ignore[override] - self, - action: str = ..., - interval: float = ..., - initial_sleep: float = ..., - **kwargs: Any, - ) -> FlagDecorator: - pass - - -class FlagGenerator: - def __getattr__(self, name: str) -> FlagDecorator: - if name[0] == "_": - raise AttributeError("Flag name must NOT start with underscore") - return FlagDecorator(Flag(name, True)) - - if TYPE_CHECKING: - chat_action: _ChatActionFlagProtocol - - -def extract_flags_from_object(obj: Any) -> Dict[str, Any]: - if not hasattr(obj, "aiogram_flag"): - return {} - return cast(Dict[str, Any], obj.aiogram_flag) - - -def extract_flags(handler: Union["HandlerObject", Dict[str, Any]]) -> Dict[str, Any]: - """ - Extract flags from handler or middleware context data - - :param handler: handler object or data - :return: dictionary with all handler flags - """ - if isinstance(handler, dict) and "handler" in handler: - handler = handler["handler"] - if hasattr(handler, "flags"): - return handler.flags - return {} - - -def get_flag( - handler: Union["HandlerObject", Dict[str, Any]], - name: str, - *, - default: Optional[Any] = None, -) -> Any: - """ - Get flag by name - - :param handler: handler object or data - :param name: name of the flag - :param default: default value (None) - :return: value of the flag or default - """ - flags = extract_flags(handler) - return flags.get(name, default) - - -def check_flags(handler: Union["HandlerObject", Dict[str, Any]], magic: MagicFilter) -> Any: - """ - Check flags via magic filter - - :param handler: handler object or data - :param magic: instance of the magic - :return: the result of magic filter check - """ - flags = extract_flags(handler) - return magic.resolve(AttrDict(flags)) diff --git a/env/Lib/site-packages/aiogram/dispatcher/middlewares/__init__.py b/env/Lib/site-packages/aiogram/dispatcher/middlewares/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/env/Lib/site-packages/aiogram/dispatcher/middlewares/__pycache__/__init__.cpython-311.pyc b/env/Lib/site-packages/aiogram/dispatcher/middlewares/__pycache__/__init__.cpython-311.pyc deleted file mode 100644 index 0cf8139..0000000 Binary files a/env/Lib/site-packages/aiogram/dispatcher/middlewares/__pycache__/__init__.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/dispatcher/middlewares/__pycache__/base.cpython-311.pyc b/env/Lib/site-packages/aiogram/dispatcher/middlewares/__pycache__/base.cpython-311.pyc deleted file mode 100644 index d4a6c6a..0000000 Binary files a/env/Lib/site-packages/aiogram/dispatcher/middlewares/__pycache__/base.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/dispatcher/middlewares/__pycache__/error.cpython-311.pyc b/env/Lib/site-packages/aiogram/dispatcher/middlewares/__pycache__/error.cpython-311.pyc deleted file mode 100644 index 10d41a9..0000000 Binary files a/env/Lib/site-packages/aiogram/dispatcher/middlewares/__pycache__/error.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/dispatcher/middlewares/__pycache__/manager.cpython-311.pyc b/env/Lib/site-packages/aiogram/dispatcher/middlewares/__pycache__/manager.cpython-311.pyc deleted file mode 100644 index 96bf53e..0000000 Binary files a/env/Lib/site-packages/aiogram/dispatcher/middlewares/__pycache__/manager.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/dispatcher/middlewares/__pycache__/user_context.cpython-311.pyc b/env/Lib/site-packages/aiogram/dispatcher/middlewares/__pycache__/user_context.cpython-311.pyc deleted file mode 100644 index 26c54da..0000000 Binary files a/env/Lib/site-packages/aiogram/dispatcher/middlewares/__pycache__/user_context.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/dispatcher/middlewares/base.py b/env/Lib/site-packages/aiogram/dispatcher/middlewares/base.py deleted file mode 100644 index 15b0b4a..0000000 --- a/env/Lib/site-packages/aiogram/dispatcher/middlewares/base.py +++ /dev/null @@ -1,29 +0,0 @@ -from abc import ABC, abstractmethod -from typing import Any, Awaitable, Callable, Dict, TypeVar - -from aiogram.types import TelegramObject - -T = TypeVar("T") - - -class BaseMiddleware(ABC): - """ - Generic middleware class - """ - - @abstractmethod - async def __call__( - self, - handler: Callable[[TelegramObject, Dict[str, Any]], Awaitable[Any]], - event: TelegramObject, - data: Dict[str, Any], - ) -> Any: # pragma: no cover - """ - Execute middleware - - :param handler: Wrapped handler in middlewares chain - :param event: Incoming event (Subclass of :class:`aiogram.types.base.TelegramObject`) - :param data: Contextual data. Will be mapped to handler arguments - :return: :class:`Any` - """ - pass diff --git a/env/Lib/site-packages/aiogram/dispatcher/middlewares/error.py b/env/Lib/site-packages/aiogram/dispatcher/middlewares/error.py deleted file mode 100644 index 4b68c0b..0000000 --- a/env/Lib/site-packages/aiogram/dispatcher/middlewares/error.py +++ /dev/null @@ -1,36 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Awaitable, Callable, Dict, cast - -from ...types import TelegramObject, Update -from ...types.error_event import ErrorEvent -from ..event.bases import UNHANDLED, CancelHandler, SkipHandler -from .base import BaseMiddleware - -if TYPE_CHECKING: - from ..router import Router - - -class ErrorsMiddleware(BaseMiddleware): - def __init__(self, router: Router): - self.router = router - - async def __call__( - self, - handler: Callable[[TelegramObject, Dict[str, Any]], Awaitable[Any]], - event: TelegramObject, - data: Dict[str, Any], - ) -> Any: - try: - return await handler(event, data) - except (SkipHandler, CancelHandler): # pragma: no cover - raise - except Exception as e: - response = await self.router.propagate_event( - update_type="error", - event=ErrorEvent(update=cast(Update, event), exception=e), - **data, - ) - if response is not UNHANDLED: - return response - raise diff --git a/env/Lib/site-packages/aiogram/dispatcher/middlewares/manager.py b/env/Lib/site-packages/aiogram/dispatcher/middlewares/manager.py deleted file mode 100644 index bcad4de..0000000 --- a/env/Lib/site-packages/aiogram/dispatcher/middlewares/manager.py +++ /dev/null @@ -1,65 +0,0 @@ -import functools -from typing import Any, Callable, Dict, List, Optional, Sequence, Union, overload - -from aiogram.dispatcher.event.bases import ( - MiddlewareEventType, - MiddlewareType, - NextMiddlewareType, -) -from aiogram.dispatcher.event.handler import CallbackType -from aiogram.types import TelegramObject - - -class MiddlewareManager(Sequence[MiddlewareType[TelegramObject]]): - def __init__(self) -> None: - self._middlewares: List[MiddlewareType[TelegramObject]] = [] - - def register( - self, - middleware: MiddlewareType[TelegramObject], - ) -> MiddlewareType[TelegramObject]: - self._middlewares.append(middleware) - return middleware - - def unregister(self, middleware: MiddlewareType[TelegramObject]) -> None: - self._middlewares.remove(middleware) - - def __call__( - self, - middleware: Optional[MiddlewareType[TelegramObject]] = None, - ) -> Union[ - Callable[[MiddlewareType[TelegramObject]], MiddlewareType[TelegramObject]], - MiddlewareType[TelegramObject], - ]: - if middleware is None: - return self.register - return self.register(middleware) - - @overload - def __getitem__(self, item: int) -> MiddlewareType[TelegramObject]: - pass - - @overload - def __getitem__(self, item: slice) -> Sequence[MiddlewareType[TelegramObject]]: - pass - - def __getitem__( - self, item: Union[int, slice] - ) -> Union[MiddlewareType[TelegramObject], Sequence[MiddlewareType[TelegramObject]]]: - return self._middlewares[item] - - def __len__(self) -> int: - return len(self._middlewares) - - @staticmethod - def wrap_middlewares( - middlewares: Sequence[MiddlewareType[MiddlewareEventType]], handler: CallbackType - ) -> NextMiddlewareType[MiddlewareEventType]: - @functools.wraps(handler) - def handler_wrapper(event: TelegramObject, kwargs: Dict[str, Any]) -> Any: - return handler(event, **kwargs) - - middleware = handler_wrapper - for m in reversed(middlewares): - middleware = functools.partial(m, middleware) # type: ignore[assignment] - return middleware diff --git a/env/Lib/site-packages/aiogram/dispatcher/middlewares/user_context.py b/env/Lib/site-packages/aiogram/dispatcher/middlewares/user_context.py deleted file mode 100644 index aa03ee6..0000000 --- a/env/Lib/site-packages/aiogram/dispatcher/middlewares/user_context.py +++ /dev/null @@ -1,178 +0,0 @@ -from dataclasses import dataclass -from typing import Any, Awaitable, Callable, Dict, Optional - -from aiogram.dispatcher.middlewares.base import BaseMiddleware -from aiogram.types import ( - Chat, - ChatBoostSourcePremium, - InaccessibleMessage, - TelegramObject, - Update, - User, -) - -EVENT_CONTEXT_KEY = "event_context" - -EVENT_FROM_USER_KEY = "event_from_user" -EVENT_CHAT_KEY = "event_chat" -EVENT_THREAD_ID_KEY = "event_thread_id" - - -@dataclass(frozen=True) -class EventContext: - chat: Optional[Chat] = None - user: Optional[User] = None - thread_id: Optional[int] = None - business_connection_id: Optional[str] = None - - @property - def user_id(self) -> Optional[int]: - return self.user.id if self.user else None - - @property - def chat_id(self) -> Optional[int]: - return self.chat.id if self.chat else None - - -class UserContextMiddleware(BaseMiddleware): - async def __call__( - self, - handler: Callable[[TelegramObject, Dict[str, Any]], Awaitable[Any]], - event: TelegramObject, - data: Dict[str, Any], - ) -> Any: - if not isinstance(event, Update): - raise RuntimeError("UserContextMiddleware got an unexpected event type!") - event_context = data[EVENT_CONTEXT_KEY] = self.resolve_event_context(event=event) - - # Backward compatibility - if event_context.user is not None: - data[EVENT_FROM_USER_KEY] = event_context.user - if event_context.chat is not None: - data[EVENT_CHAT_KEY] = event_context.chat - if event_context.thread_id is not None: - data[EVENT_THREAD_ID_KEY] = event_context.thread_id - - return await handler(event, data) - - @classmethod - def resolve_event_context(cls, event: Update) -> EventContext: - """ - Resolve chat and user instance from Update object - """ - if event.message: - return EventContext( - chat=event.message.chat, - user=event.message.from_user, - thread_id=( - event.message.message_thread_id if event.message.is_topic_message else None - ), - ) - if event.edited_message: - return EventContext( - chat=event.edited_message.chat, - user=event.edited_message.from_user, - thread_id=( - event.edited_message.message_thread_id - if event.edited_message.is_topic_message - else None - ), - ) - if event.channel_post: - return EventContext(chat=event.channel_post.chat) - if event.edited_channel_post: - return EventContext(chat=event.edited_channel_post.chat) - if event.inline_query: - return EventContext(user=event.inline_query.from_user) - if event.chosen_inline_result: - return EventContext(user=event.chosen_inline_result.from_user) - if event.callback_query: - callback_query_message = event.callback_query.message - if callback_query_message: - return EventContext( - chat=callback_query_message.chat, - user=event.callback_query.from_user, - thread_id=( - callback_query_message.message_thread_id - if not isinstance(callback_query_message, InaccessibleMessage) - and callback_query_message.is_topic_message - else None - ), - business_connection_id=( - callback_query_message.business_connection_id - if not isinstance(callback_query_message, InaccessibleMessage) - else None - ), - ) - return EventContext(user=event.callback_query.from_user) - if event.shipping_query: - return EventContext(user=event.shipping_query.from_user) - if event.pre_checkout_query: - return EventContext(user=event.pre_checkout_query.from_user) - if event.poll_answer: - return EventContext( - chat=event.poll_answer.voter_chat, - user=event.poll_answer.user, - ) - if event.my_chat_member: - return EventContext( - chat=event.my_chat_member.chat, user=event.my_chat_member.from_user - ) - if event.chat_member: - return EventContext(chat=event.chat_member.chat, user=event.chat_member.from_user) - if event.chat_join_request: - return EventContext( - chat=event.chat_join_request.chat, user=event.chat_join_request.from_user - ) - if event.message_reaction: - return EventContext( - chat=event.message_reaction.chat, - user=event.message_reaction.user, - ) - if event.message_reaction_count: - return EventContext(chat=event.message_reaction_count.chat) - if event.chat_boost: - # We only check the premium source, because only it has a sender user, - # other sources have a user, but it is not the sender, but the recipient - if isinstance(event.chat_boost.boost.source, ChatBoostSourcePremium): - return EventContext( - chat=event.chat_boost.chat, - user=event.chat_boost.boost.source.user, - ) - - return EventContext(chat=event.chat_boost.chat) - if event.removed_chat_boost: - return EventContext(chat=event.removed_chat_boost.chat) - if event.deleted_business_messages: - return EventContext( - chat=event.deleted_business_messages.chat, - business_connection_id=event.deleted_business_messages.business_connection_id, - ) - if event.business_connection: - return EventContext( - user=event.business_connection.user, - business_connection_id=event.business_connection.id, - ) - if event.business_message: - return EventContext( - chat=event.business_message.chat, - user=event.business_message.from_user, - thread_id=( - event.business_message.message_thread_id - if event.business_message.is_topic_message - else None - ), - business_connection_id=event.business_message.business_connection_id, - ) - if event.edited_business_message: - return EventContext( - chat=event.edited_business_message.chat, - user=event.edited_business_message.from_user, - thread_id=( - event.edited_business_message.message_thread_id - if event.edited_business_message.is_topic_message - else None - ), - business_connection_id=event.edited_business_message.business_connection_id, - ) - return EventContext() diff --git a/env/Lib/site-packages/aiogram/dispatcher/router.py b/env/Lib/site-packages/aiogram/dispatcher/router.py deleted file mode 100644 index 400c1c0..0000000 --- a/env/Lib/site-packages/aiogram/dispatcher/router.py +++ /dev/null @@ -1,271 +0,0 @@ -from __future__ import annotations - -from typing import Any, Dict, Final, Generator, List, Optional, Set - -from ..types import TelegramObject -from .event.bases import REJECTED, UNHANDLED -from .event.event import EventObserver -from .event.telegram import TelegramEventObserver - -INTERNAL_UPDATE_TYPES: Final[frozenset[str]] = frozenset({"update", "error"}) - - -class Router: - """ - Router can route update, and it nested update types like messages, callback query, - polls and all other event types. - - Event handlers can be registered in observer by two ways: - - - By observer method - :obj:`router..register(handler, )` - - By decorator - :obj:`@router.()` - """ - - def __init__(self, *, name: Optional[str] = None) -> None: - """ - :param name: Optional router name, can be useful for debugging - """ - - self.name = name or hex(id(self)) - - self._parent_router: Optional[Router] = None - self.sub_routers: List[Router] = [] - - # Observers - self.message = TelegramEventObserver(router=self, event_name="message") - self.edited_message = TelegramEventObserver(router=self, event_name="edited_message") - self.channel_post = TelegramEventObserver(router=self, event_name="channel_post") - self.edited_channel_post = TelegramEventObserver( - router=self, event_name="edited_channel_post" - ) - self.inline_query = TelegramEventObserver(router=self, event_name="inline_query") - self.chosen_inline_result = TelegramEventObserver( - router=self, event_name="chosen_inline_result" - ) - self.callback_query = TelegramEventObserver(router=self, event_name="callback_query") - self.shipping_query = TelegramEventObserver(router=self, event_name="shipping_query") - self.pre_checkout_query = TelegramEventObserver( - router=self, event_name="pre_checkout_query" - ) - self.poll = TelegramEventObserver(router=self, event_name="poll") - self.poll_answer = TelegramEventObserver(router=self, event_name="poll_answer") - self.my_chat_member = TelegramEventObserver(router=self, event_name="my_chat_member") - self.chat_member = TelegramEventObserver(router=self, event_name="chat_member") - self.chat_join_request = TelegramEventObserver(router=self, event_name="chat_join_request") - self.message_reaction = TelegramEventObserver(router=self, event_name="message_reaction") - self.message_reaction_count = TelegramEventObserver( - router=self, event_name="message_reaction_count" - ) - self.chat_boost = TelegramEventObserver(router=self, event_name="chat_boost") - self.removed_chat_boost = TelegramEventObserver( - router=self, event_name="removed_chat_boost" - ) - self.deleted_business_messages = TelegramEventObserver( - router=self, event_name="deleted_business_messages" - ) - self.business_connection = TelegramEventObserver( - router=self, event_name="business_connection" - ) - self.edited_business_message = TelegramEventObserver( - router=self, event_name="edited_business_message" - ) - self.business_message = TelegramEventObserver(router=self, event_name="business_message") - - self.errors = self.error = TelegramEventObserver(router=self, event_name="error") - - self.startup = EventObserver() - self.shutdown = EventObserver() - - self.observers: Dict[str, TelegramEventObserver] = { - "message": self.message, - "edited_message": self.edited_message, - "channel_post": self.channel_post, - "edited_channel_post": self.edited_channel_post, - "inline_query": self.inline_query, - "chosen_inline_result": self.chosen_inline_result, - "callback_query": self.callback_query, - "shipping_query": self.shipping_query, - "pre_checkout_query": self.pre_checkout_query, - "poll": self.poll, - "poll_answer": self.poll_answer, - "my_chat_member": self.my_chat_member, - "chat_member": self.chat_member, - "chat_join_request": self.chat_join_request, - "message_reaction": self.message_reaction, - "message_reaction_count": self.message_reaction_count, - "chat_boost": self.chat_boost, - "removed_chat_boost": self.removed_chat_boost, - "deleted_business_messages": self.deleted_business_messages, - "business_connection": self.business_connection, - "edited_business_message": self.edited_business_message, - "business_message": self.business_message, - "error": self.errors, - } - - def __str__(self) -> str: - return f"{type(self).__name__} {self.name!r}" - - def __repr__(self) -> str: - return f"<{self}>" - - def resolve_used_update_types(self, skip_events: Optional[Set[str]] = None) -> List[str]: - """ - Resolve registered event names - - Is useful for getting updates only for registered event types. - - :param skip_events: skip specified event names - :return: set of registered names - """ - handlers_in_use: Set[str] = set() - if skip_events is None: - skip_events = set() - skip_events = {*skip_events, *INTERNAL_UPDATE_TYPES} - - for router in self.chain_tail: - for update_name, observer in router.observers.items(): - if observer.handlers and update_name not in skip_events: - handlers_in_use.add(update_name) - - return list(sorted(handlers_in_use)) # NOQA: C413 - - async def propagate_event(self, update_type: str, event: TelegramObject, **kwargs: Any) -> Any: - kwargs.update(event_router=self) - observer = self.observers.get(update_type) - - async def _wrapped(telegram_event: TelegramObject, **data: Any) -> Any: - return await self._propagate_event( - observer=observer, update_type=update_type, event=telegram_event, **data - ) - - if observer: - return await observer.wrap_outer_middleware(_wrapped, event=event, data=kwargs) - return await _wrapped(event, **kwargs) - - async def _propagate_event( - self, - observer: Optional[TelegramEventObserver], - update_type: str, - event: TelegramObject, - **kwargs: Any, - ) -> Any: - response = UNHANDLED - if observer: - # Check globally defined filters before any other handler will be checked. - # This check is placed here instead of `trigger` method to add possibility - # to pass context to handlers from global filters. - result, data = await observer.check_root_filters(event, **kwargs) - if not result: - return UNHANDLED - kwargs.update(data) - - response = await observer.trigger(event, **kwargs) - if response is REJECTED: # pragma: no cover - # Possible only if some handler returns REJECTED - return UNHANDLED - if response is not UNHANDLED: - return response - - for router in self.sub_routers: - response = await router.propagate_event(update_type=update_type, event=event, **kwargs) - if response is not UNHANDLED: - break - - return response - - @property - def chain_head(self) -> Generator[Router, None, None]: - router: Optional[Router] = self - while router: - yield router - router = router.parent_router - - @property - def chain_tail(self) -> Generator[Router, None, None]: - yield self - for router in self.sub_routers: - yield from router.chain_tail - - @property - def parent_router(self) -> Optional[Router]: - return self._parent_router - - @parent_router.setter - def parent_router(self, router: Router) -> None: - """ - Internal property setter of parent router fot this router. - Do not use this method in own code. - All routers should be included via `include_router` method. - - Self- and circular- referencing are not allowed here - - :param router: - """ - if not isinstance(router, Router): - raise ValueError(f"router should be instance of Router not {type(router).__name__!r}") - if self._parent_router: - raise RuntimeError(f"Router is already attached to {self._parent_router!r}") - if self == router: - raise RuntimeError("Self-referencing routers is not allowed") - - parent: Optional[Router] = router - while parent is not None: - if parent == self: - raise RuntimeError("Circular referencing of Router is not allowed") - - parent = parent.parent_router - - self._parent_router = router - router.sub_routers.append(self) - - def include_routers(self, *routers: Router) -> None: - """ - Attach multiple routers. - - :param routers: - :return: - """ - if not routers: - raise ValueError("At least one router must be provided") - for router in routers: - self.include_router(router) - - def include_router(self, router: Router) -> Router: - """ - Attach another router. - - :param router: - :return: - """ - if not isinstance(router, Router): - raise ValueError( - f"router should be instance of Router not {type(router).__class__.__name__}" - ) - router.parent_router = self - return router - - async def emit_startup(self, *args: Any, **kwargs: Any) -> None: - """ - Recursively call startup callbacks - - :param args: - :param kwargs: - :return: - """ - kwargs.update(router=self) - await self.startup.trigger(*args, **kwargs) - for router in self.sub_routers: - await router.emit_startup(*args, **kwargs) - - async def emit_shutdown(self, *args: Any, **kwargs: Any) -> None: - """ - Recursively call shutdown callbacks to graceful shutdown - - :param args: - :param kwargs: - :return: - """ - kwargs.update(router=self) - await self.shutdown.trigger(*args, **kwargs) - for router in self.sub_routers: - await router.emit_shutdown(*args, **kwargs) diff --git a/env/Lib/site-packages/aiogram/enums/__init__.py b/env/Lib/site-packages/aiogram/enums/__init__.py deleted file mode 100644 index f8c4532..0000000 --- a/env/Lib/site-packages/aiogram/enums/__init__.py +++ /dev/null @@ -1,59 +0,0 @@ -from .bot_command_scope_type import BotCommandScopeType -from .chat_action import ChatAction -from .chat_boost_source_type import ChatBoostSourceType -from .chat_member_status import ChatMemberStatus -from .chat_type import ChatType -from .content_type import ContentType -from .currency import Currency -from .dice_emoji import DiceEmoji -from .encrypted_passport_element import EncryptedPassportElement -from .inline_query_result_type import InlineQueryResultType -from .input_media_type import InputMediaType -from .input_paid_media_type import InputPaidMediaType -from .keyboard_button_poll_type_type import KeyboardButtonPollTypeType -from .mask_position_point import MaskPositionPoint -from .menu_button_type import MenuButtonType -from .message_entity_type import MessageEntityType -from .message_origin_type import MessageOriginType -from .paid_media_type import PaidMediaType -from .parse_mode import ParseMode -from .passport_element_error_type import PassportElementErrorType -from .poll_type import PollType -from .reaction_type_type import ReactionTypeType -from .revenue_withdrawal_state_type import RevenueWithdrawalStateType -from .sticker_format import StickerFormat -from .sticker_type import StickerType -from .topic_icon_color import TopicIconColor -from .transaction_partner_type import TransactionPartnerType -from .update_type import UpdateType - -__all__ = ( - "BotCommandScopeType", - "ChatAction", - "ChatBoostSourceType", - "ChatMemberStatus", - "ChatType", - "ContentType", - "Currency", - "DiceEmoji", - "EncryptedPassportElement", - "InlineQueryResultType", - "InputMediaType", - "InputPaidMediaType", - "KeyboardButtonPollTypeType", - "MaskPositionPoint", - "MenuButtonType", - "MessageEntityType", - "MessageOriginType", - "PaidMediaType", - "ParseMode", - "PassportElementErrorType", - "PollType", - "ReactionTypeType", - "RevenueWithdrawalStateType", - "StickerFormat", - "StickerType", - "TopicIconColor", - "TransactionPartnerType", - "UpdateType", -) diff --git a/env/Lib/site-packages/aiogram/enums/__pycache__/__init__.cpython-311.pyc b/env/Lib/site-packages/aiogram/enums/__pycache__/__init__.cpython-311.pyc deleted file mode 100644 index 46aed5f..0000000 Binary files a/env/Lib/site-packages/aiogram/enums/__pycache__/__init__.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/enums/__pycache__/bot_command_scope_type.cpython-311.pyc b/env/Lib/site-packages/aiogram/enums/__pycache__/bot_command_scope_type.cpython-311.pyc deleted file mode 100644 index 9257634..0000000 Binary files a/env/Lib/site-packages/aiogram/enums/__pycache__/bot_command_scope_type.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/enums/__pycache__/chat_action.cpython-311.pyc b/env/Lib/site-packages/aiogram/enums/__pycache__/chat_action.cpython-311.pyc deleted file mode 100644 index ccea966..0000000 Binary files a/env/Lib/site-packages/aiogram/enums/__pycache__/chat_action.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/enums/__pycache__/chat_boost_source_type.cpython-311.pyc b/env/Lib/site-packages/aiogram/enums/__pycache__/chat_boost_source_type.cpython-311.pyc deleted file mode 100644 index 38a2035..0000000 Binary files a/env/Lib/site-packages/aiogram/enums/__pycache__/chat_boost_source_type.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/enums/__pycache__/chat_member_status.cpython-311.pyc b/env/Lib/site-packages/aiogram/enums/__pycache__/chat_member_status.cpython-311.pyc deleted file mode 100644 index 56fc5f0..0000000 Binary files a/env/Lib/site-packages/aiogram/enums/__pycache__/chat_member_status.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/enums/__pycache__/chat_type.cpython-311.pyc b/env/Lib/site-packages/aiogram/enums/__pycache__/chat_type.cpython-311.pyc deleted file mode 100644 index 06f39bb..0000000 Binary files a/env/Lib/site-packages/aiogram/enums/__pycache__/chat_type.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/enums/__pycache__/content_type.cpython-311.pyc b/env/Lib/site-packages/aiogram/enums/__pycache__/content_type.cpython-311.pyc deleted file mode 100644 index 98c28e4..0000000 Binary files a/env/Lib/site-packages/aiogram/enums/__pycache__/content_type.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/enums/__pycache__/currency.cpython-311.pyc b/env/Lib/site-packages/aiogram/enums/__pycache__/currency.cpython-311.pyc deleted file mode 100644 index e09e3c0..0000000 Binary files a/env/Lib/site-packages/aiogram/enums/__pycache__/currency.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/enums/__pycache__/dice_emoji.cpython-311.pyc b/env/Lib/site-packages/aiogram/enums/__pycache__/dice_emoji.cpython-311.pyc deleted file mode 100644 index f44f896..0000000 Binary files a/env/Lib/site-packages/aiogram/enums/__pycache__/dice_emoji.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/enums/__pycache__/encrypted_passport_element.cpython-311.pyc b/env/Lib/site-packages/aiogram/enums/__pycache__/encrypted_passport_element.cpython-311.pyc deleted file mode 100644 index 0f12c3b..0000000 Binary files a/env/Lib/site-packages/aiogram/enums/__pycache__/encrypted_passport_element.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/enums/__pycache__/inline_query_result_type.cpython-311.pyc b/env/Lib/site-packages/aiogram/enums/__pycache__/inline_query_result_type.cpython-311.pyc deleted file mode 100644 index c3a5fe4..0000000 Binary files a/env/Lib/site-packages/aiogram/enums/__pycache__/inline_query_result_type.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/enums/__pycache__/input_media_type.cpython-311.pyc b/env/Lib/site-packages/aiogram/enums/__pycache__/input_media_type.cpython-311.pyc deleted file mode 100644 index 47e46d2..0000000 Binary files a/env/Lib/site-packages/aiogram/enums/__pycache__/input_media_type.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/enums/__pycache__/input_paid_media_type.cpython-311.pyc b/env/Lib/site-packages/aiogram/enums/__pycache__/input_paid_media_type.cpython-311.pyc deleted file mode 100644 index 2316e0f..0000000 Binary files a/env/Lib/site-packages/aiogram/enums/__pycache__/input_paid_media_type.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/enums/__pycache__/keyboard_button_poll_type_type.cpython-311.pyc b/env/Lib/site-packages/aiogram/enums/__pycache__/keyboard_button_poll_type_type.cpython-311.pyc deleted file mode 100644 index 616b235..0000000 Binary files a/env/Lib/site-packages/aiogram/enums/__pycache__/keyboard_button_poll_type_type.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/enums/__pycache__/mask_position_point.cpython-311.pyc b/env/Lib/site-packages/aiogram/enums/__pycache__/mask_position_point.cpython-311.pyc deleted file mode 100644 index f697a4e..0000000 Binary files a/env/Lib/site-packages/aiogram/enums/__pycache__/mask_position_point.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/enums/__pycache__/menu_button_type.cpython-311.pyc b/env/Lib/site-packages/aiogram/enums/__pycache__/menu_button_type.cpython-311.pyc deleted file mode 100644 index 3c9d400..0000000 Binary files a/env/Lib/site-packages/aiogram/enums/__pycache__/menu_button_type.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/enums/__pycache__/message_entity_type.cpython-311.pyc b/env/Lib/site-packages/aiogram/enums/__pycache__/message_entity_type.cpython-311.pyc deleted file mode 100644 index fc266ea..0000000 Binary files a/env/Lib/site-packages/aiogram/enums/__pycache__/message_entity_type.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/enums/__pycache__/message_origin_type.cpython-311.pyc b/env/Lib/site-packages/aiogram/enums/__pycache__/message_origin_type.cpython-311.pyc deleted file mode 100644 index 17c5630..0000000 Binary files a/env/Lib/site-packages/aiogram/enums/__pycache__/message_origin_type.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/enums/__pycache__/paid_media_type.cpython-311.pyc b/env/Lib/site-packages/aiogram/enums/__pycache__/paid_media_type.cpython-311.pyc deleted file mode 100644 index 433b4a3..0000000 Binary files a/env/Lib/site-packages/aiogram/enums/__pycache__/paid_media_type.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/enums/__pycache__/parse_mode.cpython-311.pyc b/env/Lib/site-packages/aiogram/enums/__pycache__/parse_mode.cpython-311.pyc deleted file mode 100644 index 011d423..0000000 Binary files a/env/Lib/site-packages/aiogram/enums/__pycache__/parse_mode.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/enums/__pycache__/passport_element_error_type.cpython-311.pyc b/env/Lib/site-packages/aiogram/enums/__pycache__/passport_element_error_type.cpython-311.pyc deleted file mode 100644 index 6abd8b3..0000000 Binary files a/env/Lib/site-packages/aiogram/enums/__pycache__/passport_element_error_type.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/enums/__pycache__/poll_type.cpython-311.pyc b/env/Lib/site-packages/aiogram/enums/__pycache__/poll_type.cpython-311.pyc deleted file mode 100644 index e23f58e..0000000 Binary files a/env/Lib/site-packages/aiogram/enums/__pycache__/poll_type.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/enums/__pycache__/reaction_type_type.cpython-311.pyc b/env/Lib/site-packages/aiogram/enums/__pycache__/reaction_type_type.cpython-311.pyc deleted file mode 100644 index 3511a4d..0000000 Binary files a/env/Lib/site-packages/aiogram/enums/__pycache__/reaction_type_type.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/enums/__pycache__/revenue_withdrawal_state_type.cpython-311.pyc b/env/Lib/site-packages/aiogram/enums/__pycache__/revenue_withdrawal_state_type.cpython-311.pyc deleted file mode 100644 index 5f20a95..0000000 Binary files a/env/Lib/site-packages/aiogram/enums/__pycache__/revenue_withdrawal_state_type.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/enums/__pycache__/sticker_format.cpython-311.pyc b/env/Lib/site-packages/aiogram/enums/__pycache__/sticker_format.cpython-311.pyc deleted file mode 100644 index df062cf..0000000 Binary files a/env/Lib/site-packages/aiogram/enums/__pycache__/sticker_format.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/enums/__pycache__/sticker_type.cpython-311.pyc b/env/Lib/site-packages/aiogram/enums/__pycache__/sticker_type.cpython-311.pyc deleted file mode 100644 index cc769aa..0000000 Binary files a/env/Lib/site-packages/aiogram/enums/__pycache__/sticker_type.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/enums/__pycache__/topic_icon_color.cpython-311.pyc b/env/Lib/site-packages/aiogram/enums/__pycache__/topic_icon_color.cpython-311.pyc deleted file mode 100644 index 70c3a0a..0000000 Binary files a/env/Lib/site-packages/aiogram/enums/__pycache__/topic_icon_color.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/enums/__pycache__/transaction_partner_type.cpython-311.pyc b/env/Lib/site-packages/aiogram/enums/__pycache__/transaction_partner_type.cpython-311.pyc deleted file mode 100644 index 4067baa..0000000 Binary files a/env/Lib/site-packages/aiogram/enums/__pycache__/transaction_partner_type.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/enums/__pycache__/update_type.cpython-311.pyc b/env/Lib/site-packages/aiogram/enums/__pycache__/update_type.cpython-311.pyc deleted file mode 100644 index 53f49c2..0000000 Binary files a/env/Lib/site-packages/aiogram/enums/__pycache__/update_type.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/enums/bot_command_scope_type.py b/env/Lib/site-packages/aiogram/enums/bot_command_scope_type.py deleted file mode 100644 index f099431..0000000 --- a/env/Lib/site-packages/aiogram/enums/bot_command_scope_type.py +++ /dev/null @@ -1,17 +0,0 @@ -from enum import Enum - - -class BotCommandScopeType(str, Enum): - """ - This object represents the scope to which bot commands are applied. - - Source: https://core.telegram.org/bots/api#botcommandscope - """ - - DEFAULT = "default" - ALL_PRIVATE_CHATS = "all_private_chats" - ALL_GROUP_CHATS = "all_group_chats" - ALL_CHAT_ADMINISTRATORS = "all_chat_administrators" - CHAT = "chat" - CHAT_ADMINISTRATORS = "chat_administrators" - CHAT_MEMBER = "chat_member" diff --git a/env/Lib/site-packages/aiogram/enums/chat_action.py b/env/Lib/site-packages/aiogram/enums/chat_action.py deleted file mode 100644 index 4402b5b..0000000 --- a/env/Lib/site-packages/aiogram/enums/chat_action.py +++ /dev/null @@ -1,32 +0,0 @@ -from enum import Enum - - -class ChatAction(str, Enum): - """ - This object represents bot actions. - - Choose one, depending on what the user is about to receive: - - - typing for text messages, - - upload_photo for photos, - - record_video or upload_video for videos, - - record_voice or upload_voice for voice notes, - - upload_document for general files, - - choose_sticker for stickers, - - find_location for location data, - - record_video_note or upload_video_note for video notes. - - Source: https://core.telegram.org/bots/api#sendchataction - """ - - TYPING = "typing" - UPLOAD_PHOTO = "upload_photo" - RECORD_VIDEO = "record_video" - UPLOAD_VIDEO = "upload_video" - RECORD_VOICE = "record_voice" - UPLOAD_VOICE = "upload_voice" - UPLOAD_DOCUMENT = "upload_document" - CHOOSE_STICKER = "choose_sticker" - FIND_LOCATION = "find_location" - RECORD_VIDEO_NOTE = "record_video_note" - UPLOAD_VIDEO_NOTE = "upload_video_note" diff --git a/env/Lib/site-packages/aiogram/enums/chat_boost_source_type.py b/env/Lib/site-packages/aiogram/enums/chat_boost_source_type.py deleted file mode 100644 index c95c31d..0000000 --- a/env/Lib/site-packages/aiogram/enums/chat_boost_source_type.py +++ /dev/null @@ -1,13 +0,0 @@ -from enum import Enum - - -class ChatBoostSourceType(str, Enum): - """ - This object represents a type of chat boost source. - - Source: https://core.telegram.org/bots/api#chatboostsource - """ - - PREMIUM = "premium" - GIFT_CODE = "gift_code" - GIVEAWAY = "giveaway" diff --git a/env/Lib/site-packages/aiogram/enums/chat_member_status.py b/env/Lib/site-packages/aiogram/enums/chat_member_status.py deleted file mode 100644 index db6f921..0000000 --- a/env/Lib/site-packages/aiogram/enums/chat_member_status.py +++ /dev/null @@ -1,16 +0,0 @@ -from enum import Enum - - -class ChatMemberStatus(str, Enum): - """ - This object represents chat member status. - - Source: https://core.telegram.org/bots/api#chatmember - """ - - CREATOR = "creator" - ADMINISTRATOR = "administrator" - MEMBER = "member" - RESTRICTED = "restricted" - LEFT = "left" - KICKED = "kicked" diff --git a/env/Lib/site-packages/aiogram/enums/chat_type.py b/env/Lib/site-packages/aiogram/enums/chat_type.py deleted file mode 100644 index 10dccc8..0000000 --- a/env/Lib/site-packages/aiogram/enums/chat_type.py +++ /dev/null @@ -1,15 +0,0 @@ -from enum import Enum - - -class ChatType(str, Enum): - """ - This object represents a chat type - - Source: https://core.telegram.org/bots/api#chat - """ - - SENDER = "sender" - PRIVATE = "private" - GROUP = "group" - SUPERGROUP = "supergroup" - CHANNEL = "channel" diff --git a/env/Lib/site-packages/aiogram/enums/content_type.py b/env/Lib/site-packages/aiogram/enums/content_type.py deleted file mode 100644 index 5d64db1..0000000 --- a/env/Lib/site-packages/aiogram/enums/content_type.py +++ /dev/null @@ -1,66 +0,0 @@ -from enum import Enum - - -class ContentType(str, Enum): - """ - This object represents a type of content in message - """ - - UNKNOWN = "unknown" - ANY = "any" - TEXT = "text" - ANIMATION = "animation" - AUDIO = "audio" - DOCUMENT = "document" - PAID_MEDIA = "paid_media" - PHOTO = "photo" - STICKER = "sticker" - STORY = "story" - VIDEO = "video" - VIDEO_NOTE = "video_note" - VOICE = "voice" - CONTACT = "contact" - DICE = "dice" - GAME = "game" - POLL = "poll" - VENUE = "venue" - LOCATION = "location" - NEW_CHAT_MEMBERS = "new_chat_members" - LEFT_CHAT_MEMBER = "left_chat_member" - NEW_CHAT_TITLE = "new_chat_title" - NEW_CHAT_PHOTO = "new_chat_photo" - DELETE_CHAT_PHOTO = "delete_chat_photo" - GROUP_CHAT_CREATED = "group_chat_created" - SUPERGROUP_CHAT_CREATED = "supergroup_chat_created" - CHANNEL_CHAT_CREATED = "channel_chat_created" - MESSAGE_AUTO_DELETE_TIMER_CHANGED = "message_auto_delete_timer_changed" - MIGRATE_TO_CHAT_ID = "migrate_to_chat_id" - MIGRATE_FROM_CHAT_ID = "migrate_from_chat_id" - PINNED_MESSAGE = "pinned_message" - INVOICE = "invoice" - SUCCESSFUL_PAYMENT = "successful_payment" - REFUNDED_PAYMENT = "refunded_payment" - USERS_SHARED = "users_shared" - CHAT_SHARED = "chat_shared" - CONNECTED_WEBSITE = "connected_website" - WRITE_ACCESS_ALLOWED = "write_access_allowed" - PASSPORT_DATA = "passport_data" - PROXIMITY_ALERT_TRIGGERED = "proximity_alert_triggered" - BOOST_ADDED = "boost_added" - CHAT_BACKGROUND_SET = "chat_background_set" - FORUM_TOPIC_CREATED = "forum_topic_created" - FORUM_TOPIC_EDITED = "forum_topic_edited" - FORUM_TOPIC_CLOSED = "forum_topic_closed" - FORUM_TOPIC_REOPENED = "forum_topic_reopened" - GENERAL_FORUM_TOPIC_HIDDEN = "general_forum_topic_hidden" - GENERAL_FORUM_TOPIC_UNHIDDEN = "general_forum_topic_unhidden" - GIVEAWAY_CREATED = "giveaway_created" - GIVEAWAY = "giveaway" - GIVEAWAY_WINNERS = "giveaway_winners" - GIVEAWAY_COMPLETED = "giveaway_completed" - VIDEO_CHAT_SCHEDULED = "video_chat_scheduled" - VIDEO_CHAT_STARTED = "video_chat_started" - VIDEO_CHAT_ENDED = "video_chat_ended" - VIDEO_CHAT_PARTICIPANTS_INVITED = "video_chat_participants_invited" - WEB_APP_DATA = "web_app_data" - USER_SHARED = "user_shared" diff --git a/env/Lib/site-packages/aiogram/enums/currency.py b/env/Lib/site-packages/aiogram/enums/currency.py deleted file mode 100644 index 563651b..0000000 --- a/env/Lib/site-packages/aiogram/enums/currency.py +++ /dev/null @@ -1,96 +0,0 @@ -from enum import Enum - - -class Currency(str, Enum): - """ - Currencies supported by Telegram Bot API - - Source: https://core.telegram.org/bots/payments#supported-currencies - """ - - AED = "AED" - AFN = "AFN" - ALL = "ALL" - AMD = "AMD" - ARS = "ARS" - AUD = "AUD" - AZN = "AZN" - BAM = "BAM" - BDT = "BDT" - BGN = "BGN" - BND = "BND" - BOB = "BOB" - BRL = "BRL" - BYN = "BYN" - CAD = "CAD" - CHF = "CHF" - CLP = "CLP" - CNY = "CNY" - COP = "COP" - CRC = "CRC" - CZK = "CZK" - DKK = "DKK" - DOP = "DOP" - DZD = "DZD" - EGP = "EGP" - ETB = "ETB" - EUR = "EUR" - GBP = "GBP" - GEL = "GEL" - GTQ = "GTQ" - HKD = "HKD" - HNL = "HNL" - HRK = "HRK" - HUF = "HUF" - IDR = "IDR" - ILS = "ILS" - INR = "INR" - ISK = "ISK" - JMD = "JMD" - JPY = "JPY" - KES = "KES" - KGS = "KGS" - KRW = "KRW" - KZT = "KZT" - LBP = "LBP" - LKR = "LKR" - MAD = "MAD" - MDL = "MDL" - MNT = "MNT" - MUR = "MUR" - MVR = "MVR" - MXN = "MXN" - MYR = "MYR" - MZN = "MZN" - NGN = "NGN" - NIO = "NIO" - NOK = "NOK" - NPR = "NPR" - NZD = "NZD" - PAB = "PAB" - PEN = "PEN" - PHP = "PHP" - PKR = "PKR" - PLN = "PLN" - PYG = "PYG" - QAR = "QAR" - RON = "RON" - RSD = "RSD" - RUB = "RUB" - SAR = "SAR" - SEK = "SEK" - SGD = "SGD" - THB = "THB" - TJS = "TJS" - TRY = "TRY" - TTD = "TTD" - TWD = "TWD" - TZS = "TZS" - UAH = "UAH" - UGX = "UGX" - USD = "USD" - UYU = "UYU" - UZS = "UZS" - VND = "VND" - YER = "YER" - ZAR = "ZAR" diff --git a/env/Lib/site-packages/aiogram/enums/dice_emoji.py b/env/Lib/site-packages/aiogram/enums/dice_emoji.py deleted file mode 100644 index 6851932..0000000 --- a/env/Lib/site-packages/aiogram/enums/dice_emoji.py +++ /dev/null @@ -1,16 +0,0 @@ -from enum import Enum - - -class DiceEmoji(str, Enum): - """ - Emoji on which the dice throw animation is based - - Source: https://core.telegram.org/bots/api#dice - """ - - DICE = "🎲" - DART = "🎯" - BASKETBALL = "🏀" - FOOTBALL = "⚽" - SLOT_MACHINE = "🎰" - BOWLING = "🎳" diff --git a/env/Lib/site-packages/aiogram/enums/encrypted_passport_element.py b/env/Lib/site-packages/aiogram/enums/encrypted_passport_element.py deleted file mode 100644 index ebb4b2e..0000000 --- a/env/Lib/site-packages/aiogram/enums/encrypted_passport_element.py +++ /dev/null @@ -1,23 +0,0 @@ -from enum import Enum - - -class EncryptedPassportElement(str, Enum): - """ - This object represents type of encrypted passport element. - - Source: https://core.telegram.org/bots/api#encryptedpassportelement - """ - - PERSONAL_DETAILS = "personal_details" - PASSPORT = "passport" - DRIVER_LICENSE = "driver_license" - IDENTITY_CARD = "identity_card" - INTERNAL_PASSPORT = "internal_passport" - ADDRESS = "address" - UTILITY_BILL = "utility_bill" - BANK_STATEMENT = "bank_statement" - RENTAL_AGREEMENT = "rental_agreement" - PASSPORT_REGISTRATION = "passport_registration" - TEMPORARY_REGISTRATION = "temporary_registration" - PHONE_NUMBER = "phone_number" - EMAIL = "email" diff --git a/env/Lib/site-packages/aiogram/enums/inline_query_result_type.py b/env/Lib/site-packages/aiogram/enums/inline_query_result_type.py deleted file mode 100644 index ae20045..0000000 --- a/env/Lib/site-packages/aiogram/enums/inline_query_result_type.py +++ /dev/null @@ -1,23 +0,0 @@ -from enum import Enum - - -class InlineQueryResultType(str, Enum): - """ - Type of inline query result - - Source: https://core.telegram.org/bots/api#inlinequeryresult - """ - - AUDIO = "audio" - DOCUMENT = "document" - GIF = "gif" - MPEG4_GIF = "mpeg4_gif" - PHOTO = "photo" - STICKER = "sticker" - VIDEO = "video" - VOICE = "voice" - ARTICLE = "article" - CONTACT = "contact" - GAME = "game" - LOCATION = "location" - VENUE = "venue" diff --git a/env/Lib/site-packages/aiogram/enums/input_media_type.py b/env/Lib/site-packages/aiogram/enums/input_media_type.py deleted file mode 100644 index 30741dd..0000000 --- a/env/Lib/site-packages/aiogram/enums/input_media_type.py +++ /dev/null @@ -1,15 +0,0 @@ -from enum import Enum - - -class InputMediaType(str, Enum): - """ - This object represents input media type - - Source: https://core.telegram.org/bots/api#inputmedia - """ - - ANIMATION = "animation" - AUDIO = "audio" - DOCUMENT = "document" - PHOTO = "photo" - VIDEO = "video" diff --git a/env/Lib/site-packages/aiogram/enums/input_paid_media_type.py b/env/Lib/site-packages/aiogram/enums/input_paid_media_type.py deleted file mode 100644 index fc132e2..0000000 --- a/env/Lib/site-packages/aiogram/enums/input_paid_media_type.py +++ /dev/null @@ -1,12 +0,0 @@ -from enum import Enum - - -class InputPaidMediaType(str, Enum): - """ - This object represents the type of a media in a paid message. - - Source: https://core.telegram.org/bots/api#inputpaidmedia - """ - - PHOTO = "photo" - VIDEO = "video" diff --git a/env/Lib/site-packages/aiogram/enums/keyboard_button_poll_type_type.py b/env/Lib/site-packages/aiogram/enums/keyboard_button_poll_type_type.py deleted file mode 100644 index b6b692f..0000000 --- a/env/Lib/site-packages/aiogram/enums/keyboard_button_poll_type_type.py +++ /dev/null @@ -1,12 +0,0 @@ -from enum import Enum - - -class KeyboardButtonPollTypeType(str, Enum): - """ - This object represents type of a poll, which is allowed to be created and sent when the corresponding button is pressed. - - Source: https://core.telegram.org/bots/api#keyboardbuttonpolltype - """ - - QUIZ = "quiz" - REGULAR = "regular" diff --git a/env/Lib/site-packages/aiogram/enums/mask_position_point.py b/env/Lib/site-packages/aiogram/enums/mask_position_point.py deleted file mode 100644 index 348ae00..0000000 --- a/env/Lib/site-packages/aiogram/enums/mask_position_point.py +++ /dev/null @@ -1,14 +0,0 @@ -from enum import Enum - - -class MaskPositionPoint(str, Enum): - """ - The part of the face relative to which the mask should be placed. - - Source: https://core.telegram.org/bots/api#maskposition - """ - - FOREHEAD = "forehead" - EYES = "eyes" - MOUTH = "mouth" - CHIN = "chin" diff --git a/env/Lib/site-packages/aiogram/enums/menu_button_type.py b/env/Lib/site-packages/aiogram/enums/menu_button_type.py deleted file mode 100644 index 4c1015b..0000000 --- a/env/Lib/site-packages/aiogram/enums/menu_button_type.py +++ /dev/null @@ -1,13 +0,0 @@ -from enum import Enum - - -class MenuButtonType(str, Enum): - """ - This object represents an type of Menu button - - Source: https://core.telegram.org/bots/api#menubuttondefault - """ - - DEFAULT = "default" - COMMANDS = "commands" - WEB_APP = "web_app" diff --git a/env/Lib/site-packages/aiogram/enums/message_entity_type.py b/env/Lib/site-packages/aiogram/enums/message_entity_type.py deleted file mode 100644 index b67dc03..0000000 --- a/env/Lib/site-packages/aiogram/enums/message_entity_type.py +++ /dev/null @@ -1,29 +0,0 @@ -from enum import Enum - - -class MessageEntityType(str, Enum): - """ - This object represents type of message entity - - Source: https://core.telegram.org/bots/api#messageentity - """ - - MENTION = "mention" - HASHTAG = "hashtag" - CASHTAG = "cashtag" - BOT_COMMAND = "bot_command" - URL = "url" - EMAIL = "email" - PHONE_NUMBER = "phone_number" - BOLD = "bold" - ITALIC = "italic" - UNDERLINE = "underline" - STRIKETHROUGH = "strikethrough" - SPOILER = "spoiler" - BLOCKQUOTE = "blockquote" - EXPANDABLE_BLOCKQUOTE = "expandable_blockquote" - CODE = "code" - PRE = "pre" - TEXT_LINK = "text_link" - TEXT_MENTION = "text_mention" - CUSTOM_EMOJI = "custom_emoji" diff --git a/env/Lib/site-packages/aiogram/enums/message_origin_type.py b/env/Lib/site-packages/aiogram/enums/message_origin_type.py deleted file mode 100644 index 9543665..0000000 --- a/env/Lib/site-packages/aiogram/enums/message_origin_type.py +++ /dev/null @@ -1,14 +0,0 @@ -from enum import Enum - - -class MessageOriginType(str, Enum): - """ - This object represents origin of a message. - - Source: https://core.telegram.org/bots/api#messageorigin - """ - - USER = "user" - HIDDEN_USER = "hidden_user" - CHAT = "chat" - CHANNEL = "channel" diff --git a/env/Lib/site-packages/aiogram/enums/paid_media_type.py b/env/Lib/site-packages/aiogram/enums/paid_media_type.py deleted file mode 100644 index 930028f..0000000 --- a/env/Lib/site-packages/aiogram/enums/paid_media_type.py +++ /dev/null @@ -1,13 +0,0 @@ -from enum import Enum - - -class PaidMediaType(str, Enum): - """ - This object represents the type of a media in a paid message. - - Source: https://core.telegram.org/bots/api#paidmedia - """ - - PHOTO = "photo" - PREVIEW = "preview" - VIDEO = "video" diff --git a/env/Lib/site-packages/aiogram/enums/parse_mode.py b/env/Lib/site-packages/aiogram/enums/parse_mode.py deleted file mode 100644 index f17dd98..0000000 --- a/env/Lib/site-packages/aiogram/enums/parse_mode.py +++ /dev/null @@ -1,13 +0,0 @@ -from enum import Enum - - -class ParseMode(str, Enum): - """ - Formatting options - - Source: https://core.telegram.org/bots/api#formatting-options - """ - - MARKDOWN_V2 = "MarkdownV2" - MARKDOWN = "Markdown" - HTML = "HTML" diff --git a/env/Lib/site-packages/aiogram/enums/passport_element_error_type.py b/env/Lib/site-packages/aiogram/enums/passport_element_error_type.py deleted file mode 100644 index cdcb480..0000000 --- a/env/Lib/site-packages/aiogram/enums/passport_element_error_type.py +++ /dev/null @@ -1,19 +0,0 @@ -from enum import Enum - - -class PassportElementErrorType(str, Enum): - """ - This object represents a passport element error type. - - Source: https://core.telegram.org/bots/api#passportelementerror - """ - - DATA = "data" - FRONT_SIDE = "front_side" - REVERSE_SIDE = "reverse_side" - SELFIE = "selfie" - FILE = "file" - FILES = "files" - TRANSLATION_FILE = "translation_file" - TRANSLATION_FILES = "translation_files" - UNSPECIFIED = "unspecified" diff --git a/env/Lib/site-packages/aiogram/enums/poll_type.py b/env/Lib/site-packages/aiogram/enums/poll_type.py deleted file mode 100644 index 039d600..0000000 --- a/env/Lib/site-packages/aiogram/enums/poll_type.py +++ /dev/null @@ -1,12 +0,0 @@ -from enum import Enum - - -class PollType(str, Enum): - """ - This object represents poll type - - Source: https://core.telegram.org/bots/api#poll - """ - - REGULAR = "regular" - QUIZ = "quiz" diff --git a/env/Lib/site-packages/aiogram/enums/reaction_type_type.py b/env/Lib/site-packages/aiogram/enums/reaction_type_type.py deleted file mode 100644 index 5b0b880..0000000 --- a/env/Lib/site-packages/aiogram/enums/reaction_type_type.py +++ /dev/null @@ -1,12 +0,0 @@ -from enum import Enum - - -class ReactionTypeType(str, Enum): - """ - This object represents reaction type. - - Source: https://core.telegram.org/bots/api#reactiontype - """ - - EMOJI = "emoji" - CUSTOM_EMOJI = "custom_emoji" diff --git a/env/Lib/site-packages/aiogram/enums/revenue_withdrawal_state_type.py b/env/Lib/site-packages/aiogram/enums/revenue_withdrawal_state_type.py deleted file mode 100644 index 89a9a04..0000000 --- a/env/Lib/site-packages/aiogram/enums/revenue_withdrawal_state_type.py +++ /dev/null @@ -1,13 +0,0 @@ -from enum import Enum - - -class RevenueWithdrawalStateType(str, Enum): - """ - This object represents a revenue withdrawal state type - - Source: https://core.telegram.org/bots/api#revenuewithdrawalstate - """ - - FAILED = "failed" - PENDING = "pending" - SUCCEEDED = "succeeded" diff --git a/env/Lib/site-packages/aiogram/enums/sticker_format.py b/env/Lib/site-packages/aiogram/enums/sticker_format.py deleted file mode 100644 index 6c9441d..0000000 --- a/env/Lib/site-packages/aiogram/enums/sticker_format.py +++ /dev/null @@ -1,13 +0,0 @@ -from enum import Enum - - -class StickerFormat(str, Enum): - """ - Format of the sticker - - Source: https://core.telegram.org/bots/api#createnewstickerset - """ - - STATIC = "static" - ANIMATED = "animated" - VIDEO = "video" diff --git a/env/Lib/site-packages/aiogram/enums/sticker_type.py b/env/Lib/site-packages/aiogram/enums/sticker_type.py deleted file mode 100644 index 748f85e..0000000 --- a/env/Lib/site-packages/aiogram/enums/sticker_type.py +++ /dev/null @@ -1,13 +0,0 @@ -from enum import Enum - - -class StickerType(str, Enum): - """ - The part of the face relative to which the mask should be placed. - - Source: https://core.telegram.org/bots/api#maskposition - """ - - REGULAR = "regular" - MASK = "mask" - CUSTOM_EMOJI = "custom_emoji" diff --git a/env/Lib/site-packages/aiogram/enums/topic_icon_color.py b/env/Lib/site-packages/aiogram/enums/topic_icon_color.py deleted file mode 100644 index f40ee71..0000000 --- a/env/Lib/site-packages/aiogram/enums/topic_icon_color.py +++ /dev/null @@ -1,16 +0,0 @@ -from enum import Enum - - -class TopicIconColor(int, Enum): - """ - Color of the topic icon in RGB format. - - Source: https://github.com/telegramdesktop/tdesktop/blob/991fe491c5ae62705d77aa8fdd44a79caf639c45/Telegram/SourceFiles/data/data_forum_topic.cpp#L51-L56 - """ - - BLUE = 0x6FB9F0 - YELLOW = 0xFFD67E - VIOLET = 0xCB86DB - GREEN = 0x8EEE98 - ROSE = 0xFF93B2 - RED = 0xFB6F5F diff --git a/env/Lib/site-packages/aiogram/enums/transaction_partner_type.py b/env/Lib/site-packages/aiogram/enums/transaction_partner_type.py deleted file mode 100644 index b335ac0..0000000 --- a/env/Lib/site-packages/aiogram/enums/transaction_partner_type.py +++ /dev/null @@ -1,14 +0,0 @@ -from enum import Enum - - -class TransactionPartnerType(str, Enum): - """ - This object represents a type of transaction partner. - - Source: https://core.telegram.org/bots/api#transactionpartner - """ - - FRAGMENT = "fragment" - OTHER = "other" - USER = "user" - TELEGRAM_ADS = "telegram_ads" diff --git a/env/Lib/site-packages/aiogram/enums/update_type.py b/env/Lib/site-packages/aiogram/enums/update_type.py deleted file mode 100644 index 16fe0e2..0000000 --- a/env/Lib/site-packages/aiogram/enums/update_type.py +++ /dev/null @@ -1,32 +0,0 @@ -from enum import Enum - - -class UpdateType(str, Enum): - """ - This object represents the complete list of allowed update types - - Source: https://core.telegram.org/bots/api#update - """ - - MESSAGE = "message" - EDITED_MESSAGE = "edited_message" - CHANNEL_POST = "channel_post" - EDITED_CHANNEL_POST = "edited_channel_post" - BUSINESS_CONNECTION = "business_connection" - BUSINESS_MESSAGE = "business_message" - EDITED_BUSINESS_MESSAGE = "edited_business_message" - DELETED_BUSINESS_MESSAGES = "deleted_business_messages" - MESSAGE_REACTION = "message_reaction" - MESSAGE_REACTION_COUNT = "message_reaction_count" - INLINE_QUERY = "inline_query" - CHOSEN_INLINE_RESULT = "chosen_inline_result" - CALLBACK_QUERY = "callback_query" - SHIPPING_QUERY = "shipping_query" - PRE_CHECKOUT_QUERY = "pre_checkout_query" - POLL = "poll" - POLL_ANSWER = "poll_answer" - MY_CHAT_MEMBER = "my_chat_member" - CHAT_MEMBER = "chat_member" - CHAT_JOIN_REQUEST = "chat_join_request" - CHAT_BOOST = "chat_boost" - REMOVED_CHAT_BOOST = "removed_chat_boost" diff --git a/env/Lib/site-packages/aiogram/exceptions.py b/env/Lib/site-packages/aiogram/exceptions.py deleted file mode 100644 index d195aa7..0000000 --- a/env/Lib/site-packages/aiogram/exceptions.py +++ /dev/null @@ -1,199 +0,0 @@ -from typing import Any, Optional - -from aiogram.methods import TelegramMethod -from aiogram.methods.base import TelegramType -from aiogram.utils.link import docs_url - - -class AiogramError(Exception): - """ - Base exception for all aiogram errors. - """ - - -class DetailedAiogramError(AiogramError): - """ - Base exception for all aiogram errors with detailed message. - """ - - url: Optional[str] = None - - def __init__(self, message: str) -> None: - self.message = message - - def __str__(self) -> str: - message = self.message - if self.url: - message += f"\n(background on this error at: {self.url})" - return message - - def __repr__(self) -> str: - return f"{type(self).__name__}('{self}')" - - -class CallbackAnswerException(AiogramError): - """ - Exception for callback answer. - """ - - -class SceneException(AiogramError): - """ - Exception for scenes. - """ - - -class UnsupportedKeywordArgument(DetailedAiogramError): - """ - Exception raised when a keyword argument is passed as filter. - """ - - url = docs_url("migration_2_to_3.html", fragment_="filtering-events") - - -class TelegramAPIError(DetailedAiogramError): - """ - Base exception for all Telegram API errors. - """ - - label: str = "Telegram server says" - - def __init__( - self, - method: TelegramMethod[TelegramType], - message: str, - ) -> None: - super().__init__(message=message) - self.method = method - - def __str__(self) -> str: - original_message = super().__str__() - return f"{self.label} - {original_message}" - - -class TelegramNetworkError(TelegramAPIError): - """ - Base exception for all Telegram network errors. - """ - - label = "HTTP Client says" - - -class TelegramRetryAfter(TelegramAPIError): - """ - Exception raised when flood control exceeds. - """ - - url = "https://core.telegram.org/bots/faq#my-bot-is-hitting-limits-how-do-i-avoid-this" - - def __init__( - self, - method: TelegramMethod[TelegramType], - message: str, - retry_after: int, - ) -> None: - description = f"Flood control exceeded on method {type(method).__name__!r}" - if chat_id := getattr(method, "chat_id", None): - description += f" in chat {chat_id}" - description += f". Retry in {retry_after} seconds." - description += f"\nOriginal description: {message}" - - super().__init__(method=method, message=description) - self.retry_after = retry_after - - -class TelegramMigrateToChat(TelegramAPIError): - """ - Exception raised when chat has been migrated to a supergroup. - """ - - url = "https://core.telegram.org/bots/api#responseparameters" - - def __init__( - self, - method: TelegramMethod[TelegramType], - message: str, - migrate_to_chat_id: int, - ) -> None: - description = f"The group has been migrated to a supergroup with id {migrate_to_chat_id}" - if chat_id := getattr(method, "chat_id", None): - description += f" from {chat_id}" - description += f"\nOriginal description: {message}" - super().__init__(method=method, message=message) - self.migrate_to_chat_id = migrate_to_chat_id - - -class TelegramBadRequest(TelegramAPIError): - """ - Exception raised when request is malformed. - """ - - -class TelegramNotFound(TelegramAPIError): - """ - Exception raised when chat, message, user, etc. not found. - """ - - -class TelegramConflictError(TelegramAPIError): - """ - Exception raised when bot token is already used by another application in polling mode. - """ - - -class TelegramUnauthorizedError(TelegramAPIError): - """ - Exception raised when bot token is invalid. - """ - - -class TelegramForbiddenError(TelegramAPIError): - """ - Exception raised when bot is kicked from chat or etc. - """ - - -class TelegramServerError(TelegramAPIError): - """ - Exception raised when Telegram server returns 5xx error. - """ - - -class RestartingTelegram(TelegramServerError): - """ - Exception raised when Telegram server is restarting. - - It seems like this error is not used by Telegram anymore, - but it's still here for backward compatibility. - - Currently, you should expect that Telegram can raise RetryAfter (with timeout 5 seconds) - error instead of this one. - """ - - -class TelegramEntityTooLarge(TelegramNetworkError): - """ - Exception raised when you are trying to send a file that is too large. - """ - - url = "https://core.telegram.org/bots/api#sending-files" - - -class ClientDecodeError(AiogramError): - """ - Exception raised when client can't decode response. (Malformed response, etc.) - """ - - def __init__(self, message: str, original: Exception, data: Any) -> None: - self.message = message - self.original = original - self.data = data - - def __str__(self) -> str: - original_type = type(self.original) - return ( - f"{self.message}\n" - f"Caused from error: " - f"{original_type.__module__}.{original_type.__name__}: {self.original}\n" - f"Content: {self.data}" - ) diff --git a/env/Lib/site-packages/aiogram/filters/__init__.py b/env/Lib/site-packages/aiogram/filters/__init__.py deleted file mode 100644 index bcadc17..0000000 --- a/env/Lib/site-packages/aiogram/filters/__init__.py +++ /dev/null @@ -1,51 +0,0 @@ -from .base import Filter -from .chat_member_updated import ( - ADMINISTRATOR, - CREATOR, - IS_ADMIN, - IS_MEMBER, - IS_NOT_MEMBER, - JOIN_TRANSITION, - KICKED, - LEAVE_TRANSITION, - LEFT, - MEMBER, - PROMOTED_TRANSITION, - RESTRICTED, - ChatMemberUpdatedFilter, -) -from .command import Command, CommandObject, CommandStart -from .exception import ExceptionMessageFilter, ExceptionTypeFilter -from .logic import and_f, invert_f, or_f -from .magic_data import MagicData -from .state import StateFilter - -BaseFilter = Filter - -__all__ = ( - "Filter", - "BaseFilter", - "Command", - "CommandObject", - "CommandStart", - "ExceptionMessageFilter", - "ExceptionTypeFilter", - "StateFilter", - "MagicData", - "ChatMemberUpdatedFilter", - "CREATOR", - "ADMINISTRATOR", - "MEMBER", - "RESTRICTED", - "LEFT", - "KICKED", - "IS_MEMBER", - "IS_ADMIN", - "PROMOTED_TRANSITION", - "IS_NOT_MEMBER", - "JOIN_TRANSITION", - "LEAVE_TRANSITION", - "and_f", - "or_f", - "invert_f", -) diff --git a/env/Lib/site-packages/aiogram/filters/__pycache__/__init__.cpython-311.pyc b/env/Lib/site-packages/aiogram/filters/__pycache__/__init__.cpython-311.pyc deleted file mode 100644 index ae5acd0..0000000 Binary files a/env/Lib/site-packages/aiogram/filters/__pycache__/__init__.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/filters/__pycache__/base.cpython-311.pyc b/env/Lib/site-packages/aiogram/filters/__pycache__/base.cpython-311.pyc deleted file mode 100644 index b4feacc..0000000 Binary files a/env/Lib/site-packages/aiogram/filters/__pycache__/base.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/filters/__pycache__/callback_data.cpython-311.pyc b/env/Lib/site-packages/aiogram/filters/__pycache__/callback_data.cpython-311.pyc deleted file mode 100644 index eb0cdb3..0000000 Binary files a/env/Lib/site-packages/aiogram/filters/__pycache__/callback_data.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/filters/__pycache__/chat_member_updated.cpython-311.pyc b/env/Lib/site-packages/aiogram/filters/__pycache__/chat_member_updated.cpython-311.pyc deleted file mode 100644 index 26dc9ff..0000000 Binary files a/env/Lib/site-packages/aiogram/filters/__pycache__/chat_member_updated.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/filters/__pycache__/command.cpython-311.pyc b/env/Lib/site-packages/aiogram/filters/__pycache__/command.cpython-311.pyc deleted file mode 100644 index 45ed429..0000000 Binary files a/env/Lib/site-packages/aiogram/filters/__pycache__/command.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/filters/__pycache__/exception.cpython-311.pyc b/env/Lib/site-packages/aiogram/filters/__pycache__/exception.cpython-311.pyc deleted file mode 100644 index d3b9229..0000000 Binary files a/env/Lib/site-packages/aiogram/filters/__pycache__/exception.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/filters/__pycache__/logic.cpython-311.pyc b/env/Lib/site-packages/aiogram/filters/__pycache__/logic.cpython-311.pyc deleted file mode 100644 index 381aa49..0000000 Binary files a/env/Lib/site-packages/aiogram/filters/__pycache__/logic.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/filters/__pycache__/magic_data.cpython-311.pyc b/env/Lib/site-packages/aiogram/filters/__pycache__/magic_data.cpython-311.pyc deleted file mode 100644 index 68a1915..0000000 Binary files a/env/Lib/site-packages/aiogram/filters/__pycache__/magic_data.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/filters/__pycache__/state.cpython-311.pyc b/env/Lib/site-packages/aiogram/filters/__pycache__/state.cpython-311.pyc deleted file mode 100644 index 00fc235..0000000 Binary files a/env/Lib/site-packages/aiogram/filters/__pycache__/state.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/filters/base.py b/env/Lib/site-packages/aiogram/filters/base.py deleted file mode 100644 index 94f9b6d..0000000 --- a/env/Lib/site-packages/aiogram/filters/base.py +++ /dev/null @@ -1,55 +0,0 @@ -from abc import ABC, abstractmethod -from typing import TYPE_CHECKING, Any, Awaitable, Callable, Dict, Union - -if TYPE_CHECKING: - from aiogram.filters.logic import _InvertFilter - - -class Filter(ABC): - """ - If you want to register own filters like builtin filters you will need to write subclass - of this class with overriding the :code:`__call__` - method and adding filter attributes. - """ - - if TYPE_CHECKING: - # This checking type-hint is needed because mypy checks validity of overrides and raises: - # error: Signature of "__call__" incompatible with supertype "BaseFilter" [override] - # https://mypy.readthedocs.io/en/latest/error_code_list.html#check-validity-of-overrides-override - __call__: Callable[..., Awaitable[Union[bool, Dict[str, Any]]]] - else: # pragma: no cover - - @abstractmethod - async def __call__(self, *args: Any, **kwargs: Any) -> Union[bool, Dict[str, Any]]: - """ - This method should be overridden. - - Accepts incoming event and should return boolean or dict. - - :return: :class:`bool` or :class:`Dict[str, Any]` - """ - pass - - def __invert__(self) -> "_InvertFilter": - from aiogram.filters.logic import invert_f - - return invert_f(self) - - def update_handler_flags(self, flags: Dict[str, Any]) -> None: - """ - Also if you want to extend handler flags with using this filter - you should implement this method - - :param flags: existing flags, can be updated directly - """ - pass - - def _signature_to_string(self, *args: Any, **kwargs: Any) -> str: - items = [repr(arg) for arg in args] - items.extend([f"{k}={v!r}" for k, v in kwargs.items() if v is not None]) - - return f"{type(self).__name__}({', '.join(items)})" - - def __await__(self): # type: ignore # pragma: no cover - # Is needed only for inspection and this method is never be called - return self.__call__ diff --git a/env/Lib/site-packages/aiogram/filters/callback_data.py b/env/Lib/site-packages/aiogram/filters/callback_data.py deleted file mode 100644 index 17ccffb..0000000 --- a/env/Lib/site-packages/aiogram/filters/callback_data.py +++ /dev/null @@ -1,207 +0,0 @@ -from __future__ import annotations - -import sys -import types -import typing -from decimal import Decimal -from enum import Enum -from fractions import Fraction -from typing import ( - TYPE_CHECKING, - Any, - ClassVar, - Dict, - Literal, - Optional, - Type, - TypeVar, - Union, -) -from uuid import UUID - -from magic_filter import MagicFilter -from pydantic import BaseModel -from pydantic.fields import FieldInfo - -from aiogram.filters.base import Filter -from aiogram.types import CallbackQuery - -T = TypeVar("T", bound="CallbackData") - -MAX_CALLBACK_LENGTH: int = 64 - - -_UNION_TYPES = {typing.Union} -if sys.version_info >= (3, 10): # pragma: no cover - _UNION_TYPES.add(types.UnionType) - - -class CallbackDataException(Exception): - pass - - -class CallbackData(BaseModel): - """ - Base class for callback data wrapper - - This class should be used as super-class of user-defined callbacks. - - The class-keyword :code:`prefix` is required to define prefix - and also the argument :code:`sep` can be passed to define separator (default is :code:`:`). - """ - - if TYPE_CHECKING: - __separator__: ClassVar[str] - """Data separator (default is :code:`:`)""" - __prefix__: ClassVar[str] - """Callback prefix""" - - def __init_subclass__(cls, **kwargs: Any) -> None: - if "prefix" not in kwargs: - raise ValueError( - f"prefix required, usage example: " - f"`class {cls.__name__}(CallbackData, prefix='my_callback'): ...`" - ) - cls.__separator__ = kwargs.pop("sep", ":") - cls.__prefix__ = kwargs.pop("prefix") - if cls.__separator__ in cls.__prefix__: - raise ValueError( - f"Separator symbol {cls.__separator__!r} can not be used " - f"inside prefix {cls.__prefix__!r}" - ) - super().__init_subclass__(**kwargs) - - def _encode_value(self, key: str, value: Any) -> str: - if value is None: - return "" - if isinstance(value, Enum): - return str(value.value) - if isinstance(value, UUID): - return value.hex - if isinstance(value, bool): - return str(int(value)) - if isinstance(value, (int, str, float, Decimal, Fraction)): - return str(value) - raise ValueError( - f"Attribute {key}={value!r} of type {type(value).__name__!r}" - f" can not be packed to callback data" - ) - - def pack(self) -> str: - """ - Generate callback data string - - :return: valid callback data for Telegram Bot API - """ - result = [self.__prefix__] - for key, value in self.model_dump(mode="json").items(): - encoded = self._encode_value(key, value) - if self.__separator__ in encoded: - raise ValueError( - f"Separator symbol {self.__separator__!r} can not be used " - f"in value {key}={encoded!r}" - ) - result.append(encoded) - callback_data = self.__separator__.join(result) - if len(callback_data.encode()) > MAX_CALLBACK_LENGTH: - raise ValueError( - f"Resulted callback data is too long! " - f"len({callback_data!r}.encode()) > {MAX_CALLBACK_LENGTH}" - ) - return callback_data - - @classmethod - def unpack(cls: Type[T], value: str) -> T: - """ - Parse callback data string - - :param value: value from Telegram - :return: instance of CallbackData - """ - prefix, *parts = value.split(cls.__separator__) - names = cls.model_fields.keys() - if len(parts) != len(names): - raise TypeError( - f"Callback data {cls.__name__!r} takes {len(names)} arguments " - f"but {len(parts)} were given" - ) - if prefix != cls.__prefix__: - raise ValueError(f"Bad prefix ({prefix!r} != {cls.__prefix__!r})") - payload = {} - for k, v in zip(names, parts): # type: str, Optional[str] - if field := cls.model_fields.get(k): - if v == "" and _check_field_is_nullable(field): - v = None - payload[k] = v - return cls(**payload) - - @classmethod - def filter(cls, rule: Optional[MagicFilter] = None) -> CallbackQueryFilter: - """ - Generates a filter for callback query with rule - - :param rule: magic rule - :return: instance of filter - """ - return CallbackQueryFilter(callback_data=cls, rule=rule) - - -class CallbackQueryFilter(Filter): - """ - This filter helps to handle callback query. - - Should not be used directly, you should create the instance of this filter - via callback data instance - """ - - __slots__ = ( - "callback_data", - "rule", - ) - - def __init__( - self, - *, - callback_data: Type[CallbackData], - rule: Optional[MagicFilter] = None, - ): - """ - :param callback_data: Expected type of callback data - :param rule: Magic rule - """ - self.callback_data = callback_data - self.rule = rule - - def __str__(self) -> str: - return self._signature_to_string( - callback_data=self.callback_data, - rule=self.rule, - ) - - async def __call__(self, query: CallbackQuery) -> Union[Literal[False], Dict[str, Any]]: - if not isinstance(query, CallbackQuery) or not query.data: - return False - try: - callback_data = self.callback_data.unpack(query.data) - except (TypeError, ValueError): - return False - - if self.rule is None or self.rule.resolve(callback_data): - return {"callback_data": callback_data} - return False - - -def _check_field_is_nullable(field: FieldInfo) -> bool: - """ - Check if the given field is nullable. - - :param field: The FieldInfo object representing the field to check. - :return: True if the field is nullable, False otherwise. - - """ - if not field.is_required(): - return True - - return typing.get_origin(field.annotation) in _UNION_TYPES and type(None) in typing.get_args( - field.annotation - ) diff --git a/env/Lib/site-packages/aiogram/filters/chat_member_updated.py b/env/Lib/site-packages/aiogram/filters/chat_member_updated.py deleted file mode 100644 index 23cf0e9..0000000 --- a/env/Lib/site-packages/aiogram/filters/chat_member_updated.py +++ /dev/null @@ -1,204 +0,0 @@ -from typing import Any, Dict, Optional, TypeVar, Union - -from aiogram.filters.base import Filter -from aiogram.types import ChatMember, ChatMemberUpdated - -MarkerT = TypeVar("MarkerT", bound="_MemberStatusMarker") -MarkerGroupT = TypeVar("MarkerGroupT", bound="_MemberStatusGroupMarker") -TransitionT = TypeVar("TransitionT", bound="_MemberStatusTransition") - - -class _MemberStatusMarker: - __slots__ = ( - "name", - "is_member", - ) - - def __init__(self, name: str, *, is_member: Optional[bool] = None) -> None: - self.name = name - self.is_member = is_member - - def __str__(self) -> str: - result = self.name.upper() - if self.is_member is not None: - result = ("+" if self.is_member else "-") + result - return result # noqa: RET504 - - def __pos__(self: MarkerT) -> MarkerT: - return type(self)(name=self.name, is_member=True) - - def __neg__(self: MarkerT) -> MarkerT: - return type(self)(name=self.name, is_member=False) - - def __or__( - self, other: Union["_MemberStatusMarker", "_MemberStatusGroupMarker"] - ) -> "_MemberStatusGroupMarker": - if isinstance(other, _MemberStatusMarker): - return _MemberStatusGroupMarker(self, other) - if isinstance(other, _MemberStatusGroupMarker): - return other | self - raise TypeError( - f"unsupported operand type(s) for |: " - f"{type(self).__name__!r} and {type(other).__name__!r}" - ) - - __ror__ = __or__ - - def __rshift__( - self, other: Union["_MemberStatusMarker", "_MemberStatusGroupMarker"] - ) -> "_MemberStatusTransition": - old = _MemberStatusGroupMarker(self) - if isinstance(other, _MemberStatusMarker): - return _MemberStatusTransition(old=old, new=_MemberStatusGroupMarker(other)) - if isinstance(other, _MemberStatusGroupMarker): - return _MemberStatusTransition(old=old, new=other) - raise TypeError( - f"unsupported operand type(s) for >>: " - f"{type(self).__name__!r} and {type(other).__name__!r}" - ) - - def __lshift__( - self, other: Union["_MemberStatusMarker", "_MemberStatusGroupMarker"] - ) -> "_MemberStatusTransition": - new = _MemberStatusGroupMarker(self) - if isinstance(other, _MemberStatusMarker): - return _MemberStatusTransition(old=_MemberStatusGroupMarker(other), new=new) - if isinstance(other, _MemberStatusGroupMarker): - return _MemberStatusTransition(old=other, new=new) - raise TypeError( - f"unsupported operand type(s) for <<: " - f"{type(self).__name__!r} and {type(other).__name__!r}" - ) - - def __hash__(self) -> int: - return hash((self.name, self.is_member)) - - def check(self, *, member: ChatMember) -> bool: - # Not all member types have `is_member` attribute - is_member = getattr(member, "is_member", None) - status = getattr(member, "status", None) - if self.is_member is not None and is_member != self.is_member: - return False - return self.name == status - - -class _MemberStatusGroupMarker: - __slots__ = ("statuses",) - - def __init__(self, *statuses: _MemberStatusMarker) -> None: - if not statuses: - raise ValueError("Member status group should have at least one status included") - self.statuses = frozenset(statuses) - - def __or__( - self: MarkerGroupT, other: Union["_MemberStatusMarker", "_MemberStatusGroupMarker"] - ) -> MarkerGroupT: - if isinstance(other, _MemberStatusMarker): - return type(self)(*self.statuses, other) - if isinstance(other, _MemberStatusGroupMarker): - return type(self)(*self.statuses, *other.statuses) - raise TypeError( - f"unsupported operand type(s) for |: " - f"{type(self).__name__!r} and {type(other).__name__!r}" - ) - - def __rshift__( - self, other: Union["_MemberStatusMarker", "_MemberStatusGroupMarker"] - ) -> "_MemberStatusTransition": - if isinstance(other, _MemberStatusMarker): - return _MemberStatusTransition(old=self, new=_MemberStatusGroupMarker(other)) - if isinstance(other, _MemberStatusGroupMarker): - return _MemberStatusTransition(old=self, new=other) - raise TypeError( - f"unsupported operand type(s) for >>: " - f"{type(self).__name__!r} and {type(other).__name__!r}" - ) - - def __lshift__( - self, other: Union["_MemberStatusMarker", "_MemberStatusGroupMarker"] - ) -> "_MemberStatusTransition": - if isinstance(other, _MemberStatusMarker): - return _MemberStatusTransition(old=_MemberStatusGroupMarker(other), new=self) - if isinstance(other, _MemberStatusGroupMarker): - return _MemberStatusTransition(old=other, new=self) - raise TypeError( - f"unsupported operand type(s) for <<: " - f"{type(self).__name__!r} and {type(other).__name__!r}" - ) - - def __str__(self) -> str: - result = " | ".join(map(str, sorted(self.statuses, key=str))) - if len(self.statuses) != 1: - return f"({result})" - return result - - def check(self, *, member: ChatMember) -> bool: - return any(status.check(member=member) for status in self.statuses) - - -class _MemberStatusTransition: - __slots__ = ( - "old", - "new", - ) - - def __init__(self, *, old: _MemberStatusGroupMarker, new: _MemberStatusGroupMarker) -> None: - self.old = old - self.new = new - - def __str__(self) -> str: - return f"{self.old} >> {self.new}" - - def __invert__(self: TransitionT) -> TransitionT: - return type(self)(old=self.new, new=self.old) - - def check(self, *, old: ChatMember, new: ChatMember) -> bool: - return self.old.check(member=old) and self.new.check(member=new) - - -CREATOR = _MemberStatusMarker("creator") -ADMINISTRATOR = _MemberStatusMarker("administrator") -MEMBER = _MemberStatusMarker("member") -RESTRICTED = _MemberStatusMarker("restricted") -LEFT = _MemberStatusMarker("left") -KICKED = _MemberStatusMarker("kicked") - -IS_MEMBER = CREATOR | ADMINISTRATOR | MEMBER | +RESTRICTED -IS_ADMIN = CREATOR | ADMINISTRATOR -IS_NOT_MEMBER = LEFT | KICKED | -RESTRICTED - -JOIN_TRANSITION = IS_NOT_MEMBER >> IS_MEMBER -LEAVE_TRANSITION = ~JOIN_TRANSITION -PROMOTED_TRANSITION = (MEMBER | RESTRICTED | LEFT | KICKED) >> ADMINISTRATOR - - -class ChatMemberUpdatedFilter(Filter): - __slots__ = ("member_status_changed",) - - def __init__( - self, - member_status_changed: Union[ - _MemberStatusMarker, - _MemberStatusGroupMarker, - _MemberStatusTransition, - ], - ): - self.member_status_changed = member_status_changed - - def __str__(self) -> str: - return self._signature_to_string( - member_status_changed=self.member_status_changed, - ) - - async def __call__(self, member_updated: ChatMemberUpdated) -> Union[bool, Dict[str, Any]]: - old = member_updated.old_chat_member - new = member_updated.new_chat_member - rule = self.member_status_changed - - if isinstance(rule, (_MemberStatusMarker, _MemberStatusGroupMarker)): - return rule.check(member=new) - if isinstance(rule, _MemberStatusTransition): - return rule.check(old=old, new=new) - - # Impossible variant in due to pydantic validation - return False # pragma: no cover diff --git a/env/Lib/site-packages/aiogram/filters/command.py b/env/Lib/site-packages/aiogram/filters/command.py deleted file mode 100644 index f52ac26..0000000 --- a/env/Lib/site-packages/aiogram/filters/command.py +++ /dev/null @@ -1,298 +0,0 @@ -from __future__ import annotations - -import re -from dataclasses import dataclass, field, replace -from typing import ( - TYPE_CHECKING, - Any, - Dict, - Iterable, - Match, - Optional, - Pattern, - Sequence, - Union, - cast, -) - -from magic_filter import MagicFilter - -from aiogram.filters.base import Filter -from aiogram.types import BotCommand, Message -from aiogram.utils.deep_linking import decode_payload - -if TYPE_CHECKING: - from aiogram import Bot - -# TODO: rm type ignore after py3.8 support expiration or mypy bug fix -CommandPatternType = Union[str, re.Pattern, BotCommand] # type: ignore[type-arg] - - -class CommandException(Exception): - pass - - -class Command(Filter): - """ - This filter can be helpful for handling commands from the text messages. - - Works only with :class:`aiogram.types.message.Message` events which have the :code:`text`. - """ - - __slots__ = ( - "commands", - "prefix", - "ignore_case", - "ignore_mention", - "magic", - ) - - def __init__( - self, - *values: CommandPatternType, - commands: Optional[Union[Sequence[CommandPatternType], CommandPatternType]] = None, - prefix: str = "/", - ignore_case: bool = False, - ignore_mention: bool = False, - magic: Optional[MagicFilter] = None, - ): - """ - List of commands (string or compiled regexp patterns) - - :param prefix: Prefix for command. - Prefix is always a single char but here you can pass all of allowed prefixes, - for example: :code:`"/!"` will work with commands prefixed - by :code:`"/"` or :code:`"!"`. - :param ignore_case: Ignore case (Does not work with regexp, use flags instead) - :param ignore_mention: Ignore bot mention. By default, - bot can not handle commands intended for other bots - :param magic: Validate command object via Magic filter after all checks done - """ - if commands is None: - commands = [] - if isinstance(commands, (str, re.Pattern, BotCommand)): - commands = [commands] - - if not isinstance(commands, Iterable): - raise ValueError( - "Command filter only supports str, re.Pattern, BotCommand object" - " or their Iterable" - ) - - items = [] - for command in (*values, *commands): - if isinstance(command, BotCommand): - command = command.command - if not isinstance(command, (str, re.Pattern)): - raise ValueError( - "Command filter only supports str, re.Pattern, BotCommand object" - " or their Iterable" - ) - if ignore_case and isinstance(command, str): - command = command.casefold() - items.append(command) - - if not items: - raise ValueError("At least one command should be specified") - - self.commands = tuple(items) - self.prefix = prefix - self.ignore_case = ignore_case - self.ignore_mention = ignore_mention - self.magic = magic - - def __str__(self) -> str: - return self._signature_to_string( - *self.commands, - prefix=self.prefix, - ignore_case=self.ignore_case, - ignore_mention=self.ignore_mention, - magic=self.magic, - ) - - def update_handler_flags(self, flags: Dict[str, Any]) -> None: - commands = flags.setdefault("commands", []) - commands.append(self) - - async def __call__(self, message: Message, bot: Bot) -> Union[bool, Dict[str, Any]]: - if not isinstance(message, Message): - return False - - text = message.text or message.caption - if not text: - return False - - try: - command = await self.parse_command(text=text, bot=bot) - except CommandException: - return False - result = {"command": command} - if command.magic_result and isinstance(command.magic_result, dict): - result.update(command.magic_result) - return result - - def extract_command(self, text: str) -> CommandObject: - # First step: separate command with arguments - # "/command@mention arg1 arg2" -> "/command@mention", ["arg1 arg2"] - try: - full_command, *args = text.split(maxsplit=1) - except ValueError: - raise CommandException("not enough values to unpack") - - # Separate command into valuable parts - # "/command@mention" -> "/", ("command", "@", "mention") - prefix, (command, _, mention) = full_command[0], full_command[1:].partition("@") - return CommandObject( - prefix=prefix, - command=command, - mention=mention or None, - args=args[0] if args else None, - ) - - def validate_prefix(self, command: CommandObject) -> None: - if command.prefix not in self.prefix: - raise CommandException("Invalid command prefix") - - async def validate_mention(self, bot: Bot, command: CommandObject) -> None: - if command.mention and not self.ignore_mention: - me = await bot.me() - if me.username and command.mention.lower() != me.username.lower(): - raise CommandException("Mention did not match") - - def validate_command(self, command: CommandObject) -> CommandObject: - for allowed_command in cast(Sequence[CommandPatternType], self.commands): - # Command can be presented as regexp pattern or raw string - # then need to validate that in different ways - if isinstance(allowed_command, Pattern): # Regexp - result = allowed_command.match(command.command) - if result: - return replace(command, regexp_match=result) - - command_name = command.command - if self.ignore_case: - command_name = command_name.casefold() - - if command_name == allowed_command: # String - return command - raise CommandException("Command did not match pattern") - - async def parse_command(self, text: str, bot: Bot) -> CommandObject: - """ - Extract command from the text and validate - - :param text: - :param bot: - :return: - """ - command = self.extract_command(text) - self.validate_prefix(command=command) - await self.validate_mention(bot=bot, command=command) - command = self.validate_command(command) - command = self.do_magic(command=command) - return command # noqa: RET504 - - def do_magic(self, command: CommandObject) -> Any: - if self.magic is None: - return command - result = self.magic.resolve(command) - if not result: - raise CommandException("Rejected via magic filter") - return replace(command, magic_result=result) - - -@dataclass(frozen=True) -class CommandObject: - """ - Instance of this object is always has command and it prefix. - Can be passed as keyword argument **command** to the handler - """ - - prefix: str = "/" - """Command prefix""" - command: str = "" - """Command without prefix and mention""" - mention: Optional[str] = None - """Mention (if available)""" - args: Optional[str] = field(repr=False, default=None) - """Command argument""" - regexp_match: Optional[Match[str]] = field(repr=False, default=None) - """Will be presented match result if the command is presented as regexp in filter""" - magic_result: Optional[Any] = field(repr=False, default=None) - - @property - def mentioned(self) -> bool: - """ - This command has mention? - """ - return bool(self.mention) - - @property - def text(self) -> str: - """ - Generate original text from object - """ - line = self.prefix + self.command - if self.mention: - line += "@" + self.mention - if self.args: - line += " " + self.args - return line - - -class CommandStart(Command): - def __init__( - self, - deep_link: bool = False, - deep_link_encoded: bool = False, - ignore_case: bool = False, - ignore_mention: bool = False, - magic: Optional[MagicFilter] = None, - ): - super().__init__( - "start", - prefix="/", - ignore_case=ignore_case, - ignore_mention=ignore_mention, - magic=magic, - ) - self.deep_link = deep_link - self.deep_link_encoded = deep_link_encoded - - def __str__(self) -> str: - return self._signature_to_string( - ignore_case=self.ignore_case, - ignore_mention=self.ignore_mention, - magic=self.magic, - deep_link=self.deep_link, - deep_link_encoded=self.deep_link_encoded, - ) - - async def parse_command(self, text: str, bot: Bot) -> CommandObject: - """ - Extract command from the text and validate - - :param text: - :param bot: - :return: - """ - command = self.extract_command(text) - self.validate_prefix(command=command) - await self.validate_mention(bot=bot, command=command) - command = self.validate_command(command) - command = self.validate_deeplink(command=command) - command = self.do_magic(command=command) - return command # noqa: RET504 - - def validate_deeplink(self, command: CommandObject) -> CommandObject: - if not self.deep_link: - return command - if not command.args: - raise CommandException("Deep-link was missing") - args = command.args - if self.deep_link_encoded: - try: - args = decode_payload(args) - except UnicodeDecodeError as e: - raise CommandException(f"Failed to decode Base64: {e}") - return replace(command, args=args) - return command diff --git a/env/Lib/site-packages/aiogram/filters/exception.py b/env/Lib/site-packages/aiogram/filters/exception.py deleted file mode 100644 index 2530d75..0000000 --- a/env/Lib/site-packages/aiogram/filters/exception.py +++ /dev/null @@ -1,55 +0,0 @@ -import re -from typing import Any, Dict, Pattern, Type, Union, cast - -from aiogram.filters.base import Filter -from aiogram.types import TelegramObject -from aiogram.types.error_event import ErrorEvent - - -class ExceptionTypeFilter(Filter): - """ - Allows to match exception by type - """ - - __slots__ = ("exceptions",) - - def __init__(self, *exceptions: Type[Exception]): - """ - :param exceptions: Exception type(s) - """ - if not exceptions: - raise ValueError("At least one exception type is required") - self.exceptions = exceptions - - async def __call__(self, obj: TelegramObject) -> Union[bool, Dict[str, Any]]: - return isinstance(cast(ErrorEvent, obj).exception, self.exceptions) - - -class ExceptionMessageFilter(Filter): - """ - Allow to match exception by message - """ - - __slots__ = ("pattern",) - - def __init__(self, pattern: Union[str, Pattern[str]]): - """ - :param pattern: Regexp pattern - """ - if isinstance(pattern, str): - pattern = re.compile(pattern) - self.pattern = pattern - - def __str__(self) -> str: - return self._signature_to_string( - pattern=self.pattern, - ) - - async def __call__( - self, - obj: TelegramObject, - ) -> Union[bool, Dict[str, Any]]: - result = self.pattern.match(str(cast(ErrorEvent, obj).exception)) - if not result: - return False - return {"match_exception": result} diff --git a/env/Lib/site-packages/aiogram/filters/logic.py b/env/Lib/site-packages/aiogram/filters/logic.py deleted file mode 100644 index 7cd2503..0000000 --- a/env/Lib/site-packages/aiogram/filters/logic.py +++ /dev/null @@ -1,77 +0,0 @@ -from abc import ABC -from typing import TYPE_CHECKING, Any, Dict, Union - -from aiogram.filters import Filter - -if TYPE_CHECKING: - from aiogram.dispatcher.event.handler import CallbackType, FilterObject - - -class _LogicFilter(Filter, ABC): - pass - - -class _InvertFilter(_LogicFilter): - __slots__ = ("target",) - - def __init__(self, target: "FilterObject") -> None: - self.target = target - - async def __call__(self, *args: Any, **kwargs: Any) -> Union[bool, Dict[str, Any]]: - return not bool(await self.target.call(*args, **kwargs)) - - -class _AndFilter(_LogicFilter): - __slots__ = ("targets",) - - def __init__(self, *targets: "FilterObject") -> None: - self.targets = targets - - async def __call__(self, *args: Any, **kwargs: Any) -> Union[bool, Dict[str, Any]]: - final_result = {} - - for target in self.targets: - result = await target.call(*args, **kwargs) - if not result: - return False - if isinstance(result, dict): - final_result.update(result) - - if final_result: - return final_result - return True - - -class _OrFilter(_LogicFilter): - __slots__ = ("targets",) - - def __init__(self, *targets: "FilterObject") -> None: - self.targets = targets - - async def __call__(self, *args: Any, **kwargs: Any) -> Union[bool, Dict[str, Any]]: - for target in self.targets: - result = await target.call(*args, **kwargs) - if not result: - continue - if isinstance(result, dict): - return result - return bool(result) - return False - - -def and_f(*targets: "CallbackType") -> _AndFilter: - from aiogram.dispatcher.event.handler import FilterObject - - return _AndFilter(*(FilterObject(target) for target in targets)) - - -def or_f(*targets: "CallbackType") -> _OrFilter: - from aiogram.dispatcher.event.handler import FilterObject - - return _OrFilter(*(FilterObject(target) for target in targets)) - - -def invert_f(target: "CallbackType") -> _InvertFilter: - from aiogram.dispatcher.event.handler import FilterObject - - return _InvertFilter(FilterObject(target)) diff --git a/env/Lib/site-packages/aiogram/filters/magic_data.py b/env/Lib/site-packages/aiogram/filters/magic_data.py deleted file mode 100644 index 5c0d474..0000000 --- a/env/Lib/site-packages/aiogram/filters/magic_data.py +++ /dev/null @@ -1,27 +0,0 @@ -from typing import Any - -from magic_filter import AttrDict, MagicFilter - -from aiogram.filters.base import Filter -from aiogram.types import TelegramObject - - -class MagicData(Filter): - """ - This filter helps to filter event with contextual data - """ - - __slots__ = ("magic_data",) - - def __init__(self, magic_data: MagicFilter) -> None: - self.magic_data = magic_data - - async def __call__(self, event: TelegramObject, *args: Any, **kwargs: Any) -> Any: - return self.magic_data.resolve( - AttrDict({"event": event, **dict(enumerate(args)), **kwargs}) - ) - - def __str__(self) -> str: - return self._signature_to_string( - magic_data=self.magic_data, - ) diff --git a/env/Lib/site-packages/aiogram/filters/state.py b/env/Lib/site-packages/aiogram/filters/state.py deleted file mode 100644 index 82a141c..0000000 --- a/env/Lib/site-packages/aiogram/filters/state.py +++ /dev/null @@ -1,43 +0,0 @@ -from inspect import isclass -from typing import Any, Dict, Optional, Sequence, Type, Union, cast - -from aiogram.filters.base import Filter -from aiogram.fsm.state import State, StatesGroup -from aiogram.types import TelegramObject - -StateType = Union[str, None, State, StatesGroup, Type[StatesGroup]] - - -class StateFilter(Filter): - """ - State filter - """ - - __slots__ = ("states",) - - def __init__(self, *states: StateType) -> None: - if not states: - raise ValueError("At least one state is required") - - self.states = states - - def __str__(self) -> str: - return self._signature_to_string( - *self.states, - ) - - async def __call__( - self, obj: TelegramObject, raw_state: Optional[str] = None - ) -> Union[bool, Dict[str, Any]]: - allowed_states = cast(Sequence[StateType], self.states) - for allowed_state in allowed_states: - if isinstance(allowed_state, str) or allowed_state is None: - if allowed_state == "*" or raw_state == allowed_state: - return True - elif isinstance(allowed_state, (State, StatesGroup)): - if allowed_state(event=obj, raw_state=raw_state): - return True - elif isclass(allowed_state) and issubclass(allowed_state, StatesGroup): - if allowed_state()(event=obj, raw_state=raw_state): - return True - return False diff --git a/env/Lib/site-packages/aiogram/fsm/__init__.py b/env/Lib/site-packages/aiogram/fsm/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/env/Lib/site-packages/aiogram/fsm/__pycache__/__init__.cpython-311.pyc b/env/Lib/site-packages/aiogram/fsm/__pycache__/__init__.cpython-311.pyc deleted file mode 100644 index 6550804..0000000 Binary files a/env/Lib/site-packages/aiogram/fsm/__pycache__/__init__.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/fsm/__pycache__/context.cpython-311.pyc b/env/Lib/site-packages/aiogram/fsm/__pycache__/context.cpython-311.pyc deleted file mode 100644 index 109c39e..0000000 Binary files a/env/Lib/site-packages/aiogram/fsm/__pycache__/context.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/fsm/__pycache__/middleware.cpython-311.pyc b/env/Lib/site-packages/aiogram/fsm/__pycache__/middleware.cpython-311.pyc deleted file mode 100644 index a4bc62b..0000000 Binary files a/env/Lib/site-packages/aiogram/fsm/__pycache__/middleware.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/fsm/__pycache__/scene.cpython-311.pyc b/env/Lib/site-packages/aiogram/fsm/__pycache__/scene.cpython-311.pyc deleted file mode 100644 index a55a4fb..0000000 Binary files a/env/Lib/site-packages/aiogram/fsm/__pycache__/scene.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/fsm/__pycache__/state.cpython-311.pyc b/env/Lib/site-packages/aiogram/fsm/__pycache__/state.cpython-311.pyc deleted file mode 100644 index a3f4cac..0000000 Binary files a/env/Lib/site-packages/aiogram/fsm/__pycache__/state.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/fsm/__pycache__/strategy.cpython-311.pyc b/env/Lib/site-packages/aiogram/fsm/__pycache__/strategy.cpython-311.pyc deleted file mode 100644 index 0df1f7f..0000000 Binary files a/env/Lib/site-packages/aiogram/fsm/__pycache__/strategy.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/fsm/context.py b/env/Lib/site-packages/aiogram/fsm/context.py deleted file mode 100644 index 53a8ea4..0000000 --- a/env/Lib/site-packages/aiogram/fsm/context.py +++ /dev/null @@ -1,32 +0,0 @@ -from typing import Any, Dict, Optional - -from aiogram.fsm.storage.base import BaseStorage, StateType, StorageKey - - -class FSMContext: - def __init__(self, storage: BaseStorage, key: StorageKey) -> None: - self.storage = storage - self.key = key - - async def set_state(self, state: StateType = None) -> None: - await self.storage.set_state(key=self.key, state=state) - - async def get_state(self) -> Optional[str]: - return await self.storage.get_state(key=self.key) - - async def set_data(self, data: Dict[str, Any]) -> None: - await self.storage.set_data(key=self.key, data=data) - - async def get_data(self) -> Dict[str, Any]: - return await self.storage.get_data(key=self.key) - - async def update_data( - self, data: Optional[Dict[str, Any]] = None, **kwargs: Any - ) -> Dict[str, Any]: - if data: - kwargs.update(data) - return await self.storage.update_data(key=self.key, data=kwargs) - - async def clear(self) -> None: - await self.set_state(state=None) - await self.set_data({}) diff --git a/env/Lib/site-packages/aiogram/fsm/middleware.py b/env/Lib/site-packages/aiogram/fsm/middleware.py deleted file mode 100644 index de93457..0000000 --- a/env/Lib/site-packages/aiogram/fsm/middleware.py +++ /dev/null @@ -1,113 +0,0 @@ -from typing import Any, Awaitable, Callable, Dict, Optional, cast - -from aiogram import Bot -from aiogram.dispatcher.middlewares.base import BaseMiddleware -from aiogram.dispatcher.middlewares.user_context import EVENT_CONTEXT_KEY, EventContext -from aiogram.fsm.context import FSMContext -from aiogram.fsm.storage.base import ( - DEFAULT_DESTINY, - BaseEventIsolation, - BaseStorage, - StorageKey, -) -from aiogram.fsm.strategy import FSMStrategy, apply_strategy -from aiogram.types import TelegramObject - - -class FSMContextMiddleware(BaseMiddleware): - def __init__( - self, - storage: BaseStorage, - events_isolation: BaseEventIsolation, - strategy: FSMStrategy = FSMStrategy.USER_IN_CHAT, - ) -> None: - self.storage = storage - self.strategy = strategy - self.events_isolation = events_isolation - - async def __call__( - self, - handler: Callable[[TelegramObject, Dict[str, Any]], Awaitable[Any]], - event: TelegramObject, - data: Dict[str, Any], - ) -> Any: - bot: Bot = cast(Bot, data["bot"]) - context = self.resolve_event_context(bot, data) - data["fsm_storage"] = self.storage - if context: - # Bugfix: https://github.com/aiogram/aiogram/issues/1317 - # State should be loaded after lock is acquired - async with self.events_isolation.lock(key=context.key): - data.update({"state": context, "raw_state": await context.get_state()}) - return await handler(event, data) - return await handler(event, data) - - def resolve_event_context( - self, - bot: Bot, - data: Dict[str, Any], - destiny: str = DEFAULT_DESTINY, - ) -> Optional[FSMContext]: - event_context: EventContext = cast(EventContext, data.get(EVENT_CONTEXT_KEY)) - return self.resolve_context( - bot=bot, - chat_id=event_context.chat_id, - user_id=event_context.user_id, - thread_id=event_context.thread_id, - business_connection_id=event_context.business_connection_id, - destiny=destiny, - ) - - def resolve_context( - self, - bot: Bot, - chat_id: Optional[int], - user_id: Optional[int], - thread_id: Optional[int] = None, - business_connection_id: Optional[str] = None, - destiny: str = DEFAULT_DESTINY, - ) -> Optional[FSMContext]: - if chat_id is None: - chat_id = user_id - - if chat_id is not None and user_id is not None: - chat_id, user_id, thread_id = apply_strategy( - chat_id=chat_id, - user_id=user_id, - thread_id=thread_id, - strategy=self.strategy, - ) - return self.get_context( - bot=bot, - chat_id=chat_id, - user_id=user_id, - thread_id=thread_id, - business_connection_id=business_connection_id, - destiny=destiny, - ) - return None - - def get_context( - self, - bot: Bot, - chat_id: int, - user_id: int, - thread_id: Optional[int] = None, - business_connection_id: Optional[str] = None, - destiny: str = DEFAULT_DESTINY, - ) -> FSMContext: - return FSMContext( - storage=self.storage, - key=StorageKey( - user_id=user_id, - chat_id=chat_id, - bot_id=bot.id, - thread_id=thread_id, - business_connection_id=business_connection_id, - destiny=destiny, - ), - ) - - async def close(self) -> None: - await self.storage.close() - await self.events_isolation.close() diff --git a/env/Lib/site-packages/aiogram/fsm/scene.py b/env/Lib/site-packages/aiogram/fsm/scene.py deleted file mode 100644 index fe4de5c..0000000 --- a/env/Lib/site-packages/aiogram/fsm/scene.py +++ /dev/null @@ -1,912 +0,0 @@ -from __future__ import annotations - -import inspect -from collections import defaultdict -from dataclasses import dataclass, replace -from enum import Enum, auto -from typing import Any, ClassVar, Dict, List, Optional, Tuple, Type, Union - -from typing_extensions import Self - -from aiogram import loggers -from aiogram.dispatcher.dispatcher import Dispatcher -from aiogram.dispatcher.event.bases import NextMiddlewareType -from aiogram.dispatcher.event.handler import CallableObject, CallbackType -from aiogram.dispatcher.flags import extract_flags_from_object -from aiogram.dispatcher.router import Router -from aiogram.exceptions import SceneException -from aiogram.filters import StateFilter -from aiogram.fsm.context import FSMContext -from aiogram.fsm.state import State -from aiogram.fsm.storage.memory import MemoryStorageRecord -from aiogram.types import TelegramObject, Update - - -class HistoryManager: - def __init__(self, state: FSMContext, destiny: str = "scenes_history", size: int = 10): - self._size = size - self._state = state - self._history_state = FSMContext( - storage=state.storage, key=replace(state.key, destiny=destiny) - ) - - async def push(self, state: Optional[str], data: Dict[str, Any]) -> None: - history_data = await self._history_state.get_data() - history = history_data.setdefault("history", []) - history.append({"state": state, "data": data}) - if len(history) > self._size: - history = history[-self._size :] - loggers.scene.debug("Push state=%s data=%s to history", state, data) - - await self._history_state.update_data(history=history) - - async def pop(self) -> Optional[MemoryStorageRecord]: - history_data = await self._history_state.get_data() - history = history_data.setdefault("history", []) - if not history: - return None - record = history.pop() - state = record["state"] - data = record["data"] - if not history: - await self._history_state.set_data({}) - else: - await self._history_state.update_data(history=history) - loggers.scene.debug("Pop state=%s data=%s from history", state, data) - return MemoryStorageRecord(state=state, data=data) - - async def get(self) -> Optional[MemoryStorageRecord]: - history_data = await self._history_state.get_data() - history = history_data.setdefault("history", []) - if not history: - return None - return MemoryStorageRecord(**history[-1]) - - async def all(self) -> List[MemoryStorageRecord]: - history_data = await self._history_state.get_data() - history = history_data.setdefault("history", []) - return [MemoryStorageRecord(**item) for item in history] - - async def clear(self) -> None: - loggers.scene.debug("Clear history") - await self._history_state.set_data({}) - - async def snapshot(self) -> None: - state = await self._state.get_state() - data = await self._state.get_data() - await self.push(state, data) - - async def _set_state(self, state: Optional[str], data: Dict[str, Any]) -> None: - await self._state.set_state(state) - await self._state.set_data(data) - - async def rollback(self) -> Optional[str]: - previous_state = await self.pop() - if not previous_state: - await self._set_state(None, {}) - return None - - loggers.scene.debug( - "Rollback to state=%s data=%s", - previous_state.state, - previous_state.data, - ) - await self._set_state(previous_state.state, previous_state.data) - return previous_state.state - - -class ObserverDecorator: - def __init__( - self, - name: str, - filters: tuple[CallbackType, ...], - action: SceneAction | None = None, - after: Optional[After] = None, - ) -> None: - self.name = name - self.filters = filters - self.action = action - self.after = after - - def _wrap_filter(self, target: Type[Scene] | CallbackType) -> None: - handlers = getattr(target, "__aiogram_handler__", None) - if not handlers: - handlers = [] - setattr(target, "__aiogram_handler__", handlers) - - handlers.append( - HandlerContainer( - name=self.name, - handler=target, - filters=self.filters, - after=self.after, - ) - ) - - def _wrap_action(self, target: CallbackType) -> None: - assert self.action is not None, "Scene action is not specified" - - action = getattr(target, "__aiogram_action__", None) - if action is None: - action = defaultdict(dict) - setattr(target, "__aiogram_action__", action) - action[self.action][self.name] = CallableObject(target) - - def __call__(self, target: CallbackType) -> CallbackType: - if inspect.isfunction(target): - if self.action is None: - self._wrap_filter(target) - else: - self._wrap_action(target) - else: - raise TypeError("Only function or method is allowed") - return target - - def leave(self) -> ActionContainer: - return ActionContainer(self.name, self.filters, SceneAction.leave) - - def enter(self, target: Type[Scene]) -> ActionContainer: - return ActionContainer(self.name, self.filters, SceneAction.enter, target) - - def exit(self) -> ActionContainer: - return ActionContainer(self.name, self.filters, SceneAction.exit) - - def back(self) -> ActionContainer: - return ActionContainer(self.name, self.filters, SceneAction.back) - - -class SceneAction(Enum): - enter = auto() - leave = auto() - exit = auto() - back = auto() - - -class ActionContainer: - def __init__( - self, - name: str, - filters: Tuple[CallbackType, ...], - action: SceneAction, - target: Optional[Union[Type[Scene], str]] = None, - ) -> None: - self.name = name - self.filters = filters - self.action = action - self.target = target - - async def execute(self, wizard: SceneWizard) -> None: - if self.action == SceneAction.enter and self.target is not None: - await wizard.goto(self.target) - elif self.action == SceneAction.leave: - await wizard.leave() - elif self.action == SceneAction.exit: - await wizard.exit() - elif self.action == SceneAction.back: - await wizard.back() - - -class HandlerContainer: - def __init__( - self, - name: str, - handler: CallbackType, - filters: Tuple[CallbackType, ...], - after: Optional[After] = None, - ) -> None: - self.name = name - self.handler = handler - self.filters = filters - self.after = after - - -@dataclass() -class SceneConfig: - state: Optional[str] - """Scene state""" - handlers: List[HandlerContainer] - """Scene handlers""" - actions: Dict[SceneAction, Dict[str, CallableObject]] - """Scene actions""" - reset_data_on_enter: Optional[bool] = None - """Reset scene data on enter""" - reset_history_on_enter: Optional[bool] = None - """Reset scene history on enter""" - callback_query_without_state: Optional[bool] = None - """Allow callback query without state""" - - -async def _empty_handler(*args: Any, **kwargs: Any) -> None: - pass - - -class SceneHandlerWrapper: - def __init__( - self, - scene: Type[Scene], - handler: CallbackType, - after: Optional[After] = None, - ) -> None: - self.scene = scene - self.handler = CallableObject(handler) - self.after = after - - async def __call__( - self, - event: TelegramObject, - **kwargs: Any, - ) -> Any: - state: FSMContext = kwargs["state"] - scenes: ScenesManager = kwargs["scenes"] - event_update: Update = kwargs["event_update"] - scene = self.scene( - wizard=SceneWizard( - scene_config=self.scene.__scene_config__, - manager=scenes, - state=state, - update_type=event_update.event_type, - event=event, - data=kwargs, - ) - ) - - result = await self.handler.call(scene, event, **kwargs) - - if self.after: - action_container = ActionContainer( - "after", - (), - self.after.action, - self.after.scene, - ) - await action_container.execute(scene.wizard) - return result - - def __await__(self) -> Self: - return self - - def __str__(self) -> str: - result = f"SceneHandlerWrapper({self.scene}, {self.handler.callback}" - if self.after: - result += f", after={self.after}" - result += ")" - return result - - -class Scene: - """ - Represents a scene in a conversation flow. - - A scene is a specific state in a conversation where certain actions can take place. - - Each scene has a set of filters that determine when it should be triggered, - and a set of handlers that define the actions to be executed when the scene is active. - - .. note:: - This class is not meant to be used directly. Instead, it should be subclassed - to define custom scenes. - """ - - __scene_config__: ClassVar[SceneConfig] - """Scene configuration.""" - - def __init__( - self, - wizard: SceneWizard, - ) -> None: - self.wizard = wizard - self.wizard.scene = self - - def __init_subclass__(cls, **kwargs: Any) -> None: - state_name = kwargs.pop("state", None) - reset_data_on_enter = kwargs.pop("reset_data_on_enter", None) - reset_history_on_enter = kwargs.pop("reset_history_on_enter", None) - callback_query_without_state = kwargs.pop("callback_query_without_state", None) - - super().__init_subclass__(**kwargs) - - handlers: list[HandlerContainer] = [] - actions: defaultdict[SceneAction, Dict[str, CallableObject]] = defaultdict(dict) - - for base in cls.__bases__: - if not issubclass(base, Scene): - continue - - parent_scene_config = getattr(base, "__scene_config__", None) - if not parent_scene_config: - continue - - handlers.extend(parent_scene_config.handlers) - for action, action_handlers in parent_scene_config.actions.items(): - actions[action].update(action_handlers) - - if reset_data_on_enter is None: - reset_data_on_enter = parent_scene_config.reset_data_on_enter - if reset_history_on_enter is None: - reset_history_on_enter = parent_scene_config.reset_history_on_enter - if callback_query_without_state is None: - callback_query_without_state = parent_scene_config.callback_query_without_state - - for name in vars(cls): - value = getattr(cls, name) - - if scene_handlers := getattr(value, "__aiogram_handler__", None): - handlers.extend(scene_handlers) - if isinstance(value, ObserverDecorator): - handlers.append( - HandlerContainer( - value.name, - _empty_handler, - value.filters, - after=value.after, - ) - ) - if hasattr(value, "__aiogram_action__"): - for action, action_handlers in value.__aiogram_action__.items(): - actions[action].update(action_handlers) - - cls.__scene_config__ = SceneConfig( - state=state_name, - handlers=handlers, - actions=dict(actions), - reset_data_on_enter=reset_data_on_enter, - reset_history_on_enter=reset_history_on_enter, - callback_query_without_state=callback_query_without_state, - ) - - @classmethod - def add_to_router(cls, router: Router) -> None: - """ - Adds the scene to the given router. - - :param router: - :return: - """ - scene_config = cls.__scene_config__ - used_observers = set() - - for handler in scene_config.handlers: - router.observers[handler.name].register( - SceneHandlerWrapper( - cls, - handler.handler, - after=handler.after, - ), - *handler.filters, - flags=extract_flags_from_object(handler.handler), - ) - used_observers.add(handler.name) - - for observer_name in used_observers: - if scene_config.callback_query_without_state and observer_name == "callback_query": - continue - router.observers[observer_name].filter(StateFilter(scene_config.state)) - - @classmethod - def as_router(cls, name: Optional[str] = None) -> Router: - """ - Returns the scene as a router. - - :return: new router - """ - if name is None: - name = ( - f"Scene '{cls.__module__}.{cls.__qualname__}' " - f"for state {cls.__scene_config__.state!r}" - ) - router = Router(name=name) - cls.add_to_router(router) - return router - - @classmethod - def as_handler(cls, **kwargs: Any) -> CallbackType: - """ - Create an entry point handler for the scene, can be used to simplify the handler - that starts the scene. - - >>> router.message.register(MyScene.as_handler(), Command("start")) - """ - - async def enter_to_scene_handler(event: TelegramObject, scenes: ScenesManager) -> None: - await scenes.enter(cls, **kwargs) - - return enter_to_scene_handler - - -class SceneWizard: - """ - A class that represents a wizard for managing scenes in a Telegram bot. - - Instance of this class is passed to each scene as a parameter. - So, you can use it to transition between scenes, get and set data, etc. - - .. note:: - - This class is not meant to be used directly. Instead, it should be used - as a parameter in the scene constructor. - - """ - - def __init__( - self, - scene_config: SceneConfig, - manager: ScenesManager, - state: FSMContext, - update_type: str, - event: TelegramObject, - data: Dict[str, Any], - ): - """ - A class that represents a wizard for managing scenes in a Telegram bot. - - :param scene_config: The configuration of the scene. - :param manager: The scene manager. - :param state: The FSMContext object for storing the state of the scene. - :param update_type: The type of the update event. - :param event: The TelegramObject represents the event. - :param data: Additional data for the scene. - """ - self.scene_config = scene_config - self.manager = manager - self.state = state - self.update_type = update_type - self.event = event - self.data = data - - self.scene: Optional[Scene] = None - - async def enter(self, **kwargs: Any) -> None: - """ - Enter method is used to transition into a scene in the SceneWizard class. - It sets the state, clears data and history if specified, - and triggers entering event of the scene. - - :param kwargs: Additional keyword arguments. - :return: None - """ - loggers.scene.debug("Entering scene %r", self.scene_config.state) - if self.scene_config.reset_data_on_enter: - await self.state.set_data({}) - if self.scene_config.reset_history_on_enter: - await self.manager.history.clear() - await self.state.set_state(self.scene_config.state) - await self._on_action(SceneAction.enter, **kwargs) - - async def leave(self, _with_history: bool = True, **kwargs: Any) -> None: - """ - Leaves the current scene. - This method is used to exit a scene and transition to the next scene. - - :param _with_history: Whether to include history in the snapshot. Defaults to True. - :param kwargs: Additional keyword arguments. - :return: None - - """ - loggers.scene.debug("Leaving scene %r", self.scene_config.state) - if _with_history: - await self.manager.history.snapshot() - await self._on_action(SceneAction.leave, **kwargs) - - async def exit(self, **kwargs: Any) -> None: - """ - Exit the current scene and enter the default scene/state. - - :param kwargs: Additional keyword arguments. - :return: None - """ - loggers.scene.debug("Exiting scene %r", self.scene_config.state) - await self.manager.history.clear() - await self._on_action(SceneAction.exit, **kwargs) - await self.manager.enter(None, _check_active=False, **kwargs) - - async def back(self, **kwargs: Any) -> None: - """ - This method is used to go back to the previous scene. - - :param kwargs: Keyword arguments that can be passed to the method. - :return: None - """ - loggers.scene.debug("Back to previous scene from scene %s", self.scene_config.state) - await self.leave(_with_history=False, **kwargs) - new_scene = await self.manager.history.rollback() - await self.manager.enter(new_scene, _check_active=False, **kwargs) - - async def retake(self, **kwargs: Any) -> None: - """ - This method allows to re-enter the current scene. - - :param kwargs: Additional keyword arguments to pass to the scene. - :return: None - """ - assert self.scene_config.state is not None, "Scene state is not specified" - await self.goto(self.scene_config.state, **kwargs) - - async def goto(self, scene: Union[Type[Scene], str], **kwargs: Any) -> None: - """ - The `goto` method transitions to a new scene. - It first calls the `leave` method to perform any necessary cleanup - in the current scene, then calls the `enter` event to enter the specified scene. - - :param scene: The scene to transition to. Can be either a `Scene` instance - or a string representing the scene. - :param kwargs: Additional keyword arguments to pass to the `enter` - method of the scene manager. - :return: None - """ - await self.leave(**kwargs) - await self.manager.enter(scene, _check_active=False, **kwargs) - - async def _on_action(self, action: SceneAction, **kwargs: Any) -> bool: - if not self.scene: - raise SceneException("Scene is not initialized") - - loggers.scene.debug("Call action %r in scene %r", action.name, self.scene_config.state) - action_config = self.scene_config.actions.get(action, {}) - if not action_config: - loggers.scene.debug( - "Action %r not found in scene %r", action.name, self.scene_config.state - ) - return False - - event_type = self.update_type - if event_type not in action_config: - loggers.scene.debug( - "Action %r for event %r not found in scene %r", - action.name, - event_type, - self.scene_config.state, - ) - return False - - await action_config[event_type].call(self.scene, self.event, **{**self.data, **kwargs}) - return True - - async def set_data(self, data: Dict[str, Any]) -> None: - """ - Sets custom data in the current state. - - :param data: A dictionary containing the custom data to be set in the current state. - :return: None - """ - await self.state.set_data(data=data) - - async def get_data(self) -> Dict[str, Any]: - """ - This method returns the data stored in the current state. - - :return: A dictionary containing the data stored in the scene state. - """ - return await self.state.get_data() - - async def update_data( - self, data: Optional[Dict[str, Any]] = None, **kwargs: Any - ) -> Dict[str, Any]: - """ - This method updates the data stored in the current state - - :param data: Optional dictionary of data to update. - :param kwargs: Additional key-value pairs of data to update. - :return: Dictionary of updated data - """ - if data: - kwargs.update(data) - return await self.state.update_data(data=kwargs) - - async def clear_data(self) -> None: - """ - Clears the data. - - :return: None - """ - await self.set_data({}) - - -class ScenesManager: - """ - The ScenesManager class is responsible for managing scenes in an application. - It provides methods for entering and exiting scenes, as well as retrieving the active scene. - """ - - def __init__( - self, - registry: SceneRegistry, - update_type: str, - event: TelegramObject, - state: FSMContext, - data: Dict[str, Any], - ) -> None: - self.registry = registry - self.update_type = update_type - self.event = event - self.state = state - self.data = data - - self.history = HistoryManager(self.state) - - async def _get_scene(self, scene_type: Optional[Union[Type[Scene], str]]) -> Scene: - scene_type = self.registry.get(scene_type) - return scene_type( - wizard=SceneWizard( - scene_config=scene_type.__scene_config__, - manager=self, - state=self.state, - update_type=self.update_type, - event=self.event, - data=self.data, - ), - ) - - async def _get_active_scene(self) -> Optional[Scene]: - state = await self.state.get_state() - try: - return await self._get_scene(state) - except SceneException: - return None - - async def enter( - self, - scene_type: Optional[Union[Type[Scene], str]], - _check_active: bool = True, - **kwargs: Any, - ) -> None: - """ - Enters the specified scene. - - :param scene_type: Optional Type[Scene] or str representing the scene type to enter. - :param _check_active: Optional bool indicating whether to check if - there is an active scene to exit before entering the new scene. Defaults to True. - :param kwargs: Additional keyword arguments to pass to the scene's wizard.enter() method. - :return: None - """ - if _check_active: - active_scene = await self._get_active_scene() - if active_scene is not None: - await active_scene.wizard.exit(**kwargs) - - try: - scene = await self._get_scene(scene_type) - except SceneException: - if scene_type is not None: - raise - await self.state.set_state(None) - else: - await scene.wizard.enter(**kwargs) - - async def close(self, **kwargs: Any) -> None: - """ - Close method is used to exit the currently active scene in the ScenesManager. - - :param kwargs: Additional keyword arguments passed to the scene's exit method. - :return: None - """ - scene = await self._get_active_scene() - if not scene: - return - await scene.wizard.exit(**kwargs) - - -class SceneRegistry: - """ - A class that represents a registry for scenes in a Telegram bot. - """ - - def __init__(self, router: Router, register_on_add: bool = True) -> None: - """ - Initialize a new instance of the SceneRegistry class. - - :param router: The router instance used for scene registration. - :param register_on_add: Whether to register the scenes to the router when they are added. - """ - self.router = router - self.register_on_add = register_on_add - - self._scenes: Dict[Optional[str], Type[Scene]] = {} - self._setup_middleware(router) - - def _setup_middleware(self, router: Router) -> None: - if isinstance(router, Dispatcher): - # Small optimization for Dispatcher - # - we don't need to set up middleware for all observers - router.update.outer_middleware(self._update_middleware) - return - - for observer in router.observers.values(): - if observer.event_name in {"update", "error"}: - continue - observer.outer_middleware(self._middleware) - - async def _update_middleware( - self, - handler: NextMiddlewareType[TelegramObject], - event: TelegramObject, - data: Dict[str, Any], - ) -> Any: - assert isinstance(event, Update), "Event must be an Update instance" - - data["scenes"] = ScenesManager( - registry=self, - update_type=event.event_type, - event=event.event, - state=data["state"], - data=data, - ) - return await handler(event, data) - - async def _middleware( - self, - handler: NextMiddlewareType[TelegramObject], - event: TelegramObject, - data: Dict[str, Any], - ) -> Any: - update: Update = data["event_update"] - data["scenes"] = ScenesManager( - registry=self, - update_type=update.event_type, - event=event, - state=data["state"], - data=data, - ) - return await handler(event, data) - - def add(self, *scenes: Type[Scene], router: Optional[Router] = None) -> None: - """ - This method adds the specified scenes to the registry - and optionally registers it to the router. - - If a scene with the same state already exists in the registry, a SceneException is raised. - - .. warning:: - - If the router is not specified, the scenes will not be registered to the router. - You will need to include the scenes manually to the router or use the register method. - - :param scenes: A variable length parameter that accepts one or more types of scenes. - These scenes are instances of the Scene class. - :param router: An optional parameter that specifies the router - to which the scenes should be added. - :return: None - """ - if not scenes: - raise ValueError("At least one scene must be specified") - - for scene in scenes: - if scene.__scene_config__.state in self._scenes: - raise SceneException( - f"Scene with state {scene.__scene_config__.state!r} already exists" - ) - - self._scenes[scene.__scene_config__.state] = scene - - if router: - router.include_router(scene.as_router()) - elif self.register_on_add: - self.router.include_router(scene.as_router()) - - def register(self, *scenes: Type[Scene]) -> None: - """ - Registers one or more scenes to the SceneRegistry. - - :param scenes: One or more scene classes to register. - :return: None - """ - self.add(*scenes, router=self.router) - - def get(self, scene: Optional[Union[Type[Scene], str]]) -> Type[Scene]: - """ - This method returns the registered Scene object for the specified scene. - The scene parameter can be either a Scene object or a string representing - the name of the scene. If a Scene object is provided, the state attribute - of the SceneConfig object associated with the Scene object will be used as the scene name. - If None or an invalid type is provided, a SceneException will be raised. - - If the specified scene is not registered in the SceneRegistry object, - a SceneException will be raised. - - :param scene: A Scene object or a string representing the name of the scene. - :return: The registered Scene object corresponding to the given scene parameter. - - """ - if inspect.isclass(scene) and issubclass(scene, Scene): - scene = scene.__scene_config__.state - if isinstance(scene, State): - scene = scene.state - if scene is not None and not isinstance(scene, str): - raise SceneException("Scene must be a subclass of Scene or a string") - - try: - return self._scenes[scene] - except KeyError: - raise SceneException(f"Scene {scene!r} is not registered") - - -@dataclass -class After: - action: SceneAction - scene: Optional[Union[Type[Scene], str]] = None - - @classmethod - def exit(cls) -> After: - return cls(action=SceneAction.exit) - - @classmethod - def back(cls) -> After: - return cls(action=SceneAction.back) - - @classmethod - def goto(cls, scene: Optional[Union[Type[Scene], str]]) -> After: - return cls(action=SceneAction.enter, scene=scene) - - -class ObserverMarker: - def __init__(self, name: str) -> None: - self.name = name - - def __call__( - self, - *filters: CallbackType, - after: Optional[After] = None, - ) -> ObserverDecorator: - return ObserverDecorator( - self.name, - filters, - after=after, - ) - - def enter(self, *filters: CallbackType) -> ObserverDecorator: - return ObserverDecorator(self.name, filters, action=SceneAction.enter) - - def leave(self) -> ObserverDecorator: - return ObserverDecorator(self.name, (), action=SceneAction.leave) - - def exit(self) -> ObserverDecorator: - return ObserverDecorator(self.name, (), action=SceneAction.exit) - - def back(self) -> ObserverDecorator: - return ObserverDecorator(self.name, (), action=SceneAction.back) - - -class OnMarker: - """ - The `OnMarker` class is used as a marker class to define different - types of events in the Scenes. - - Attributes: - - - :code:`message`: Event marker for handling `Message` events. - - :code:`edited_message`: Event marker for handling edited `Message` events. - - :code:`channel_post`: Event marker for handling channel `Post` events. - - :code:`edited_channel_post`: Event marker for handling edited channel `Post` events. - - :code:`inline_query`: Event marker for handling `InlineQuery` events. - - :code:`chosen_inline_result`: Event marker for handling chosen `InlineResult` events. - - :code:`callback_query`: Event marker for handling `CallbackQuery` events. - - :code:`shipping_query`: Event marker for handling `ShippingQuery` events. - - :code:`pre_checkout_query`: Event marker for handling `PreCheckoutQuery` events. - - :code:`poll`: Event marker for handling `Poll` events. - - :code:`poll_answer`: Event marker for handling `PollAnswer` events. - - :code:`my_chat_member`: Event marker for handling my chat `Member` events. - - :code:`chat_member`: Event marker for handling chat `Member` events. - - :code:`chat_join_request`: Event marker for handling chat `JoinRequest` events. - - :code:`error`: Event marker for handling `Error` events. - - .. note:: - - This is a marker class and does not contain any methods or implementation logic. - """ - - message = ObserverMarker("message") - edited_message = ObserverMarker("edited_message") - channel_post = ObserverMarker("channel_post") - edited_channel_post = ObserverMarker("edited_channel_post") - inline_query = ObserverMarker("inline_query") - chosen_inline_result = ObserverMarker("chosen_inline_result") - callback_query = ObserverMarker("callback_query") - shipping_query = ObserverMarker("shipping_query") - pre_checkout_query = ObserverMarker("pre_checkout_query") - poll = ObserverMarker("poll") - poll_answer = ObserverMarker("poll_answer") - my_chat_member = ObserverMarker("my_chat_member") - chat_member = ObserverMarker("chat_member") - chat_join_request = ObserverMarker("chat_join_request") - - -on = OnMarker() diff --git a/env/Lib/site-packages/aiogram/fsm/state.py b/env/Lib/site-packages/aiogram/fsm/state.py deleted file mode 100644 index 6b8c737..0000000 --- a/env/Lib/site-packages/aiogram/fsm/state.py +++ /dev/null @@ -1,172 +0,0 @@ -import inspect -from typing import Any, Iterator, Optional, Tuple, Type, no_type_check - -from aiogram.types import TelegramObject - - -class State: - """ - State object - """ - - def __init__(self, state: Optional[str] = None, group_name: Optional[str] = None) -> None: - self._state = state - self._group_name = group_name - self._group: Optional[Type[StatesGroup]] = None - - @property - def group(self) -> "Type[StatesGroup]": - if not self._group: - raise RuntimeError("This state is not in any group.") - return self._group - - @property - def state(self) -> Optional[str]: - if self._state is None or self._state == "*": - return self._state - - if self._group_name is None and self._group: - group = self._group.__full_group_name__ - elif self._group_name: - group = self._group_name - else: - group = "@" - - return f"{group}:{self._state}" - - def set_parent(self, group: "Type[StatesGroup]") -> None: - if not issubclass(group, StatesGroup): - raise ValueError("Group must be subclass of StatesGroup") - self._group = group - - def __set_name__(self, owner: "Type[StatesGroup]", name: str) -> None: - if self._state is None: - self._state = name - self.set_parent(owner) - - def __str__(self) -> str: - return f"" - - __repr__ = __str__ - - def __call__(self, event: TelegramObject, raw_state: Optional[str] = None) -> bool: - if self.state == "*": - return True - return raw_state == self.state - - def __eq__(self, other: Any) -> bool: - if isinstance(other, self.__class__): - return self.state == other.state - if isinstance(other, str): - return self.state == other - return NotImplemented - - def __hash__(self) -> int: - return hash(self.state) - - -class StatesGroupMeta(type): - __parent__: "Optional[Type[StatesGroup]]" - __childs__: "Tuple[Type[StatesGroup], ...]" - __states__: Tuple[State, ...] - __state_names__: Tuple[str, ...] - __all_childs__: Tuple[Type["StatesGroup"], ...] - __all_states__: Tuple[State, ...] - __all_states_names__: Tuple[str, ...] - - @no_type_check - def __new__(mcs, name, bases, namespace, **kwargs): - cls = super().__new__(mcs, name, bases, namespace) - - states = [] - childs = [] - - for name, arg in namespace.items(): - if isinstance(arg, State): - states.append(arg) - elif inspect.isclass(arg) and issubclass(arg, StatesGroup): - child = cls._prepare_child(arg) - childs.append(child) - - cls.__parent__ = None - cls.__childs__ = tuple(childs) - cls.__states__ = tuple(states) - cls.__state_names__ = tuple(state.state for state in states) - - cls.__all_childs__ = cls._get_all_childs() - cls.__all_states__ = cls._get_all_states() - - # In order to ensure performance, we calculate this parameter - # in advance already during the production of the class. - # Depending on the relationship, it should be recalculated - cls.__all_states_names__ = cls._get_all_states_names() - - return cls - - @property - def __full_group_name__(cls) -> str: - if cls.__parent__: - return ".".join((cls.__parent__.__full_group_name__, cls.__name__)) - return cls.__name__ - - def _prepare_child(cls, child: Type["StatesGroup"]) -> Type["StatesGroup"]: - """Prepare child. - - While adding `cls` for its children, we also need to recalculate - the parameter `__all_states_names__` for each child - `StatesGroup`. Since the child class appears before the - parent, at the time of adding the parent, the child's - `__all_states_names__` is already recorded without taking into - account the name of current parent. - """ - child.__parent__ = cls # type: ignore[assignment] - child.__all_states_names__ = child._get_all_states_names() - return child - - def _get_all_childs(cls) -> Tuple[Type["StatesGroup"], ...]: - result = cls.__childs__ - for child in cls.__childs__: - result += child.__childs__ - return result - - def _get_all_states(cls) -> Tuple[State, ...]: - result = cls.__states__ - for group in cls.__childs__: - result += group.__all_states__ - return result - - def _get_all_states_names(cls) -> Tuple[str, ...]: - return tuple(state.state for state in cls.__all_states__ if state.state) - - def __contains__(cls, item: Any) -> bool: - if isinstance(item, str): - return item in cls.__all_states_names__ - if isinstance(item, State): - return item in cls.__all_states__ - if isinstance(item, StatesGroupMeta): - return item in cls.__all_childs__ - return False - - def __str__(self) -> str: - return f"" - - def __iter__(self) -> Iterator[State]: - return iter(self.__all_states__) - - -class StatesGroup(metaclass=StatesGroupMeta): - @classmethod - def get_root(cls) -> Type["StatesGroup"]: - if cls.__parent__ is None: - return cls - return cls.__parent__.get_root() - - def __call__(self, event: TelegramObject, raw_state: Optional[str] = None) -> bool: - return raw_state in type(self).__all_states_names__ - - def __str__(self) -> str: - return f"StatesGroup {type(self).__full_group_name__}" - - -default_state = State() -any_state = State(state="*") diff --git a/env/Lib/site-packages/aiogram/fsm/storage/__init__.py b/env/Lib/site-packages/aiogram/fsm/storage/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/env/Lib/site-packages/aiogram/fsm/storage/__pycache__/__init__.cpython-311.pyc b/env/Lib/site-packages/aiogram/fsm/storage/__pycache__/__init__.cpython-311.pyc deleted file mode 100644 index accd518..0000000 Binary files a/env/Lib/site-packages/aiogram/fsm/storage/__pycache__/__init__.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/fsm/storage/__pycache__/base.cpython-311.pyc b/env/Lib/site-packages/aiogram/fsm/storage/__pycache__/base.cpython-311.pyc deleted file mode 100644 index 0f9c3aa..0000000 Binary files a/env/Lib/site-packages/aiogram/fsm/storage/__pycache__/base.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/fsm/storage/__pycache__/memory.cpython-311.pyc b/env/Lib/site-packages/aiogram/fsm/storage/__pycache__/memory.cpython-311.pyc deleted file mode 100644 index c23eb64..0000000 Binary files a/env/Lib/site-packages/aiogram/fsm/storage/__pycache__/memory.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/fsm/storage/__pycache__/mongo.cpython-311.pyc b/env/Lib/site-packages/aiogram/fsm/storage/__pycache__/mongo.cpython-311.pyc deleted file mode 100644 index 8d41982..0000000 Binary files a/env/Lib/site-packages/aiogram/fsm/storage/__pycache__/mongo.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/fsm/storage/__pycache__/redis.cpython-311.pyc b/env/Lib/site-packages/aiogram/fsm/storage/__pycache__/redis.cpython-311.pyc deleted file mode 100644 index 0b86cfe..0000000 Binary files a/env/Lib/site-packages/aiogram/fsm/storage/__pycache__/redis.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/fsm/storage/base.py b/env/Lib/site-packages/aiogram/fsm/storage/base.py deleted file mode 100644 index 8e1b206..0000000 --- a/env/Lib/site-packages/aiogram/fsm/storage/base.py +++ /dev/null @@ -1,183 +0,0 @@ -from abc import ABC, abstractmethod -from contextlib import asynccontextmanager -from dataclasses import dataclass -from typing import Any, AsyncGenerator, Dict, Literal, Optional, Union - -from aiogram.fsm.state import State - -StateType = Optional[Union[str, State]] - -DEFAULT_DESTINY = "default" - - -@dataclass(frozen=True) -class StorageKey: - bot_id: int - chat_id: int - user_id: int - thread_id: Optional[int] = None - business_connection_id: Optional[str] = None - destiny: str = DEFAULT_DESTINY - - -class KeyBuilder(ABC): - """Base class for key builder.""" - - @abstractmethod - def build( - self, - key: StorageKey, - part: Optional[Literal["data", "state", "lock"]] = None, - ) -> str: - """ - Build key to be used in storage's db queries - - :param key: contextual key - :param part: part of the record - :return: key to be used in storage's db queries - """ - pass - - -class DefaultKeyBuilder(KeyBuilder): - """ - Simple key builder with default prefix. - - Generates a colon-joined string with prefix, chat_id, user_id, - optional bot_id, business_connection_id, destiny and field. - - Format: - :code:`::::::` - """ - - def __init__( - self, - *, - prefix: str = "fsm", - separator: str = ":", - with_bot_id: bool = False, - with_business_connection_id: bool = False, - with_destiny: bool = False, - ) -> None: - """ - :param prefix: prefix for all records - :param separator: separator - :param with_bot_id: include Bot id in the key - :param with_business_connection_id: include business connection id - :param with_destiny: include destiny key - """ - self.prefix = prefix - self.separator = separator - self.with_bot_id = with_bot_id - self.with_business_connection_id = with_business_connection_id - self.with_destiny = with_destiny - - def build( - self, - key: StorageKey, - part: Optional[Literal["data", "state", "lock"]] = None, - ) -> str: - parts = [self.prefix] - if self.with_bot_id: - parts.append(str(key.bot_id)) - if self.with_business_connection_id and key.business_connection_id: - parts.append(str(key.business_connection_id)) - parts.append(str(key.chat_id)) - if key.thread_id: - parts.append(str(key.thread_id)) - parts.append(str(key.user_id)) - if self.with_destiny: - parts.append(key.destiny) - elif key.destiny != DEFAULT_DESTINY: - error_message = ( - "Default key builder is not configured to use key destiny other than the default." - "\n\nProbably, you should set `with_destiny=True` in for DefaultKeyBuilder." - ) - raise ValueError(error_message) - if part: - parts.append(part) - return self.separator.join(parts) - - -class BaseStorage(ABC): - """ - Base class for all FSM storages - """ - - @abstractmethod - async def set_state(self, key: StorageKey, state: StateType = None) -> None: - """ - Set state for specified key - - :param key: storage key - :param state: new state - """ - pass - - @abstractmethod - async def get_state(self, key: StorageKey) -> Optional[str]: - """ - Get key state - - :param key: storage key - :return: current state - """ - pass - - @abstractmethod - async def set_data(self, key: StorageKey, data: Dict[str, Any]) -> None: - """ - Write data (replace) - - :param key: storage key - :param data: new data - """ - pass - - @abstractmethod - async def get_data(self, key: StorageKey) -> Dict[str, Any]: - """ - Get current data for key - - :param key: storage key - :return: current data - """ - pass - - async def update_data(self, key: StorageKey, data: Dict[str, Any]) -> Dict[str, Any]: - """ - Update date in the storage for key (like dict.update) - - :param key: storage key - :param data: partial data - :return: new data - """ - current_data = await self.get_data(key=key) - current_data.update(data) - await self.set_data(key=key, data=current_data) - return current_data.copy() - - @abstractmethod - async def close(self) -> None: # pragma: no cover - """ - Close storage (database connection, file or etc.) - """ - pass - - -class BaseEventIsolation(ABC): - @abstractmethod - @asynccontextmanager - async def lock(self, key: StorageKey) -> AsyncGenerator[None, None]: - """ - Isolate events with lock. - Will be used as context manager - - :param key: storage key - :return: An async generator - """ - yield None - - @abstractmethod - async def close(self) -> None: - pass diff --git a/env/Lib/site-packages/aiogram/fsm/storage/memory.py b/env/Lib/site-packages/aiogram/fsm/storage/memory.py deleted file mode 100644 index d80a9ff..0000000 --- a/env/Lib/site-packages/aiogram/fsm/storage/memory.py +++ /dev/null @@ -1,74 +0,0 @@ -from asyncio import Lock -from collections import defaultdict -from contextlib import asynccontextmanager -from dataclasses import dataclass, field -from typing import Any, AsyncGenerator, DefaultDict, Dict, Hashable, Optional - -from aiogram.fsm.state import State -from aiogram.fsm.storage.base import ( - BaseEventIsolation, - BaseStorage, - StateType, - StorageKey, -) - - -@dataclass -class MemoryStorageRecord: - data: Dict[str, Any] = field(default_factory=dict) - state: Optional[str] = None - - -class MemoryStorage(BaseStorage): - """ - Default FSM storage, stores all data in :class:`dict` and loss everything on shutdown - - .. warning:: - - Is not recommended using in production in due to you will lose all data - when your bot restarts - """ - - def __init__(self) -> None: - self.storage: DefaultDict[StorageKey, MemoryStorageRecord] = defaultdict( - MemoryStorageRecord - ) - - async def close(self) -> None: - pass - - async def set_state(self, key: StorageKey, state: StateType = None) -> None: - self.storage[key].state = state.state if isinstance(state, State) else state - - async def get_state(self, key: StorageKey) -> Optional[str]: - return self.storage[key].state - - async def set_data(self, key: StorageKey, data: Dict[str, Any]) -> None: - self.storage[key].data = data.copy() - - async def get_data(self, key: StorageKey) -> Dict[str, Any]: - return self.storage[key].data.copy() - - -class DisabledEventIsolation(BaseEventIsolation): - @asynccontextmanager - async def lock(self, key: StorageKey) -> AsyncGenerator[None, None]: - yield - - async def close(self) -> None: - pass - - -class SimpleEventIsolation(BaseEventIsolation): - def __init__(self) -> None: - # TODO: Unused locks cleaner is needed - self._locks: DefaultDict[Hashable, Lock] = defaultdict(Lock) - - @asynccontextmanager - async def lock(self, key: StorageKey) -> AsyncGenerator[None, None]: - lock = self._locks[key] - async with lock: - yield - - async def close(self) -> None: - self._locks.clear() diff --git a/env/Lib/site-packages/aiogram/fsm/storage/mongo.py b/env/Lib/site-packages/aiogram/fsm/storage/mongo.py deleted file mode 100644 index b4b1eea..0000000 --- a/env/Lib/site-packages/aiogram/fsm/storage/mongo.py +++ /dev/null @@ -1,130 +0,0 @@ -from typing import Any, Dict, Optional, cast - -from motor.motor_asyncio import AsyncIOMotorClient - -from aiogram.fsm.state import State -from aiogram.fsm.storage.base import ( - BaseStorage, - DefaultKeyBuilder, - KeyBuilder, - StateType, - StorageKey, -) - - -class MongoStorage(BaseStorage): - """ - MongoDB storage required :code:`motor` package installed (:code:`pip install motor`) - """ - - def __init__( - self, - client: AsyncIOMotorClient, - key_builder: Optional[KeyBuilder] = None, - db_name: str = "aiogram_fsm", - collection_name: str = "states_and_data", - ) -> None: - """ - :param client: Instance of AsyncIOMotorClient - :param key_builder: builder that helps to convert contextual key to string - :param db_name: name of the MongoDB database for FSM - :param collection_name: name of the collection for storing FSM states and data - """ - if key_builder is None: - key_builder = DefaultKeyBuilder() - self._client = client - self._database = self._client[db_name] - self._collection = self._database[collection_name] - self._key_builder = key_builder - - @classmethod - def from_url( - cls, url: str, connection_kwargs: Optional[Dict[str, Any]] = None, **kwargs: Any - ) -> "MongoStorage": - """ - Create an instance of :class:`MongoStorage` with specifying the connection string - - :param url: for example :code:`mongodb://user:password@host:port` - :param connection_kwargs: see :code:`motor` docs - :param kwargs: arguments to be passed to :class:`MongoStorage` - :return: an instance of :class:`MongoStorage` - """ - if connection_kwargs is None: - connection_kwargs = {} - client = AsyncIOMotorClient(url, **connection_kwargs) - return cls(client=client, **kwargs) - - async def close(self) -> None: - """Cleanup client resources and disconnect from MongoDB.""" - self._client.close() - - def resolve_state(self, value: StateType) -> Optional[str]: - if value is None: - return None - if isinstance(value, State): - return value.state - return str(value) - - async def set_state(self, key: StorageKey, state: StateType = None) -> None: - document_id = self._key_builder.build(key) - if state is None: - updated = await self._collection.find_one_and_update( - filter={"_id": document_id}, - update={"$unset": {"state": 1}}, - projection={"_id": 0}, - return_document=True, - ) - if updated == {}: - await self._collection.delete_one({"_id": document_id}) - else: - await self._collection.update_one( - filter={"_id": document_id}, - update={"$set": {"state": self.resolve_state(state)}}, - upsert=True, - ) - - async def get_state(self, key: StorageKey) -> Optional[str]: - document_id = self._key_builder.build(key) - document = await self._collection.find_one({"_id": document_id}) - if document is None: - return None - return document.get("state") - - async def set_data(self, key: StorageKey, data: Dict[str, Any]) -> None: - document_id = self._key_builder.build(key) - if not data: - updated = await self._collection.find_one_and_update( - filter={"_id": document_id}, - update={"$unset": {"data": 1}}, - projection={"_id": 0}, - return_document=True, - ) - if updated == {}: - await self._collection.delete_one({"_id": document_id}) - else: - await self._collection.update_one( - filter={"_id": document_id}, - update={"$set": {"data": data}}, - upsert=True, - ) - - async def get_data(self, key: StorageKey) -> Dict[str, Any]: - document_id = self._key_builder.build(key) - document = await self._collection.find_one({"_id": document_id}) - if document is None or not document.get("data"): - return {} - return cast(Dict[str, Any], document["data"]) - - async def update_data(self, key: StorageKey, data: Dict[str, Any]) -> Dict[str, Any]: - document_id = self._key_builder.build(key) - update_with = {f"data.{key}": value for key, value in data.items()} - update_result = await self._collection.find_one_and_update( - filter={"_id": document_id}, - update={"$set": update_with}, - upsert=True, - return_document=True, - projection={"_id": 0}, - ) - if not update_result: - await self._collection.delete_one({"_id": document_id}) - return update_result.get("data", {}) diff --git a/env/Lib/site-packages/aiogram/fsm/storage/redis.py b/env/Lib/site-packages/aiogram/fsm/storage/redis.py deleted file mode 100644 index edcf9d6..0000000 --- a/env/Lib/site-packages/aiogram/fsm/storage/redis.py +++ /dev/null @@ -1,169 +0,0 @@ -import json -from contextlib import asynccontextmanager -from typing import Any, AsyncGenerator, Callable, Dict, Optional, cast - -from redis.asyncio.client import Redis -from redis.asyncio.connection import ConnectionPool -from redis.asyncio.lock import Lock -from redis.typing import ExpiryT - -from aiogram.fsm.state import State -from aiogram.fsm.storage.base import ( - BaseEventIsolation, - BaseStorage, - DefaultKeyBuilder, - KeyBuilder, - StateType, - StorageKey, -) - -DEFAULT_REDIS_LOCK_KWARGS = {"timeout": 60} -_JsonLoads = Callable[..., Any] -_JsonDumps = Callable[..., str] - - -class RedisStorage(BaseStorage): - """ - Redis storage required :code:`redis` package installed (:code:`pip install redis`) - """ - - def __init__( - self, - redis: Redis, - key_builder: Optional[KeyBuilder] = None, - state_ttl: Optional[ExpiryT] = None, - data_ttl: Optional[ExpiryT] = None, - json_loads: _JsonLoads = json.loads, - json_dumps: _JsonDumps = json.dumps, - ) -> None: - """ - :param redis: Instance of Redis connection - :param key_builder: builder that helps to convert contextual key to string - :param state_ttl: TTL for state records - :param data_ttl: TTL for data records - """ - if key_builder is None: - key_builder = DefaultKeyBuilder() - self.redis = redis - self.key_builder = key_builder - self.state_ttl = state_ttl - self.data_ttl = data_ttl - self.json_loads = json_loads - self.json_dumps = json_dumps - - @classmethod - def from_url( - cls, url: str, connection_kwargs: Optional[Dict[str, Any]] = None, **kwargs: Any - ) -> "RedisStorage": - """ - Create an instance of :class:`RedisStorage` with specifying the connection string - - :param url: for example :code:`redis://user:password@host:port/db` - :param connection_kwargs: see :code:`redis` docs - :param kwargs: arguments to be passed to :class:`RedisStorage` - :return: an instance of :class:`RedisStorage` - """ - if connection_kwargs is None: - connection_kwargs = {} - pool = ConnectionPool.from_url(url, **connection_kwargs) - redis = Redis(connection_pool=pool) - return cls(redis=redis, **kwargs) - - def create_isolation(self, **kwargs: Any) -> "RedisEventIsolation": - return RedisEventIsolation(redis=self.redis, key_builder=self.key_builder, **kwargs) - - async def close(self) -> None: - await self.redis.aclose(close_connection_pool=True) - - async def set_state( - self, - key: StorageKey, - state: StateType = None, - ) -> None: - redis_key = self.key_builder.build(key, "state") - if state is None: - await self.redis.delete(redis_key) - else: - await self.redis.set( - redis_key, - cast(str, state.state if isinstance(state, State) else state), - ex=self.state_ttl, - ) - - async def get_state( - self, - key: StorageKey, - ) -> Optional[str]: - redis_key = self.key_builder.build(key, "state") - value = await self.redis.get(redis_key) - if isinstance(value, bytes): - return value.decode("utf-8") - return cast(Optional[str], value) - - async def set_data( - self, - key: StorageKey, - data: Dict[str, Any], - ) -> None: - redis_key = self.key_builder.build(key, "data") - if not data: - await self.redis.delete(redis_key) - return - await self.redis.set( - redis_key, - self.json_dumps(data), - ex=self.data_ttl, - ) - - async def get_data( - self, - key: StorageKey, - ) -> Dict[str, Any]: - redis_key = self.key_builder.build(key, "data") - value = await self.redis.get(redis_key) - if value is None: - return {} - if isinstance(value, bytes): - value = value.decode("utf-8") - return cast(Dict[str, Any], self.json_loads(value)) - - -class RedisEventIsolation(BaseEventIsolation): - def __init__( - self, - redis: Redis, - key_builder: Optional[KeyBuilder] = None, - lock_kwargs: Optional[Dict[str, Any]] = None, - ) -> None: - if key_builder is None: - key_builder = DefaultKeyBuilder() - if lock_kwargs is None: - lock_kwargs = DEFAULT_REDIS_LOCK_KWARGS - self.redis = redis - self.key_builder = key_builder - self.lock_kwargs = lock_kwargs - - @classmethod - def from_url( - cls, - url: str, - connection_kwargs: Optional[Dict[str, Any]] = None, - **kwargs: Any, - ) -> "RedisEventIsolation": - if connection_kwargs is None: - connection_kwargs = {} - pool = ConnectionPool.from_url(url, **connection_kwargs) - redis = Redis(connection_pool=pool) - return cls(redis=redis, **kwargs) - - @asynccontextmanager - async def lock( - self, - key: StorageKey, - ) -> AsyncGenerator[None, None]: - redis_key = self.key_builder.build(key, "lock") - async with self.redis.lock(name=redis_key, **self.lock_kwargs, lock_class=Lock): - yield None - - async def close(self) -> None: - pass diff --git a/env/Lib/site-packages/aiogram/fsm/strategy.py b/env/Lib/site-packages/aiogram/fsm/strategy.py deleted file mode 100644 index da2d94e..0000000 --- a/env/Lib/site-packages/aiogram/fsm/strategy.py +++ /dev/null @@ -1,37 +0,0 @@ -from enum import Enum, auto -from typing import Optional, Tuple - - -class FSMStrategy(Enum): - """ - FSM strategy for storage key generation. - """ - - USER_IN_CHAT = auto() - """State will be stored for each user in chat.""" - CHAT = auto() - """State will be stored for each chat globally without separating by users.""" - GLOBAL_USER = auto() - """State will be stored globally for each user globally.""" - USER_IN_TOPIC = auto() - """State will be stored for each user in chat and topic.""" - CHAT_TOPIC = auto() - """State will be stored for each chat and topic, but not separated by users.""" - - -def apply_strategy( - strategy: FSMStrategy, - chat_id: int, - user_id: int, - thread_id: Optional[int] = None, -) -> Tuple[int, int, Optional[int]]: - if strategy == FSMStrategy.CHAT: - return chat_id, chat_id, None - if strategy == FSMStrategy.GLOBAL_USER: - return user_id, user_id, None - if strategy == FSMStrategy.USER_IN_TOPIC: - return chat_id, user_id, thread_id - if strategy == FSMStrategy.CHAT_TOPIC: - return chat_id, chat_id, thread_id - - return chat_id, user_id, None diff --git a/env/Lib/site-packages/aiogram/handlers/__init__.py b/env/Lib/site-packages/aiogram/handlers/__init__.py deleted file mode 100644 index 5483788..0000000 --- a/env/Lib/site-packages/aiogram/handlers/__init__.py +++ /dev/null @@ -1,25 +0,0 @@ -from .base import BaseHandler, BaseHandlerMixin -from .callback_query import CallbackQueryHandler -from .chat_member import ChatMemberHandler -from .chosen_inline_result import ChosenInlineResultHandler -from .error import ErrorHandler -from .inline_query import InlineQueryHandler -from .message import MessageHandler, MessageHandlerCommandMixin -from .poll import PollHandler -from .pre_checkout_query import PreCheckoutQueryHandler -from .shipping_query import ShippingQueryHandler - -__all__ = ( - "BaseHandler", - "BaseHandlerMixin", - "CallbackQueryHandler", - "ChatMemberHandler", - "ChosenInlineResultHandler", - "ErrorHandler", - "InlineQueryHandler", - "MessageHandler", - "MessageHandlerCommandMixin", - "PollHandler", - "PreCheckoutQueryHandler", - "ShippingQueryHandler", -) diff --git a/env/Lib/site-packages/aiogram/handlers/__pycache__/__init__.cpython-311.pyc b/env/Lib/site-packages/aiogram/handlers/__pycache__/__init__.cpython-311.pyc deleted file mode 100644 index 829da16..0000000 Binary files a/env/Lib/site-packages/aiogram/handlers/__pycache__/__init__.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/handlers/__pycache__/base.cpython-311.pyc b/env/Lib/site-packages/aiogram/handlers/__pycache__/base.cpython-311.pyc deleted file mode 100644 index f4e3835..0000000 Binary files a/env/Lib/site-packages/aiogram/handlers/__pycache__/base.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/handlers/__pycache__/callback_query.cpython-311.pyc b/env/Lib/site-packages/aiogram/handlers/__pycache__/callback_query.cpython-311.pyc deleted file mode 100644 index e737c9c..0000000 Binary files a/env/Lib/site-packages/aiogram/handlers/__pycache__/callback_query.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/handlers/__pycache__/chat_member.cpython-311.pyc b/env/Lib/site-packages/aiogram/handlers/__pycache__/chat_member.cpython-311.pyc deleted file mode 100644 index 809e513..0000000 Binary files a/env/Lib/site-packages/aiogram/handlers/__pycache__/chat_member.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/handlers/__pycache__/chosen_inline_result.cpython-311.pyc b/env/Lib/site-packages/aiogram/handlers/__pycache__/chosen_inline_result.cpython-311.pyc deleted file mode 100644 index dc6b51b..0000000 Binary files a/env/Lib/site-packages/aiogram/handlers/__pycache__/chosen_inline_result.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/handlers/__pycache__/error.cpython-311.pyc b/env/Lib/site-packages/aiogram/handlers/__pycache__/error.cpython-311.pyc deleted file mode 100644 index 6cd5dbc..0000000 Binary files a/env/Lib/site-packages/aiogram/handlers/__pycache__/error.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/handlers/__pycache__/inline_query.cpython-311.pyc b/env/Lib/site-packages/aiogram/handlers/__pycache__/inline_query.cpython-311.pyc deleted file mode 100644 index eb7fb19..0000000 Binary files a/env/Lib/site-packages/aiogram/handlers/__pycache__/inline_query.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/handlers/__pycache__/message.cpython-311.pyc b/env/Lib/site-packages/aiogram/handlers/__pycache__/message.cpython-311.pyc deleted file mode 100644 index cea5141..0000000 Binary files a/env/Lib/site-packages/aiogram/handlers/__pycache__/message.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/handlers/__pycache__/poll.cpython-311.pyc b/env/Lib/site-packages/aiogram/handlers/__pycache__/poll.cpython-311.pyc deleted file mode 100644 index dc98312..0000000 Binary files a/env/Lib/site-packages/aiogram/handlers/__pycache__/poll.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/handlers/__pycache__/pre_checkout_query.cpython-311.pyc b/env/Lib/site-packages/aiogram/handlers/__pycache__/pre_checkout_query.cpython-311.pyc deleted file mode 100644 index 8a913f4..0000000 Binary files a/env/Lib/site-packages/aiogram/handlers/__pycache__/pre_checkout_query.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/handlers/__pycache__/shipping_query.cpython-311.pyc b/env/Lib/site-packages/aiogram/handlers/__pycache__/shipping_query.cpython-311.pyc deleted file mode 100644 index 3e03ae1..0000000 Binary files a/env/Lib/site-packages/aiogram/handlers/__pycache__/shipping_query.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/handlers/base.py b/env/Lib/site-packages/aiogram/handlers/base.py deleted file mode 100644 index 0eb1b42..0000000 --- a/env/Lib/site-packages/aiogram/handlers/base.py +++ /dev/null @@ -1,46 +0,0 @@ -from __future__ import annotations - -from abc import ABC, abstractmethod -from typing import TYPE_CHECKING, Any, Dict, Generic, TypeVar, cast - -from aiogram.types import Update - -if TYPE_CHECKING: - from aiogram import Bot - -T = TypeVar("T") - - -class BaseHandlerMixin(Generic[T]): - if TYPE_CHECKING: - event: T - data: Dict[str, Any] - - -class BaseHandler(BaseHandlerMixin[T], ABC): - """ - Base class for all class-based handlers - """ - - def __init__(self, event: T, **kwargs: Any) -> None: - self.event: T = event - self.data: Dict[str, Any] = kwargs - - @property - def bot(self) -> Bot: - from aiogram import Bot - - if "bot" in self.data: - return cast(Bot, self.data["bot"]) - raise RuntimeError("Bot instance not found in the context") - - @property - def update(self) -> Update: - return cast(Update, self.data.get("update", self.data.get("event_update"))) - - @abstractmethod - async def handle(self) -> Any: # pragma: no cover - pass - - def __await__(self) -> Any: - return self.handle().__await__() diff --git a/env/Lib/site-packages/aiogram/handlers/callback_query.py b/env/Lib/site-packages/aiogram/handlers/callback_query.py deleted file mode 100644 index 342b11b..0000000 --- a/env/Lib/site-packages/aiogram/handlers/callback_query.py +++ /dev/null @@ -1,43 +0,0 @@ -from abc import ABC -from typing import Optional - -from aiogram.handlers import BaseHandler -from aiogram.types import CallbackQuery, MaybeInaccessibleMessage, Message, User - - -class CallbackQueryHandler(BaseHandler[CallbackQuery], ABC): - """ - There is base class for callback query handlers. - - Example: - .. code-block:: python - - from aiogram.handlers import CallbackQueryHandler - - ... - - @router.callback_query() - class MyHandler(CallbackQueryHandler): - async def handle(self) -> Any: ... - """ - - @property - def from_user(self) -> User: - """ - Is alias for `event.from_user` - """ - return self.event.from_user - - @property - def message(self) -> Optional[MaybeInaccessibleMessage]: - """ - Is alias for `event.message` - """ - return self.event.message - - @property - def callback_data(self) -> Optional[str]: - """ - Is alias for `event.data` - """ - return self.event.data diff --git a/env/Lib/site-packages/aiogram/handlers/chat_member.py b/env/Lib/site-packages/aiogram/handlers/chat_member.py deleted file mode 100644 index bf668ac..0000000 --- a/env/Lib/site-packages/aiogram/handlers/chat_member.py +++ /dev/null @@ -1,14 +0,0 @@ -from abc import ABC - -from aiogram.handlers import BaseHandler -from aiogram.types import ChatMemberUpdated, User - - -class ChatMemberHandler(BaseHandler[ChatMemberUpdated], ABC): - """ - Base class for chat member updated events - """ - - @property - def from_user(self) -> User: - return self.event.from_user diff --git a/env/Lib/site-packages/aiogram/handlers/chosen_inline_result.py b/env/Lib/site-packages/aiogram/handlers/chosen_inline_result.py deleted file mode 100644 index d6b66c5..0000000 --- a/env/Lib/site-packages/aiogram/handlers/chosen_inline_result.py +++ /dev/null @@ -1,18 +0,0 @@ -from abc import ABC - -from aiogram.handlers import BaseHandler -from aiogram.types import ChosenInlineResult, User - - -class ChosenInlineResultHandler(BaseHandler[ChosenInlineResult], ABC): - """ - Base class for chosen inline result handlers - """ - - @property - def from_user(self) -> User: - return self.event.from_user - - @property - def query(self) -> str: - return self.event.query diff --git a/env/Lib/site-packages/aiogram/handlers/error.py b/env/Lib/site-packages/aiogram/handlers/error.py deleted file mode 100644 index 51ccf07..0000000 --- a/env/Lib/site-packages/aiogram/handlers/error.py +++ /dev/null @@ -1,17 +0,0 @@ -from abc import ABC - -from aiogram.handlers.base import BaseHandler - - -class ErrorHandler(BaseHandler[Exception], ABC): - """ - Base class for errors handlers - """ - - @property - def exception_name(self) -> str: - return self.event.__class__.__name__ - - @property - def exception_message(self) -> str: - return str(self.event) diff --git a/env/Lib/site-packages/aiogram/handlers/inline_query.py b/env/Lib/site-packages/aiogram/handlers/inline_query.py deleted file mode 100644 index 022d8f2..0000000 --- a/env/Lib/site-packages/aiogram/handlers/inline_query.py +++ /dev/null @@ -1,18 +0,0 @@ -from abc import ABC - -from aiogram.handlers import BaseHandler -from aiogram.types import InlineQuery, User - - -class InlineQueryHandler(BaseHandler[InlineQuery], ABC): - """ - Base class for inline query handlers - """ - - @property - def from_user(self) -> User: - return self.event.from_user - - @property - def query(self) -> str: - return self.event.query diff --git a/env/Lib/site-packages/aiogram/handlers/message.py b/env/Lib/site-packages/aiogram/handlers/message.py deleted file mode 100644 index 4fbecec..0000000 --- a/env/Lib/site-packages/aiogram/handlers/message.py +++ /dev/null @@ -1,28 +0,0 @@ -from abc import ABC -from typing import Optional, cast - -from aiogram.filters import CommandObject -from aiogram.handlers.base import BaseHandler, BaseHandlerMixin -from aiogram.types import Chat, Message, User - - -class MessageHandler(BaseHandler[Message], ABC): - """ - Base class for message handlers - """ - - @property - def from_user(self) -> Optional[User]: - return self.event.from_user - - @property - def chat(self) -> Chat: - return self.event.chat - - -class MessageHandlerCommandMixin(BaseHandlerMixin[Message]): - @property - def command(self) -> Optional[CommandObject]: - if "command" in self.data: - return cast(CommandObject, self.data["command"]) - return None diff --git a/env/Lib/site-packages/aiogram/handlers/poll.py b/env/Lib/site-packages/aiogram/handlers/poll.py deleted file mode 100644 index 2183d84..0000000 --- a/env/Lib/site-packages/aiogram/handlers/poll.py +++ /dev/null @@ -1,19 +0,0 @@ -from abc import ABC -from typing import List - -from aiogram.handlers import BaseHandler -from aiogram.types import Poll, PollOption - - -class PollHandler(BaseHandler[Poll], ABC): - """ - Base class for poll handlers - """ - - @property - def question(self) -> str: - return self.event.question - - @property - def options(self) -> List[PollOption]: - return self.event.options diff --git a/env/Lib/site-packages/aiogram/handlers/pre_checkout_query.py b/env/Lib/site-packages/aiogram/handlers/pre_checkout_query.py deleted file mode 100644 index 34290f2..0000000 --- a/env/Lib/site-packages/aiogram/handlers/pre_checkout_query.py +++ /dev/null @@ -1,14 +0,0 @@ -from abc import ABC - -from aiogram.handlers import BaseHandler -from aiogram.types import PreCheckoutQuery, User - - -class PreCheckoutQueryHandler(BaseHandler[PreCheckoutQuery], ABC): - """ - Base class for pre-checkout handlers - """ - - @property - def from_user(self) -> User: - return self.event.from_user diff --git a/env/Lib/site-packages/aiogram/handlers/shipping_query.py b/env/Lib/site-packages/aiogram/handlers/shipping_query.py deleted file mode 100644 index 64a5645..0000000 --- a/env/Lib/site-packages/aiogram/handlers/shipping_query.py +++ /dev/null @@ -1,14 +0,0 @@ -from abc import ABC - -from aiogram.handlers import BaseHandler -from aiogram.types import ShippingQuery, User - - -class ShippingQueryHandler(BaseHandler[ShippingQuery], ABC): - """ - Base class for shipping query handlers - """ - - @property - def from_user(self) -> User: - return self.event.from_user diff --git a/env/Lib/site-packages/aiogram/loggers.py b/env/Lib/site-packages/aiogram/loggers.py deleted file mode 100644 index 942c124..0000000 --- a/env/Lib/site-packages/aiogram/loggers.py +++ /dev/null @@ -1,7 +0,0 @@ -import logging - -dispatcher = logging.getLogger("aiogram.dispatcher") -event = logging.getLogger("aiogram.event") -middlewares = logging.getLogger("aiogram.middlewares") -webhook = logging.getLogger("aiogram.webhook") -scene = logging.getLogger("aiogram.scene") diff --git a/env/Lib/site-packages/aiogram/methods/__init__.py b/env/Lib/site-packages/aiogram/methods/__init__.py deleted file mode 100644 index 66214ac..0000000 --- a/env/Lib/site-packages/aiogram/methods/__init__.py +++ /dev/null @@ -1,259 +0,0 @@ -from .add_sticker_to_set import AddStickerToSet -from .answer_callback_query import AnswerCallbackQuery -from .answer_inline_query import AnswerInlineQuery -from .answer_pre_checkout_query import AnswerPreCheckoutQuery -from .answer_shipping_query import AnswerShippingQuery -from .answer_web_app_query import AnswerWebAppQuery -from .approve_chat_join_request import ApproveChatJoinRequest -from .ban_chat_member import BanChatMember -from .ban_chat_sender_chat import BanChatSenderChat -from .base import Request, Response, TelegramMethod -from .close import Close -from .close_forum_topic import CloseForumTopic -from .close_general_forum_topic import CloseGeneralForumTopic -from .copy_message import CopyMessage -from .copy_messages import CopyMessages -from .create_chat_invite_link import CreateChatInviteLink -from .create_chat_subscription_invite_link import CreateChatSubscriptionInviteLink -from .create_forum_topic import CreateForumTopic -from .create_invoice_link import CreateInvoiceLink -from .create_new_sticker_set import CreateNewStickerSet -from .decline_chat_join_request import DeclineChatJoinRequest -from .delete_chat_photo import DeleteChatPhoto -from .delete_chat_sticker_set import DeleteChatStickerSet -from .delete_forum_topic import DeleteForumTopic -from .delete_message import DeleteMessage -from .delete_messages import DeleteMessages -from .delete_my_commands import DeleteMyCommands -from .delete_sticker_from_set import DeleteStickerFromSet -from .delete_sticker_set import DeleteStickerSet -from .delete_webhook import DeleteWebhook -from .edit_chat_invite_link import EditChatInviteLink -from .edit_chat_subscription_invite_link import EditChatSubscriptionInviteLink -from .edit_forum_topic import EditForumTopic -from .edit_general_forum_topic import EditGeneralForumTopic -from .edit_message_caption import EditMessageCaption -from .edit_message_live_location import EditMessageLiveLocation -from .edit_message_media import EditMessageMedia -from .edit_message_reply_markup import EditMessageReplyMarkup -from .edit_message_text import EditMessageText -from .export_chat_invite_link import ExportChatInviteLink -from .forward_message import ForwardMessage -from .forward_messages import ForwardMessages -from .get_business_connection import GetBusinessConnection -from .get_chat import GetChat -from .get_chat_administrators import GetChatAdministrators -from .get_chat_member import GetChatMember -from .get_chat_member_count import GetChatMemberCount -from .get_chat_menu_button import GetChatMenuButton -from .get_custom_emoji_stickers import GetCustomEmojiStickers -from .get_file import GetFile -from .get_forum_topic_icon_stickers import GetForumTopicIconStickers -from .get_game_high_scores import GetGameHighScores -from .get_me import GetMe -from .get_my_commands import GetMyCommands -from .get_my_default_administrator_rights import GetMyDefaultAdministratorRights -from .get_my_description import GetMyDescription -from .get_my_name import GetMyName -from .get_my_short_description import GetMyShortDescription -from .get_star_transactions import GetStarTransactions -from .get_sticker_set import GetStickerSet -from .get_updates import GetUpdates -from .get_user_chat_boosts import GetUserChatBoosts -from .get_user_profile_photos import GetUserProfilePhotos -from .get_webhook_info import GetWebhookInfo -from .hide_general_forum_topic import HideGeneralForumTopic -from .leave_chat import LeaveChat -from .log_out import LogOut -from .pin_chat_message import PinChatMessage -from .promote_chat_member import PromoteChatMember -from .refund_star_payment import RefundStarPayment -from .reopen_forum_topic import ReopenForumTopic -from .reopen_general_forum_topic import ReopenGeneralForumTopic -from .replace_sticker_in_set import ReplaceStickerInSet -from .restrict_chat_member import RestrictChatMember -from .revoke_chat_invite_link import RevokeChatInviteLink -from .send_animation import SendAnimation -from .send_audio import SendAudio -from .send_chat_action import SendChatAction -from .send_contact import SendContact -from .send_dice import SendDice -from .send_document import SendDocument -from .send_game import SendGame -from .send_invoice import SendInvoice -from .send_location import SendLocation -from .send_media_group import SendMediaGroup -from .send_message import SendMessage -from .send_paid_media import SendPaidMedia -from .send_photo import SendPhoto -from .send_poll import SendPoll -from .send_sticker import SendSticker -from .send_venue import SendVenue -from .send_video import SendVideo -from .send_video_note import SendVideoNote -from .send_voice import SendVoice -from .set_chat_administrator_custom_title import SetChatAdministratorCustomTitle -from .set_chat_description import SetChatDescription -from .set_chat_menu_button import SetChatMenuButton -from .set_chat_permissions import SetChatPermissions -from .set_chat_photo import SetChatPhoto -from .set_chat_sticker_set import SetChatStickerSet -from .set_chat_title import SetChatTitle -from .set_custom_emoji_sticker_set_thumbnail import SetCustomEmojiStickerSetThumbnail -from .set_game_score import SetGameScore -from .set_message_reaction import SetMessageReaction -from .set_my_commands import SetMyCommands -from .set_my_default_administrator_rights import SetMyDefaultAdministratorRights -from .set_my_description import SetMyDescription -from .set_my_name import SetMyName -from .set_my_short_description import SetMyShortDescription -from .set_passport_data_errors import SetPassportDataErrors -from .set_sticker_emoji_list import SetStickerEmojiList -from .set_sticker_keywords import SetStickerKeywords -from .set_sticker_mask_position import SetStickerMaskPosition -from .set_sticker_position_in_set import SetStickerPositionInSet -from .set_sticker_set_thumbnail import SetStickerSetThumbnail -from .set_sticker_set_title import SetStickerSetTitle -from .set_webhook import SetWebhook -from .stop_message_live_location import StopMessageLiveLocation -from .stop_poll import StopPoll -from .unban_chat_member import UnbanChatMember -from .unban_chat_sender_chat import UnbanChatSenderChat -from .unhide_general_forum_topic import UnhideGeneralForumTopic -from .unpin_all_chat_messages import UnpinAllChatMessages -from .unpin_all_forum_topic_messages import UnpinAllForumTopicMessages -from .unpin_all_general_forum_topic_messages import UnpinAllGeneralForumTopicMessages -from .unpin_chat_message import UnpinChatMessage -from .upload_sticker_file import UploadStickerFile - -__all__ = ( - "AddStickerToSet", - "AnswerCallbackQuery", - "AnswerInlineQuery", - "AnswerPreCheckoutQuery", - "AnswerShippingQuery", - "AnswerWebAppQuery", - "ApproveChatJoinRequest", - "BanChatMember", - "BanChatSenderChat", - "Close", - "CloseForumTopic", - "CloseGeneralForumTopic", - "CopyMessage", - "CopyMessages", - "CreateChatInviteLink", - "CreateChatSubscriptionInviteLink", - "CreateForumTopic", - "CreateInvoiceLink", - "CreateNewStickerSet", - "DeclineChatJoinRequest", - "DeleteChatPhoto", - "DeleteChatStickerSet", - "DeleteForumTopic", - "DeleteMessage", - "DeleteMessages", - "DeleteMyCommands", - "DeleteStickerFromSet", - "DeleteStickerSet", - "DeleteWebhook", - "EditChatInviteLink", - "EditChatSubscriptionInviteLink", - "EditForumTopic", - "EditGeneralForumTopic", - "EditMessageCaption", - "EditMessageLiveLocation", - "EditMessageMedia", - "EditMessageReplyMarkup", - "EditMessageText", - "ExportChatInviteLink", - "ForwardMessage", - "ForwardMessages", - "GetBusinessConnection", - "GetChat", - "GetChatAdministrators", - "GetChatMember", - "GetChatMemberCount", - "GetChatMenuButton", - "GetCustomEmojiStickers", - "GetFile", - "GetForumTopicIconStickers", - "GetGameHighScores", - "GetMe", - "GetMyCommands", - "GetMyDefaultAdministratorRights", - "GetMyDescription", - "GetMyName", - "GetMyShortDescription", - "GetStarTransactions", - "GetStickerSet", - "GetUpdates", - "GetUserChatBoosts", - "GetUserProfilePhotos", - "GetWebhookInfo", - "HideGeneralForumTopic", - "LeaveChat", - "LogOut", - "PinChatMessage", - "PromoteChatMember", - "RefundStarPayment", - "ReopenForumTopic", - "ReopenGeneralForumTopic", - "ReplaceStickerInSet", - "Request", - "Response", - "RestrictChatMember", - "RevokeChatInviteLink", - "SendAnimation", - "SendAudio", - "SendChatAction", - "SendContact", - "SendDice", - "SendDocument", - "SendGame", - "SendInvoice", - "SendLocation", - "SendMediaGroup", - "SendMessage", - "SendPaidMedia", - "SendPhoto", - "SendPoll", - "SendSticker", - "SendVenue", - "SendVideo", - "SendVideoNote", - "SendVoice", - "SetChatAdministratorCustomTitle", - "SetChatDescription", - "SetChatMenuButton", - "SetChatPermissions", - "SetChatPhoto", - "SetChatStickerSet", - "SetChatTitle", - "SetCustomEmojiStickerSetThumbnail", - "SetGameScore", - "SetMessageReaction", - "SetMyCommands", - "SetMyDefaultAdministratorRights", - "SetMyDescription", - "SetMyName", - "SetMyShortDescription", - "SetPassportDataErrors", - "SetStickerEmojiList", - "SetStickerKeywords", - "SetStickerMaskPosition", - "SetStickerPositionInSet", - "SetStickerSetThumbnail", - "SetStickerSetTitle", - "SetWebhook", - "StopMessageLiveLocation", - "StopPoll", - "TelegramMethod", - "UnbanChatMember", - "UnbanChatSenderChat", - "UnhideGeneralForumTopic", - "UnpinAllChatMessages", - "UnpinAllForumTopicMessages", - "UnpinAllGeneralForumTopicMessages", - "UnpinChatMessage", - "UploadStickerFile", -) diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/__init__.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/__init__.cpython-311.pyc deleted file mode 100644 index 82ae6e7..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/__init__.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/add_sticker_to_set.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/add_sticker_to_set.cpython-311.pyc deleted file mode 100644 index b8758a7..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/add_sticker_to_set.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/answer_callback_query.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/answer_callback_query.cpython-311.pyc deleted file mode 100644 index 45e044c..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/answer_callback_query.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/answer_inline_query.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/answer_inline_query.cpython-311.pyc deleted file mode 100644 index f1152a3..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/answer_inline_query.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/answer_pre_checkout_query.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/answer_pre_checkout_query.cpython-311.pyc deleted file mode 100644 index c6280d4..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/answer_pre_checkout_query.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/answer_shipping_query.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/answer_shipping_query.cpython-311.pyc deleted file mode 100644 index 517a91b..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/answer_shipping_query.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/answer_web_app_query.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/answer_web_app_query.cpython-311.pyc deleted file mode 100644 index 9cc458d..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/answer_web_app_query.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/approve_chat_join_request.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/approve_chat_join_request.cpython-311.pyc deleted file mode 100644 index 392a3cb..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/approve_chat_join_request.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/ban_chat_member.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/ban_chat_member.cpython-311.pyc deleted file mode 100644 index 00fb582..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/ban_chat_member.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/ban_chat_sender_chat.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/ban_chat_sender_chat.cpython-311.pyc deleted file mode 100644 index 63700c6..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/ban_chat_sender_chat.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/base.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/base.cpython-311.pyc deleted file mode 100644 index 8496a2d..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/base.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/close.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/close.cpython-311.pyc deleted file mode 100644 index c15575a..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/close.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/close_forum_topic.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/close_forum_topic.cpython-311.pyc deleted file mode 100644 index 23b904b..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/close_forum_topic.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/close_general_forum_topic.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/close_general_forum_topic.cpython-311.pyc deleted file mode 100644 index 1361dcf..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/close_general_forum_topic.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/copy_message.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/copy_message.cpython-311.pyc deleted file mode 100644 index add1a79..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/copy_message.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/copy_messages.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/copy_messages.cpython-311.pyc deleted file mode 100644 index bd95073..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/copy_messages.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/create_chat_invite_link.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/create_chat_invite_link.cpython-311.pyc deleted file mode 100644 index ca8a069..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/create_chat_invite_link.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/create_chat_subscription_invite_link.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/create_chat_subscription_invite_link.cpython-311.pyc deleted file mode 100644 index 5424dac..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/create_chat_subscription_invite_link.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/create_forum_topic.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/create_forum_topic.cpython-311.pyc deleted file mode 100644 index 58e8227..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/create_forum_topic.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/create_invoice_link.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/create_invoice_link.cpython-311.pyc deleted file mode 100644 index c8e06b4..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/create_invoice_link.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/create_new_sticker_set.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/create_new_sticker_set.cpython-311.pyc deleted file mode 100644 index d13b111..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/create_new_sticker_set.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/decline_chat_join_request.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/decline_chat_join_request.cpython-311.pyc deleted file mode 100644 index e113237..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/decline_chat_join_request.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/delete_chat_photo.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/delete_chat_photo.cpython-311.pyc deleted file mode 100644 index ef77708..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/delete_chat_photo.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/delete_chat_sticker_set.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/delete_chat_sticker_set.cpython-311.pyc deleted file mode 100644 index 962556d..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/delete_chat_sticker_set.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/delete_forum_topic.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/delete_forum_topic.cpython-311.pyc deleted file mode 100644 index fe9c022..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/delete_forum_topic.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/delete_message.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/delete_message.cpython-311.pyc deleted file mode 100644 index 4d313b8..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/delete_message.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/delete_messages.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/delete_messages.cpython-311.pyc deleted file mode 100644 index ae95e3e..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/delete_messages.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/delete_my_commands.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/delete_my_commands.cpython-311.pyc deleted file mode 100644 index 9519683..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/delete_my_commands.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/delete_sticker_from_set.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/delete_sticker_from_set.cpython-311.pyc deleted file mode 100644 index eddd32b..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/delete_sticker_from_set.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/delete_sticker_set.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/delete_sticker_set.cpython-311.pyc deleted file mode 100644 index 1fa96ea..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/delete_sticker_set.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/delete_webhook.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/delete_webhook.cpython-311.pyc deleted file mode 100644 index 038dddc..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/delete_webhook.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/edit_chat_invite_link.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/edit_chat_invite_link.cpython-311.pyc deleted file mode 100644 index e514bc2..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/edit_chat_invite_link.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/edit_chat_subscription_invite_link.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/edit_chat_subscription_invite_link.cpython-311.pyc deleted file mode 100644 index 130c845..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/edit_chat_subscription_invite_link.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/edit_forum_topic.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/edit_forum_topic.cpython-311.pyc deleted file mode 100644 index f393ab9..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/edit_forum_topic.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/edit_general_forum_topic.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/edit_general_forum_topic.cpython-311.pyc deleted file mode 100644 index 997b017..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/edit_general_forum_topic.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/edit_message_caption.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/edit_message_caption.cpython-311.pyc deleted file mode 100644 index e4195ca..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/edit_message_caption.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/edit_message_live_location.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/edit_message_live_location.cpython-311.pyc deleted file mode 100644 index 687ffb3..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/edit_message_live_location.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/edit_message_media.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/edit_message_media.cpython-311.pyc deleted file mode 100644 index d5142c6..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/edit_message_media.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/edit_message_reply_markup.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/edit_message_reply_markup.cpython-311.pyc deleted file mode 100644 index edfa056..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/edit_message_reply_markup.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/edit_message_text.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/edit_message_text.cpython-311.pyc deleted file mode 100644 index 058f326..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/edit_message_text.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/export_chat_invite_link.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/export_chat_invite_link.cpython-311.pyc deleted file mode 100644 index 66c47df..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/export_chat_invite_link.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/forward_message.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/forward_message.cpython-311.pyc deleted file mode 100644 index da4a2a5..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/forward_message.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/forward_messages.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/forward_messages.cpython-311.pyc deleted file mode 100644 index 3358a8a..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/forward_messages.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/get_business_connection.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/get_business_connection.cpython-311.pyc deleted file mode 100644 index 43a163f..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/get_business_connection.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/get_chat.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/get_chat.cpython-311.pyc deleted file mode 100644 index e5e8b04..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/get_chat.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/get_chat_administrators.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/get_chat_administrators.cpython-311.pyc deleted file mode 100644 index 834aa56..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/get_chat_administrators.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/get_chat_member.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/get_chat_member.cpython-311.pyc deleted file mode 100644 index a196474..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/get_chat_member.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/get_chat_member_count.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/get_chat_member_count.cpython-311.pyc deleted file mode 100644 index 6cb54b1..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/get_chat_member_count.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/get_chat_menu_button.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/get_chat_menu_button.cpython-311.pyc deleted file mode 100644 index 3307b67..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/get_chat_menu_button.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/get_custom_emoji_stickers.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/get_custom_emoji_stickers.cpython-311.pyc deleted file mode 100644 index 32a662e..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/get_custom_emoji_stickers.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/get_file.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/get_file.cpython-311.pyc deleted file mode 100644 index c1318d5..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/get_file.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/get_forum_topic_icon_stickers.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/get_forum_topic_icon_stickers.cpython-311.pyc deleted file mode 100644 index 1740ab9..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/get_forum_topic_icon_stickers.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/get_game_high_scores.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/get_game_high_scores.cpython-311.pyc deleted file mode 100644 index cb99480..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/get_game_high_scores.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/get_me.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/get_me.cpython-311.pyc deleted file mode 100644 index 818ef8e..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/get_me.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/get_my_commands.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/get_my_commands.cpython-311.pyc deleted file mode 100644 index ac6a534..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/get_my_commands.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/get_my_default_administrator_rights.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/get_my_default_administrator_rights.cpython-311.pyc deleted file mode 100644 index dc47504..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/get_my_default_administrator_rights.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/get_my_description.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/get_my_description.cpython-311.pyc deleted file mode 100644 index 42ed125..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/get_my_description.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/get_my_name.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/get_my_name.cpython-311.pyc deleted file mode 100644 index 579097f..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/get_my_name.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/get_my_short_description.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/get_my_short_description.cpython-311.pyc deleted file mode 100644 index 88844bf..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/get_my_short_description.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/get_star_transactions.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/get_star_transactions.cpython-311.pyc deleted file mode 100644 index 5ad40b6..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/get_star_transactions.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/get_sticker_set.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/get_sticker_set.cpython-311.pyc deleted file mode 100644 index de2401a..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/get_sticker_set.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/get_updates.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/get_updates.cpython-311.pyc deleted file mode 100644 index 71c3412..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/get_updates.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/get_user_chat_boosts.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/get_user_chat_boosts.cpython-311.pyc deleted file mode 100644 index d5e2b5f..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/get_user_chat_boosts.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/get_user_profile_photos.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/get_user_profile_photos.cpython-311.pyc deleted file mode 100644 index 8f83768..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/get_user_profile_photos.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/get_webhook_info.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/get_webhook_info.cpython-311.pyc deleted file mode 100644 index bcad955..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/get_webhook_info.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/hide_general_forum_topic.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/hide_general_forum_topic.cpython-311.pyc deleted file mode 100644 index 1eff922..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/hide_general_forum_topic.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/leave_chat.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/leave_chat.cpython-311.pyc deleted file mode 100644 index 8c4ad6a..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/leave_chat.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/log_out.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/log_out.cpython-311.pyc deleted file mode 100644 index b3a3405..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/log_out.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/pin_chat_message.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/pin_chat_message.cpython-311.pyc deleted file mode 100644 index da1eada..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/pin_chat_message.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/promote_chat_member.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/promote_chat_member.cpython-311.pyc deleted file mode 100644 index e9331f9..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/promote_chat_member.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/refund_star_payment.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/refund_star_payment.cpython-311.pyc deleted file mode 100644 index 9d31f7e..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/refund_star_payment.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/reopen_forum_topic.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/reopen_forum_topic.cpython-311.pyc deleted file mode 100644 index 437e3c6..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/reopen_forum_topic.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/reopen_general_forum_topic.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/reopen_general_forum_topic.cpython-311.pyc deleted file mode 100644 index c013133..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/reopen_general_forum_topic.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/replace_sticker_in_set.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/replace_sticker_in_set.cpython-311.pyc deleted file mode 100644 index ee763ca..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/replace_sticker_in_set.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/restrict_chat_member.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/restrict_chat_member.cpython-311.pyc deleted file mode 100644 index 71aa06a..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/restrict_chat_member.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/revoke_chat_invite_link.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/revoke_chat_invite_link.cpython-311.pyc deleted file mode 100644 index a24d8d8..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/revoke_chat_invite_link.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/send_animation.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/send_animation.cpython-311.pyc deleted file mode 100644 index 54aff8f..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/send_animation.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/send_audio.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/send_audio.cpython-311.pyc deleted file mode 100644 index 7162c25..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/send_audio.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/send_chat_action.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/send_chat_action.cpython-311.pyc deleted file mode 100644 index 7997f09..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/send_chat_action.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/send_contact.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/send_contact.cpython-311.pyc deleted file mode 100644 index 6f1126c..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/send_contact.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/send_dice.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/send_dice.cpython-311.pyc deleted file mode 100644 index fd297ad..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/send_dice.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/send_document.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/send_document.cpython-311.pyc deleted file mode 100644 index c99a437..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/send_document.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/send_game.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/send_game.cpython-311.pyc deleted file mode 100644 index 6119721..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/send_game.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/send_invoice.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/send_invoice.cpython-311.pyc deleted file mode 100644 index a1ce63e..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/send_invoice.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/send_location.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/send_location.cpython-311.pyc deleted file mode 100644 index effb9fa..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/send_location.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/send_media_group.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/send_media_group.cpython-311.pyc deleted file mode 100644 index 43e30be..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/send_media_group.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/send_message.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/send_message.cpython-311.pyc deleted file mode 100644 index 3f2860f..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/send_message.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/send_paid_media.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/send_paid_media.cpython-311.pyc deleted file mode 100644 index 656e2e6..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/send_paid_media.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/send_photo.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/send_photo.cpython-311.pyc deleted file mode 100644 index 7779dcb..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/send_photo.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/send_poll.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/send_poll.cpython-311.pyc deleted file mode 100644 index 15ce756..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/send_poll.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/send_sticker.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/send_sticker.cpython-311.pyc deleted file mode 100644 index b586954..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/send_sticker.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/send_venue.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/send_venue.cpython-311.pyc deleted file mode 100644 index 2548f39..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/send_venue.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/send_video.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/send_video.cpython-311.pyc deleted file mode 100644 index ae4324b..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/send_video.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/send_video_note.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/send_video_note.cpython-311.pyc deleted file mode 100644 index b783f96..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/send_video_note.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/send_voice.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/send_voice.cpython-311.pyc deleted file mode 100644 index 14a3fb7..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/send_voice.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/set_chat_administrator_custom_title.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/set_chat_administrator_custom_title.cpython-311.pyc deleted file mode 100644 index 3d08c86..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/set_chat_administrator_custom_title.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/set_chat_description.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/set_chat_description.cpython-311.pyc deleted file mode 100644 index c007e9a..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/set_chat_description.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/set_chat_menu_button.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/set_chat_menu_button.cpython-311.pyc deleted file mode 100644 index 895f3b7..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/set_chat_menu_button.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/set_chat_permissions.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/set_chat_permissions.cpython-311.pyc deleted file mode 100644 index 72408ce..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/set_chat_permissions.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/set_chat_photo.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/set_chat_photo.cpython-311.pyc deleted file mode 100644 index 0ce412e..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/set_chat_photo.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/set_chat_sticker_set.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/set_chat_sticker_set.cpython-311.pyc deleted file mode 100644 index 9fe2e2a..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/set_chat_sticker_set.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/set_chat_title.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/set_chat_title.cpython-311.pyc deleted file mode 100644 index 66668e4..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/set_chat_title.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/set_custom_emoji_sticker_set_thumbnail.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/set_custom_emoji_sticker_set_thumbnail.cpython-311.pyc deleted file mode 100644 index c87dcf2..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/set_custom_emoji_sticker_set_thumbnail.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/set_game_score.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/set_game_score.cpython-311.pyc deleted file mode 100644 index eba6dc4..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/set_game_score.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/set_message_reaction.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/set_message_reaction.cpython-311.pyc deleted file mode 100644 index 1a9d887..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/set_message_reaction.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/set_my_commands.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/set_my_commands.cpython-311.pyc deleted file mode 100644 index 2306134..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/set_my_commands.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/set_my_default_administrator_rights.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/set_my_default_administrator_rights.cpython-311.pyc deleted file mode 100644 index 24499eb..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/set_my_default_administrator_rights.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/set_my_description.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/set_my_description.cpython-311.pyc deleted file mode 100644 index 7dbdbcd..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/set_my_description.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/set_my_name.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/set_my_name.cpython-311.pyc deleted file mode 100644 index 751a9db..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/set_my_name.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/set_my_short_description.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/set_my_short_description.cpython-311.pyc deleted file mode 100644 index 402fadd..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/set_my_short_description.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/set_passport_data_errors.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/set_passport_data_errors.cpython-311.pyc deleted file mode 100644 index 2654323..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/set_passport_data_errors.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/set_sticker_emoji_list.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/set_sticker_emoji_list.cpython-311.pyc deleted file mode 100644 index eb9bdc5..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/set_sticker_emoji_list.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/set_sticker_keywords.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/set_sticker_keywords.cpython-311.pyc deleted file mode 100644 index 00b0d15..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/set_sticker_keywords.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/set_sticker_mask_position.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/set_sticker_mask_position.cpython-311.pyc deleted file mode 100644 index 7b4df04..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/set_sticker_mask_position.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/set_sticker_position_in_set.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/set_sticker_position_in_set.cpython-311.pyc deleted file mode 100644 index 06fa42a..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/set_sticker_position_in_set.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/set_sticker_set_thumbnail.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/set_sticker_set_thumbnail.cpython-311.pyc deleted file mode 100644 index 0a1b7c8..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/set_sticker_set_thumbnail.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/set_sticker_set_title.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/set_sticker_set_title.cpython-311.pyc deleted file mode 100644 index 5963ae6..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/set_sticker_set_title.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/set_webhook.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/set_webhook.cpython-311.pyc deleted file mode 100644 index 2de1839..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/set_webhook.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/stop_message_live_location.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/stop_message_live_location.cpython-311.pyc deleted file mode 100644 index da8a6df..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/stop_message_live_location.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/stop_poll.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/stop_poll.cpython-311.pyc deleted file mode 100644 index 334f1ee..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/stop_poll.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/unban_chat_member.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/unban_chat_member.cpython-311.pyc deleted file mode 100644 index 4bd8025..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/unban_chat_member.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/unban_chat_sender_chat.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/unban_chat_sender_chat.cpython-311.pyc deleted file mode 100644 index a67b3aa..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/unban_chat_sender_chat.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/unhide_general_forum_topic.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/unhide_general_forum_topic.cpython-311.pyc deleted file mode 100644 index 4e2719d..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/unhide_general_forum_topic.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/unpin_all_chat_messages.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/unpin_all_chat_messages.cpython-311.pyc deleted file mode 100644 index 69b8a37..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/unpin_all_chat_messages.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/unpin_all_forum_topic_messages.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/unpin_all_forum_topic_messages.cpython-311.pyc deleted file mode 100644 index 3e00676..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/unpin_all_forum_topic_messages.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/unpin_all_general_forum_topic_messages.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/unpin_all_general_forum_topic_messages.cpython-311.pyc deleted file mode 100644 index cf9df6d..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/unpin_all_general_forum_topic_messages.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/unpin_chat_message.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/unpin_chat_message.cpython-311.pyc deleted file mode 100644 index 6f01b48..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/unpin_chat_message.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/__pycache__/upload_sticker_file.cpython-311.pyc b/env/Lib/site-packages/aiogram/methods/__pycache__/upload_sticker_file.cpython-311.pyc deleted file mode 100644 index 7f4fb5c..0000000 Binary files a/env/Lib/site-packages/aiogram/methods/__pycache__/upload_sticker_file.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/methods/add_sticker_to_set.py b/env/Lib/site-packages/aiogram/methods/add_sticker_to_set.py deleted file mode 100644 index cc2e31d..0000000 --- a/env/Lib/site-packages/aiogram/methods/add_sticker_to_set.py +++ /dev/null @@ -1,42 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any - -from ..types import InputSticker -from .base import TelegramMethod - - -class AddStickerToSet(TelegramMethod[bool]): - """ - Use this method to add a new sticker to a set created by the bot. Emoji sticker sets can have up to 200 stickers. Other sticker sets can have up to 120 stickers. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#addstickertoset - """ - - __returning__ = bool - __api_method__ = "addStickerToSet" - - user_id: int - """User identifier of sticker set owner""" - name: str - """Sticker set name""" - sticker: InputSticker - """A JSON-serialized object with information about the added sticker. If exactly the same sticker had already been added to the set, then the set isn't changed.""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - user_id: int, - name: str, - sticker: InputSticker, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(user_id=user_id, name=name, sticker=sticker, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/methods/answer_callback_query.py b/env/Lib/site-packages/aiogram/methods/answer_callback_query.py deleted file mode 100644 index 15ed1bf..0000000 --- a/env/Lib/site-packages/aiogram/methods/answer_callback_query.py +++ /dev/null @@ -1,56 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Optional - -from .base import TelegramMethod - - -class AnswerCallbackQuery(TelegramMethod[bool]): - """ - Use this method to send answers to callback queries sent from `inline keyboards `_. The answer will be displayed to the user as a notification at the top of the chat screen or as an alert. On success, :code:`True` is returned. - - Alternatively, the user can be redirected to the specified Game URL. For this option to work, you must first create a game for your bot via `@BotFather `_ and accept the terms. Otherwise, you may use links like :code:`t.me/your_bot?start=XXXX` that open your bot with a parameter. - - Source: https://core.telegram.org/bots/api#answercallbackquery - """ - - __returning__ = bool - __api_method__ = "answerCallbackQuery" - - callback_query_id: str - """Unique identifier for the query to be answered""" - text: Optional[str] = None - """Text of the notification. If not specified, nothing will be shown to the user, 0-200 characters""" - show_alert: Optional[bool] = None - """If :code:`True`, an alert will be shown by the client instead of a notification at the top of the chat screen. Defaults to *false*.""" - url: Optional[str] = None - """URL that will be opened by the user's client. If you have created a :class:`aiogram.types.game.Game` and accepted the conditions via `@BotFather `_, specify the URL that opens your game - note that this will only work if the query comes from a `https://core.telegram.org/bots/api#inlinekeyboardbutton `_ *callback_game* button.""" - cache_time: Optional[int] = None - """The maximum amount of time in seconds that the result of the callback query may be cached client-side. Telegram apps will support caching starting in version 3.14. Defaults to 0.""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - callback_query_id: str, - text: Optional[str] = None, - show_alert: Optional[bool] = None, - url: Optional[str] = None, - cache_time: Optional[int] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - callback_query_id=callback_query_id, - text=text, - show_alert=show_alert, - url=url, - cache_time=cache_time, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/methods/answer_inline_query.py b/env/Lib/site-packages/aiogram/methods/answer_inline_query.py deleted file mode 100644 index acfb80a..0000000 --- a/env/Lib/site-packages/aiogram/methods/answer_inline_query.py +++ /dev/null @@ -1,145 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, List, Optional, Union - -from pydantic import Field - -from ..types import ( - InlineQueryResultArticle, - InlineQueryResultAudio, - InlineQueryResultCachedAudio, - InlineQueryResultCachedDocument, - InlineQueryResultCachedGif, - InlineQueryResultCachedMpeg4Gif, - InlineQueryResultCachedPhoto, - InlineQueryResultCachedSticker, - InlineQueryResultCachedVideo, - InlineQueryResultCachedVoice, - InlineQueryResultContact, - InlineQueryResultDocument, - InlineQueryResultGame, - InlineQueryResultGif, - InlineQueryResultLocation, - InlineQueryResultMpeg4Gif, - InlineQueryResultPhoto, - InlineQueryResultsButton, - InlineQueryResultVenue, - InlineQueryResultVideo, - InlineQueryResultVoice, -) -from .base import TelegramMethod - - -class AnswerInlineQuery(TelegramMethod[bool]): - """ - Use this method to send answers to an inline query. On success, :code:`True` is returned. - - No more than **50** results per query are allowed. - - Source: https://core.telegram.org/bots/api#answerinlinequery - """ - - __returning__ = bool - __api_method__ = "answerInlineQuery" - - inline_query_id: str - """Unique identifier for the answered query""" - results: List[ - Union[ - InlineQueryResultCachedAudio, - InlineQueryResultCachedDocument, - InlineQueryResultCachedGif, - InlineQueryResultCachedMpeg4Gif, - InlineQueryResultCachedPhoto, - InlineQueryResultCachedSticker, - InlineQueryResultCachedVideo, - InlineQueryResultCachedVoice, - InlineQueryResultArticle, - InlineQueryResultAudio, - InlineQueryResultContact, - InlineQueryResultGame, - InlineQueryResultDocument, - InlineQueryResultGif, - InlineQueryResultLocation, - InlineQueryResultMpeg4Gif, - InlineQueryResultPhoto, - InlineQueryResultVenue, - InlineQueryResultVideo, - InlineQueryResultVoice, - ] - ] - """A JSON-serialized array of results for the inline query""" - cache_time: Optional[int] = None - """The maximum amount of time in seconds that the result of the inline query may be cached on the server. Defaults to 300.""" - is_personal: Optional[bool] = None - """Pass :code:`True` 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: Optional[str] = None - """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.""" - button: Optional[InlineQueryResultsButton] = None - """A JSON-serialized object describing a button to be shown above inline query results""" - switch_pm_parameter: Optional[str] = Field(None, json_schema_extra={"deprecated": True}) - """`Deep-linking `_ parameter for the /start message sent to the bot when user presses the switch button. 1-64 characters, only :code:`A-Z`, :code:`a-z`, :code:`0-9`, :code:`_` and :code:`-` are allowed. - -.. deprecated:: API:6.7 - https://core.telegram.org/bots/api-changelog#april-21-2023""" - switch_pm_text: Optional[str] = Field(None, json_schema_extra={"deprecated": True}) - """If passed, clients will display a button with specified text that switches the user to a private chat with the bot and sends the bot a start message with the parameter *switch_pm_parameter* - -.. deprecated:: API:6.7 - https://core.telegram.org/bots/api-changelog#april-21-2023""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - inline_query_id: str, - results: List[ - Union[ - InlineQueryResultCachedAudio, - InlineQueryResultCachedDocument, - InlineQueryResultCachedGif, - InlineQueryResultCachedMpeg4Gif, - InlineQueryResultCachedPhoto, - InlineQueryResultCachedSticker, - InlineQueryResultCachedVideo, - InlineQueryResultCachedVoice, - InlineQueryResultArticle, - InlineQueryResultAudio, - InlineQueryResultContact, - InlineQueryResultGame, - InlineQueryResultDocument, - InlineQueryResultGif, - InlineQueryResultLocation, - InlineQueryResultMpeg4Gif, - InlineQueryResultPhoto, - InlineQueryResultVenue, - InlineQueryResultVideo, - InlineQueryResultVoice, - ] - ], - cache_time: Optional[int] = None, - is_personal: Optional[bool] = None, - next_offset: Optional[str] = None, - button: Optional[InlineQueryResultsButton] = None, - switch_pm_parameter: Optional[str] = None, - switch_pm_text: Optional[str] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - inline_query_id=inline_query_id, - results=results, - cache_time=cache_time, - is_personal=is_personal, - next_offset=next_offset, - button=button, - switch_pm_parameter=switch_pm_parameter, - switch_pm_text=switch_pm_text, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/methods/answer_pre_checkout_query.py b/env/Lib/site-packages/aiogram/methods/answer_pre_checkout_query.py deleted file mode 100644 index 479d76c..0000000 --- a/env/Lib/site-packages/aiogram/methods/answer_pre_checkout_query.py +++ /dev/null @@ -1,46 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Optional - -from .base import TelegramMethod - - -class AnswerPreCheckoutQuery(TelegramMethod[bool]): - """ - Once the user has confirmed their payment and shipping details, the Bot API sends the final confirmation in the form of an :class:`aiogram.types.update.Update` with the field *pre_checkout_query*. Use this method to respond to such pre-checkout queries. On success, :code:`True` is returned. **Note:** The Bot API must receive an answer within 10 seconds after the pre-checkout query was sent. - - Source: https://core.telegram.org/bots/api#answerprecheckoutquery - """ - - __returning__ = bool - __api_method__ = "answerPreCheckoutQuery" - - pre_checkout_query_id: str - """Unique identifier for the query to be answered""" - ok: bool - """Specify :code:`True` if everything is alright (goods are available, etc.) and the bot is ready to proceed with the order. Use :code:`False` if there are any problems.""" - error_message: Optional[str] = None - """Required if *ok* is :code:`False`. 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.""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - pre_checkout_query_id: str, - ok: bool, - error_message: Optional[str] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - pre_checkout_query_id=pre_checkout_query_id, - ok=ok, - error_message=error_message, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/methods/answer_shipping_query.py b/env/Lib/site-packages/aiogram/methods/answer_shipping_query.py deleted file mode 100644 index ad0e9dc..0000000 --- a/env/Lib/site-packages/aiogram/methods/answer_shipping_query.py +++ /dev/null @@ -1,51 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, List, Optional - -from ..types import ShippingOption -from .base import TelegramMethod - - -class AnswerShippingQuery(TelegramMethod[bool]): - """ - If you sent an invoice requesting a shipping address and the parameter *is_flexible* was specified, the Bot API will send an :class:`aiogram.types.update.Update` with a *shipping_query* field to the bot. Use this method to reply to shipping queries. On success, :code:`True` is returned. - - Source: https://core.telegram.org/bots/api#answershippingquery - """ - - __returning__ = bool - __api_method__ = "answerShippingQuery" - - shipping_query_id: str - """Unique identifier for the query to be answered""" - ok: bool - """Pass :code:`True` if delivery to the specified address is possible and :code:`False` if there are any problems (for example, if delivery to the specified address is not possible)""" - shipping_options: Optional[List[ShippingOption]] = None - """Required if *ok* is :code:`True`. A JSON-serialized array of available shipping options.""" - error_message: Optional[str] = None - """Required if *ok* is :code:`False`. 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.""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - shipping_query_id: str, - ok: bool, - shipping_options: Optional[List[ShippingOption]] = None, - error_message: Optional[str] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - shipping_query_id=shipping_query_id, - ok=ok, - shipping_options=shipping_options, - error_message=error_message, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/methods/answer_web_app_query.py b/env/Lib/site-packages/aiogram/methods/answer_web_app_query.py deleted file mode 100644 index 4dc87eb..0000000 --- a/env/Lib/site-packages/aiogram/methods/answer_web_app_query.py +++ /dev/null @@ -1,103 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Union - -from ..types import ( - InlineQueryResultArticle, - InlineQueryResultAudio, - InlineQueryResultCachedAudio, - InlineQueryResultCachedDocument, - InlineQueryResultCachedGif, - InlineQueryResultCachedMpeg4Gif, - InlineQueryResultCachedPhoto, - InlineQueryResultCachedSticker, - InlineQueryResultCachedVideo, - InlineQueryResultCachedVoice, - InlineQueryResultContact, - InlineQueryResultDocument, - InlineQueryResultGame, - InlineQueryResultGif, - InlineQueryResultLocation, - InlineQueryResultMpeg4Gif, - InlineQueryResultPhoto, - InlineQueryResultVenue, - InlineQueryResultVideo, - InlineQueryResultVoice, - SentWebAppMessage, -) -from .base import TelegramMethod - - -class AnswerWebAppQuery(TelegramMethod[SentWebAppMessage]): - """ - Use this method to set the result of an interaction with a `Web App `_ and send a corresponding message on behalf of the user to the chat from which the query originated. On success, a :class:`aiogram.types.sent_web_app_message.SentWebAppMessage` object is returned. - - Source: https://core.telegram.org/bots/api#answerwebappquery - """ - - __returning__ = SentWebAppMessage - __api_method__ = "answerWebAppQuery" - - web_app_query_id: str - """Unique identifier for the query to be answered""" - result: Union[ - InlineQueryResultCachedAudio, - InlineQueryResultCachedDocument, - InlineQueryResultCachedGif, - InlineQueryResultCachedMpeg4Gif, - InlineQueryResultCachedPhoto, - InlineQueryResultCachedSticker, - InlineQueryResultCachedVideo, - InlineQueryResultCachedVoice, - InlineQueryResultArticle, - InlineQueryResultAudio, - InlineQueryResultContact, - InlineQueryResultGame, - InlineQueryResultDocument, - InlineQueryResultGif, - InlineQueryResultLocation, - InlineQueryResultMpeg4Gif, - InlineQueryResultPhoto, - InlineQueryResultVenue, - InlineQueryResultVideo, - InlineQueryResultVoice, - ] - """A JSON-serialized object describing the message to be sent""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - web_app_query_id: str, - result: Union[ - InlineQueryResultCachedAudio, - InlineQueryResultCachedDocument, - InlineQueryResultCachedGif, - InlineQueryResultCachedMpeg4Gif, - InlineQueryResultCachedPhoto, - InlineQueryResultCachedSticker, - InlineQueryResultCachedVideo, - InlineQueryResultCachedVoice, - InlineQueryResultArticle, - InlineQueryResultAudio, - InlineQueryResultContact, - InlineQueryResultGame, - InlineQueryResultDocument, - InlineQueryResultGif, - InlineQueryResultLocation, - InlineQueryResultMpeg4Gif, - InlineQueryResultPhoto, - InlineQueryResultVenue, - InlineQueryResultVideo, - InlineQueryResultVoice, - ], - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(web_app_query_id=web_app_query_id, result=result, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/methods/approve_chat_join_request.py b/env/Lib/site-packages/aiogram/methods/approve_chat_join_request.py deleted file mode 100644 index 2f4995b..0000000 --- a/env/Lib/site-packages/aiogram/methods/approve_chat_join_request.py +++ /dev/null @@ -1,34 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Union - -from .base import TelegramMethod - - -class ApproveChatJoinRequest(TelegramMethod[bool]): - """ - Use this method to approve a chat join request. The bot must be an administrator in the chat for this to work and must have the *can_invite_users* administrator right. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#approvechatjoinrequest - """ - - __returning__ = bool - __api_method__ = "approveChatJoinRequest" - - chat_id: Union[int, str] - """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" - user_id: int - """Unique identifier of the target user""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, *, chat_id: Union[int, str], user_id: int, **__pydantic_kwargs: Any - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(chat_id=chat_id, user_id=user_id, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/methods/ban_chat_member.py b/env/Lib/site-packages/aiogram/methods/ban_chat_member.py deleted file mode 100644 index 947fcca..0000000 --- a/env/Lib/site-packages/aiogram/methods/ban_chat_member.py +++ /dev/null @@ -1,51 +0,0 @@ -from __future__ import annotations - -import datetime -from typing import TYPE_CHECKING, Any, Optional, Union - -from .base import TelegramMethod - - -class BanChatMember(TelegramMethod[bool]): - """ - Use this method to ban a user in a group, a supergroup or a channel. In the case of supergroups and channels, the user will not be able to return to the chat on their own using invite links, etc., unless `unbanned `_ first. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#banchatmember - """ - - __returning__ = bool - __api_method__ = "banChatMember" - - chat_id: Union[int, str] - """Unique identifier for the target group or username of the target supergroup or channel (in the format :code:`@channelusername`)""" - user_id: int - """Unique identifier of the target user""" - until_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None - """Date when the user will be unbanned; Unix time. If user is banned for more than 366 days or less than 30 seconds from the current time they are considered to be banned forever. Applied for supergroups and channels only.""" - revoke_messages: Optional[bool] = None - """Pass :code:`True` to delete all messages from the chat for the user that is being removed. If :code:`False`, the user will be able to see messages in the group that were sent before the user was removed. Always :code:`True` for supergroups and channels.""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - chat_id: Union[int, str], - user_id: int, - until_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None, - revoke_messages: Optional[bool] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - chat_id=chat_id, - user_id=user_id, - until_date=until_date, - revoke_messages=revoke_messages, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/methods/ban_chat_sender_chat.py b/env/Lib/site-packages/aiogram/methods/ban_chat_sender_chat.py deleted file mode 100644 index cbe6194..0000000 --- a/env/Lib/site-packages/aiogram/methods/ban_chat_sender_chat.py +++ /dev/null @@ -1,38 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Union - -from .base import TelegramMethod - - -class BanChatSenderChat(TelegramMethod[bool]): - """ - Use this method to ban a channel chat in a supergroup or a channel. Until the chat is `unbanned `_, the owner of the banned chat won't be able to send messages on behalf of **any of their channels**. The bot must be an administrator in the supergroup or channel for this to work and must have the appropriate administrator rights. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#banchatsenderchat - """ - - __returning__ = bool - __api_method__ = "banChatSenderChat" - - chat_id: Union[int, str] - """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" - sender_chat_id: int - """Unique identifier of the target sender chat""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - chat_id: Union[int, str], - sender_chat_id: int, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(chat_id=chat_id, sender_chat_id=sender_chat_id, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/methods/base.py b/env/Lib/site-packages/aiogram/methods/base.py deleted file mode 100644 index b2d35be..0000000 --- a/env/Lib/site-packages/aiogram/methods/base.py +++ /dev/null @@ -1,95 +0,0 @@ -from __future__ import annotations - -from abc import ABC, abstractmethod -from typing import ( - TYPE_CHECKING, - Any, - ClassVar, - Dict, - Generator, - Generic, - Optional, - TypeVar, -) - -from pydantic import BaseModel, ConfigDict -from pydantic.functional_validators import model_validator - -from aiogram.client.context_controller import BotContextController - -from ..types import InputFile, ResponseParameters -from ..types.base import UNSET_TYPE - -if TYPE_CHECKING: - from ..client.bot import Bot - -TelegramType = TypeVar("TelegramType", bound=Any) - - -class Request(BaseModel): - model_config = ConfigDict(arbitrary_types_allowed=True) - - method: str - - data: Dict[str, Optional[Any]] - files: Optional[Dict[str, InputFile]] - - -class Response(BaseModel, Generic[TelegramType]): - ok: bool - result: Optional[TelegramType] = None - description: Optional[str] = None - error_code: Optional[int] = None - parameters: Optional[ResponseParameters] = None - - -class TelegramMethod(BotContextController, BaseModel, Generic[TelegramType], ABC): - model_config = ConfigDict( - extra="allow", - populate_by_name=True, - arbitrary_types_allowed=True, - ) - - @model_validator(mode="before") - @classmethod - def remove_unset(cls, values: Dict[str, Any]) -> Dict[str, Any]: - """ - Remove UNSET before fields validation. - - We use UNSET as a sentinel value for `parse_mode` and replace it to real value later. - It isn't a problem when it's just default value for a model field, - but UNSET might be passing to a model initialization from `Bot.method_name`, - so we must take care of it and remove it before fields validation. - """ - if not isinstance(values, dict): - return values - return {k: v for k, v in values.items() if not isinstance(v, UNSET_TYPE)} - - if TYPE_CHECKING: - __returning__: ClassVar[type] - __api_method__: ClassVar[str] - else: - - @property - @abstractmethod - def __returning__(self) -> type: - pass - - @property - @abstractmethod - def __api_method__(self) -> str: - pass - - async def emit(self, bot: Bot) -> TelegramType: - return await bot(self) - - def __await__(self) -> Generator[Any, None, TelegramType]: - bot = self._bot - if not bot: - raise RuntimeError( - "This method is not mounted to a any bot instance, please call it explicilty " - "with bot instance `await bot(method)`\n" - "or mount method to a bot instance `method.as_(bot)` " - "and then call it `await method()`" - ) - return self.emit(bot).__await__() diff --git a/env/Lib/site-packages/aiogram/methods/close.py b/env/Lib/site-packages/aiogram/methods/close.py deleted file mode 100644 index 7c33eca..0000000 --- a/env/Lib/site-packages/aiogram/methods/close.py +++ /dev/null @@ -1,14 +0,0 @@ -from __future__ import annotations - -from .base import TelegramMethod - - -class Close(TelegramMethod[bool]): - """ - Use this method to close the bot instance before moving it from one local server to another. You need to delete the webhook before calling this method to ensure that the bot isn't launched again after server restart. The method will return error 429 in the first 10 minutes after the bot is launched. Returns :code:`True` on success. Requires no parameters. - - Source: https://core.telegram.org/bots/api#close - """ - - __returning__ = bool - __api_method__ = "close" diff --git a/env/Lib/site-packages/aiogram/methods/close_forum_topic.py b/env/Lib/site-packages/aiogram/methods/close_forum_topic.py deleted file mode 100644 index 110fbce..0000000 --- a/env/Lib/site-packages/aiogram/methods/close_forum_topic.py +++ /dev/null @@ -1,40 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Union - -from .base import TelegramMethod - - -class CloseForumTopic(TelegramMethod[bool]): - """ - Use this method to close an open topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the *can_manage_topics* administrator rights, unless it is the creator of the topic. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#closeforumtopic - """ - - __returning__ = bool - __api_method__ = "closeForumTopic" - - chat_id: Union[int, str] - """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)""" - message_thread_id: int - """Unique identifier for the target message thread of the forum topic""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - chat_id: Union[int, str], - message_thread_id: int, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - chat_id=chat_id, message_thread_id=message_thread_id, **__pydantic_kwargs - ) diff --git a/env/Lib/site-packages/aiogram/methods/close_general_forum_topic.py b/env/Lib/site-packages/aiogram/methods/close_general_forum_topic.py deleted file mode 100644 index 3f1a633..0000000 --- a/env/Lib/site-packages/aiogram/methods/close_general_forum_topic.py +++ /dev/null @@ -1,32 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Union - -from .base import TelegramMethod - - -class CloseGeneralForumTopic(TelegramMethod[bool]): - """ - Use this method to close an open 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the *can_manage_topics* administrator rights. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#closegeneralforumtopic - """ - - __returning__ = bool - __api_method__ = "closeGeneralForumTopic" - - chat_id: Union[int, str] - """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, *, chat_id: Union[int, str], **__pydantic_kwargs: Any - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(chat_id=chat_id, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/methods/copy_message.py b/env/Lib/site-packages/aiogram/methods/copy_message.py deleted file mode 100644 index ca44f93..0000000 --- a/env/Lib/site-packages/aiogram/methods/copy_message.py +++ /dev/null @@ -1,116 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, List, Optional, Union - -from pydantic import Field - -from ..client.default import Default -from ..types import ( - ForceReply, - InlineKeyboardMarkup, - MessageEntity, - MessageId, - ReplyKeyboardMarkup, - ReplyKeyboardRemove, - ReplyParameters, -) -from .base import TelegramMethod - - -class CopyMessage(TelegramMethod[MessageId]): - """ - Use this method to copy messages of any kind. Service messages, paid media messages, giveaway messages, giveaway winners messages, and invoice messages can't be copied. A quiz :class:`aiogram.methods.poll.Poll` can be copied only if the value of the field *correct_option_id* is known to the bot. The method is analogous to the method :class:`aiogram.methods.forward_message.ForwardMessage`, but the copied message doesn't have a link to the original message. Returns the :class:`aiogram.types.message_id.MessageId` of the sent message on success. - - Source: https://core.telegram.org/bots/api#copymessage - """ - - __returning__ = MessageId - __api_method__ = "copyMessage" - - chat_id: Union[int, str] - """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" - from_chat_id: Union[int, str] - """Unique identifier for the chat where the original message was sent (or channel username in the format :code:`@channelusername`)""" - message_id: int - """Message identifier in the chat specified in *from_chat_id*""" - message_thread_id: Optional[int] = None - """Unique identifier for the target message thread (topic) of the forum; for forum supergroups only""" - caption: Optional[str] = None - """New caption for media, 0-1024 characters after entities parsing. If not specified, the original caption is kept""" - parse_mode: Optional[Union[str, Default]] = Default("parse_mode") - """Mode for parsing entities in the new caption. See `formatting options `_ for more details.""" - caption_entities: Optional[List[MessageEntity]] = None - """A JSON-serialized list of special entities that appear in the new caption, which can be specified instead of *parse_mode*""" - show_caption_above_media: Optional[Union[bool, Default]] = Default("show_caption_above_media") - """Pass :code:`True`, if the caption must be shown above the message media. Ignored if a new caption isn't specified.""" - disable_notification: Optional[bool] = None - """Sends the message `silently `_. Users will receive a notification with no sound.""" - protect_content: Optional[Union[bool, Default]] = Default("protect_content") - """Protects the contents of the sent message from forwarding and saving""" - reply_parameters: Optional[ReplyParameters] = None - """Description of the message to reply to""" - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None - """Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user""" - allow_sending_without_reply: Optional[bool] = Field( - None, json_schema_extra={"deprecated": True} - ) - """Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - -.. deprecated:: API:7.0 - https://core.telegram.org/bots/api-changelog#december-29-2023""" - reply_to_message_id: Optional[int] = Field(None, json_schema_extra={"deprecated": True}) - """If the message is a reply, ID of the original message - -.. deprecated:: API:7.0 - https://core.telegram.org/bots/api-changelog#december-29-2023""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - chat_id: Union[int, str], - from_chat_id: Union[int, str], - message_id: int, - message_thread_id: Optional[int] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - show_caption_above_media: Optional[Union[bool, Default]] = Default( - "show_caption_above_media" - ), - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - chat_id=chat_id, - from_chat_id=from_chat_id, - message_id=message_id, - message_thread_id=message_thread_id, - caption=caption, - parse_mode=parse_mode, - caption_entities=caption_entities, - show_caption_above_media=show_caption_above_media, - disable_notification=disable_notification, - protect_content=protect_content, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - reply_to_message_id=reply_to_message_id, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/methods/copy_messages.py b/env/Lib/site-packages/aiogram/methods/copy_messages.py deleted file mode 100644 index c734d0a..0000000 --- a/env/Lib/site-packages/aiogram/methods/copy_messages.py +++ /dev/null @@ -1,61 +0,0 @@ -from typing import TYPE_CHECKING, Any, List, Optional, Union - -from ..types import MessageId -from .base import TelegramMethod - - -class CopyMessages(TelegramMethod[List[MessageId]]): - """ - Use this method to copy messages of any kind. If some of the specified messages can't be found or copied, they are skipped. Service messages, paid media messages, giveaway messages, giveaway winners messages, and invoice messages can't be copied. A quiz :class:`aiogram.methods.poll.Poll` can be copied only if the value of the field *correct_option_id* is known to the bot. The method is analogous to the method :class:`aiogram.methods.forward_messages.ForwardMessages`, but the copied messages don't have a link to the original message. Album grouping is kept for copied messages. On success, an array of :class:`aiogram.types.message_id.MessageId` of the sent messages is returned. - - Source: https://core.telegram.org/bots/api#copymessages - """ - - __returning__ = List[MessageId] - __api_method__ = "copyMessages" - - chat_id: Union[int, str] - """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" - from_chat_id: Union[int, str] - """Unique identifier for the chat where the original messages were sent (or channel username in the format :code:`@channelusername`)""" - message_ids: List[int] - """A JSON-serialized list of 1-100 identifiers of messages in the chat *from_chat_id* to copy. The identifiers must be specified in a strictly increasing order.""" - message_thread_id: Optional[int] = None - """Unique identifier for the target message thread (topic) of the forum; for forum supergroups only""" - disable_notification: Optional[bool] = None - """Sends the messages `silently `_. Users will receive a notification with no sound.""" - protect_content: Optional[bool] = None - """Protects the contents of the sent messages from forwarding and saving""" - remove_caption: Optional[bool] = None - """Pass :code:`True` to copy the messages without their captions""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - chat_id: Union[int, str], - from_chat_id: Union[int, str], - message_ids: List[int], - message_thread_id: Optional[int] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[bool] = None, - remove_caption: Optional[bool] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - chat_id=chat_id, - from_chat_id=from_chat_id, - message_ids=message_ids, - message_thread_id=message_thread_id, - disable_notification=disable_notification, - protect_content=protect_content, - remove_caption=remove_caption, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/methods/create_chat_invite_link.py b/env/Lib/site-packages/aiogram/methods/create_chat_invite_link.py deleted file mode 100644 index ff0b386..0000000 --- a/env/Lib/site-packages/aiogram/methods/create_chat_invite_link.py +++ /dev/null @@ -1,56 +0,0 @@ -from __future__ import annotations - -import datetime -from typing import TYPE_CHECKING, Any, Optional, Union - -from ..types import ChatInviteLink -from .base import TelegramMethod - - -class CreateChatInviteLink(TelegramMethod[ChatInviteLink]): - """ - Use this method to create an additional invite link for a chat. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. The link can be revoked using the method :class:`aiogram.methods.revoke_chat_invite_link.RevokeChatInviteLink`. Returns the new invite link as :class:`aiogram.types.chat_invite_link.ChatInviteLink` object. - - Source: https://core.telegram.org/bots/api#createchatinvitelink - """ - - __returning__ = ChatInviteLink - __api_method__ = "createChatInviteLink" - - chat_id: Union[int, str] - """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" - name: Optional[str] = None - """Invite link name; 0-32 characters""" - expire_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None - """Point in time (Unix timestamp) when the link will expire""" - member_limit: Optional[int] = None - """The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999""" - creates_join_request: Optional[bool] = None - """:code:`True`, if users joining the chat via the link need to be approved by chat administrators. If :code:`True`, *member_limit* can't be specified""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - chat_id: Union[int, str], - name: Optional[str] = None, - expire_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None, - member_limit: Optional[int] = None, - creates_join_request: Optional[bool] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - chat_id=chat_id, - name=name, - expire_date=expire_date, - member_limit=member_limit, - creates_join_request=creates_join_request, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/methods/create_chat_subscription_invite_link.py b/env/Lib/site-packages/aiogram/methods/create_chat_subscription_invite_link.py deleted file mode 100644 index 1301eb2..0000000 --- a/env/Lib/site-packages/aiogram/methods/create_chat_subscription_invite_link.py +++ /dev/null @@ -1,52 +0,0 @@ -from __future__ import annotations - -import datetime -from typing import TYPE_CHECKING, Any, Optional, Union - -from ..types import ChatInviteLink -from .base import TelegramMethod - - -class CreateChatSubscriptionInviteLink(TelegramMethod[ChatInviteLink]): - """ - Use this method to create a `subscription invite link `_ for a channel chat. The bot must have the *can_invite_users* administrator rights. The link can be edited using the method :class:`aiogram.methods.edit_chat_subscription_invite_link.EditChatSubscriptionInviteLink` or revoked using the method :class:`aiogram.methods.revoke_chat_invite_link.RevokeChatInviteLink`. Returns the new invite link as a :class:`aiogram.types.chat_invite_link.ChatInviteLink` object. - - Source: https://core.telegram.org/bots/api#createchatsubscriptioninvitelink - """ - - __returning__ = ChatInviteLink - __api_method__ = "createChatSubscriptionInviteLink" - - chat_id: Union[int, str] - """Unique identifier for the target channel chat or username of the target channel (in the format :code:`@channelusername`)""" - subscription_period: Union[datetime.datetime, datetime.timedelta, int] - """The number of seconds the subscription will be active for before the next payment. Currently, it must always be 2592000 (30 days).""" - subscription_price: int - """The amount of Telegram Stars a user must pay initially and after each subsequent subscription period to be a member of the chat; 1-2500""" - name: Optional[str] = None - """Invite link name; 0-32 characters""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - chat_id: Union[int, str], - subscription_period: Union[datetime.datetime, datetime.timedelta, int], - subscription_price: int, - name: Optional[str] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - chat_id=chat_id, - subscription_period=subscription_period, - subscription_price=subscription_price, - name=name, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/methods/create_forum_topic.py b/env/Lib/site-packages/aiogram/methods/create_forum_topic.py deleted file mode 100644 index 8b0f692..0000000 --- a/env/Lib/site-packages/aiogram/methods/create_forum_topic.py +++ /dev/null @@ -1,51 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Optional, Union - -from ..types import ForumTopic -from .base import TelegramMethod - - -class CreateForumTopic(TelegramMethod[ForumTopic]): - """ - Use this method to create a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the *can_manage_topics* administrator rights. Returns information about the created topic as a :class:`aiogram.types.forum_topic.ForumTopic` object. - - Source: https://core.telegram.org/bots/api#createforumtopic - """ - - __returning__ = ForumTopic - __api_method__ = "createForumTopic" - - chat_id: Union[int, str] - """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)""" - name: str - """Topic name, 1-128 characters""" - icon_color: Optional[int] = None - """Color of the topic icon in RGB format. Currently, must be one of 7322096 (0x6FB9F0), 16766590 (0xFFD67E), 13338331 (0xCB86DB), 9367192 (0x8EEE98), 16749490 (0xFF93B2), or 16478047 (0xFB6F5F)""" - icon_custom_emoji_id: Optional[str] = None - """Unique identifier of the custom emoji shown as the topic icon. Use :class:`aiogram.methods.get_forum_topic_icon_stickers.GetForumTopicIconStickers` to get all allowed custom emoji identifiers.""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - chat_id: Union[int, str], - name: str, - icon_color: Optional[int] = None, - icon_custom_emoji_id: Optional[str] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - chat_id=chat_id, - name=name, - icon_color=icon_color, - icon_custom_emoji_id=icon_custom_emoji_id, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/methods/create_invoice_link.py b/env/Lib/site-packages/aiogram/methods/create_invoice_link.py deleted file mode 100644 index 2068f75..0000000 --- a/env/Lib/site-packages/aiogram/methods/create_invoice_link.py +++ /dev/null @@ -1,115 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, List, Optional - -from ..types import LabeledPrice -from .base import TelegramMethod - - -class CreateInvoiceLink(TelegramMethod[str]): - """ - Use this method to create a link for an invoice. Returns the created invoice link as *String* on success. - - Source: https://core.telegram.org/bots/api#createinvoicelink - """ - - __returning__ = str - __api_method__ = "createInvoiceLink" - - title: str - """Product name, 1-32 characters""" - description: str - """Product description, 1-255 characters""" - payload: str - """Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes.""" - currency: str - """Three-letter ISO 4217 currency code, see `more on currencies `_. Pass 'XTR' for payments in `Telegram Stars `_.""" - prices: List[LabeledPrice] - """Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.). Must contain exactly one item for payments in `Telegram Stars `_.""" - provider_token: Optional[str] = None - """Payment provider token, obtained via `@BotFather `_. Pass an empty string for payments in `Telegram Stars `_.""" - max_tip_amount: Optional[int] = None - """The maximum accepted amount for tips in the *smallest units* of the currency (integer, **not** float/double). For example, for a maximum tip of :code:`US$ 1.45` pass :code:`max_tip_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). Defaults to 0. Not supported for payments in `Telegram Stars `_.""" - suggested_tip_amounts: Optional[List[int]] = None - """A JSON-serialized array 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*.""" - provider_data: Optional[str] = None - """JSON-serialized 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_url: Optional[str] = None - """URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service.""" - photo_size: Optional[int] = None - """Photo size in bytes""" - photo_width: Optional[int] = None - """Photo width""" - photo_height: Optional[int] = None - """Photo height""" - need_name: Optional[bool] = None - """Pass :code:`True` if you require the user's full name to complete the order. Ignored for payments in `Telegram Stars `_.""" - need_phone_number: Optional[bool] = None - """Pass :code:`True` if you require the user's phone number to complete the order. Ignored for payments in `Telegram Stars `_.""" - need_email: Optional[bool] = None - """Pass :code:`True` if you require the user's email address to complete the order. Ignored for payments in `Telegram Stars `_.""" - need_shipping_address: Optional[bool] = None - """Pass :code:`True` if you require the user's shipping address to complete the order. Ignored for payments in `Telegram Stars `_.""" - send_phone_number_to_provider: Optional[bool] = None - """Pass :code:`True` if the user's phone number should be sent to the provider. Ignored for payments in `Telegram Stars `_.""" - send_email_to_provider: Optional[bool] = None - """Pass :code:`True` if the user's email address should be sent to the provider. Ignored for payments in `Telegram Stars `_.""" - is_flexible: Optional[bool] = None - """Pass :code:`True` if the final price depends on the shipping method. Ignored for payments in `Telegram Stars `_.""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - title: str, - description: str, - payload: str, - currency: str, - prices: List[LabeledPrice], - provider_token: Optional[str] = None, - max_tip_amount: Optional[int] = None, - suggested_tip_amounts: Optional[List[int]] = None, - provider_data: Optional[str] = None, - photo_url: Optional[str] = None, - photo_size: Optional[int] = None, - photo_width: Optional[int] = None, - photo_height: Optional[int] = None, - need_name: Optional[bool] = None, - need_phone_number: Optional[bool] = None, - need_email: Optional[bool] = None, - need_shipping_address: Optional[bool] = None, - send_phone_number_to_provider: Optional[bool] = None, - send_email_to_provider: Optional[bool] = None, - is_flexible: Optional[bool] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - title=title, - description=description, - payload=payload, - currency=currency, - prices=prices, - provider_token=provider_token, - max_tip_amount=max_tip_amount, - suggested_tip_amounts=suggested_tip_amounts, - provider_data=provider_data, - photo_url=photo_url, - photo_size=photo_size, - photo_width=photo_width, - photo_height=photo_height, - need_name=need_name, - need_phone_number=need_phone_number, - need_email=need_email, - need_shipping_address=need_shipping_address, - send_phone_number_to_provider=send_phone_number_to_provider, - send_email_to_provider=send_email_to_provider, - is_flexible=is_flexible, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/methods/create_new_sticker_set.py b/env/Lib/site-packages/aiogram/methods/create_new_sticker_set.py deleted file mode 100644 index c304d85..0000000 --- a/env/Lib/site-packages/aiogram/methods/create_new_sticker_set.py +++ /dev/null @@ -1,68 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, List, Optional - -from pydantic import Field - -from ..types import InputSticker -from .base import TelegramMethod - - -class CreateNewStickerSet(TelegramMethod[bool]): - """ - Use this method to create a new sticker set owned by a user. The bot will be able to edit the sticker set thus created. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#createnewstickerset - """ - - __returning__ = bool - __api_method__ = "createNewStickerSet" - - user_id: int - """User identifier of created sticker set owner""" - name: str - """Short name of sticker set, to be used in :code:`t.me/addstickers/` URLs (e.g., *animals*). Can contain only English letters, digits and underscores. Must begin with a letter, can't contain consecutive underscores and must end in :code:`"_by_"`. :code:`` is case insensitive. 1-64 characters.""" - title: str - """Sticker set title, 1-64 characters""" - stickers: List[InputSticker] - """A JSON-serialized list of 1-50 initial stickers to be added to the sticker set""" - sticker_type: Optional[str] = None - """Type of stickers in the set, pass 'regular', 'mask', or 'custom_emoji'. By default, a regular sticker set is created.""" - needs_repainting: Optional[bool] = None - """Pass :code:`True` if stickers in the sticker set must be repainted to the color of text 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 sticker sets only""" - sticker_format: Optional[str] = Field(None, json_schema_extra={"deprecated": True}) - """Format of stickers in the set, must be one of 'static', 'animated', 'video' - -.. deprecated:: API:7.2 - https://core.telegram.org/bots/api-changelog#march-31-2024""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - user_id: int, - name: str, - title: str, - stickers: List[InputSticker], - sticker_type: Optional[str] = None, - needs_repainting: Optional[bool] = None, - sticker_format: Optional[str] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - user_id=user_id, - name=name, - title=title, - stickers=stickers, - sticker_type=sticker_type, - needs_repainting=needs_repainting, - sticker_format=sticker_format, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/methods/decline_chat_join_request.py b/env/Lib/site-packages/aiogram/methods/decline_chat_join_request.py deleted file mode 100644 index b0fa2c3..0000000 --- a/env/Lib/site-packages/aiogram/methods/decline_chat_join_request.py +++ /dev/null @@ -1,34 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Union - -from .base import TelegramMethod - - -class DeclineChatJoinRequest(TelegramMethod[bool]): - """ - Use this method to decline a chat join request. The bot must be an administrator in the chat for this to work and must have the *can_invite_users* administrator right. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#declinechatjoinrequest - """ - - __returning__ = bool - __api_method__ = "declineChatJoinRequest" - - chat_id: Union[int, str] - """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" - user_id: int - """Unique identifier of the target user""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, *, chat_id: Union[int, str], user_id: int, **__pydantic_kwargs: Any - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(chat_id=chat_id, user_id=user_id, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/methods/delete_chat_photo.py b/env/Lib/site-packages/aiogram/methods/delete_chat_photo.py deleted file mode 100644 index 503ace2..0000000 --- a/env/Lib/site-packages/aiogram/methods/delete_chat_photo.py +++ /dev/null @@ -1,32 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Union - -from .base import TelegramMethod - - -class DeleteChatPhoto(TelegramMethod[bool]): - """ - Use this method to delete a chat photo. Photos can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#deletechatphoto - """ - - __returning__ = bool - __api_method__ = "deleteChatPhoto" - - chat_id: Union[int, str] - """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, *, chat_id: Union[int, str], **__pydantic_kwargs: Any - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(chat_id=chat_id, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/methods/delete_chat_sticker_set.py b/env/Lib/site-packages/aiogram/methods/delete_chat_sticker_set.py deleted file mode 100644 index 50d705f..0000000 --- a/env/Lib/site-packages/aiogram/methods/delete_chat_sticker_set.py +++ /dev/null @@ -1,32 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Union - -from .base import TelegramMethod - - -class DeleteChatStickerSet(TelegramMethod[bool]): - """ - Use this method to delete a group sticker set from a supergroup. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Use the field *can_set_sticker_set* optionally returned in :class:`aiogram.methods.get_chat.GetChat` requests to check if the bot can use this method. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#deletechatstickerset - """ - - __returning__ = bool - __api_method__ = "deleteChatStickerSet" - - chat_id: Union[int, str] - """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, *, chat_id: Union[int, str], **__pydantic_kwargs: Any - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(chat_id=chat_id, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/methods/delete_forum_topic.py b/env/Lib/site-packages/aiogram/methods/delete_forum_topic.py deleted file mode 100644 index 7d23856..0000000 --- a/env/Lib/site-packages/aiogram/methods/delete_forum_topic.py +++ /dev/null @@ -1,40 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Union - -from .base import TelegramMethod - - -class DeleteForumTopic(TelegramMethod[bool]): - """ - Use this method to delete a forum topic along with all its messages in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the *can_delete_messages* administrator rights. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#deleteforumtopic - """ - - __returning__ = bool - __api_method__ = "deleteForumTopic" - - chat_id: Union[int, str] - """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)""" - message_thread_id: int - """Unique identifier for the target message thread of the forum topic""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - chat_id: Union[int, str], - message_thread_id: int, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - chat_id=chat_id, message_thread_id=message_thread_id, **__pydantic_kwargs - ) diff --git a/env/Lib/site-packages/aiogram/methods/delete_message.py b/env/Lib/site-packages/aiogram/methods/delete_message.py deleted file mode 100644 index 59aee04..0000000 --- a/env/Lib/site-packages/aiogram/methods/delete_message.py +++ /dev/null @@ -1,56 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Union - -from .base import TelegramMethod - - -class DeleteMessage(TelegramMethod[bool]): - """ - Use this method to delete a message, including service messages, with the following limitations: - - - A message can only be deleted if it was sent less than 48 hours ago. - - - Service messages about a supergroup, channel, or forum topic creation can't be deleted. - - - A dice message in a private chat can only be deleted if it was sent more than 24 hours ago. - - - Bots can delete outgoing messages in private chats, groups, and supergroups. - - - Bots can delete incoming messages in private chats. - - - Bots granted *can_post_messages* permissions can delete outgoing messages in channels. - - - If the bot is an administrator of a group, it can delete any message there. - - - If the bot has *can_delete_messages* permission in a supergroup or a channel, it can delete any message there. - - Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#deletemessage - """ - - __returning__ = bool - __api_method__ = "deleteMessage" - - chat_id: Union[int, str] - """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" - message_id: int - """Identifier of the message to delete""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - chat_id: Union[int, str], - message_id: int, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(chat_id=chat_id, message_id=message_id, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/methods/delete_messages.py b/env/Lib/site-packages/aiogram/methods/delete_messages.py deleted file mode 100644 index 061d12b..0000000 --- a/env/Lib/site-packages/aiogram/methods/delete_messages.py +++ /dev/null @@ -1,36 +0,0 @@ -from typing import TYPE_CHECKING, Any, List, Union - -from .base import TelegramMethod - - -class DeleteMessages(TelegramMethod[bool]): - """ - Use this method to delete multiple messages simultaneously. If some of the specified messages can't be found, they are skipped. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#deletemessages - """ - - __returning__ = bool - __api_method__ = "deleteMessages" - - chat_id: Union[int, str] - """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" - message_ids: List[int] - """A JSON-serialized list of 1-100 identifiers of messages to delete. See :class:`aiogram.methods.delete_message.DeleteMessage` for limitations on which messages can be deleted""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - chat_id: Union[int, str], - message_ids: List[int], - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(chat_id=chat_id, message_ids=message_ids, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/methods/delete_my_commands.py b/env/Lib/site-packages/aiogram/methods/delete_my_commands.py deleted file mode 100644 index e35ef67..0000000 --- a/env/Lib/site-packages/aiogram/methods/delete_my_commands.py +++ /dev/null @@ -1,67 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Optional, Union - -from ..types import ( - BotCommandScopeAllChatAdministrators, - BotCommandScopeAllGroupChats, - BotCommandScopeAllPrivateChats, - BotCommandScopeChat, - BotCommandScopeChatAdministrators, - BotCommandScopeChatMember, - BotCommandScopeDefault, -) -from .base import TelegramMethod - - -class DeleteMyCommands(TelegramMethod[bool]): - """ - Use this method to delete the list of the bot's commands for the given scope and user language. After deletion, `higher level commands `_ will be shown to affected users. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#deletemycommands - """ - - __returning__ = bool - __api_method__ = "deleteMyCommands" - - scope: Optional[ - Union[ - BotCommandScopeDefault, - BotCommandScopeAllPrivateChats, - BotCommandScopeAllGroupChats, - BotCommandScopeAllChatAdministrators, - BotCommandScopeChat, - BotCommandScopeChatAdministrators, - BotCommandScopeChatMember, - ] - ] = None - """A JSON-serialized object, describing scope of users for which the commands are relevant. Defaults to :class:`aiogram.types.bot_command_scope_default.BotCommandScopeDefault`.""" - language_code: Optional[str] = None - """A two-letter ISO 639-1 language code. If empty, commands will be applied to all users from the given scope, for whose language there are no dedicated commands""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - scope: Optional[ - Union[ - BotCommandScopeDefault, - BotCommandScopeAllPrivateChats, - BotCommandScopeAllGroupChats, - BotCommandScopeAllChatAdministrators, - BotCommandScopeChat, - BotCommandScopeChatAdministrators, - BotCommandScopeChatMember, - ] - ] = None, - language_code: Optional[str] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(scope=scope, language_code=language_code, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/methods/delete_sticker_from_set.py b/env/Lib/site-packages/aiogram/methods/delete_sticker_from_set.py deleted file mode 100644 index 6aae72b..0000000 --- a/env/Lib/site-packages/aiogram/methods/delete_sticker_from_set.py +++ /dev/null @@ -1,30 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any - -from .base import TelegramMethod - - -class DeleteStickerFromSet(TelegramMethod[bool]): - """ - Use this method to delete a sticker from a set created by the bot. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#deletestickerfromset - """ - - __returning__ = bool - __api_method__ = "deleteStickerFromSet" - - sticker: str - """File identifier of the sticker""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__(__pydantic__self__, *, sticker: str, **__pydantic_kwargs: Any) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(sticker=sticker, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/methods/delete_sticker_set.py b/env/Lib/site-packages/aiogram/methods/delete_sticker_set.py deleted file mode 100644 index 519c5db..0000000 --- a/env/Lib/site-packages/aiogram/methods/delete_sticker_set.py +++ /dev/null @@ -1,30 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any - -from .base import TelegramMethod - - -class DeleteStickerSet(TelegramMethod[bool]): - """ - Use this method to delete a sticker set that was created by the bot. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#deletestickerset - """ - - __returning__ = bool - __api_method__ = "deleteStickerSet" - - name: str - """Sticker set name""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__(__pydantic__self__, *, name: str, **__pydantic_kwargs: Any) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(name=name, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/methods/delete_webhook.py b/env/Lib/site-packages/aiogram/methods/delete_webhook.py deleted file mode 100644 index 05c39f4..0000000 --- a/env/Lib/site-packages/aiogram/methods/delete_webhook.py +++ /dev/null @@ -1,35 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Optional - -from .base import TelegramMethod - - -class DeleteWebhook(TelegramMethod[bool]): - """ - Use this method to remove webhook integration if you decide to switch back to :class:`aiogram.methods.get_updates.GetUpdates`. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#deletewebhook - """ - - __returning__ = bool - __api_method__ = "deleteWebhook" - - drop_pending_updates: Optional[bool] = None - """Pass :code:`True` to drop all pending updates""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - drop_pending_updates: Optional[bool] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(drop_pending_updates=drop_pending_updates, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/methods/edit_chat_invite_link.py b/env/Lib/site-packages/aiogram/methods/edit_chat_invite_link.py deleted file mode 100644 index 8ec86ca..0000000 --- a/env/Lib/site-packages/aiogram/methods/edit_chat_invite_link.py +++ /dev/null @@ -1,60 +0,0 @@ -from __future__ import annotations - -import datetime -from typing import TYPE_CHECKING, Any, Optional, Union - -from ..types import ChatInviteLink -from .base import TelegramMethod - - -class EditChatInviteLink(TelegramMethod[ChatInviteLink]): - """ - Use this method to edit a non-primary invite link created by the bot. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the edited invite link as a :class:`aiogram.types.chat_invite_link.ChatInviteLink` object. - - Source: https://core.telegram.org/bots/api#editchatinvitelink - """ - - __returning__ = ChatInviteLink - __api_method__ = "editChatInviteLink" - - chat_id: Union[int, str] - """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" - invite_link: str - """The invite link to edit""" - name: Optional[str] = None - """Invite link name; 0-32 characters""" - expire_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None - """Point in time (Unix timestamp) when the link will expire""" - member_limit: Optional[int] = None - """The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999""" - creates_join_request: Optional[bool] = None - """:code:`True`, if users joining the chat via the link need to be approved by chat administrators. If :code:`True`, *member_limit* can't be specified""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - chat_id: Union[int, str], - invite_link: str, - name: Optional[str] = None, - expire_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None, - member_limit: Optional[int] = None, - creates_join_request: Optional[bool] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - chat_id=chat_id, - invite_link=invite_link, - name=name, - expire_date=expire_date, - member_limit=member_limit, - creates_join_request=creates_join_request, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/methods/edit_chat_subscription_invite_link.py b/env/Lib/site-packages/aiogram/methods/edit_chat_subscription_invite_link.py deleted file mode 100644 index ffb37d8..0000000 --- a/env/Lib/site-packages/aiogram/methods/edit_chat_subscription_invite_link.py +++ /dev/null @@ -1,44 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Optional, Union - -from ..types import ChatInviteLink -from .base import TelegramMethod - - -class EditChatSubscriptionInviteLink(TelegramMethod[ChatInviteLink]): - """ - Use this method to edit a subscription invite link created by the bot. The bot must have the *can_invite_users* administrator rights. Returns the edited invite link as a :class:`aiogram.types.chat_invite_link.ChatInviteLink` object. - - Source: https://core.telegram.org/bots/api#editchatsubscriptioninvitelink - """ - - __returning__ = ChatInviteLink - __api_method__ = "editChatSubscriptionInviteLink" - - chat_id: Union[int, str] - """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" - invite_link: str - """The invite link to edit""" - name: Optional[str] = None - """Invite link name; 0-32 characters""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - chat_id: Union[int, str], - invite_link: str, - name: Optional[str] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - chat_id=chat_id, invite_link=invite_link, name=name, **__pydantic_kwargs - ) diff --git a/env/Lib/site-packages/aiogram/methods/edit_forum_topic.py b/env/Lib/site-packages/aiogram/methods/edit_forum_topic.py deleted file mode 100644 index 233e9cb..0000000 --- a/env/Lib/site-packages/aiogram/methods/edit_forum_topic.py +++ /dev/null @@ -1,50 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Optional, Union - -from .base import TelegramMethod - - -class EditForumTopic(TelegramMethod[bool]): - """ - Use this method to edit name and icon of a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the *can_manage_topics* administrator rights, unless it is the creator of the topic. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#editforumtopic - """ - - __returning__ = bool - __api_method__ = "editForumTopic" - - chat_id: Union[int, str] - """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)""" - message_thread_id: int - """Unique identifier for the target message thread of the forum topic""" - name: Optional[str] = None - """New topic name, 0-128 characters. If not specified or empty, the current name of the topic will be kept""" - icon_custom_emoji_id: Optional[str] = None - """New unique identifier of the custom emoji shown as the topic icon. Use :class:`aiogram.methods.get_forum_topic_icon_stickers.GetForumTopicIconStickers` to get all allowed custom emoji identifiers. Pass an empty string to remove the icon. If not specified, the current icon will be kept""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - chat_id: Union[int, str], - message_thread_id: int, - name: Optional[str] = None, - icon_custom_emoji_id: Optional[str] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - chat_id=chat_id, - message_thread_id=message_thread_id, - name=name, - icon_custom_emoji_id=icon_custom_emoji_id, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/methods/edit_general_forum_topic.py b/env/Lib/site-packages/aiogram/methods/edit_general_forum_topic.py deleted file mode 100644 index f0be56e..0000000 --- a/env/Lib/site-packages/aiogram/methods/edit_general_forum_topic.py +++ /dev/null @@ -1,34 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Union - -from .base import TelegramMethod - - -class EditGeneralForumTopic(TelegramMethod[bool]): - """ - Use this method to edit the name of the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the *can_manage_topics* administrator rights. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#editgeneralforumtopic - """ - - __returning__ = bool - __api_method__ = "editGeneralForumTopic" - - chat_id: Union[int, str] - """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)""" - name: str - """New topic name, 1-128 characters""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, *, chat_id: Union[int, str], name: str, **__pydantic_kwargs: Any - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(chat_id=chat_id, name=name, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/methods/edit_message_caption.py b/env/Lib/site-packages/aiogram/methods/edit_message_caption.py deleted file mode 100644 index 8a759d4..0000000 --- a/env/Lib/site-packages/aiogram/methods/edit_message_caption.py +++ /dev/null @@ -1,74 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, List, Optional, Union - -from ..client.default import Default -from ..types import UNSET_PARSE_MODE, InlineKeyboardMarkup, Message, MessageEntity -from .base import TelegramMethod - - -class EditMessageCaption(TelegramMethod[Union[Message, bool]]): - """ - Use this method to edit captions of messages. On success, if the edited message is not an inline message, the edited :class:`aiogram.types.message.Message` is returned, otherwise :code:`True` is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within **48 hours** from the time they were sent. - - Source: https://core.telegram.org/bots/api#editmessagecaption - """ - - __returning__ = Union[Message, bool] - __api_method__ = "editMessageCaption" - - business_connection_id: Optional[str] = None - """Unique identifier of the business connection on behalf of which the message to be edited was sent""" - chat_id: Optional[Union[int, str]] = None - """Required if *inline_message_id* is not specified. Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" - message_id: Optional[int] = None - """Required if *inline_message_id* is not specified. Identifier of the message to edit""" - inline_message_id: Optional[str] = None - """Required if *chat_id* and *message_id* are not specified. Identifier of the inline message""" - caption: Optional[str] = None - """New caption of the message, 0-1024 characters after entities parsing""" - parse_mode: Optional[Union[str, Default]] = Default("parse_mode") - """Mode for parsing entities in the message caption. See `formatting options `_ for more details.""" - caption_entities: Optional[List[MessageEntity]] = None - """A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*""" - show_caption_above_media: Optional[Union[bool, Default]] = Default("show_caption_above_media") - """Pass :code:`True`, if the caption must be shown above the message media. Supported only for animation, photo and video messages.""" - reply_markup: Optional[InlineKeyboardMarkup] = None - """A JSON-serialized object for an `inline keyboard `_.""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - business_connection_id: Optional[str] = None, - chat_id: Optional[Union[int, str]] = None, - message_id: Optional[int] = None, - inline_message_id: Optional[str] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - show_caption_above_media: Optional[Union[bool, Default]] = Default( - "show_caption_above_media" - ), - reply_markup: Optional[InlineKeyboardMarkup] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - business_connection_id=business_connection_id, - chat_id=chat_id, - message_id=message_id, - inline_message_id=inline_message_id, - caption=caption, - parse_mode=parse_mode, - caption_entities=caption_entities, - show_caption_above_media=show_caption_above_media, - reply_markup=reply_markup, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/methods/edit_message_live_location.py b/env/Lib/site-packages/aiogram/methods/edit_message_live_location.py deleted file mode 100644 index 6bc5569..0000000 --- a/env/Lib/site-packages/aiogram/methods/edit_message_live_location.py +++ /dev/null @@ -1,79 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Optional, Union - -from ..types import InlineKeyboardMarkup, Message -from .base import TelegramMethod - - -class EditMessageLiveLocation(TelegramMethod[Union[Message, bool]]): - """ - Use this method to edit live location messages. A location can be edited until its *live_period* expires or editing is explicitly disabled by a call to :class:`aiogram.methods.stop_message_live_location.StopMessageLiveLocation`. On success, if the edited message is not an inline message, the edited :class:`aiogram.types.message.Message` is returned, otherwise :code:`True` is returned. - - Source: https://core.telegram.org/bots/api#editmessagelivelocation - """ - - __returning__ = Union[Message, bool] - __api_method__ = "editMessageLiveLocation" - - latitude: float - """Latitude of new location""" - longitude: float - """Longitude of new location""" - business_connection_id: Optional[str] = None - """Unique identifier of the business connection on behalf of which the message to be edited was sent""" - chat_id: Optional[Union[int, str]] = None - """Required if *inline_message_id* is not specified. Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" - message_id: Optional[int] = None - """Required if *inline_message_id* is not specified. Identifier of the message to edit""" - inline_message_id: Optional[str] = None - """Required if *chat_id* and *message_id* are not specified. Identifier of the inline message""" - live_period: Optional[int] = None - """New period in seconds during which the location can be updated, starting from the message send date. If 0x7FFFFFFF is specified, then the location can be updated forever. Otherwise, the new value must not exceed the current *live_period* by more than a day, and the live location expiration date must remain within the next 90 days. If not specified, then *live_period* remains unchanged""" - horizontal_accuracy: Optional[float] = None - """The radius of uncertainty for the location, measured in meters; 0-1500""" - heading: Optional[int] = None - """Direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.""" - proximity_alert_radius: Optional[int] = None - """The maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.""" - reply_markup: Optional[InlineKeyboardMarkup] = None - """A JSON-serialized object for a new `inline keyboard `_.""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - latitude: float, - longitude: float, - business_connection_id: Optional[str] = None, - chat_id: Optional[Union[int, str]] = None, - message_id: Optional[int] = None, - inline_message_id: Optional[str] = None, - live_period: Optional[int] = None, - horizontal_accuracy: Optional[float] = None, - heading: Optional[int] = None, - proximity_alert_radius: Optional[int] = None, - reply_markup: Optional[InlineKeyboardMarkup] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - latitude=latitude, - longitude=longitude, - business_connection_id=business_connection_id, - chat_id=chat_id, - message_id=message_id, - inline_message_id=inline_message_id, - live_period=live_period, - horizontal_accuracy=horizontal_accuracy, - heading=heading, - proximity_alert_radius=proximity_alert_radius, - reply_markup=reply_markup, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/methods/edit_message_media.py b/env/Lib/site-packages/aiogram/methods/edit_message_media.py deleted file mode 100644 index b898be7..0000000 --- a/env/Lib/site-packages/aiogram/methods/edit_message_media.py +++ /dev/null @@ -1,75 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Optional, Union - -from ..types import ( - InlineKeyboardMarkup, - InputMediaAnimation, - InputMediaAudio, - InputMediaDocument, - InputMediaPhoto, - InputMediaVideo, - Message, -) -from .base import TelegramMethod - - -class EditMessageMedia(TelegramMethod[Union[Message, bool]]): - """ - Use this method to edit animation, audio, document, photo, or video messages. If a message is part of a message album, then it can be edited only to an audio for audio albums, only to a document for document albums and to a photo or a video otherwise. When an inline message is edited, a new file can't be uploaded; use a previously uploaded file via its file_id or specify a URL. On success, if the edited message is not an inline message, the edited :class:`aiogram.types.message.Message` is returned, otherwise :code:`True` is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within **48 hours** from the time they were sent. - - Source: https://core.telegram.org/bots/api#editmessagemedia - """ - - __returning__ = Union[Message, bool] - __api_method__ = "editMessageMedia" - - media: Union[ - InputMediaAnimation, InputMediaDocument, InputMediaAudio, InputMediaPhoto, InputMediaVideo - ] - """A JSON-serialized object for a new media content of the message""" - business_connection_id: Optional[str] = None - """Unique identifier of the business connection on behalf of which the message to be edited was sent""" - chat_id: Optional[Union[int, str]] = None - """Required if *inline_message_id* is not specified. Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" - message_id: Optional[int] = None - """Required if *inline_message_id* is not specified. Identifier of the message to edit""" - inline_message_id: Optional[str] = None - """Required if *chat_id* and *message_id* are not specified. Identifier of the inline message""" - reply_markup: Optional[InlineKeyboardMarkup] = None - """A JSON-serialized object for a new `inline keyboard `_.""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - media: Union[ - InputMediaAnimation, - InputMediaDocument, - InputMediaAudio, - InputMediaPhoto, - InputMediaVideo, - ], - business_connection_id: Optional[str] = None, - chat_id: Optional[Union[int, str]] = None, - message_id: Optional[int] = None, - inline_message_id: Optional[str] = None, - reply_markup: Optional[InlineKeyboardMarkup] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - media=media, - business_connection_id=business_connection_id, - chat_id=chat_id, - message_id=message_id, - inline_message_id=inline_message_id, - reply_markup=reply_markup, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/methods/edit_message_reply_markup.py b/env/Lib/site-packages/aiogram/methods/edit_message_reply_markup.py deleted file mode 100644 index 49052f3..0000000 --- a/env/Lib/site-packages/aiogram/methods/edit_message_reply_markup.py +++ /dev/null @@ -1,55 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Optional, Union - -from ..types import InlineKeyboardMarkup, Message -from .base import TelegramMethod - - -class EditMessageReplyMarkup(TelegramMethod[Union[Message, bool]]): - """ - Use this method to edit only the reply markup of messages. On success, if the edited message is not an inline message, the edited :class:`aiogram.types.message.Message` is returned, otherwise :code:`True` is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within **48 hours** from the time they were sent. - - Source: https://core.telegram.org/bots/api#editmessagereplymarkup - """ - - __returning__ = Union[Message, bool] - __api_method__ = "editMessageReplyMarkup" - - business_connection_id: Optional[str] = None - """Unique identifier of the business connection on behalf of which the message to be edited was sent""" - chat_id: Optional[Union[int, str]] = None - """Required if *inline_message_id* is not specified. Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" - message_id: Optional[int] = None - """Required if *inline_message_id* is not specified. Identifier of the message to edit""" - inline_message_id: Optional[str] = None - """Required if *chat_id* and *message_id* are not specified. Identifier of the inline message""" - reply_markup: Optional[InlineKeyboardMarkup] = None - """A JSON-serialized object for an `inline keyboard `_.""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - business_connection_id: Optional[str] = None, - chat_id: Optional[Union[int, str]] = None, - message_id: Optional[int] = None, - inline_message_id: Optional[str] = None, - reply_markup: Optional[InlineKeyboardMarkup] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - business_connection_id=business_connection_id, - chat_id=chat_id, - message_id=message_id, - inline_message_id=inline_message_id, - reply_markup=reply_markup, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/methods/edit_message_text.py b/env/Lib/site-packages/aiogram/methods/edit_message_text.py deleted file mode 100644 index cfaaa94..0000000 --- a/env/Lib/site-packages/aiogram/methods/edit_message_text.py +++ /dev/null @@ -1,91 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, List, Optional, Union - -from pydantic import Field - -from ..client.default import Default -from ..types import ( - UNSET_PARSE_MODE, - InlineKeyboardMarkup, - LinkPreviewOptions, - Message, - MessageEntity, -) -from .base import TelegramMethod - - -class EditMessageText(TelegramMethod[Union[Message, bool]]): - """ - Use this method to edit text and `game `_ messages. On success, if the edited message is not an inline message, the edited :class:`aiogram.types.message.Message` is returned, otherwise :code:`True` is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within **48 hours** from the time they were sent. - - Source: https://core.telegram.org/bots/api#editmessagetext - """ - - __returning__ = Union[Message, bool] - __api_method__ = "editMessageText" - - text: str - """New text of the message, 1-4096 characters after entities parsing""" - business_connection_id: Optional[str] = None - """Unique identifier of the business connection on behalf of which the message to be edited was sent""" - chat_id: Optional[Union[int, str]] = None - """Required if *inline_message_id* is not specified. Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" - message_id: Optional[int] = None - """Required if *inline_message_id* is not specified. Identifier of the message to edit""" - inline_message_id: Optional[str] = None - """Required if *chat_id* and *message_id* are not specified. Identifier of the inline message""" - parse_mode: Optional[Union[str, Default]] = Default("parse_mode") - """Mode for parsing entities in the message text. See `formatting options `_ for more details.""" - entities: Optional[List[MessageEntity]] = None - """A JSON-serialized list of special entities that appear in message text, which can be specified instead of *parse_mode*""" - link_preview_options: Optional[LinkPreviewOptions] = None - """Link preview generation options for the message""" - reply_markup: Optional[InlineKeyboardMarkup] = None - """A JSON-serialized object for an `inline keyboard `_.""" - disable_web_page_preview: Optional[Union[bool, Default]] = Field( - Default("link_preview_is_disabled"), json_schema_extra={"deprecated": True} - ) - """Disables link previews for links in this message - -.. deprecated:: API:7.0 - https://core.telegram.org/bots/api-changelog#december-29-2023""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - text: str, - business_connection_id: Optional[str] = None, - chat_id: Optional[Union[int, str]] = None, - message_id: Optional[int] = None, - inline_message_id: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - entities: Optional[List[MessageEntity]] = None, - link_preview_options: Optional[LinkPreviewOptions] = None, - reply_markup: Optional[InlineKeyboardMarkup] = None, - disable_web_page_preview: Optional[Union[bool, Default]] = Default( - "link_preview_is_disabled" - ), - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - text=text, - business_connection_id=business_connection_id, - chat_id=chat_id, - message_id=message_id, - inline_message_id=inline_message_id, - parse_mode=parse_mode, - entities=entities, - link_preview_options=link_preview_options, - reply_markup=reply_markup, - disable_web_page_preview=disable_web_page_preview, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/methods/export_chat_invite_link.py b/env/Lib/site-packages/aiogram/methods/export_chat_invite_link.py deleted file mode 100644 index 271e35d..0000000 --- a/env/Lib/site-packages/aiogram/methods/export_chat_invite_link.py +++ /dev/null @@ -1,34 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Union - -from .base import TelegramMethod - - -class ExportChatInviteLink(TelegramMethod[str]): - """ - Use this method to generate a new primary invite link for a chat; any previously generated primary link is revoked. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the new invite link as *String* on success. - - Note: Each administrator in a chat generates their own invite links. Bots can't use invite links generated by other administrators. If you want your bot to work with invite links, it will need to generate its own link using :class:`aiogram.methods.export_chat_invite_link.ExportChatInviteLink` or by calling the :class:`aiogram.methods.get_chat.GetChat` method. If your bot needs to generate a new primary invite link replacing its previous one, use :class:`aiogram.methods.export_chat_invite_link.ExportChatInviteLink` again. - - Source: https://core.telegram.org/bots/api#exportchatinvitelink - """ - - __returning__ = str - __api_method__ = "exportChatInviteLink" - - chat_id: Union[int, str] - """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, *, chat_id: Union[int, str], **__pydantic_kwargs: Any - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(chat_id=chat_id, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/methods/forward_message.py b/env/Lib/site-packages/aiogram/methods/forward_message.py deleted file mode 100644 index 01d764a..0000000 --- a/env/Lib/site-packages/aiogram/methods/forward_message.py +++ /dev/null @@ -1,61 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Optional, Union - -from ..client.default import Default -from ..types import Message -from ..types.base import UNSET_PROTECT_CONTENT -from .base import TelegramMethod - - -class ForwardMessage(TelegramMethod[Message]): - """ - Use this method to forward messages of any kind. Service messages and messages with protected content can't be forwarded. On success, the sent :class:`aiogram.types.message.Message` is returned. - - Source: https://core.telegram.org/bots/api#forwardmessage - """ - - __returning__ = Message - __api_method__ = "forwardMessage" - - chat_id: Union[int, str] - """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" - from_chat_id: Union[int, str] - """Unique identifier for the chat where the original message was sent (or channel username in the format :code:`@channelusername`)""" - message_id: int - """Message identifier in the chat specified in *from_chat_id*""" - message_thread_id: Optional[int] = None - """Unique identifier for the target message thread (topic) of the forum; for forum supergroups only""" - disable_notification: Optional[bool] = None - """Sends the message `silently `_. Users will receive a notification with no sound.""" - protect_content: Optional[Union[bool, Default]] = Default("protect_content") - """Protects the contents of the forwarded message from forwarding and saving""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - chat_id: Union[int, str], - from_chat_id: Union[int, str], - message_id: int, - message_thread_id: Optional[int] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - chat_id=chat_id, - from_chat_id=from_chat_id, - message_id=message_id, - message_thread_id=message_thread_id, - disable_notification=disable_notification, - protect_content=protect_content, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/methods/forward_messages.py b/env/Lib/site-packages/aiogram/methods/forward_messages.py deleted file mode 100644 index 829545f..0000000 --- a/env/Lib/site-packages/aiogram/methods/forward_messages.py +++ /dev/null @@ -1,57 +0,0 @@ -from typing import TYPE_CHECKING, Any, List, Optional, Union - -from ..types import MessageId -from .base import TelegramMethod - - -class ForwardMessages(TelegramMethod[List[MessageId]]): - """ - Use this method to forward multiple messages of any kind. If some of the specified messages can't be found or forwarded, they are skipped. Service messages and messages with protected content can't be forwarded. Album grouping is kept for forwarded messages. On success, an array of :class:`aiogram.types.message_id.MessageId` of the sent messages is returned. - - Source: https://core.telegram.org/bots/api#forwardmessages - """ - - __returning__ = List[MessageId] - __api_method__ = "forwardMessages" - - chat_id: Union[int, str] - """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" - from_chat_id: Union[int, str] - """Unique identifier for the chat where the original messages were sent (or channel username in the format :code:`@channelusername`)""" - message_ids: List[int] - """A JSON-serialized list of 1-100 identifiers of messages in the chat *from_chat_id* to forward. The identifiers must be specified in a strictly increasing order.""" - message_thread_id: Optional[int] = None - """Unique identifier for the target message thread (topic) of the forum; for forum supergroups only""" - disable_notification: Optional[bool] = None - """Sends the messages `silently `_. Users will receive a notification with no sound.""" - protect_content: Optional[bool] = None - """Protects the contents of the forwarded messages from forwarding and saving""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - chat_id: Union[int, str], - from_chat_id: Union[int, str], - message_ids: List[int], - message_thread_id: Optional[int] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[bool] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - chat_id=chat_id, - from_chat_id=from_chat_id, - message_ids=message_ids, - message_thread_id=message_thread_id, - disable_notification=disable_notification, - protect_content=protect_content, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/methods/get_business_connection.py b/env/Lib/site-packages/aiogram/methods/get_business_connection.py deleted file mode 100644 index 97cb9ca..0000000 --- a/env/Lib/site-packages/aiogram/methods/get_business_connection.py +++ /dev/null @@ -1,34 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any - -from aiogram.types import BusinessConnection - -from .base import TelegramMethod - - -class GetBusinessConnection(TelegramMethod[BusinessConnection]): - """ - Use this method to get information about the connection of the bot with a business account. Returns a :class:`aiogram.types.business_connection.BusinessConnection` object on success. - - Source: https://core.telegram.org/bots/api#getbusinessconnection - """ - - __returning__ = BusinessConnection - __api_method__ = "getBusinessConnection" - - business_connection_id: str - """Unique identifier of the business connection""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, *, business_connection_id: str, **__pydantic_kwargs: Any - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(business_connection_id=business_connection_id, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/methods/get_chat.py b/env/Lib/site-packages/aiogram/methods/get_chat.py deleted file mode 100644 index 6b6b977..0000000 --- a/env/Lib/site-packages/aiogram/methods/get_chat.py +++ /dev/null @@ -1,33 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Union - -from ..types import ChatFullInfo -from .base import TelegramMethod - - -class GetChat(TelegramMethod[ChatFullInfo]): - """ - Use this method to get up-to-date information about the chat. Returns a :class:`aiogram.types.chat_full_info.ChatFullInfo` object on success. - - Source: https://core.telegram.org/bots/api#getchat - """ - - __returning__ = ChatFullInfo - __api_method__ = "getChat" - - chat_id: Union[int, str] - """Unique identifier for the target chat or username of the target supergroup or channel (in the format :code:`@channelusername`)""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, *, chat_id: Union[int, str], **__pydantic_kwargs: Any - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(chat_id=chat_id, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/methods/get_chat_administrators.py b/env/Lib/site-packages/aiogram/methods/get_chat_administrators.py deleted file mode 100644 index 99e403e..0000000 --- a/env/Lib/site-packages/aiogram/methods/get_chat_administrators.py +++ /dev/null @@ -1,62 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, List, Union - -from ..types import ( - ChatMemberAdministrator, - ChatMemberBanned, - ChatMemberLeft, - ChatMemberMember, - ChatMemberOwner, - ChatMemberRestricted, -) -from .base import TelegramMethod - - -class GetChatAdministrators( - TelegramMethod[ - List[ - Union[ - ChatMemberOwner, - ChatMemberAdministrator, - ChatMemberMember, - ChatMemberRestricted, - ChatMemberLeft, - ChatMemberBanned, - ] - ] - ] -): - """ - Use this method to get a list of administrators in a chat, which aren't bots. Returns an Array of :class:`aiogram.types.chat_member.ChatMember` objects. - - Source: https://core.telegram.org/bots/api#getchatadministrators - """ - - __returning__ = List[ - Union[ - ChatMemberOwner, - ChatMemberAdministrator, - ChatMemberMember, - ChatMemberRestricted, - ChatMemberLeft, - ChatMemberBanned, - ] - ] - __api_method__ = "getChatAdministrators" - - chat_id: Union[int, str] - """Unique identifier for the target chat or username of the target supergroup or channel (in the format :code:`@channelusername`)""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, *, chat_id: Union[int, str], **__pydantic_kwargs: Any - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(chat_id=chat_id, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/methods/get_chat_member.py b/env/Lib/site-packages/aiogram/methods/get_chat_member.py deleted file mode 100644 index 495f628..0000000 --- a/env/Lib/site-packages/aiogram/methods/get_chat_member.py +++ /dev/null @@ -1,60 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Union - -from ..types import ( - ChatMemberAdministrator, - ChatMemberBanned, - ChatMemberLeft, - ChatMemberMember, - ChatMemberOwner, - ChatMemberRestricted, -) -from .base import TelegramMethod - - -class GetChatMember( - TelegramMethod[ - Union[ - ChatMemberOwner, - ChatMemberAdministrator, - ChatMemberMember, - ChatMemberRestricted, - ChatMemberLeft, - ChatMemberBanned, - ] - ] -): - """ - Use this method to get information about a member of a chat. The method is only guaranteed to work for other users if the bot is an administrator in the chat. Returns a :class:`aiogram.types.chat_member.ChatMember` object on success. - - Source: https://core.telegram.org/bots/api#getchatmember - """ - - __returning__ = Union[ - ChatMemberOwner, - ChatMemberAdministrator, - ChatMemberMember, - ChatMemberRestricted, - ChatMemberLeft, - ChatMemberBanned, - ] - __api_method__ = "getChatMember" - - chat_id: Union[int, str] - """Unique identifier for the target chat or username of the target supergroup or channel (in the format :code:`@channelusername`)""" - user_id: int - """Unique identifier of the target user""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, *, chat_id: Union[int, str], user_id: int, **__pydantic_kwargs: Any - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(chat_id=chat_id, user_id=user_id, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/methods/get_chat_member_count.py b/env/Lib/site-packages/aiogram/methods/get_chat_member_count.py deleted file mode 100644 index fc33c23..0000000 --- a/env/Lib/site-packages/aiogram/methods/get_chat_member_count.py +++ /dev/null @@ -1,32 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Union - -from .base import TelegramMethod - - -class GetChatMemberCount(TelegramMethod[int]): - """ - Use this method to get the number of members in a chat. Returns *Int* on success. - - Source: https://core.telegram.org/bots/api#getchatmembercount - """ - - __returning__ = int - __api_method__ = "getChatMemberCount" - - chat_id: Union[int, str] - """Unique identifier for the target chat or username of the target supergroup or channel (in the format :code:`@channelusername`)""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, *, chat_id: Union[int, str], **__pydantic_kwargs: Any - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(chat_id=chat_id, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/methods/get_chat_menu_button.py b/env/Lib/site-packages/aiogram/methods/get_chat_menu_button.py deleted file mode 100644 index ee1248d..0000000 --- a/env/Lib/site-packages/aiogram/methods/get_chat_menu_button.py +++ /dev/null @@ -1,35 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Optional, Union - -from ..types import MenuButtonCommands, MenuButtonDefault, MenuButtonWebApp -from .base import TelegramMethod - - -class GetChatMenuButton( - TelegramMethod[Union[MenuButtonDefault, MenuButtonWebApp, MenuButtonCommands]] -): - """ - Use this method to get the current value of the bot's menu button in a private chat, or the default menu button. Returns :class:`aiogram.types.menu_button.MenuButton` on success. - - Source: https://core.telegram.org/bots/api#getchatmenubutton - """ - - __returning__ = Union[MenuButtonDefault, MenuButtonWebApp, MenuButtonCommands] - __api_method__ = "getChatMenuButton" - - chat_id: Optional[int] = None - """Unique identifier for the target private chat. If not specified, default bot's menu button will be returned""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, *, chat_id: Optional[int] = None, **__pydantic_kwargs: Any - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(chat_id=chat_id, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/methods/get_custom_emoji_stickers.py b/env/Lib/site-packages/aiogram/methods/get_custom_emoji_stickers.py deleted file mode 100644 index 3235d97..0000000 --- a/env/Lib/site-packages/aiogram/methods/get_custom_emoji_stickers.py +++ /dev/null @@ -1,33 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, List - -from ..types import Sticker -from .base import TelegramMethod - - -class GetCustomEmojiStickers(TelegramMethod[List[Sticker]]): - """ - Use this method to get information about custom emoji stickers by their identifiers. Returns an Array of :class:`aiogram.types.sticker.Sticker` objects. - - Source: https://core.telegram.org/bots/api#getcustomemojistickers - """ - - __returning__ = List[Sticker] - __api_method__ = "getCustomEmojiStickers" - - custom_emoji_ids: List[str] - """A JSON-serialized list of custom emoji identifiers. At most 200 custom emoji identifiers can be specified.""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, *, custom_emoji_ids: List[str], **__pydantic_kwargs: Any - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(custom_emoji_ids=custom_emoji_ids, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/methods/get_file.py b/env/Lib/site-packages/aiogram/methods/get_file.py deleted file mode 100644 index c96ff31..0000000 --- a/env/Lib/site-packages/aiogram/methods/get_file.py +++ /dev/null @@ -1,32 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any - -from ..types import File -from .base import TelegramMethod - - -class GetFile(TelegramMethod[File]): - """ - Use this method to get basic information about a file and prepare it for downloading. For the moment, bots can download files of up to 20MB in size. On success, a :class:`aiogram.types.file.File` object is returned. The file can then be downloaded via the link :code:`https://api.telegram.org/file/bot/`, where :code:`` is taken from the response. It is guaranteed that the link will be valid for at least 1 hour. When the link expires, a new one can be requested by calling :class:`aiogram.methods.get_file.GetFile` again. - **Note:** This function may not preserve the original file name and MIME type. You should save the file's MIME type and name (if available) when the File object is received. - - Source: https://core.telegram.org/bots/api#getfile - """ - - __returning__ = File - __api_method__ = "getFile" - - file_id: str - """File identifier to get information about""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__(__pydantic__self__, *, file_id: str, **__pydantic_kwargs: Any) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(file_id=file_id, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/methods/get_forum_topic_icon_stickers.py b/env/Lib/site-packages/aiogram/methods/get_forum_topic_icon_stickers.py deleted file mode 100644 index 5c23321..0000000 --- a/env/Lib/site-packages/aiogram/methods/get_forum_topic_icon_stickers.py +++ /dev/null @@ -1,17 +0,0 @@ -from __future__ import annotations - -from typing import List - -from ..types import Sticker -from .base import TelegramMethod - - -class GetForumTopicIconStickers(TelegramMethod[List[Sticker]]): - """ - Use this method to get custom emoji stickers, which can be used as a forum topic icon by any user. Requires no parameters. Returns an Array of :class:`aiogram.types.sticker.Sticker` objects. - - Source: https://core.telegram.org/bots/api#getforumtopiciconstickers - """ - - __returning__ = List[Sticker] - __api_method__ = "getForumTopicIconStickers" diff --git a/env/Lib/site-packages/aiogram/methods/get_game_high_scores.py b/env/Lib/site-packages/aiogram/methods/get_game_high_scores.py deleted file mode 100644 index cac9d61..0000000 --- a/env/Lib/site-packages/aiogram/methods/get_game_high_scores.py +++ /dev/null @@ -1,53 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, List, Optional - -from ..types import GameHighScore -from .base import TelegramMethod - - -class GetGameHighScores(TelegramMethod[List[GameHighScore]]): - """ - Use this method to get data for high score tables. Will return the score of the specified user and several of their neighbors in a game. Returns an Array of :class:`aiogram.types.game_high_score.GameHighScore` objects. - - This method will currently return scores for the target user, plus two of their closest neighbors on each side. Will also return the top three users if the user and their neighbors are not among them. Please note that this behavior is subject to change. - - Source: https://core.telegram.org/bots/api#getgamehighscores - """ - - __returning__ = List[GameHighScore] - __api_method__ = "getGameHighScores" - - user_id: int - """Target user id""" - chat_id: Optional[int] = None - """Required if *inline_message_id* is not specified. Unique identifier for the target chat""" - message_id: Optional[int] = None - """Required if *inline_message_id* is not specified. Identifier of the sent message""" - inline_message_id: Optional[str] = None - """Required if *chat_id* and *message_id* are not specified. Identifier of the inline message""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - user_id: int, - chat_id: Optional[int] = None, - message_id: Optional[int] = None, - inline_message_id: Optional[str] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - user_id=user_id, - chat_id=chat_id, - message_id=message_id, - inline_message_id=inline_message_id, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/methods/get_me.py b/env/Lib/site-packages/aiogram/methods/get_me.py deleted file mode 100644 index c2cc52f..0000000 --- a/env/Lib/site-packages/aiogram/methods/get_me.py +++ /dev/null @@ -1,15 +0,0 @@ -from __future__ import annotations - -from ..types import User -from .base import TelegramMethod - - -class GetMe(TelegramMethod[User]): - """ - A simple method for testing your bot's authentication token. Requires no parameters. Returns basic information about the bot in form of a :class:`aiogram.types.user.User` object. - - Source: https://core.telegram.org/bots/api#getme - """ - - __returning__ = User - __api_method__ = "getMe" diff --git a/env/Lib/site-packages/aiogram/methods/get_my_commands.py b/env/Lib/site-packages/aiogram/methods/get_my_commands.py deleted file mode 100644 index b3386b6..0000000 --- a/env/Lib/site-packages/aiogram/methods/get_my_commands.py +++ /dev/null @@ -1,68 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, List, Optional, Union - -from ..types import ( - BotCommand, - BotCommandScopeAllChatAdministrators, - BotCommandScopeAllGroupChats, - BotCommandScopeAllPrivateChats, - BotCommandScopeChat, - BotCommandScopeChatAdministrators, - BotCommandScopeChatMember, - BotCommandScopeDefault, -) -from .base import TelegramMethod - - -class GetMyCommands(TelegramMethod[List[BotCommand]]): - """ - Use this method to get the current list of the bot's commands for the given scope and user language. Returns an Array of :class:`aiogram.types.bot_command.BotCommand` objects. If commands aren't set, an empty list is returned. - - Source: https://core.telegram.org/bots/api#getmycommands - """ - - __returning__ = List[BotCommand] - __api_method__ = "getMyCommands" - - scope: Optional[ - Union[ - BotCommandScopeDefault, - BotCommandScopeAllPrivateChats, - BotCommandScopeAllGroupChats, - BotCommandScopeAllChatAdministrators, - BotCommandScopeChat, - BotCommandScopeChatAdministrators, - BotCommandScopeChatMember, - ] - ] = None - """A JSON-serialized object, describing scope of users. Defaults to :class:`aiogram.types.bot_command_scope_default.BotCommandScopeDefault`.""" - language_code: Optional[str] = None - """A two-letter ISO 639-1 language code or an empty string""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - scope: Optional[ - Union[ - BotCommandScopeDefault, - BotCommandScopeAllPrivateChats, - BotCommandScopeAllGroupChats, - BotCommandScopeAllChatAdministrators, - BotCommandScopeChat, - BotCommandScopeChatAdministrators, - BotCommandScopeChatMember, - ] - ] = None, - language_code: Optional[str] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(scope=scope, language_code=language_code, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/methods/get_my_default_administrator_rights.py b/env/Lib/site-packages/aiogram/methods/get_my_default_administrator_rights.py deleted file mode 100644 index 4f9ad9a..0000000 --- a/env/Lib/site-packages/aiogram/methods/get_my_default_administrator_rights.py +++ /dev/null @@ -1,33 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Optional - -from ..types import ChatAdministratorRights -from .base import TelegramMethod - - -class GetMyDefaultAdministratorRights(TelegramMethod[ChatAdministratorRights]): - """ - Use this method to get the current default administrator rights of the bot. Returns :class:`aiogram.types.chat_administrator_rights.ChatAdministratorRights` on success. - - Source: https://core.telegram.org/bots/api#getmydefaultadministratorrights - """ - - __returning__ = ChatAdministratorRights - __api_method__ = "getMyDefaultAdministratorRights" - - for_channels: Optional[bool] = None - """Pass :code:`True` to get default administrator rights of the bot in channels. Otherwise, default administrator rights of the bot for groups and supergroups will be returned.""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, *, for_channels: Optional[bool] = None, **__pydantic_kwargs: Any - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(for_channels=for_channels, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/methods/get_my_description.py b/env/Lib/site-packages/aiogram/methods/get_my_description.py deleted file mode 100644 index f967faf..0000000 --- a/env/Lib/site-packages/aiogram/methods/get_my_description.py +++ /dev/null @@ -1,33 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Optional - -from ..types import BotDescription -from .base import TelegramMethod - - -class GetMyDescription(TelegramMethod[BotDescription]): - """ - Use this method to get the current bot description for the given user language. Returns :class:`aiogram.types.bot_description.BotDescription` on success. - - Source: https://core.telegram.org/bots/api#getmydescription - """ - - __returning__ = BotDescription - __api_method__ = "getMyDescription" - - language_code: Optional[str] = None - """A two-letter ISO 639-1 language code or an empty string""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, *, language_code: Optional[str] = None, **__pydantic_kwargs: Any - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(language_code=language_code, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/methods/get_my_name.py b/env/Lib/site-packages/aiogram/methods/get_my_name.py deleted file mode 100644 index 909ac3f..0000000 --- a/env/Lib/site-packages/aiogram/methods/get_my_name.py +++ /dev/null @@ -1,31 +0,0 @@ -from typing import TYPE_CHECKING, Any, Optional - -from ..types import BotName -from .base import TelegramMethod - - -class GetMyName(TelegramMethod[BotName]): - """ - Use this method to get the current bot name for the given user language. Returns :class:`aiogram.types.bot_name.BotName` on success. - - Source: https://core.telegram.org/bots/api#getmyname - """ - - __returning__ = BotName - __api_method__ = "getMyName" - - language_code: Optional[str] = None - """A two-letter ISO 639-1 language code or an empty string""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, *, language_code: Optional[str] = None, **__pydantic_kwargs: Any - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(language_code=language_code, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/methods/get_my_short_description.py b/env/Lib/site-packages/aiogram/methods/get_my_short_description.py deleted file mode 100644 index a9a5666..0000000 --- a/env/Lib/site-packages/aiogram/methods/get_my_short_description.py +++ /dev/null @@ -1,33 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Optional - -from ..types import BotShortDescription -from .base import TelegramMethod - - -class GetMyShortDescription(TelegramMethod[BotShortDescription]): - """ - Use this method to get the current bot short description for the given user language. Returns :class:`aiogram.types.bot_short_description.BotShortDescription` on success. - - Source: https://core.telegram.org/bots/api#getmyshortdescription - """ - - __returning__ = BotShortDescription - __api_method__ = "getMyShortDescription" - - language_code: Optional[str] = None - """A two-letter ISO 639-1 language code or an empty string""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, *, language_code: Optional[str] = None, **__pydantic_kwargs: Any - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(language_code=language_code, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/methods/get_star_transactions.py b/env/Lib/site-packages/aiogram/methods/get_star_transactions.py deleted file mode 100644 index ee0ea2e..0000000 --- a/env/Lib/site-packages/aiogram/methods/get_star_transactions.py +++ /dev/null @@ -1,39 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Optional - -from ..types import StarTransactions -from .base import TelegramMethod - - -class GetStarTransactions(TelegramMethod[StarTransactions]): - """ - Returns the bot's Telegram Star transactions in chronological order. On success, returns a :class:`aiogram.types.star_transactions.StarTransactions` object. - - Source: https://core.telegram.org/bots/api#getstartransactions - """ - - __returning__ = StarTransactions - __api_method__ = "getStarTransactions" - - offset: Optional[int] = None - """Number of transactions to skip in the response""" - limit: Optional[int] = None - """The maximum number of transactions to be retrieved. Values between 1-100 are accepted. Defaults to 100.""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - offset: Optional[int] = None, - limit: Optional[int] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(offset=offset, limit=limit, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/methods/get_sticker_set.py b/env/Lib/site-packages/aiogram/methods/get_sticker_set.py deleted file mode 100644 index 2700e17..0000000 --- a/env/Lib/site-packages/aiogram/methods/get_sticker_set.py +++ /dev/null @@ -1,31 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any - -from ..types import StickerSet -from .base import TelegramMethod - - -class GetStickerSet(TelegramMethod[StickerSet]): - """ - Use this method to get a sticker set. On success, a :class:`aiogram.types.sticker_set.StickerSet` object is returned. - - Source: https://core.telegram.org/bots/api#getstickerset - """ - - __returning__ = StickerSet - __api_method__ = "getStickerSet" - - name: str - """Name of the sticker set""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__(__pydantic__self__, *, name: str, **__pydantic_kwargs: Any) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(name=name, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/methods/get_updates.py b/env/Lib/site-packages/aiogram/methods/get_updates.py deleted file mode 100644 index d1f6371..0000000 --- a/env/Lib/site-packages/aiogram/methods/get_updates.py +++ /dev/null @@ -1,57 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, List, Optional - -from ..types import Update -from .base import TelegramMethod - - -class GetUpdates(TelegramMethod[List[Update]]): - """ - Use this method to receive incoming updates using long polling (`wiki `_). Returns an Array of :class:`aiogram.types.update.Update` objects. - - **Notes** - - **1.** This method will not work if an outgoing webhook is set up. - - **2.** In order to avoid getting duplicate updates, recalculate *offset* after each server response. - - Source: https://core.telegram.org/bots/api#getupdates - """ - - __returning__ = List[Update] - __api_method__ = "getUpdates" - - offset: Optional[int] = None - """Identifier of the first update to be returned. Must be greater by one than the highest among the identifiers of previously received updates. By default, updates starting with the earliest unconfirmed update are returned. An update is considered confirmed as soon as :class:`aiogram.methods.get_updates.GetUpdates` is called with an *offset* higher than its *update_id*. The negative offset can be specified to retrieve updates starting from *-offset* update from the end of the updates queue. All previous updates will be forgotten.""" - limit: Optional[int] = None - """Limits the number of updates to be retrieved. Values between 1-100 are accepted. Defaults to 100.""" - timeout: Optional[int] = None - """Timeout in seconds for long polling. Defaults to 0, i.e. usual short polling. Should be positive, short polling should be used for testing purposes only.""" - allowed_updates: Optional[List[str]] = None - """A JSON-serialized list of the update types you want your bot to receive. For example, specify :code:`["message", "edited_channel_post", "callback_query"]` to only receive updates of these types. See :class:`aiogram.types.update.Update` for a complete list of available update types. Specify an empty list to receive all update types except *chat_member*, *message_reaction*, and *message_reaction_count* (default). If not specified, the previous setting will be used.""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - offset: Optional[int] = None, - limit: Optional[int] = None, - timeout: Optional[int] = None, - allowed_updates: Optional[List[str]] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - offset=offset, - limit=limit, - timeout=timeout, - allowed_updates=allowed_updates, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/methods/get_user_chat_boosts.py b/env/Lib/site-packages/aiogram/methods/get_user_chat_boosts.py deleted file mode 100644 index f3eae26..0000000 --- a/env/Lib/site-packages/aiogram/methods/get_user_chat_boosts.py +++ /dev/null @@ -1,33 +0,0 @@ -from typing import TYPE_CHECKING, Any, Union - -from ..types import UserChatBoosts -from .base import TelegramMethod - - -class GetUserChatBoosts(TelegramMethod[UserChatBoosts]): - """ - Use this method to get the list of boosts added to a chat by a user. Requires administrator rights in the chat. Returns a :class:`aiogram.types.user_chat_boosts.UserChatBoosts` object. - - Source: https://core.telegram.org/bots/api#getuserchatboosts - """ - - __returning__ = UserChatBoosts - __api_method__ = "getUserChatBoosts" - - chat_id: Union[int, str] - """Unique identifier for the chat or username of the channel (in the format :code:`@channelusername`)""" - user_id: int - """Unique identifier of the target user""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, *, chat_id: Union[int, str], user_id: int, **__pydantic_kwargs: Any - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(chat_id=chat_id, user_id=user_id, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/methods/get_user_profile_photos.py b/env/Lib/site-packages/aiogram/methods/get_user_profile_photos.py deleted file mode 100644 index 488885e..0000000 --- a/env/Lib/site-packages/aiogram/methods/get_user_profile_photos.py +++ /dev/null @@ -1,42 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Optional - -from ..types import UserProfilePhotos -from .base import TelegramMethod - - -class GetUserProfilePhotos(TelegramMethod[UserProfilePhotos]): - """ - Use this method to get a list of profile pictures for a user. Returns a :class:`aiogram.types.user_profile_photos.UserProfilePhotos` object. - - Source: https://core.telegram.org/bots/api#getuserprofilephotos - """ - - __returning__ = UserProfilePhotos - __api_method__ = "getUserProfilePhotos" - - user_id: int - """Unique identifier of the target user""" - offset: Optional[int] = None - """Sequential number of the first photo to be returned. By default, all photos are returned.""" - limit: Optional[int] = None - """Limits the number of photos to be retrieved. Values between 1-100 are accepted. Defaults to 100.""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - user_id: int, - offset: Optional[int] = None, - limit: Optional[int] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(user_id=user_id, offset=offset, limit=limit, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/methods/get_webhook_info.py b/env/Lib/site-packages/aiogram/methods/get_webhook_info.py deleted file mode 100644 index c9f0e46..0000000 --- a/env/Lib/site-packages/aiogram/methods/get_webhook_info.py +++ /dev/null @@ -1,15 +0,0 @@ -from __future__ import annotations - -from ..types import WebhookInfo -from .base import TelegramMethod - - -class GetWebhookInfo(TelegramMethod[WebhookInfo]): - """ - Use this method to get current webhook status. Requires no parameters. On success, returns a :class:`aiogram.types.webhook_info.WebhookInfo` object. If the bot is using :class:`aiogram.methods.get_updates.GetUpdates`, will return an object with the *url* field empty. - - Source: https://core.telegram.org/bots/api#getwebhookinfo - """ - - __returning__ = WebhookInfo - __api_method__ = "getWebhookInfo" diff --git a/env/Lib/site-packages/aiogram/methods/hide_general_forum_topic.py b/env/Lib/site-packages/aiogram/methods/hide_general_forum_topic.py deleted file mode 100644 index a3b6ee3..0000000 --- a/env/Lib/site-packages/aiogram/methods/hide_general_forum_topic.py +++ /dev/null @@ -1,32 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Union - -from .base import TelegramMethod - - -class HideGeneralForumTopic(TelegramMethod[bool]): - """ - Use this method to hide the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the *can_manage_topics* administrator rights. The topic will be automatically closed if it was open. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#hidegeneralforumtopic - """ - - __returning__ = bool - __api_method__ = "hideGeneralForumTopic" - - chat_id: Union[int, str] - """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, *, chat_id: Union[int, str], **__pydantic_kwargs: Any - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(chat_id=chat_id, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/methods/leave_chat.py b/env/Lib/site-packages/aiogram/methods/leave_chat.py deleted file mode 100644 index f9d4312..0000000 --- a/env/Lib/site-packages/aiogram/methods/leave_chat.py +++ /dev/null @@ -1,32 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Union - -from .base import TelegramMethod - - -class LeaveChat(TelegramMethod[bool]): - """ - Use this method for your bot to leave a group, supergroup or channel. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#leavechat - """ - - __returning__ = bool - __api_method__ = "leaveChat" - - chat_id: Union[int, str] - """Unique identifier for the target chat or username of the target supergroup or channel (in the format :code:`@channelusername`)""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, *, chat_id: Union[int, str], **__pydantic_kwargs: Any - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(chat_id=chat_id, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/methods/log_out.py b/env/Lib/site-packages/aiogram/methods/log_out.py deleted file mode 100644 index 2a62653..0000000 --- a/env/Lib/site-packages/aiogram/methods/log_out.py +++ /dev/null @@ -1,14 +0,0 @@ -from __future__ import annotations - -from .base import TelegramMethod - - -class LogOut(TelegramMethod[bool]): - """ - Use this method to log out from the cloud Bot API server before launching the bot locally. You **must** log out the bot before running it locally, otherwise there is no guarantee that the bot will receive updates. After a successful call, you can immediately log in on a local server, but will not be able to log in back to the cloud Bot API server for 10 minutes. Returns :code:`True` on success. Requires no parameters. - - Source: https://core.telegram.org/bots/api#logout - """ - - __returning__ = bool - __api_method__ = "logOut" diff --git a/env/Lib/site-packages/aiogram/methods/pin_chat_message.py b/env/Lib/site-packages/aiogram/methods/pin_chat_message.py deleted file mode 100644 index 47c28f1..0000000 --- a/env/Lib/site-packages/aiogram/methods/pin_chat_message.py +++ /dev/null @@ -1,50 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Optional, Union - -from .base import TelegramMethod - - -class PinChatMessage(TelegramMethod[bool]): - """ - Use this method to add a message to the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#pinchatmessage - """ - - __returning__ = bool - __api_method__ = "pinChatMessage" - - chat_id: Union[int, str] - """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" - message_id: int - """Identifier of a message to pin""" - business_connection_id: Optional[str] = None - """Unique identifier of the business connection on behalf of which the message will be pinned""" - disable_notification: Optional[bool] = None - """Pass :code:`True` if it is not necessary to send a notification to all chat members about the new pinned message. Notifications are always disabled in channels and private chats.""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - chat_id: Union[int, str], - message_id: int, - business_connection_id: Optional[str] = None, - disable_notification: Optional[bool] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - chat_id=chat_id, - message_id=message_id, - business_connection_id=business_connection_id, - disable_notification=disable_notification, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/methods/promote_chat_member.py b/env/Lib/site-packages/aiogram/methods/promote_chat_member.py deleted file mode 100644 index 2ca410f..0000000 --- a/env/Lib/site-packages/aiogram/methods/promote_chat_member.py +++ /dev/null @@ -1,102 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Optional, Union - -from .base import TelegramMethod - - -class PromoteChatMember(TelegramMethod[bool]): - """ - Use this method to promote or demote a user in a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Pass :code:`False` for all boolean parameters to demote a user. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#promotechatmember - """ - - __returning__ = bool - __api_method__ = "promoteChatMember" - - chat_id: Union[int, str] - """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" - user_id: int - """Unique identifier of the target user""" - is_anonymous: Optional[bool] = None - """Pass :code:`True` if the administrator's presence in the chat is hidden""" - can_manage_chat: Optional[bool] = None - """Pass :code:`True` if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages and ignore slow mode. Implied by any other administrator privilege.""" - can_delete_messages: Optional[bool] = None - """Pass :code:`True` if the administrator can delete messages of other users""" - can_manage_video_chats: Optional[bool] = None - """Pass :code:`True` if the administrator can manage video chats""" - can_restrict_members: Optional[bool] = None - """Pass :code:`True` if the administrator can restrict, ban or unban chat members, or access supergroup statistics""" - can_promote_members: Optional[bool] = None - """Pass :code:`True` if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have promoted, directly or indirectly (promoted by administrators that were appointed by him)""" - can_change_info: Optional[bool] = None - """Pass :code:`True` if the administrator can change chat title, photo and other settings""" - can_invite_users: Optional[bool] = None - """Pass :code:`True` if the administrator can invite new users to the chat""" - can_post_stories: Optional[bool] = None - """Pass :code:`True` if the administrator can post stories to the chat""" - can_edit_stories: Optional[bool] = None - """Pass :code:`True` if the administrator can edit stories posted by other users, post stories to the chat page, pin chat stories, and access the chat's story archive""" - can_delete_stories: Optional[bool] = None - """Pass :code:`True` if the administrator can delete stories posted by other users""" - can_post_messages: Optional[bool] = None - """Pass :code:`True` if the administrator can post messages in the channel, or access channel statistics; for channels only""" - can_edit_messages: Optional[bool] = None - """Pass :code:`True` if the administrator can edit messages of other users and can pin messages; for channels only""" - can_pin_messages: Optional[bool] = None - """Pass :code:`True` if the administrator can pin messages; for supergroups only""" - can_manage_topics: Optional[bool] = None - """Pass :code:`True` if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - chat_id: Union[int, str], - user_id: int, - is_anonymous: Optional[bool] = None, - can_manage_chat: Optional[bool] = None, - can_delete_messages: Optional[bool] = None, - can_manage_video_chats: Optional[bool] = None, - can_restrict_members: Optional[bool] = None, - can_promote_members: Optional[bool] = None, - can_change_info: Optional[bool] = None, - can_invite_users: Optional[bool] = None, - can_post_stories: Optional[bool] = None, - can_edit_stories: Optional[bool] = None, - can_delete_stories: Optional[bool] = None, - can_post_messages: Optional[bool] = None, - can_edit_messages: Optional[bool] = None, - can_pin_messages: Optional[bool] = None, - can_manage_topics: Optional[bool] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - chat_id=chat_id, - user_id=user_id, - is_anonymous=is_anonymous, - can_manage_chat=can_manage_chat, - can_delete_messages=can_delete_messages, - can_manage_video_chats=can_manage_video_chats, - can_restrict_members=can_restrict_members, - can_promote_members=can_promote_members, - can_change_info=can_change_info, - can_invite_users=can_invite_users, - can_post_stories=can_post_stories, - can_edit_stories=can_edit_stories, - can_delete_stories=can_delete_stories, - can_post_messages=can_post_messages, - can_edit_messages=can_edit_messages, - can_pin_messages=can_pin_messages, - can_manage_topics=can_manage_topics, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/methods/refund_star_payment.py b/env/Lib/site-packages/aiogram/methods/refund_star_payment.py deleted file mode 100644 index 495cc9e..0000000 --- a/env/Lib/site-packages/aiogram/methods/refund_star_payment.py +++ /dev/null @@ -1,42 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any - -from .base import TelegramMethod - - -class RefundStarPayment(TelegramMethod[bool]): - """ - Refunds a successful payment in `Telegram Stars `_. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#refundstarpayment - """ - - __returning__ = bool - __api_method__ = "refundStarPayment" - - user_id: int - """Identifier of the user whose payment will be refunded""" - telegram_payment_charge_id: str - """Telegram payment identifier""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - user_id: int, - telegram_payment_charge_id: str, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - user_id=user_id, - telegram_payment_charge_id=telegram_payment_charge_id, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/methods/reopen_forum_topic.py b/env/Lib/site-packages/aiogram/methods/reopen_forum_topic.py deleted file mode 100644 index 45eb18d..0000000 --- a/env/Lib/site-packages/aiogram/methods/reopen_forum_topic.py +++ /dev/null @@ -1,40 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Union - -from .base import TelegramMethod - - -class ReopenForumTopic(TelegramMethod[bool]): - """ - Use this method to reopen a closed topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the *can_manage_topics* administrator rights, unless it is the creator of the topic. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#reopenforumtopic - """ - - __returning__ = bool - __api_method__ = "reopenForumTopic" - - chat_id: Union[int, str] - """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)""" - message_thread_id: int - """Unique identifier for the target message thread of the forum topic""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - chat_id: Union[int, str], - message_thread_id: int, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - chat_id=chat_id, message_thread_id=message_thread_id, **__pydantic_kwargs - ) diff --git a/env/Lib/site-packages/aiogram/methods/reopen_general_forum_topic.py b/env/Lib/site-packages/aiogram/methods/reopen_general_forum_topic.py deleted file mode 100644 index a6dc04e..0000000 --- a/env/Lib/site-packages/aiogram/methods/reopen_general_forum_topic.py +++ /dev/null @@ -1,32 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Union - -from .base import TelegramMethod - - -class ReopenGeneralForumTopic(TelegramMethod[bool]): - """ - Use this method to reopen a closed 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the *can_manage_topics* administrator rights. The topic will be automatically unhidden if it was hidden. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#reopengeneralforumtopic - """ - - __returning__ = bool - __api_method__ = "reopenGeneralForumTopic" - - chat_id: Union[int, str] - """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, *, chat_id: Union[int, str], **__pydantic_kwargs: Any - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(chat_id=chat_id, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/methods/replace_sticker_in_set.py b/env/Lib/site-packages/aiogram/methods/replace_sticker_in_set.py deleted file mode 100644 index f46eef2..0000000 --- a/env/Lib/site-packages/aiogram/methods/replace_sticker_in_set.py +++ /dev/null @@ -1,51 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any - -from ..types import InputSticker -from .base import TelegramMethod - - -class ReplaceStickerInSet(TelegramMethod[bool]): - """ - Use this method to replace an existing sticker in a sticker set with a new one. The method is equivalent to calling :class:`aiogram.methods.delete_sticker_from_set.DeleteStickerFromSet`, then :class:`aiogram.methods.add_sticker_to_set.AddStickerToSet`, then :class:`aiogram.methods.set_sticker_position_in_set.SetStickerPositionInSet`. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#replacestickerinset - """ - - __returning__ = bool - __api_method__ = "replaceStickerInSet" - - user_id: int - """User identifier of the sticker set owner""" - name: str - """Sticker set name""" - old_sticker: str - """File identifier of the replaced sticker""" - sticker: InputSticker - """A JSON-serialized object with information about the added sticker. If exactly the same sticker had already been added to the set, then the set remains unchanged.""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - user_id: int, - name: str, - old_sticker: str, - sticker: InputSticker, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - user_id=user_id, - name=name, - old_sticker=old_sticker, - sticker=sticker, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/methods/restrict_chat_member.py b/env/Lib/site-packages/aiogram/methods/restrict_chat_member.py deleted file mode 100644 index 5dfbd01..0000000 --- a/env/Lib/site-packages/aiogram/methods/restrict_chat_member.py +++ /dev/null @@ -1,56 +0,0 @@ -from __future__ import annotations - -import datetime -from typing import TYPE_CHECKING, Any, Optional, Union - -from ..types import ChatPermissions -from .base import TelegramMethod - - -class RestrictChatMember(TelegramMethod[bool]): - """ - Use this method to restrict a user in a supergroup. The bot must be an administrator in the supergroup for this to work and must have the appropriate administrator rights. Pass :code:`True` for all permissions to lift restrictions from a user. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#restrictchatmember - """ - - __returning__ = bool - __api_method__ = "restrictChatMember" - - chat_id: Union[int, str] - """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)""" - user_id: int - """Unique identifier of the target user""" - permissions: ChatPermissions - """A JSON-serialized object for new user permissions""" - use_independent_chat_permissions: Optional[bool] = None - """Pass :code:`True` if chat permissions are set independently. Otherwise, the *can_send_other_messages* and *can_add_web_page_previews* permissions will imply the *can_send_messages*, *can_send_audios*, *can_send_documents*, *can_send_photos*, *can_send_videos*, *can_send_video_notes*, and *can_send_voice_notes* permissions; the *can_send_polls* permission will imply the *can_send_messages* permission.""" - until_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None - """Date when restrictions will be lifted for the user; Unix time. If user is restricted for more than 366 days or less than 30 seconds from the current time, they are considered to be restricted forever""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - chat_id: Union[int, str], - user_id: int, - permissions: ChatPermissions, - use_independent_chat_permissions: Optional[bool] = None, - until_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - chat_id=chat_id, - user_id=user_id, - permissions=permissions, - use_independent_chat_permissions=use_independent_chat_permissions, - until_date=until_date, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/methods/revoke_chat_invite_link.py b/env/Lib/site-packages/aiogram/methods/revoke_chat_invite_link.py deleted file mode 100644 index 414feb3..0000000 --- a/env/Lib/site-packages/aiogram/methods/revoke_chat_invite_link.py +++ /dev/null @@ -1,39 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Union - -from ..types import ChatInviteLink -from .base import TelegramMethod - - -class RevokeChatInviteLink(TelegramMethod[ChatInviteLink]): - """ - Use this method to revoke an invite link created by the bot. If the primary link is revoked, a new link is automatically generated. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the revoked invite link as :class:`aiogram.types.chat_invite_link.ChatInviteLink` object. - - Source: https://core.telegram.org/bots/api#revokechatinvitelink - """ - - __returning__ = ChatInviteLink - __api_method__ = "revokeChatInviteLink" - - chat_id: Union[int, str] - """Unique identifier of the target chat or username of the target channel (in the format :code:`@channelusername`)""" - invite_link: str - """The invite link to revoke""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - chat_id: Union[int, str], - invite_link: str, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(chat_id=chat_id, invite_link=invite_link, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/methods/send_animation.py b/env/Lib/site-packages/aiogram/methods/send_animation.py deleted file mode 100644 index 0baab73..0000000 --- a/env/Lib/site-packages/aiogram/methods/send_animation.py +++ /dev/null @@ -1,141 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, List, Optional, Union - -from pydantic import Field - -from ..client.default import Default -from ..types import ( - ForceReply, - InlineKeyboardMarkup, - InputFile, - Message, - MessageEntity, - ReplyKeyboardMarkup, - ReplyKeyboardRemove, - ReplyParameters, -) -from .base import TelegramMethod - - -class SendAnimation(TelegramMethod[Message]): - """ - Use this method to send animation files (GIF or H.264/MPEG-4 AVC video without sound). On success, the sent :class:`aiogram.types.message.Message` is returned. Bots can currently send animation files of up to 50 MB in size, this limit may be changed in the future. - - Source: https://core.telegram.org/bots/api#sendanimation - """ - - __returning__ = Message - __api_method__ = "sendAnimation" - - chat_id: Union[int, str] - """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" - animation: Union[InputFile, str] - """Animation to send. Pass a file_id as String to send an animation that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an animation from the Internet, or upload a new animation using multipart/form-data. :ref:`More information on Sending Files » `""" - business_connection_id: Optional[str] = None - """Unique identifier of the business connection on behalf of which the message will be sent""" - message_thread_id: Optional[int] = None - """Unique identifier for the target message thread (topic) of the forum; for forum supergroups only""" - duration: Optional[int] = None - """Duration of sent animation in seconds""" - width: Optional[int] = None - """Animation width""" - height: Optional[int] = None - """Animation height""" - thumbnail: Optional[InputFile] = None - """Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More information on Sending Files » `""" - caption: Optional[str] = None - """Animation caption (may also be used when resending animation by *file_id*), 0-1024 characters after entities parsing""" - parse_mode: Optional[Union[str, Default]] = Default("parse_mode") - """Mode for parsing entities in the animation caption. See `formatting options `_ for more details.""" - caption_entities: Optional[List[MessageEntity]] = None - """A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*""" - show_caption_above_media: Optional[Union[bool, Default]] = Default("show_caption_above_media") - """Pass :code:`True`, if the caption must be shown above the message media""" - has_spoiler: Optional[bool] = None - """Pass :code:`True` if the animation needs to be covered with a spoiler animation""" - disable_notification: Optional[bool] = None - """Sends the message `silently `_. Users will receive a notification with no sound.""" - protect_content: Optional[Union[bool, Default]] = Default("protect_content") - """Protects the contents of the sent message from forwarding and saving""" - message_effect_id: Optional[str] = None - """Unique identifier of the message effect to be added to the message; for private chats only""" - reply_parameters: Optional[ReplyParameters] = None - """Description of the message to reply to""" - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None - """Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user""" - allow_sending_without_reply: Optional[bool] = Field( - None, json_schema_extra={"deprecated": True} - ) - """Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - -.. deprecated:: API:7.0 - https://core.telegram.org/bots/api-changelog#december-29-2023""" - reply_to_message_id: Optional[int] = Field(None, json_schema_extra={"deprecated": True}) - """If the message is a reply, ID of the original message - -.. deprecated:: API:7.0 - https://core.telegram.org/bots/api-changelog#december-29-2023""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - chat_id: Union[int, str], - animation: Union[InputFile, str], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - duration: Optional[int] = None, - width: Optional[int] = None, - height: Optional[int] = None, - thumbnail: Optional[InputFile] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - show_caption_above_media: Optional[Union[bool, Default]] = Default( - "show_caption_above_media" - ), - has_spoiler: Optional[bool] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - chat_id=chat_id, - animation=animation, - business_connection_id=business_connection_id, - message_thread_id=message_thread_id, - duration=duration, - width=width, - height=height, - thumbnail=thumbnail, - caption=caption, - parse_mode=parse_mode, - caption_entities=caption_entities, - show_caption_above_media=show_caption_above_media, - has_spoiler=has_spoiler, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - reply_to_message_id=reply_to_message_id, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/methods/send_audio.py b/env/Lib/site-packages/aiogram/methods/send_audio.py deleted file mode 100644 index b15824a..0000000 --- a/env/Lib/site-packages/aiogram/methods/send_audio.py +++ /dev/null @@ -1,132 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, List, Optional, Union - -from pydantic import Field - -from ..client.default import Default -from ..types import ( - ForceReply, - InlineKeyboardMarkup, - InputFile, - Message, - MessageEntity, - ReplyKeyboardMarkup, - ReplyKeyboardRemove, - ReplyParameters, -) -from .base import TelegramMethod - - -class SendAudio(TelegramMethod[Message]): - """ - Use this method to send audio files, if you want Telegram clients to display them in the music player. Your audio must be in the .MP3 or .M4A format. On success, the sent :class:`aiogram.types.message.Message` is returned. Bots can currently send audio files of up to 50 MB in size, this limit may be changed in the future. - For sending voice messages, use the :class:`aiogram.methods.send_voice.SendVoice` method instead. - - Source: https://core.telegram.org/bots/api#sendaudio - """ - - __returning__ = Message - __api_method__ = "sendAudio" - - chat_id: Union[int, str] - """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" - audio: Union[InputFile, str] - """Audio file to send. Pass a file_id as String to send an audio file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an audio file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » `""" - business_connection_id: Optional[str] = None - """Unique identifier of the business connection on behalf of which the message will be sent""" - message_thread_id: Optional[int] = None - """Unique identifier for the target message thread (topic) of the forum; for forum supergroups only""" - caption: Optional[str] = None - """Audio caption, 0-1024 characters after entities parsing""" - parse_mode: Optional[Union[str, Default]] = Default("parse_mode") - """Mode for parsing entities in the audio caption. See `formatting options `_ for more details.""" - caption_entities: Optional[List[MessageEntity]] = None - """A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*""" - duration: Optional[int] = None - """Duration of the audio in seconds""" - performer: Optional[str] = None - """Performer""" - title: Optional[str] = None - """Track name""" - thumbnail: Optional[InputFile] = None - """Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More information on Sending Files » `""" - disable_notification: Optional[bool] = None - """Sends the message `silently `_. Users will receive a notification with no sound.""" - protect_content: Optional[Union[bool, Default]] = Default("protect_content") - """Protects the contents of the sent message from forwarding and saving""" - message_effect_id: Optional[str] = None - """Unique identifier of the message effect to be added to the message; for private chats only""" - reply_parameters: Optional[ReplyParameters] = None - """Description of the message to reply to""" - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None - """Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user""" - allow_sending_without_reply: Optional[bool] = Field( - None, json_schema_extra={"deprecated": True} - ) - """Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - -.. deprecated:: API:7.0 - https://core.telegram.org/bots/api-changelog#december-29-2023""" - reply_to_message_id: Optional[int] = Field(None, json_schema_extra={"deprecated": True}) - """If the message is a reply, ID of the original message - -.. deprecated:: API:7.0 - https://core.telegram.org/bots/api-changelog#december-29-2023""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - chat_id: Union[int, str], - audio: Union[InputFile, str], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - duration: Optional[int] = None, - performer: Optional[str] = None, - title: Optional[str] = None, - thumbnail: Optional[InputFile] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - chat_id=chat_id, - audio=audio, - business_connection_id=business_connection_id, - message_thread_id=message_thread_id, - caption=caption, - parse_mode=parse_mode, - caption_entities=caption_entities, - duration=duration, - performer=performer, - title=title, - thumbnail=thumbnail, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - reply_to_message_id=reply_to_message_id, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/methods/send_chat_action.py b/env/Lib/site-packages/aiogram/methods/send_chat_action.py deleted file mode 100644 index a9f452a..0000000 --- a/env/Lib/site-packages/aiogram/methods/send_chat_action.py +++ /dev/null @@ -1,54 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Optional, Union - -from .base import TelegramMethod - - -class SendChatAction(TelegramMethod[bool]): - """ - Use this method when you need to tell the user that something is happening on the bot's side. The status is set for 5 seconds or less (when a message arrives from your bot, Telegram clients clear its typing status). Returns :code:`True` on success. - - Example: The `ImageBot `_ needs some time to process a request and upload the image. Instead of sending a text message along the lines of 'Retrieving image, please wait…', the bot may use :class:`aiogram.methods.send_chat_action.SendChatAction` with *action* = *upload_photo*. The user will see a 'sending photo' status for the bot. - - We only recommend using this method when a response from the bot will take a **noticeable** amount of time to arrive. - - Source: https://core.telegram.org/bots/api#sendchataction - """ - - __returning__ = bool - __api_method__ = "sendChatAction" - - chat_id: Union[int, str] - """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" - action: str - """Type of action to broadcast. Choose one, depending on what the user is about to receive: *typing* for `text messages `_, *upload_photo* for `photos `_, *record_video* or *upload_video* for `videos `_, *record_voice* or *upload_voice* for `voice notes `_, *upload_document* for `general files `_, *choose_sticker* for `stickers `_, *find_location* for `location data `_, *record_video_note* or *upload_video_note* for `video notes `_.""" - business_connection_id: Optional[str] = None - """Unique identifier of the business connection on behalf of which the action will be sent""" - message_thread_id: Optional[int] = None - """Unique identifier for the target message thread; for supergroups only""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - chat_id: Union[int, str], - action: str, - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - chat_id=chat_id, - action=action, - business_connection_id=business_connection_id, - message_thread_id=message_thread_id, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/methods/send_contact.py b/env/Lib/site-packages/aiogram/methods/send_contact.py deleted file mode 100644 index 6c14d56..0000000 --- a/env/Lib/site-packages/aiogram/methods/send_contact.py +++ /dev/null @@ -1,113 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Optional, Union - -from pydantic import Field - -from ..client.default import Default -from ..types import ( - ForceReply, - InlineKeyboardMarkup, - Message, - ReplyKeyboardMarkup, - ReplyKeyboardRemove, - ReplyParameters, -) -from .base import TelegramMethod - - -class SendContact(TelegramMethod[Message]): - """ - Use this method to send phone contacts. On success, the sent :class:`aiogram.types.message.Message` is returned. - - Source: https://core.telegram.org/bots/api#sendcontact - """ - - __returning__ = Message - __api_method__ = "sendContact" - - chat_id: Union[int, str] - """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" - phone_number: str - """Contact's phone number""" - first_name: str - """Contact's first name""" - business_connection_id: Optional[str] = None - """Unique identifier of the business connection on behalf of which the message will be sent""" - message_thread_id: Optional[int] = None - """Unique identifier for the target message thread (topic) of the forum; for forum supergroups only""" - last_name: Optional[str] = None - """Contact's last name""" - vcard: Optional[str] = None - """Additional data about the contact in the form of a `vCard `_, 0-2048 bytes""" - disable_notification: Optional[bool] = None - """Sends the message `silently `_. Users will receive a notification with no sound.""" - protect_content: Optional[Union[bool, Default]] = Default("protect_content") - """Protects the contents of the sent message from forwarding and saving""" - message_effect_id: Optional[str] = None - """Unique identifier of the message effect to be added to the message; for private chats only""" - reply_parameters: Optional[ReplyParameters] = None - """Description of the message to reply to""" - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None - """Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user""" - allow_sending_without_reply: Optional[bool] = Field( - None, json_schema_extra={"deprecated": True} - ) - """Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - -.. deprecated:: API:7.0 - https://core.telegram.org/bots/api-changelog#december-29-2023""" - reply_to_message_id: Optional[int] = Field(None, json_schema_extra={"deprecated": True}) - """If the message is a reply, ID of the original message - -.. deprecated:: API:7.0 - https://core.telegram.org/bots/api-changelog#december-29-2023""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - chat_id: Union[int, str], - phone_number: str, - first_name: str, - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - last_name: Optional[str] = None, - vcard: Optional[str] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - chat_id=chat_id, - phone_number=phone_number, - first_name=first_name, - business_connection_id=business_connection_id, - message_thread_id=message_thread_id, - last_name=last_name, - vcard=vcard, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - reply_to_message_id=reply_to_message_id, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/methods/send_dice.py b/env/Lib/site-packages/aiogram/methods/send_dice.py deleted file mode 100644 index 42d2bf5..0000000 --- a/env/Lib/site-packages/aiogram/methods/send_dice.py +++ /dev/null @@ -1,101 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Optional, Union - -from pydantic import Field - -from ..client.default import Default -from ..types import ( - ForceReply, - InlineKeyboardMarkup, - Message, - ReplyKeyboardMarkup, - ReplyKeyboardRemove, - ReplyParameters, -) -from .base import TelegramMethod - - -class SendDice(TelegramMethod[Message]): - """ - Use this method to send an animated emoji that will display a random value. On success, the sent :class:`aiogram.types.message.Message` is returned. - - Source: https://core.telegram.org/bots/api#senddice - """ - - __returning__ = Message - __api_method__ = "sendDice" - - chat_id: Union[int, str] - """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" - business_connection_id: Optional[str] = None - """Unique identifier of the business connection on behalf of which the message will be sent""" - message_thread_id: Optional[int] = None - """Unique identifier for the target message thread (topic) of the forum; for forum supergroups only""" - emoji: Optional[str] = None - """Emoji on which the dice throw animation is based. Currently, must be one of '🎲', '🎯', '🏀', '⚽', '🎳', or '🎰'. Dice can have values 1-6 for '🎲', '🎯' and '🎳', values 1-5 for '🏀' and '⚽', and values 1-64 for '🎰'. Defaults to '🎲'""" - disable_notification: Optional[bool] = None - """Sends the message `silently `_. Users will receive a notification with no sound.""" - protect_content: Optional[Union[bool, Default]] = Default("protect_content") - """Protects the contents of the sent message from forwarding""" - message_effect_id: Optional[str] = None - """Unique identifier of the message effect to be added to the message; for private chats only""" - reply_parameters: Optional[ReplyParameters] = None - """Description of the message to reply to""" - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None - """Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user""" - allow_sending_without_reply: Optional[bool] = Field( - None, json_schema_extra={"deprecated": True} - ) - """Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - -.. deprecated:: API:7.0 - https://core.telegram.org/bots/api-changelog#december-29-2023""" - reply_to_message_id: Optional[int] = Field(None, json_schema_extra={"deprecated": True}) - """If the message is a reply, ID of the original message - -.. deprecated:: API:7.0 - https://core.telegram.org/bots/api-changelog#december-29-2023""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - chat_id: Union[int, str], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - emoji: Optional[str] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - chat_id=chat_id, - business_connection_id=business_connection_id, - message_thread_id=message_thread_id, - emoji=emoji, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - reply_to_message_id=reply_to_message_id, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/methods/send_document.py b/env/Lib/site-packages/aiogram/methods/send_document.py deleted file mode 100644 index 411165d..0000000 --- a/env/Lib/site-packages/aiogram/methods/send_document.py +++ /dev/null @@ -1,123 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, List, Optional, Union - -from pydantic import Field - -from ..client.default import Default -from ..types import ( - ForceReply, - InlineKeyboardMarkup, - InputFile, - Message, - MessageEntity, - ReplyKeyboardMarkup, - ReplyKeyboardRemove, - ReplyParameters, -) -from .base import TelegramMethod - - -class SendDocument(TelegramMethod[Message]): - """ - Use this method to send general files. On success, the sent :class:`aiogram.types.message.Message` is returned. Bots can currently send files of any type of up to 50 MB in size, this limit may be changed in the future. - - Source: https://core.telegram.org/bots/api#senddocument - """ - - __returning__ = Message - __api_method__ = "sendDocument" - - chat_id: Union[int, str] - """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" - document: Union[InputFile, str] - """File to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » `""" - business_connection_id: Optional[str] = None - """Unique identifier of the business connection on behalf of which the message will be sent""" - message_thread_id: Optional[int] = None - """Unique identifier for the target message thread (topic) of the forum; for forum supergroups only""" - thumbnail: Optional[InputFile] = None - """Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More information on Sending Files » `""" - caption: Optional[str] = None - """Document caption (may also be used when resending documents by *file_id*), 0-1024 characters after entities parsing""" - parse_mode: Optional[Union[str, Default]] = Default("parse_mode") - """Mode for parsing entities in the document caption. See `formatting options `_ for more details.""" - caption_entities: Optional[List[MessageEntity]] = None - """A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*""" - disable_content_type_detection: Optional[bool] = None - """Disables automatic server-side content type detection for files uploaded using multipart/form-data""" - disable_notification: Optional[bool] = None - """Sends the message `silently `_. Users will receive a notification with no sound.""" - protect_content: Optional[Union[bool, Default]] = Default("protect_content") - """Protects the contents of the sent message from forwarding and saving""" - message_effect_id: Optional[str] = None - """Unique identifier of the message effect to be added to the message; for private chats only""" - reply_parameters: Optional[ReplyParameters] = None - """Description of the message to reply to""" - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None - """Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user""" - allow_sending_without_reply: Optional[bool] = Field( - None, json_schema_extra={"deprecated": True} - ) - """Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - -.. deprecated:: API:7.0 - https://core.telegram.org/bots/api-changelog#december-29-2023""" - reply_to_message_id: Optional[int] = Field(None, json_schema_extra={"deprecated": True}) - """If the message is a reply, ID of the original message - -.. deprecated:: API:7.0 - https://core.telegram.org/bots/api-changelog#december-29-2023""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - chat_id: Union[int, str], - document: Union[InputFile, str], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - thumbnail: Optional[InputFile] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - disable_content_type_detection: Optional[bool] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - chat_id=chat_id, - document=document, - business_connection_id=business_connection_id, - message_thread_id=message_thread_id, - thumbnail=thumbnail, - caption=caption, - parse_mode=parse_mode, - caption_entities=caption_entities, - disable_content_type_detection=disable_content_type_detection, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - reply_to_message_id=reply_to_message_id, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/methods/send_game.py b/env/Lib/site-packages/aiogram/methods/send_game.py deleted file mode 100644 index eb96330..0000000 --- a/env/Lib/site-packages/aiogram/methods/send_game.py +++ /dev/null @@ -1,90 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Optional, Union - -from pydantic import Field - -from ..client.default import Default -from ..types import InlineKeyboardMarkup, Message, ReplyParameters -from .base import TelegramMethod - - -class SendGame(TelegramMethod[Message]): - """ - Use this method to send a game. On success, the sent :class:`aiogram.types.message.Message` is returned. - - Source: https://core.telegram.org/bots/api#sendgame - """ - - __returning__ = Message - __api_method__ = "sendGame" - - chat_id: int - """Unique identifier for the target chat""" - game_short_name: str - """Short name of the game, serves as the unique identifier for the game. Set up your games via `@BotFather `_.""" - business_connection_id: Optional[str] = None - """Unique identifier of the business connection on behalf of which the message will be sent""" - message_thread_id: Optional[int] = None - """Unique identifier for the target message thread (topic) of the forum; for forum supergroups only""" - disable_notification: Optional[bool] = None - """Sends the message `silently `_. Users will receive a notification with no sound.""" - protect_content: Optional[Union[bool, Default]] = Default("protect_content") - """Protects the contents of the sent message from forwarding and saving""" - message_effect_id: Optional[str] = None - """Unique identifier of the message effect to be added to the message; for private chats only""" - reply_parameters: Optional[ReplyParameters] = None - """Description of the message to reply to""" - reply_markup: Optional[InlineKeyboardMarkup] = None - """A JSON-serialized object for an `inline keyboard `_. If empty, one 'Play game_title' button will be shown. If not empty, the first button must launch the game.""" - allow_sending_without_reply: Optional[bool] = Field( - None, json_schema_extra={"deprecated": True} - ) - """Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - -.. deprecated:: API:7.0 - https://core.telegram.org/bots/api-changelog#december-29-2023""" - reply_to_message_id: Optional[int] = Field(None, json_schema_extra={"deprecated": True}) - """If the message is a reply, ID of the original message - -.. deprecated:: API:7.0 - https://core.telegram.org/bots/api-changelog#december-29-2023""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - chat_id: int, - game_short_name: str, - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[InlineKeyboardMarkup] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - chat_id=chat_id, - game_short_name=game_short_name, - business_connection_id=business_connection_id, - message_thread_id=message_thread_id, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - reply_to_message_id=reply_to_message_id, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/methods/send_invoice.py b/env/Lib/site-packages/aiogram/methods/send_invoice.py deleted file mode 100644 index 108219e..0000000 --- a/env/Lib/site-packages/aiogram/methods/send_invoice.py +++ /dev/null @@ -1,166 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, List, Optional, Union - -from pydantic import Field - -from ..client.default import Default -from ..types import InlineKeyboardMarkup, LabeledPrice, Message, ReplyParameters -from .base import TelegramMethod - - -class SendInvoice(TelegramMethod[Message]): - """ - Use this method to send invoices. On success, the sent :class:`aiogram.types.message.Message` is returned. - - Source: https://core.telegram.org/bots/api#sendinvoice - """ - - __returning__ = Message - __api_method__ = "sendInvoice" - - chat_id: Union[int, str] - """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" - title: str - """Product name, 1-32 characters""" - description: str - """Product description, 1-255 characters""" - payload: str - """Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes.""" - currency: str - """Three-letter ISO 4217 currency code, see `more on currencies `_. Pass 'XTR' for payments in `Telegram Stars `_.""" - prices: List[LabeledPrice] - """Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.). Must contain exactly one item for payments in `Telegram Stars `_.""" - message_thread_id: Optional[int] = None - """Unique identifier for the target message thread (topic) of the forum; for forum supergroups only""" - provider_token: Optional[str] = None - """Payment provider token, obtained via `@BotFather `_. Pass an empty string for payments in `Telegram Stars `_.""" - max_tip_amount: Optional[int] = None - """The maximum accepted amount for tips in the *smallest units* of the currency (integer, **not** float/double). For example, for a maximum tip of :code:`US$ 1.45` pass :code:`max_tip_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). Defaults to 0. Not supported for payments in `Telegram Stars `_.""" - suggested_tip_amounts: Optional[List[int]] = None - """A JSON-serialized array 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*.""" - start_parameter: Optional[str] = None - """Unique deep-linking parameter. If left empty, **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. If non-empty, 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""" - provider_data: Optional[str] = None - """JSON-serialized 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_url: Optional[str] = None - """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.""" - photo_size: Optional[int] = None - """Photo size in bytes""" - photo_width: Optional[int] = None - """Photo width""" - photo_height: Optional[int] = None - """Photo height""" - need_name: Optional[bool] = None - """Pass :code:`True` if you require the user's full name to complete the order. Ignored for payments in `Telegram Stars `_.""" - need_phone_number: Optional[bool] = None - """Pass :code:`True` if you require the user's phone number to complete the order. Ignored for payments in `Telegram Stars `_.""" - need_email: Optional[bool] = None - """Pass :code:`True` if you require the user's email address to complete the order. Ignored for payments in `Telegram Stars `_.""" - need_shipping_address: Optional[bool] = None - """Pass :code:`True` if you require the user's shipping address to complete the order. Ignored for payments in `Telegram Stars `_.""" - send_phone_number_to_provider: Optional[bool] = None - """Pass :code:`True` if the user's phone number should be sent to the provider. Ignored for payments in `Telegram Stars `_.""" - send_email_to_provider: Optional[bool] = None - """Pass :code:`True` if the user's email address should be sent to the provider. Ignored for payments in `Telegram Stars `_.""" - is_flexible: Optional[bool] = None - """Pass :code:`True` if the final price depends on the shipping method. Ignored for payments in `Telegram Stars `_.""" - disable_notification: Optional[bool] = None - """Sends the message `silently `_. Users will receive a notification with no sound.""" - protect_content: Optional[Union[bool, Default]] = Default("protect_content") - """Protects the contents of the sent message from forwarding and saving""" - message_effect_id: Optional[str] = None - """Unique identifier of the message effect to be added to the message; for private chats only""" - reply_parameters: Optional[ReplyParameters] = None - """Description of the message to reply to""" - reply_markup: Optional[InlineKeyboardMarkup] = None - """A JSON-serialized object for an `inline keyboard `_. If empty, one 'Pay :code:`total price`' button will be shown. If not empty, the first button must be a Pay button.""" - allow_sending_without_reply: Optional[bool] = Field( - None, json_schema_extra={"deprecated": True} - ) - """Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - -.. deprecated:: API:7.0 - https://core.telegram.org/bots/api-changelog#december-29-2023""" - reply_to_message_id: Optional[int] = Field(None, json_schema_extra={"deprecated": True}) - """If the message is a reply, ID of the original message - -.. deprecated:: API:7.0 - https://core.telegram.org/bots/api-changelog#december-29-2023""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - chat_id: Union[int, str], - title: str, - description: str, - payload: str, - currency: str, - prices: List[LabeledPrice], - message_thread_id: Optional[int] = None, - provider_token: Optional[str] = None, - max_tip_amount: Optional[int] = None, - suggested_tip_amounts: Optional[List[int]] = None, - start_parameter: Optional[str] = None, - provider_data: Optional[str] = None, - photo_url: Optional[str] = None, - photo_size: Optional[int] = None, - photo_width: Optional[int] = None, - photo_height: Optional[int] = None, - need_name: Optional[bool] = None, - need_phone_number: Optional[bool] = None, - need_email: Optional[bool] = None, - need_shipping_address: Optional[bool] = None, - send_phone_number_to_provider: Optional[bool] = None, - send_email_to_provider: Optional[bool] = None, - is_flexible: Optional[bool] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[InlineKeyboardMarkup] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - chat_id=chat_id, - title=title, - description=description, - payload=payload, - currency=currency, - prices=prices, - message_thread_id=message_thread_id, - provider_token=provider_token, - max_tip_amount=max_tip_amount, - suggested_tip_amounts=suggested_tip_amounts, - start_parameter=start_parameter, - provider_data=provider_data, - photo_url=photo_url, - photo_size=photo_size, - photo_width=photo_width, - photo_height=photo_height, - need_name=need_name, - need_phone_number=need_phone_number, - need_email=need_email, - need_shipping_address=need_shipping_address, - send_phone_number_to_provider=send_phone_number_to_provider, - send_email_to_provider=send_email_to_provider, - is_flexible=is_flexible, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - reply_to_message_id=reply_to_message_id, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/methods/send_location.py b/env/Lib/site-packages/aiogram/methods/send_location.py deleted file mode 100644 index d33f676..0000000 --- a/env/Lib/site-packages/aiogram/methods/send_location.py +++ /dev/null @@ -1,121 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Optional, Union - -from pydantic import Field - -from ..client.default import Default -from ..types import ( - ForceReply, - InlineKeyboardMarkup, - Message, - ReplyKeyboardMarkup, - ReplyKeyboardRemove, - ReplyParameters, -) -from .base import TelegramMethod - - -class SendLocation(TelegramMethod[Message]): - """ - Use this method to send point on the map. On success, the sent :class:`aiogram.types.message.Message` is returned. - - Source: https://core.telegram.org/bots/api#sendlocation - """ - - __returning__ = Message - __api_method__ = "sendLocation" - - chat_id: Union[int, str] - """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" - latitude: float - """Latitude of the location""" - longitude: float - """Longitude of the location""" - business_connection_id: Optional[str] = None - """Unique identifier of the business connection on behalf of which the message will be sent""" - message_thread_id: Optional[int] = None - """Unique identifier for the target message thread (topic) of the forum; for forum supergroups only""" - horizontal_accuracy: Optional[float] = None - """The radius of uncertainty for the location, measured in meters; 0-1500""" - live_period: Optional[int] = None - """Period in seconds during which the location will be updated (see `Live Locations `_, should be between 60 and 86400, or 0x7FFFFFFF for live locations that can be edited indefinitely.""" - heading: Optional[int] = None - """For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.""" - proximity_alert_radius: Optional[int] = None - """For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.""" - disable_notification: Optional[bool] = None - """Sends the message `silently `_. Users will receive a notification with no sound.""" - protect_content: Optional[Union[bool, Default]] = Default("protect_content") - """Protects the contents of the sent message from forwarding and saving""" - message_effect_id: Optional[str] = None - """Unique identifier of the message effect to be added to the message; for private chats only""" - reply_parameters: Optional[ReplyParameters] = None - """Description of the message to reply to""" - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None - """Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user""" - allow_sending_without_reply: Optional[bool] = Field( - None, json_schema_extra={"deprecated": True} - ) - """Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - -.. deprecated:: API:7.0 - https://core.telegram.org/bots/api-changelog#december-29-2023""" - reply_to_message_id: Optional[int] = Field(None, json_schema_extra={"deprecated": True}) - """If the message is a reply, ID of the original message - -.. deprecated:: API:7.0 - https://core.telegram.org/bots/api-changelog#december-29-2023""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - chat_id: Union[int, str], - latitude: float, - longitude: float, - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - horizontal_accuracy: Optional[float] = None, - live_period: Optional[int] = None, - heading: Optional[int] = None, - proximity_alert_radius: Optional[int] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - chat_id=chat_id, - latitude=latitude, - longitude=longitude, - business_connection_id=business_connection_id, - message_thread_id=message_thread_id, - horizontal_accuracy=horizontal_accuracy, - live_period=live_period, - heading=heading, - proximity_alert_radius=proximity_alert_radius, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - reply_to_message_id=reply_to_message_id, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/methods/send_media_group.py b/env/Lib/site-packages/aiogram/methods/send_media_group.py deleted file mode 100644 index f8c081a..0000000 --- a/env/Lib/site-packages/aiogram/methods/send_media_group.py +++ /dev/null @@ -1,99 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, List, Optional, Union - -from pydantic import Field - -from ..client.default import Default -from ..types import ( - ForceReply, - InlineKeyboardMarkup, - InputMediaAudio, - InputMediaDocument, - InputMediaPhoto, - InputMediaVideo, - Message, - ReplyKeyboardMarkup, - ReplyKeyboardRemove, - ReplyParameters, -) -from .base import TelegramMethod - - -class SendMediaGroup(TelegramMethod[List[Message]]): - """ - Use this method to send a group of photos, videos, documents or audios as an album. Documents and audio files can be only grouped in an album with messages of the same type. On success, an array of `Messages `_ that were sent is returned. - - Source: https://core.telegram.org/bots/api#sendmediagroup - """ - - __returning__ = List[Message] - __api_method__ = "sendMediaGroup" - - chat_id: Union[int, str] - """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" - media: List[Union[InputMediaAudio, InputMediaDocument, InputMediaPhoto, InputMediaVideo]] - """A JSON-serialized array describing messages to be sent, must include 2-10 items""" - business_connection_id: Optional[str] = None - """Unique identifier of the business connection on behalf of which the message will be sent""" - message_thread_id: Optional[int] = None - """Unique identifier for the target message thread (topic) of the forum; for forum supergroups only""" - disable_notification: Optional[bool] = None - """Sends messages `silently `_. Users will receive a notification with no sound.""" - protect_content: Optional[Union[bool, Default]] = Default("protect_content") - """Protects the contents of the sent messages from forwarding and saving""" - message_effect_id: Optional[str] = None - """Unique identifier of the message effect to be added to the message; for private chats only""" - reply_parameters: Optional[ReplyParameters] = None - """Description of the message to reply to""" - allow_sending_without_reply: Optional[bool] = Field( - None, json_schema_extra={"deprecated": True} - ) - """Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - -.. deprecated:: API:7.0 - https://core.telegram.org/bots/api-changelog#december-29-2023""" - reply_to_message_id: Optional[int] = Field(None, json_schema_extra={"deprecated": True}) - """If the messages are a reply, ID of the original message - -.. deprecated:: API:7.0 - https://core.telegram.org/bots/api-changelog#december-29-2023""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - chat_id: Union[int, str], - media: List[ - Union[InputMediaAudio, InputMediaDocument, InputMediaPhoto, InputMediaVideo] - ], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - chat_id=chat_id, - media=media, - business_connection_id=business_connection_id, - message_thread_id=message_thread_id, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - allow_sending_without_reply=allow_sending_without_reply, - reply_to_message_id=reply_to_message_id, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/methods/send_message.py b/env/Lib/site-packages/aiogram/methods/send_message.py deleted file mode 100644 index caf2852..0000000 --- a/env/Lib/site-packages/aiogram/methods/send_message.py +++ /dev/null @@ -1,128 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, List, Optional, Union - -from pydantic import Field - -from ..client.default import Default -from ..types import ( - ForceReply, - InlineKeyboardMarkup, - LinkPreviewOptions, - Message, - MessageEntity, - ReplyKeyboardMarkup, - ReplyKeyboardRemove, - ReplyParameters, -) -from .base import TelegramMethod - - -class SendMessage(TelegramMethod[Message]): - """ - Use this method to send text messages. On success, the sent :class:`aiogram.types.message.Message` is returned. - - Source: https://core.telegram.org/bots/api#sendmessage - """ - - __returning__ = Message - __api_method__ = "sendMessage" - - chat_id: Union[int, str] - """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" - text: str - """Text of the message to be sent, 1-4096 characters after entities parsing""" - business_connection_id: Optional[str] = None - """Unique identifier of the business connection on behalf of which the message will be sent""" - message_thread_id: Optional[int] = None - """Unique identifier for the target message thread (topic) of the forum; for forum supergroups only""" - parse_mode: Optional[Union[str, Default]] = Default("parse_mode") - """Mode for parsing entities in the message text. See `formatting options `_ for more details.""" - entities: Optional[List[MessageEntity]] = None - """A JSON-serialized list of special entities that appear in message text, which can be specified instead of *parse_mode*""" - link_preview_options: Optional[Union[LinkPreviewOptions, Default]] = Default("link_preview") - """Link preview generation options for the message""" - disable_notification: Optional[bool] = None - """Sends the message `silently `_. Users will receive a notification with no sound.""" - protect_content: Optional[Union[bool, Default]] = Default("protect_content") - """Protects the contents of the sent message from forwarding and saving""" - message_effect_id: Optional[str] = None - """Unique identifier of the message effect to be added to the message; for private chats only""" - reply_parameters: Optional[ReplyParameters] = None - """Description of the message to reply to""" - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None - """Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user""" - allow_sending_without_reply: Optional[bool] = Field( - None, json_schema_extra={"deprecated": True} - ) - """Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - -.. deprecated:: API:7.0 - https://core.telegram.org/bots/api-changelog#december-29-2023""" - disable_web_page_preview: Optional[Union[bool, Default]] = Field( - Default("link_preview_is_disabled"), json_schema_extra={"deprecated": True} - ) - """Disables link previews for links in this message - -.. deprecated:: API:7.0 - https://core.telegram.org/bots/api-changelog#december-29-2023""" - reply_to_message_id: Optional[int] = Field(None, json_schema_extra={"deprecated": True}) - """If the message is a reply, ID of the original message - -.. deprecated:: API:7.0 - https://core.telegram.org/bots/api-changelog#december-29-2023""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - chat_id: Union[int, str], - text: str, - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - entities: Optional[List[MessageEntity]] = None, - link_preview_options: Optional[Union[LinkPreviewOptions, Default]] = Default( - "link_preview" - ), - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - disable_web_page_preview: Optional[Union[bool, Default]] = Default( - "link_preview_is_disabled" - ), - reply_to_message_id: Optional[int] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - chat_id=chat_id, - text=text, - business_connection_id=business_connection_id, - message_thread_id=message_thread_id, - parse_mode=parse_mode, - entities=entities, - link_preview_options=link_preview_options, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - disable_web_page_preview=disable_web_page_preview, - reply_to_message_id=reply_to_message_id, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/methods/send_paid_media.py b/env/Lib/site-packages/aiogram/methods/send_paid_media.py deleted file mode 100644 index dd847f5..0000000 --- a/env/Lib/site-packages/aiogram/methods/send_paid_media.py +++ /dev/null @@ -1,97 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, List, Optional, Union - -from ..types import ( - ForceReply, - InlineKeyboardMarkup, - InputPaidMediaPhoto, - InputPaidMediaVideo, - Message, - MessageEntity, - ReplyKeyboardMarkup, - ReplyKeyboardRemove, - ReplyParameters, -) -from .base import TelegramMethod - - -class SendPaidMedia(TelegramMethod[Message]): - """ - Use this method to send paid media. On success, the sent :class:`aiogram.types.message.Message` is returned. - - Source: https://core.telegram.org/bots/api#sendpaidmedia - """ - - __returning__ = Message - __api_method__ = "sendPaidMedia" - - chat_id: Union[int, str] - """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`). If the chat is a channel, all Telegram Star proceeds from this media will be credited to the chat's balance. Otherwise, they will be credited to the bot's balance.""" - star_count: int - """The number of Telegram Stars that must be paid to buy access to the media""" - media: List[Union[InputPaidMediaPhoto, InputPaidMediaVideo]] - """A JSON-serialized array describing the media to be sent; up to 10 items""" - business_connection_id: Optional[str] = None - """Unique identifier of the business connection on behalf of which the message will be sent""" - caption: Optional[str] = None - """Media caption, 0-1024 characters after entities parsing""" - parse_mode: Optional[str] = None - """Mode for parsing entities in the media caption. See `formatting options `_ for more details.""" - caption_entities: Optional[List[MessageEntity]] = None - """A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*""" - show_caption_above_media: Optional[bool] = None - """Pass :code:`True`, if the caption must be shown above the message media""" - disable_notification: Optional[bool] = None - """Sends the message `silently `_. Users will receive a notification with no sound.""" - protect_content: Optional[bool] = None - """Protects the contents of the sent message from forwarding and saving""" - reply_parameters: Optional[ReplyParameters] = None - """Description of the message to reply to""" - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None - """Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - chat_id: Union[int, str], - star_count: int, - media: List[Union[InputPaidMediaPhoto, InputPaidMediaVideo]], - business_connection_id: Optional[str] = None, - caption: Optional[str] = None, - parse_mode: Optional[str] = None, - caption_entities: Optional[List[MessageEntity]] = None, - show_caption_above_media: Optional[bool] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[bool] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - chat_id=chat_id, - star_count=star_count, - media=media, - business_connection_id=business_connection_id, - caption=caption, - parse_mode=parse_mode, - caption_entities=caption_entities, - show_caption_above_media=show_caption_above_media, - disable_notification=disable_notification, - protect_content=protect_content, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/methods/send_photo.py b/env/Lib/site-packages/aiogram/methods/send_photo.py deleted file mode 100644 index 3ba7da1..0000000 --- a/env/Lib/site-packages/aiogram/methods/send_photo.py +++ /dev/null @@ -1,125 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, List, Optional, Union - -from pydantic import Field - -from ..client.default import Default -from ..types import ( - ForceReply, - InlineKeyboardMarkup, - InputFile, - Message, - MessageEntity, - ReplyKeyboardMarkup, - ReplyKeyboardRemove, - ReplyParameters, -) -from .base import TelegramMethod - - -class SendPhoto(TelegramMethod[Message]): - """ - Use this method to send photos. On success, the sent :class:`aiogram.types.message.Message` is returned. - - Source: https://core.telegram.org/bots/api#sendphoto - """ - - __returning__ = Message - __api_method__ = "sendPhoto" - - chat_id: Union[int, str] - """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" - photo: Union[InputFile, str] - """Photo to send. Pass a file_id as String to send a photo that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a photo from the Internet, or upload a new photo using multipart/form-data. The photo must be at most 10 MB in size. The photo's width and height must not exceed 10000 in total. Width and height ratio must be at most 20. :ref:`More information on Sending Files » `""" - business_connection_id: Optional[str] = None - """Unique identifier of the business connection on behalf of which the message will be sent""" - message_thread_id: Optional[int] = None - """Unique identifier for the target message thread (topic) of the forum; for forum supergroups only""" - caption: Optional[str] = None - """Photo caption (may also be used when resending photos by *file_id*), 0-1024 characters after entities parsing""" - parse_mode: Optional[Union[str, Default]] = Default("parse_mode") - """Mode for parsing entities in the photo caption. See `formatting options `_ for more details.""" - caption_entities: Optional[List[MessageEntity]] = None - """A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*""" - show_caption_above_media: Optional[Union[bool, Default]] = Default("show_caption_above_media") - """Pass :code:`True`, if the caption must be shown above the message media""" - has_spoiler: Optional[bool] = None - """Pass :code:`True` if the photo needs to be covered with a spoiler animation""" - disable_notification: Optional[bool] = None - """Sends the message `silently `_. Users will receive a notification with no sound.""" - protect_content: Optional[Union[bool, Default]] = Default("protect_content") - """Protects the contents of the sent message from forwarding and saving""" - message_effect_id: Optional[str] = None - """Unique identifier of the message effect to be added to the message; for private chats only""" - reply_parameters: Optional[ReplyParameters] = None - """Description of the message to reply to""" - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None - """Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user""" - allow_sending_without_reply: Optional[bool] = Field( - None, json_schema_extra={"deprecated": True} - ) - """Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - -.. deprecated:: API:7.0 - https://core.telegram.org/bots/api-changelog#december-29-2023""" - reply_to_message_id: Optional[int] = Field(None, json_schema_extra={"deprecated": True}) - """If the message is a reply, ID of the original message - -.. deprecated:: API:7.0 - https://core.telegram.org/bots/api-changelog#december-29-2023""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - chat_id: Union[int, str], - photo: Union[InputFile, str], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - show_caption_above_media: Optional[Union[bool, Default]] = Default( - "show_caption_above_media" - ), - has_spoiler: Optional[bool] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - chat_id=chat_id, - photo=photo, - business_connection_id=business_connection_id, - message_thread_id=message_thread_id, - caption=caption, - parse_mode=parse_mode, - caption_entities=caption_entities, - show_caption_above_media=show_caption_above_media, - has_spoiler=has_spoiler, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - reply_to_message_id=reply_to_message_id, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/methods/send_poll.py b/env/Lib/site-packages/aiogram/methods/send_poll.py deleted file mode 100644 index e791b70..0000000 --- a/env/Lib/site-packages/aiogram/methods/send_poll.py +++ /dev/null @@ -1,156 +0,0 @@ -from __future__ import annotations - -import datetime -from typing import TYPE_CHECKING, Any, List, Optional, Union - -from pydantic import Field - -from ..client.default import Default -from ..types import ( - ForceReply, - InlineKeyboardMarkup, - InputPollOption, - Message, - MessageEntity, - ReplyKeyboardMarkup, - ReplyKeyboardRemove, - ReplyParameters, -) -from .base import TelegramMethod - - -class SendPoll(TelegramMethod[Message]): - """ - Use this method to send a native poll. On success, the sent :class:`aiogram.types.message.Message` is returned. - - Source: https://core.telegram.org/bots/api#sendpoll - """ - - __returning__ = Message - __api_method__ = "sendPoll" - - chat_id: Union[int, str] - """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" - question: str - """Poll question, 1-300 characters""" - options: List[Union[InputPollOption, str]] - """A JSON-serialized list of 2-10 answer options""" - business_connection_id: Optional[str] = None - """Unique identifier of the business connection on behalf of which the message will be sent""" - message_thread_id: Optional[int] = None - """Unique identifier for the target message thread (topic) of the forum; for forum supergroups only""" - question_parse_mode: Optional[Union[str, Default]] = Default("parse_mode") - """Mode for parsing entities in the question. See `formatting options `_ for more details. Currently, only custom emoji entities are allowed""" - question_entities: Optional[List[MessageEntity]] = None - """A JSON-serialized list of special entities that appear in the poll question. It can be specified instead of *question_parse_mode*""" - is_anonymous: Optional[bool] = None - """:code:`True`, if the poll needs to be anonymous, defaults to :code:`True`""" - type: Optional[str] = None - """Poll type, 'quiz' or 'regular', defaults to 'regular'""" - allows_multiple_answers: Optional[bool] = None - """:code:`True`, if the poll allows multiple answers, ignored for polls in quiz mode, defaults to :code:`False`""" - correct_option_id: Optional[int] = None - """0-based identifier of the correct answer option, required for polls in quiz mode""" - explanation: Optional[str] = None - """Text that is shown when a user chooses an incorrect answer or taps on the lamp icon in a quiz-style poll, 0-200 characters with at most 2 line feeds after entities parsing""" - explanation_parse_mode: Optional[Union[str, Default]] = Default("parse_mode") - """Mode for parsing entities in the explanation. See `formatting options `_ for more details.""" - explanation_entities: Optional[List[MessageEntity]] = None - """A JSON-serialized list of special entities that appear in the poll explanation. It can be specified instead of *explanation_parse_mode*""" - open_period: Optional[int] = None - """Amount of time in seconds the poll will be active after creation, 5-600. Can't be used together with *close_date*.""" - close_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None - """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 *open_period*.""" - is_closed: Optional[bool] = None - """Pass :code:`True` if the poll needs to be immediately closed. This can be useful for poll preview.""" - disable_notification: Optional[bool] = None - """Sends the message `silently `_. Users will receive a notification with no sound.""" - protect_content: Optional[Union[bool, Default]] = Default("protect_content") - """Protects the contents of the sent message from forwarding and saving""" - message_effect_id: Optional[str] = None - """Unique identifier of the message effect to be added to the message; for private chats only""" - reply_parameters: Optional[ReplyParameters] = None - """Description of the message to reply to""" - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None - """Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user""" - allow_sending_without_reply: Optional[bool] = Field( - None, json_schema_extra={"deprecated": True} - ) - """Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - -.. deprecated:: API:7.0 - https://core.telegram.org/bots/api-changelog#december-29-2023""" - reply_to_message_id: Optional[int] = Field(None, json_schema_extra={"deprecated": True}) - """If the message is a reply, ID of the original message - -.. deprecated:: API:7.0 - https://core.telegram.org/bots/api-changelog#december-29-2023""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - chat_id: Union[int, str], - question: str, - options: List[Union[InputPollOption, str]], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - question_parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - question_entities: Optional[List[MessageEntity]] = None, - is_anonymous: Optional[bool] = None, - type: Optional[str] = None, - allows_multiple_answers: Optional[bool] = None, - correct_option_id: Optional[int] = None, - explanation: Optional[str] = None, - explanation_parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - explanation_entities: Optional[List[MessageEntity]] = None, - open_period: Optional[int] = None, - close_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None, - is_closed: Optional[bool] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - chat_id=chat_id, - question=question, - options=options, - business_connection_id=business_connection_id, - message_thread_id=message_thread_id, - question_parse_mode=question_parse_mode, - question_entities=question_entities, - is_anonymous=is_anonymous, - type=type, - allows_multiple_answers=allows_multiple_answers, - correct_option_id=correct_option_id, - explanation=explanation, - explanation_parse_mode=explanation_parse_mode, - explanation_entities=explanation_entities, - open_period=open_period, - close_date=close_date, - is_closed=is_closed, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - reply_to_message_id=reply_to_message_id, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/methods/send_sticker.py b/env/Lib/site-packages/aiogram/methods/send_sticker.py deleted file mode 100644 index 236792b..0000000 --- a/env/Lib/site-packages/aiogram/methods/send_sticker.py +++ /dev/null @@ -1,106 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Optional, Union - -from pydantic import Field - -from ..client.default import Default -from ..types import ( - ForceReply, - InlineKeyboardMarkup, - InputFile, - Message, - ReplyKeyboardMarkup, - ReplyKeyboardRemove, - ReplyParameters, -) -from .base import TelegramMethod - - -class SendSticker(TelegramMethod[Message]): - """ - Use this method to send static .WEBP, `animated `_ .TGS, or `video `_ .WEBM stickers. On success, the sent :class:`aiogram.types.message.Message` is returned. - - Source: https://core.telegram.org/bots/api#sendsticker - """ - - __returning__ = Message - __api_method__ = "sendSticker" - - chat_id: Union[int, str] - """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" - sticker: Union[InputFile, str] - """Sticker to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a .WEBP sticker from the Internet, or upload a new .WEBP, .TGS, or .WEBM sticker using multipart/form-data. :ref:`More information on Sending Files » `. Video and animated stickers can't be sent via an HTTP URL.""" - business_connection_id: Optional[str] = None - """Unique identifier of the business connection on behalf of which the message will be sent""" - message_thread_id: Optional[int] = None - """Unique identifier for the target message thread (topic) of the forum; for forum supergroups only""" - emoji: Optional[str] = None - """Emoji associated with the sticker; only for just uploaded stickers""" - disable_notification: Optional[bool] = None - """Sends the message `silently `_. Users will receive a notification with no sound.""" - protect_content: Optional[Union[bool, Default]] = Default("protect_content") - """Protects the contents of the sent message from forwarding and saving""" - message_effect_id: Optional[str] = None - """Unique identifier of the message effect to be added to the message; for private chats only""" - reply_parameters: Optional[ReplyParameters] = None - """Description of the message to reply to""" - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None - """Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user""" - allow_sending_without_reply: Optional[bool] = Field( - None, json_schema_extra={"deprecated": True} - ) - """Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - -.. deprecated:: API:7.0 - https://core.telegram.org/bots/api-changelog#december-29-2023""" - reply_to_message_id: Optional[int] = Field(None, json_schema_extra={"deprecated": True}) - """If the message is a reply, ID of the original message - -.. deprecated:: API:7.0 - https://core.telegram.org/bots/api-changelog#december-29-2023""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - chat_id: Union[int, str], - sticker: Union[InputFile, str], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - emoji: Optional[str] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - chat_id=chat_id, - sticker=sticker, - business_connection_id=business_connection_id, - message_thread_id=message_thread_id, - emoji=emoji, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - reply_to_message_id=reply_to_message_id, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/methods/send_venue.py b/env/Lib/site-packages/aiogram/methods/send_venue.py deleted file mode 100644 index 04ebcee..0000000 --- a/env/Lib/site-packages/aiogram/methods/send_venue.py +++ /dev/null @@ -1,129 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Optional, Union - -from pydantic import Field - -from ..client.default import Default -from ..types import ( - ForceReply, - InlineKeyboardMarkup, - Message, - ReplyKeyboardMarkup, - ReplyKeyboardRemove, - ReplyParameters, -) -from .base import TelegramMethod - - -class SendVenue(TelegramMethod[Message]): - """ - Use this method to send information about a venue. On success, the sent :class:`aiogram.types.message.Message` is returned. - - Source: https://core.telegram.org/bots/api#sendvenue - """ - - __returning__ = Message - __api_method__ = "sendVenue" - - chat_id: Union[int, str] - """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" - latitude: float - """Latitude of the venue""" - longitude: float - """Longitude of the venue""" - title: str - """Name of the venue""" - address: str - """Address of the venue""" - business_connection_id: Optional[str] = None - """Unique identifier of the business connection on behalf of which the message will be sent""" - message_thread_id: Optional[int] = None - """Unique identifier for the target message thread (topic) of the forum; for forum supergroups only""" - foursquare_id: Optional[str] = None - """Foursquare identifier of the venue""" - foursquare_type: Optional[str] = None - """Foursquare type of the venue, if known. (For example, 'arts_entertainment/default', 'arts_entertainment/aquarium' or 'food/icecream'.)""" - google_place_id: Optional[str] = None - """Google Places identifier of the venue""" - google_place_type: Optional[str] = None - """Google Places type of the venue. (See `supported types `_.)""" - disable_notification: Optional[bool] = None - """Sends the message `silently `_. Users will receive a notification with no sound.""" - protect_content: Optional[Union[bool, Default]] = Default("protect_content") - """Protects the contents of the sent message from forwarding and saving""" - message_effect_id: Optional[str] = None - """Unique identifier of the message effect to be added to the message; for private chats only""" - reply_parameters: Optional[ReplyParameters] = None - """Description of the message to reply to""" - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None - """Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user""" - allow_sending_without_reply: Optional[bool] = Field( - None, json_schema_extra={"deprecated": True} - ) - """Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - -.. deprecated:: API:7.0 - https://core.telegram.org/bots/api-changelog#december-29-2023""" - reply_to_message_id: Optional[int] = Field(None, json_schema_extra={"deprecated": True}) - """If the message is a reply, ID of the original message - -.. deprecated:: API:7.0 - https://core.telegram.org/bots/api-changelog#december-29-2023""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - chat_id: Union[int, str], - latitude: float, - longitude: float, - title: str, - address: str, - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - foursquare_id: Optional[str] = None, - foursquare_type: Optional[str] = None, - google_place_id: Optional[str] = None, - google_place_type: Optional[str] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - chat_id=chat_id, - latitude=latitude, - longitude=longitude, - title=title, - address=address, - business_connection_id=business_connection_id, - message_thread_id=message_thread_id, - foursquare_id=foursquare_id, - foursquare_type=foursquare_type, - google_place_id=google_place_id, - google_place_type=google_place_type, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - reply_to_message_id=reply_to_message_id, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/methods/send_video.py b/env/Lib/site-packages/aiogram/methods/send_video.py deleted file mode 100644 index 33fb7aa..0000000 --- a/env/Lib/site-packages/aiogram/methods/send_video.py +++ /dev/null @@ -1,145 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, List, Optional, Union - -from pydantic import Field - -from ..client.default import Default -from ..types import ( - ForceReply, - InlineKeyboardMarkup, - InputFile, - Message, - MessageEntity, - ReplyKeyboardMarkup, - ReplyKeyboardRemove, - ReplyParameters, -) -from .base import TelegramMethod - - -class SendVideo(TelegramMethod[Message]): - """ - Use this method to send video files, Telegram clients support MPEG4 videos (other formats may be sent as :class:`aiogram.types.document.Document`). On success, the sent :class:`aiogram.types.message.Message` is returned. Bots can currently send video files of up to 50 MB in size, this limit may be changed in the future. - - Source: https://core.telegram.org/bots/api#sendvideo - """ - - __returning__ = Message - __api_method__ = "sendVideo" - - chat_id: Union[int, str] - """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" - video: Union[InputFile, str] - """Video to send. Pass a file_id as String to send a video that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a video from the Internet, or upload a new video using multipart/form-data. :ref:`More information on Sending Files » `""" - business_connection_id: Optional[str] = None - """Unique identifier of the business connection on behalf of which the message will be sent""" - message_thread_id: Optional[int] = None - """Unique identifier for the target message thread (topic) of the forum; for forum supergroups only""" - duration: Optional[int] = None - """Duration of sent video in seconds""" - width: Optional[int] = None - """Video width""" - height: Optional[int] = None - """Video height""" - thumbnail: Optional[InputFile] = None - """Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More information on Sending Files » `""" - caption: Optional[str] = None - """Video caption (may also be used when resending videos by *file_id*), 0-1024 characters after entities parsing""" - parse_mode: Optional[Union[str, Default]] = Default("parse_mode") - """Mode for parsing entities in the video caption. See `formatting options `_ for more details.""" - caption_entities: Optional[List[MessageEntity]] = None - """A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*""" - show_caption_above_media: Optional[Union[bool, Default]] = Default("show_caption_above_media") - """Pass :code:`True`, if the caption must be shown above the message media""" - has_spoiler: Optional[bool] = None - """Pass :code:`True` if the video needs to be covered with a spoiler animation""" - supports_streaming: Optional[bool] = None - """Pass :code:`True` if the uploaded video is suitable for streaming""" - disable_notification: Optional[bool] = None - """Sends the message `silently `_. Users will receive a notification with no sound.""" - protect_content: Optional[Union[bool, Default]] = Default("protect_content") - """Protects the contents of the sent message from forwarding and saving""" - message_effect_id: Optional[str] = None - """Unique identifier of the message effect to be added to the message; for private chats only""" - reply_parameters: Optional[ReplyParameters] = None - """Description of the message to reply to""" - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None - """Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user""" - allow_sending_without_reply: Optional[bool] = Field( - None, json_schema_extra={"deprecated": True} - ) - """Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - -.. deprecated:: API:7.0 - https://core.telegram.org/bots/api-changelog#december-29-2023""" - reply_to_message_id: Optional[int] = Field(None, json_schema_extra={"deprecated": True}) - """If the message is a reply, ID of the original message - -.. deprecated:: API:7.0 - https://core.telegram.org/bots/api-changelog#december-29-2023""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - chat_id: Union[int, str], - video: Union[InputFile, str], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - duration: Optional[int] = None, - width: Optional[int] = None, - height: Optional[int] = None, - thumbnail: Optional[InputFile] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - show_caption_above_media: Optional[Union[bool, Default]] = Default( - "show_caption_above_media" - ), - has_spoiler: Optional[bool] = None, - supports_streaming: Optional[bool] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - chat_id=chat_id, - video=video, - business_connection_id=business_connection_id, - message_thread_id=message_thread_id, - duration=duration, - width=width, - height=height, - thumbnail=thumbnail, - caption=caption, - parse_mode=parse_mode, - caption_entities=caption_entities, - show_caption_above_media=show_caption_above_media, - has_spoiler=has_spoiler, - supports_streaming=supports_streaming, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - reply_to_message_id=reply_to_message_id, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/methods/send_video_note.py b/env/Lib/site-packages/aiogram/methods/send_video_note.py deleted file mode 100644 index 43d685b..0000000 --- a/env/Lib/site-packages/aiogram/methods/send_video_note.py +++ /dev/null @@ -1,114 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Optional, Union - -from pydantic import Field - -from ..client.default import Default -from ..types import ( - ForceReply, - InlineKeyboardMarkup, - InputFile, - Message, - ReplyKeyboardMarkup, - ReplyKeyboardRemove, - ReplyParameters, -) -from .base import TelegramMethod - - -class SendVideoNote(TelegramMethod[Message]): - """ - As of `v.4.0 `_, Telegram clients support rounded square MPEG4 videos of up to 1 minute long. Use this method to send video messages. On success, the sent :class:`aiogram.types.message.Message` is returned. - - Source: https://core.telegram.org/bots/api#sendvideonote - """ - - __returning__ = Message - __api_method__ = "sendVideoNote" - - chat_id: Union[int, str] - """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" - video_note: Union[InputFile, str] - """Video note to send. Pass a file_id as String to send a video note that exists on the Telegram servers (recommended) or upload a new video using multipart/form-data. :ref:`More information on Sending Files » `. Sending video notes by a URL is currently unsupported""" - business_connection_id: Optional[str] = None - """Unique identifier of the business connection on behalf of which the message will be sent""" - message_thread_id: Optional[int] = None - """Unique identifier for the target message thread (topic) of the forum; for forum supergroups only""" - duration: Optional[int] = None - """Duration of sent video in seconds""" - length: Optional[int] = None - """Video width and height, i.e. diameter of the video message""" - thumbnail: Optional[InputFile] = None - """Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More information on Sending Files » `""" - disable_notification: Optional[bool] = None - """Sends the message `silently `_. Users will receive a notification with no sound.""" - protect_content: Optional[Union[bool, Default]] = Default("protect_content") - """Protects the contents of the sent message from forwarding and saving""" - message_effect_id: Optional[str] = None - """Unique identifier of the message effect to be added to the message; for private chats only""" - reply_parameters: Optional[ReplyParameters] = None - """Description of the message to reply to""" - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None - """Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user""" - allow_sending_without_reply: Optional[bool] = Field( - None, json_schema_extra={"deprecated": True} - ) - """Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - -.. deprecated:: API:7.0 - https://core.telegram.org/bots/api-changelog#december-29-2023""" - reply_to_message_id: Optional[int] = Field(None, json_schema_extra={"deprecated": True}) - """If the message is a reply, ID of the original message - -.. deprecated:: API:7.0 - https://core.telegram.org/bots/api-changelog#december-29-2023""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - chat_id: Union[int, str], - video_note: Union[InputFile, str], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - duration: Optional[int] = None, - length: Optional[int] = None, - thumbnail: Optional[InputFile] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - chat_id=chat_id, - video_note=video_note, - business_connection_id=business_connection_id, - message_thread_id=message_thread_id, - duration=duration, - length=length, - thumbnail=thumbnail, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - reply_to_message_id=reply_to_message_id, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/methods/send_voice.py b/env/Lib/site-packages/aiogram/methods/send_voice.py deleted file mode 100644 index ccb27d3..0000000 --- a/env/Lib/site-packages/aiogram/methods/send_voice.py +++ /dev/null @@ -1,119 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, List, Optional, Union - -from pydantic import Field - -from ..client.default import Default -from ..types import ( - ForceReply, - InlineKeyboardMarkup, - InputFile, - Message, - MessageEntity, - ReplyKeyboardMarkup, - ReplyKeyboardRemove, - ReplyParameters, -) -from .base import TelegramMethod - - -class SendVoice(TelegramMethod[Message]): - """ - Use this method to send audio files, if you want Telegram clients to display the file as a playable voice message. For this to work, your audio must be in an .OGG file encoded with OPUS, or in .MP3 format, or in .M4A format (other formats may be sent as :class:`aiogram.types.audio.Audio` or :class:`aiogram.types.document.Document`). On success, the sent :class:`aiogram.types.message.Message` is returned. Bots can currently send voice messages of up to 50 MB in size, this limit may be changed in the future. - - Source: https://core.telegram.org/bots/api#sendvoice - """ - - __returning__ = Message - __api_method__ = "sendVoice" - - chat_id: Union[int, str] - """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" - voice: Union[InputFile, str] - """Audio file to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » `""" - business_connection_id: Optional[str] = None - """Unique identifier of the business connection on behalf of which the message will be sent""" - message_thread_id: Optional[int] = None - """Unique identifier for the target message thread (topic) of the forum; for forum supergroups only""" - caption: Optional[str] = None - """Voice message caption, 0-1024 characters after entities parsing""" - parse_mode: Optional[Union[str, Default]] = Default("parse_mode") - """Mode for parsing entities in the voice message caption. See `formatting options `_ for more details.""" - caption_entities: Optional[List[MessageEntity]] = None - """A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*""" - duration: Optional[int] = None - """Duration of the voice message in seconds""" - disable_notification: Optional[bool] = None - """Sends the message `silently `_. Users will receive a notification with no sound.""" - protect_content: Optional[Union[bool, Default]] = Default("protect_content") - """Protects the contents of the sent message from forwarding and saving""" - message_effect_id: Optional[str] = None - """Unique identifier of the message effect to be added to the message; for private chats only""" - reply_parameters: Optional[ReplyParameters] = None - """Description of the message to reply to""" - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None - """Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user""" - allow_sending_without_reply: Optional[bool] = Field( - None, json_schema_extra={"deprecated": True} - ) - """Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - -.. deprecated:: API:7.0 - https://core.telegram.org/bots/api-changelog#december-29-2023""" - reply_to_message_id: Optional[int] = Field(None, json_schema_extra={"deprecated": True}) - """If the message is a reply, ID of the original message - -.. deprecated:: API:7.0 - https://core.telegram.org/bots/api-changelog#december-29-2023""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - chat_id: Union[int, str], - voice: Union[InputFile, str], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - duration: Optional[int] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - chat_id=chat_id, - voice=voice, - business_connection_id=business_connection_id, - message_thread_id=message_thread_id, - caption=caption, - parse_mode=parse_mode, - caption_entities=caption_entities, - duration=duration, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - reply_to_message_id=reply_to_message_id, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/methods/set_chat_administrator_custom_title.py b/env/Lib/site-packages/aiogram/methods/set_chat_administrator_custom_title.py deleted file mode 100644 index a7953c1..0000000 --- a/env/Lib/site-packages/aiogram/methods/set_chat_administrator_custom_title.py +++ /dev/null @@ -1,43 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Union - -from .base import TelegramMethod - - -class SetChatAdministratorCustomTitle(TelegramMethod[bool]): - """ - Use this method to set a custom title for an administrator in a supergroup promoted by the bot. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#setchatadministratorcustomtitle - """ - - __returning__ = bool - __api_method__ = "setChatAdministratorCustomTitle" - - chat_id: Union[int, str] - """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)""" - user_id: int - """Unique identifier of the target user""" - custom_title: str - """New custom title for the administrator; 0-16 characters, emoji are not allowed""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - chat_id: Union[int, str], - user_id: int, - custom_title: str, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - chat_id=chat_id, user_id=user_id, custom_title=custom_title, **__pydantic_kwargs - ) diff --git a/env/Lib/site-packages/aiogram/methods/set_chat_description.py b/env/Lib/site-packages/aiogram/methods/set_chat_description.py deleted file mode 100644 index 0f8a4a4..0000000 --- a/env/Lib/site-packages/aiogram/methods/set_chat_description.py +++ /dev/null @@ -1,38 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Optional, Union - -from .base import TelegramMethod - - -class SetChatDescription(TelegramMethod[bool]): - """ - Use this method to change the description of a group, a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#setchatdescription - """ - - __returning__ = bool - __api_method__ = "setChatDescription" - - chat_id: Union[int, str] - """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" - description: Optional[str] = None - """New chat description, 0-255 characters""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - chat_id: Union[int, str], - description: Optional[str] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(chat_id=chat_id, description=description, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/methods/set_chat_menu_button.py b/env/Lib/site-packages/aiogram/methods/set_chat_menu_button.py deleted file mode 100644 index 97515d5..0000000 --- a/env/Lib/site-packages/aiogram/methods/set_chat_menu_button.py +++ /dev/null @@ -1,41 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Optional, Union - -from ..types import MenuButtonCommands, MenuButtonDefault, MenuButtonWebApp -from .base import TelegramMethod - - -class SetChatMenuButton(TelegramMethod[bool]): - """ - Use this method to change the bot's menu button in a private chat, or the default menu button. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#setchatmenubutton - """ - - __returning__ = bool - __api_method__ = "setChatMenuButton" - - chat_id: Optional[int] = None - """Unique identifier for the target private chat. If not specified, default bot's menu button will be changed""" - menu_button: Optional[Union[MenuButtonCommands, MenuButtonWebApp, MenuButtonDefault]] = None - """A JSON-serialized object for the bot's new menu button. Defaults to :class:`aiogram.types.menu_button_default.MenuButtonDefault`""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - chat_id: Optional[int] = None, - menu_button: Optional[ - Union[MenuButtonCommands, MenuButtonWebApp, MenuButtonDefault] - ] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(chat_id=chat_id, menu_button=menu_button, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/methods/set_chat_permissions.py b/env/Lib/site-packages/aiogram/methods/set_chat_permissions.py deleted file mode 100644 index 232af08..0000000 --- a/env/Lib/site-packages/aiogram/methods/set_chat_permissions.py +++ /dev/null @@ -1,47 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Optional, Union - -from ..types import ChatPermissions -from .base import TelegramMethod - - -class SetChatPermissions(TelegramMethod[bool]): - """ - Use this method to set default chat permissions for all members. The bot must be an administrator in the group or a supergroup for this to work and must have the *can_restrict_members* administrator rights. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#setchatpermissions - """ - - __returning__ = bool - __api_method__ = "setChatPermissions" - - chat_id: Union[int, str] - """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)""" - permissions: ChatPermissions - """A JSON-serialized object for new default chat permissions""" - use_independent_chat_permissions: Optional[bool] = None - """Pass :code:`True` if chat permissions are set independently. Otherwise, the *can_send_other_messages* and *can_add_web_page_previews* permissions will imply the *can_send_messages*, *can_send_audios*, *can_send_documents*, *can_send_photos*, *can_send_videos*, *can_send_video_notes*, and *can_send_voice_notes* permissions; the *can_send_polls* permission will imply the *can_send_messages* permission.""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - chat_id: Union[int, str], - permissions: ChatPermissions, - use_independent_chat_permissions: Optional[bool] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - chat_id=chat_id, - permissions=permissions, - use_independent_chat_permissions=use_independent_chat_permissions, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/methods/set_chat_photo.py b/env/Lib/site-packages/aiogram/methods/set_chat_photo.py deleted file mode 100644 index 105f8f8..0000000 --- a/env/Lib/site-packages/aiogram/methods/set_chat_photo.py +++ /dev/null @@ -1,39 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Union - -from ..types import InputFile -from .base import TelegramMethod - - -class SetChatPhoto(TelegramMethod[bool]): - """ - Use this method to set a new profile photo for the chat. Photos can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#setchatphoto - """ - - __returning__ = bool - __api_method__ = "setChatPhoto" - - chat_id: Union[int, str] - """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" - photo: InputFile - """New chat photo, uploaded using multipart/form-data""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - chat_id: Union[int, str], - photo: InputFile, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(chat_id=chat_id, photo=photo, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/methods/set_chat_sticker_set.py b/env/Lib/site-packages/aiogram/methods/set_chat_sticker_set.py deleted file mode 100644 index 62ed5d1..0000000 --- a/env/Lib/site-packages/aiogram/methods/set_chat_sticker_set.py +++ /dev/null @@ -1,40 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Union - -from .base import TelegramMethod - - -class SetChatStickerSet(TelegramMethod[bool]): - """ - Use this method to set a new group sticker set for a supergroup. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Use the field *can_set_sticker_set* optionally returned in :class:`aiogram.methods.get_chat.GetChat` requests to check if the bot can use this method. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#setchatstickerset - """ - - __returning__ = bool - __api_method__ = "setChatStickerSet" - - chat_id: Union[int, str] - """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)""" - sticker_set_name: str - """Name of the sticker set to be set as the group sticker set""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - chat_id: Union[int, str], - sticker_set_name: str, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - chat_id=chat_id, sticker_set_name=sticker_set_name, **__pydantic_kwargs - ) diff --git a/env/Lib/site-packages/aiogram/methods/set_chat_title.py b/env/Lib/site-packages/aiogram/methods/set_chat_title.py deleted file mode 100644 index 04b52e0..0000000 --- a/env/Lib/site-packages/aiogram/methods/set_chat_title.py +++ /dev/null @@ -1,34 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Union - -from .base import TelegramMethod - - -class SetChatTitle(TelegramMethod[bool]): - """ - Use this method to change the title of a chat. Titles can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#setchattitle - """ - - __returning__ = bool - __api_method__ = "setChatTitle" - - chat_id: Union[int, str] - """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" - title: str - """New chat title, 1-128 characters""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, *, chat_id: Union[int, str], title: str, **__pydantic_kwargs: Any - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(chat_id=chat_id, title=title, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/methods/set_custom_emoji_sticker_set_thumbnail.py b/env/Lib/site-packages/aiogram/methods/set_custom_emoji_sticker_set_thumbnail.py deleted file mode 100644 index 47e9c03..0000000 --- a/env/Lib/site-packages/aiogram/methods/set_custom_emoji_sticker_set_thumbnail.py +++ /dev/null @@ -1,38 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Optional - -from .base import TelegramMethod - - -class SetCustomEmojiStickerSetThumbnail(TelegramMethod[bool]): - """ - Use this method to set the thumbnail of a custom emoji sticker set. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#setcustomemojistickersetthumbnail - """ - - __returning__ = bool - __api_method__ = "setCustomEmojiStickerSetThumbnail" - - name: str - """Sticker set name""" - custom_emoji_id: Optional[str] = None - """Custom emoji identifier of a sticker from the sticker set; pass an empty string to drop the thumbnail and use the first sticker as the thumbnail.""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - name: str, - custom_emoji_id: Optional[str] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(name=name, custom_emoji_id=custom_emoji_id, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/methods/set_game_score.py b/env/Lib/site-packages/aiogram/methods/set_game_score.py deleted file mode 100644 index 38e5374..0000000 --- a/env/Lib/site-packages/aiogram/methods/set_game_score.py +++ /dev/null @@ -1,63 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Optional, Union - -from ..types import Message -from .base import TelegramMethod - - -class SetGameScore(TelegramMethod[Union[Message, bool]]): - """ - Use this method to set the score of the specified user in a game message. On success, if the message is not an inline message, the :class:`aiogram.types.message.Message` is returned, otherwise :code:`True` is returned. Returns an error, if the new score is not greater than the user's current score in the chat and *force* is :code:`False`. - - Source: https://core.telegram.org/bots/api#setgamescore - """ - - __returning__ = Union[Message, bool] - __api_method__ = "setGameScore" - - user_id: int - """User identifier""" - score: int - """New score, must be non-negative""" - force: Optional[bool] = None - """Pass :code:`True` if the high score is allowed to decrease. This can be useful when fixing mistakes or banning cheaters""" - disable_edit_message: Optional[bool] = None - """Pass :code:`True` if the game message should not be automatically edited to include the current scoreboard""" - chat_id: Optional[int] = None - """Required if *inline_message_id* is not specified. Unique identifier for the target chat""" - message_id: Optional[int] = None - """Required if *inline_message_id* is not specified. Identifier of the sent message""" - inline_message_id: Optional[str] = None - """Required if *chat_id* and *message_id* are not specified. Identifier of the inline message""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - user_id: int, - score: int, - force: Optional[bool] = None, - disable_edit_message: Optional[bool] = None, - chat_id: Optional[int] = None, - message_id: Optional[int] = None, - inline_message_id: Optional[str] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - user_id=user_id, - score=score, - force=force, - disable_edit_message=disable_edit_message, - chat_id=chat_id, - message_id=message_id, - inline_message_id=inline_message_id, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/methods/set_message_reaction.py b/env/Lib/site-packages/aiogram/methods/set_message_reaction.py deleted file mode 100644 index d1c061c..0000000 --- a/env/Lib/site-packages/aiogram/methods/set_message_reaction.py +++ /dev/null @@ -1,53 +0,0 @@ -from typing import TYPE_CHECKING, Any, List, Optional, Union - -from ..types import ReactionTypeCustomEmoji, ReactionTypeEmoji, ReactionTypePaid -from .base import TelegramMethod - - -class SetMessageReaction(TelegramMethod[bool]): - """ - Use this method to change the chosen reactions on a message. Service messages can't be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. Bots can't use paid reactions. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#setmessagereaction - """ - - __returning__ = bool - __api_method__ = "setMessageReaction" - - chat_id: Union[int, str] - """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" - message_id: int - """Identifier of the target message. If the message belongs to a media group, the reaction is set to the first non-deleted message in the group instead.""" - reaction: Optional[ - List[Union[ReactionTypeEmoji, ReactionTypeCustomEmoji, ReactionTypePaid]] - ] = None - """A JSON-serialized list of reaction types to set on the message. Currently, as non-premium users, bots can set up to one reaction per message. A custom emoji reaction can be used if it is either already present on the message or explicitly allowed by chat administrators. Paid reactions can't be used by bots.""" - is_big: Optional[bool] = None - """Pass :code:`True` to set the reaction with a big animation""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - chat_id: Union[int, str], - message_id: int, - reaction: Optional[ - List[Union[ReactionTypeEmoji, ReactionTypeCustomEmoji, ReactionTypePaid]] - ] = None, - is_big: Optional[bool] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - chat_id=chat_id, - message_id=message_id, - reaction=reaction, - is_big=is_big, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/methods/set_my_commands.py b/env/Lib/site-packages/aiogram/methods/set_my_commands.py deleted file mode 100644 index 2e52771..0000000 --- a/env/Lib/site-packages/aiogram/methods/set_my_commands.py +++ /dev/null @@ -1,73 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, List, Optional, Union - -from ..types import ( - BotCommand, - BotCommandScopeAllChatAdministrators, - BotCommandScopeAllGroupChats, - BotCommandScopeAllPrivateChats, - BotCommandScopeChat, - BotCommandScopeChatAdministrators, - BotCommandScopeChatMember, - BotCommandScopeDefault, -) -from .base import TelegramMethod - - -class SetMyCommands(TelegramMethod[bool]): - """ - Use this method to change the list of the bot's commands. See `this manual `_ for more details about bot commands. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#setmycommands - """ - - __returning__ = bool - __api_method__ = "setMyCommands" - - commands: List[BotCommand] - """A JSON-serialized list of bot commands to be set as the list of the bot's commands. At most 100 commands can be specified.""" - scope: Optional[ - Union[ - BotCommandScopeDefault, - BotCommandScopeAllPrivateChats, - BotCommandScopeAllGroupChats, - BotCommandScopeAllChatAdministrators, - BotCommandScopeChat, - BotCommandScopeChatAdministrators, - BotCommandScopeChatMember, - ] - ] = None - """A JSON-serialized object, describing scope of users for which the commands are relevant. Defaults to :class:`aiogram.types.bot_command_scope_default.BotCommandScopeDefault`.""" - language_code: Optional[str] = None - """A two-letter ISO 639-1 language code. If empty, commands will be applied to all users from the given scope, for whose language there are no dedicated commands""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - commands: List[BotCommand], - scope: Optional[ - Union[ - BotCommandScopeDefault, - BotCommandScopeAllPrivateChats, - BotCommandScopeAllGroupChats, - BotCommandScopeAllChatAdministrators, - BotCommandScopeChat, - BotCommandScopeChatAdministrators, - BotCommandScopeChatMember, - ] - ] = None, - language_code: Optional[str] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - commands=commands, scope=scope, language_code=language_code, **__pydantic_kwargs - ) diff --git a/env/Lib/site-packages/aiogram/methods/set_my_default_administrator_rights.py b/env/Lib/site-packages/aiogram/methods/set_my_default_administrator_rights.py deleted file mode 100644 index 02aa7ad..0000000 --- a/env/Lib/site-packages/aiogram/methods/set_my_default_administrator_rights.py +++ /dev/null @@ -1,39 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Optional - -from ..types import ChatAdministratorRights -from .base import TelegramMethod - - -class SetMyDefaultAdministratorRights(TelegramMethod[bool]): - """ - Use this method to change the default administrator rights requested by the bot when it's added as an administrator to groups or channels. These rights will be suggested to users, but they are free to modify the list before adding the bot. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#setmydefaultadministratorrights - """ - - __returning__ = bool - __api_method__ = "setMyDefaultAdministratorRights" - - rights: Optional[ChatAdministratorRights] = None - """A JSON-serialized object describing new default administrator rights. If not specified, the default administrator rights will be cleared.""" - for_channels: Optional[bool] = None - """Pass :code:`True` to change the default administrator rights of the bot in channels. Otherwise, the default administrator rights of the bot for groups and supergroups will be changed.""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - rights: Optional[ChatAdministratorRights] = None, - for_channels: Optional[bool] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(rights=rights, for_channels=for_channels, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/methods/set_my_description.py b/env/Lib/site-packages/aiogram/methods/set_my_description.py deleted file mode 100644 index ee192c8..0000000 --- a/env/Lib/site-packages/aiogram/methods/set_my_description.py +++ /dev/null @@ -1,40 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Optional - -from .base import TelegramMethod - - -class SetMyDescription(TelegramMethod[bool]): - """ - Use this method to change the bot's description, which is shown in the chat with the bot if the chat is empty. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#setmydescription - """ - - __returning__ = bool - __api_method__ = "setMyDescription" - - description: Optional[str] = None - """New bot description; 0-512 characters. Pass an empty string to remove the dedicated description for the given language.""" - language_code: Optional[str] = None - """A two-letter ISO 639-1 language code. If empty, the description will be applied to all users for whose language there is no dedicated description.""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - description: Optional[str] = None, - language_code: Optional[str] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - description=description, language_code=language_code, **__pydantic_kwargs - ) diff --git a/env/Lib/site-packages/aiogram/methods/set_my_name.py b/env/Lib/site-packages/aiogram/methods/set_my_name.py deleted file mode 100644 index 3633fdc..0000000 --- a/env/Lib/site-packages/aiogram/methods/set_my_name.py +++ /dev/null @@ -1,36 +0,0 @@ -from typing import TYPE_CHECKING, Any, Optional - -from .base import TelegramMethod - - -class SetMyName(TelegramMethod[bool]): - """ - Use this method to change the bot's name. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#setmyname - """ - - __returning__ = bool - __api_method__ = "setMyName" - - name: Optional[str] = None - """New bot name; 0-64 characters. Pass an empty string to remove the dedicated name for the given language.""" - language_code: Optional[str] = None - """A two-letter ISO 639-1 language code. If empty, the name will be shown to all users for whose language there is no dedicated name.""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - name: Optional[str] = None, - language_code: Optional[str] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(name=name, language_code=language_code, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/methods/set_my_short_description.py b/env/Lib/site-packages/aiogram/methods/set_my_short_description.py deleted file mode 100644 index 22fa581..0000000 --- a/env/Lib/site-packages/aiogram/methods/set_my_short_description.py +++ /dev/null @@ -1,42 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Optional - -from .base import TelegramMethod - - -class SetMyShortDescription(TelegramMethod[bool]): - """ - Use this method to change the bot's short description, which is shown on the bot's profile page and is sent together with the link when users share the bot. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#setmyshortdescription - """ - - __returning__ = bool - __api_method__ = "setMyShortDescription" - - short_description: Optional[str] = None - """New short description for the bot; 0-120 characters. Pass an empty string to remove the dedicated short description for the given language.""" - language_code: Optional[str] = None - """A two-letter ISO 639-1 language code. If empty, the short description will be applied to all users for whose language there is no dedicated short description.""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - short_description: Optional[str] = None, - language_code: Optional[str] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - short_description=short_description, - language_code=language_code, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/methods/set_passport_data_errors.py b/env/Lib/site-packages/aiogram/methods/set_passport_data_errors.py deleted file mode 100644 index 0ad7e8b..0000000 --- a/env/Lib/site-packages/aiogram/methods/set_passport_data_errors.py +++ /dev/null @@ -1,74 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, List, Union - -from ..types import ( - PassportElementErrorDataField, - PassportElementErrorFile, - PassportElementErrorFiles, - PassportElementErrorFrontSide, - PassportElementErrorReverseSide, - PassportElementErrorSelfie, - PassportElementErrorTranslationFile, - PassportElementErrorTranslationFiles, - PassportElementErrorUnspecified, -) -from .base import TelegramMethod - - -class SetPassportDataErrors(TelegramMethod[bool]): - """ - Informs a user that some of the Telegram Passport elements they provided contains errors. The user will not be able to re-submit their Passport to you until the errors are fixed (the contents of the field for which you returned the error must change). Returns :code:`True` on success. - Use this if the data submitted by the user doesn't satisfy the standards your service requires for any reason. For example, if a birthday date seems invalid, a submitted document is blurry, a scan shows evidence of tampering, etc. Supply some details in the error message to make sure the user knows how to correct the issues. - - Source: https://core.telegram.org/bots/api#setpassportdataerrors - """ - - __returning__ = bool - __api_method__ = "setPassportDataErrors" - - user_id: int - """User identifier""" - errors: List[ - Union[ - PassportElementErrorDataField, - PassportElementErrorFrontSide, - PassportElementErrorReverseSide, - PassportElementErrorSelfie, - PassportElementErrorFile, - PassportElementErrorFiles, - PassportElementErrorTranslationFile, - PassportElementErrorTranslationFiles, - PassportElementErrorUnspecified, - ] - ] - """A JSON-serialized array describing the errors""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - user_id: int, - errors: List[ - Union[ - PassportElementErrorDataField, - PassportElementErrorFrontSide, - PassportElementErrorReverseSide, - PassportElementErrorSelfie, - PassportElementErrorFile, - PassportElementErrorFiles, - PassportElementErrorTranslationFile, - PassportElementErrorTranslationFiles, - PassportElementErrorUnspecified, - ] - ], - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(user_id=user_id, errors=errors, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/methods/set_sticker_emoji_list.py b/env/Lib/site-packages/aiogram/methods/set_sticker_emoji_list.py deleted file mode 100644 index ac268c1..0000000 --- a/env/Lib/site-packages/aiogram/methods/set_sticker_emoji_list.py +++ /dev/null @@ -1,34 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, List - -from .base import TelegramMethod - - -class SetStickerEmojiList(TelegramMethod[bool]): - """ - Use this method to change the list of emoji assigned to a regular or custom emoji sticker. The sticker must belong to a sticker set created by the bot. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#setstickeremojilist - """ - - __returning__ = bool - __api_method__ = "setStickerEmojiList" - - sticker: str - """File identifier of the sticker""" - emoji_list: List[str] - """A JSON-serialized list of 1-20 emoji associated with the sticker""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, *, sticker: str, emoji_list: List[str], **__pydantic_kwargs: Any - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(sticker=sticker, emoji_list=emoji_list, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/methods/set_sticker_keywords.py b/env/Lib/site-packages/aiogram/methods/set_sticker_keywords.py deleted file mode 100644 index 49e68f8..0000000 --- a/env/Lib/site-packages/aiogram/methods/set_sticker_keywords.py +++ /dev/null @@ -1,38 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, List, Optional - -from .base import TelegramMethod - - -class SetStickerKeywords(TelegramMethod[bool]): - """ - Use this method to change search keywords assigned to a regular or custom emoji sticker. The sticker must belong to a sticker set created by the bot. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#setstickerkeywords - """ - - __returning__ = bool - __api_method__ = "setStickerKeywords" - - sticker: str - """File identifier of the sticker""" - keywords: Optional[List[str]] = None - """A JSON-serialized list of 0-20 search keywords for the sticker with total length of up to 64 characters""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - sticker: str, - keywords: Optional[List[str]] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(sticker=sticker, keywords=keywords, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/methods/set_sticker_mask_position.py b/env/Lib/site-packages/aiogram/methods/set_sticker_mask_position.py deleted file mode 100644 index 617e48b..0000000 --- a/env/Lib/site-packages/aiogram/methods/set_sticker_mask_position.py +++ /dev/null @@ -1,39 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Optional - -from ..types import MaskPosition -from .base import TelegramMethod - - -class SetStickerMaskPosition(TelegramMethod[bool]): - """ - Use this method to change the `mask position `_ of a mask sticker. The sticker must belong to a sticker set that was created by the bot. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#setstickermaskposition - """ - - __returning__ = bool - __api_method__ = "setStickerMaskPosition" - - sticker: str - """File identifier of the sticker""" - mask_position: Optional[MaskPosition] = None - """A JSON-serialized object with the position where the mask should be placed on faces. Omit the parameter to remove the mask position.""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - sticker: str, - mask_position: Optional[MaskPosition] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(sticker=sticker, mask_position=mask_position, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/methods/set_sticker_position_in_set.py b/env/Lib/site-packages/aiogram/methods/set_sticker_position_in_set.py deleted file mode 100644 index 8d30eab..0000000 --- a/env/Lib/site-packages/aiogram/methods/set_sticker_position_in_set.py +++ /dev/null @@ -1,34 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any - -from .base import TelegramMethod - - -class SetStickerPositionInSet(TelegramMethod[bool]): - """ - Use this method to move a sticker in a set created by the bot to a specific position. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#setstickerpositioninset - """ - - __returning__ = bool - __api_method__ = "setStickerPositionInSet" - - sticker: str - """File identifier of the sticker""" - position: int - """New sticker position in the set, zero-based""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, *, sticker: str, position: int, **__pydantic_kwargs: Any - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(sticker=sticker, position=position, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/methods/set_sticker_set_thumbnail.py b/env/Lib/site-packages/aiogram/methods/set_sticker_set_thumbnail.py deleted file mode 100644 index ef83f70..0000000 --- a/env/Lib/site-packages/aiogram/methods/set_sticker_set_thumbnail.py +++ /dev/null @@ -1,47 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Optional, Union - -from ..types import InputFile -from .base import TelegramMethod - - -class SetStickerSetThumbnail(TelegramMethod[bool]): - """ - Use this method to set the thumbnail of a regular or mask sticker set. The format of the thumbnail file must match the format of the stickers in the set. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#setstickersetthumbnail - """ - - __returning__ = bool - __api_method__ = "setStickerSetThumbnail" - - name: str - """Sticker set name""" - user_id: int - """User identifier of the sticker set owner""" - format: str - """Format of the thumbnail, must be one of 'static' for a **.WEBP** or **.PNG** image, 'animated' for a **.TGS** animation, or 'video' for a **WEBM** video""" - thumbnail: Optional[Union[InputFile, str]] = None - """A **.WEBP** or **.PNG** image with the thumbnail, must be up to 128 kilobytes in size and have a width and height of exactly 100px, or a **.TGS** animation with a thumbnail up to 32 kilobytes in size (see `https://core.telegram.org/stickers#animation-requirements `_`https://core.telegram.org/stickers#animation-requirements `_ for animated sticker technical requirements), or a **WEBM** video with the thumbnail up to 32 kilobytes in size; see `https://core.telegram.org/stickers#video-requirements `_`https://core.telegram.org/stickers#video-requirements `_ for video sticker technical requirements. Pass a *file_id* as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » `. Animated and video sticker set thumbnails can't be uploaded via HTTP URL. If omitted, then the thumbnail is dropped and the first sticker is used as the thumbnail.""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - name: str, - user_id: int, - format: str, - thumbnail: Optional[Union[InputFile, str]] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - name=name, user_id=user_id, format=format, thumbnail=thumbnail, **__pydantic_kwargs - ) diff --git a/env/Lib/site-packages/aiogram/methods/set_sticker_set_title.py b/env/Lib/site-packages/aiogram/methods/set_sticker_set_title.py deleted file mode 100644 index ec25473..0000000 --- a/env/Lib/site-packages/aiogram/methods/set_sticker_set_title.py +++ /dev/null @@ -1,34 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any - -from .base import TelegramMethod - - -class SetStickerSetTitle(TelegramMethod[bool]): - """ - Use this method to set the title of a created sticker set. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#setstickersettitle - """ - - __returning__ = bool - __api_method__ = "setStickerSetTitle" - - name: str - """Sticker set name""" - title: str - """Sticker set title, 1-64 characters""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, *, name: str, title: str, **__pydantic_kwargs: Any - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(name=name, title=title, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/methods/set_webhook.py b/env/Lib/site-packages/aiogram/methods/set_webhook.py deleted file mode 100644 index 998e51b..0000000 --- a/env/Lib/site-packages/aiogram/methods/set_webhook.py +++ /dev/null @@ -1,73 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, List, Optional - -from ..types import InputFile -from .base import TelegramMethod - - -class SetWebhook(TelegramMethod[bool]): - """ - Use this method to specify a URL and receive incoming updates via an outgoing webhook. Whenever there is an update for the bot, we will send an HTTPS POST request to the specified URL, containing a JSON-serialized :class:`aiogram.types.update.Update`. In case of an unsuccessful request, we will give up after a reasonable amount of attempts. Returns :code:`True` on success. - If you'd like to make sure that the webhook was set by you, you can specify secret data in the parameter *secret_token*. If specified, the request will contain a header 'X-Telegram-Bot-Api-Secret-Token' with the secret token as content. - - **Notes** - - **1.** You will not be able to receive updates using :class:`aiogram.methods.get_updates.GetUpdates` for as long as an outgoing webhook is set up. - - **2.** To use a self-signed certificate, you need to upload your `public key certificate `_ using *certificate* parameter. Please upload as InputFile, sending a String will not work. - - **3.** Ports currently supported *for webhooks*: **443, 80, 88, 8443**. - If you're having any trouble setting up webhooks, please check out this `amazing guide to webhooks `_. - - Source: https://core.telegram.org/bots/api#setwebhook - """ - - __returning__ = bool - __api_method__ = "setWebhook" - - url: str - """HTTPS URL to send updates to. Use an empty string to remove webhook integration""" - certificate: Optional[InputFile] = None - """Upload your public key certificate so that the root certificate in use can be checked. See our `self-signed guide `_ for details.""" - ip_address: Optional[str] = None - """The fixed IP address which will be used to send webhook requests instead of the IP address resolved through DNS""" - max_connections: Optional[int] = None - """The maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery, 1-100. Defaults to *40*. Use lower values to limit the load on your bot's server, and higher values to increase your bot's throughput.""" - allowed_updates: Optional[List[str]] = None - """A JSON-serialized list of the update types you want your bot to receive. For example, specify :code:`["message", "edited_channel_post", "callback_query"]` to only receive updates of these types. See :class:`aiogram.types.update.Update` for a complete list of available update types. Specify an empty list to receive all update types except *chat_member*, *message_reaction*, and *message_reaction_count* (default). If not specified, the previous setting will be used.""" - drop_pending_updates: Optional[bool] = None - """Pass :code:`True` to drop all pending updates""" - secret_token: Optional[str] = None - """A secret token to be sent in a header 'X-Telegram-Bot-Api-Secret-Token' in every webhook request, 1-256 characters. Only characters :code:`A-Z`, :code:`a-z`, :code:`0-9`, :code:`_` and :code:`-` are allowed. The header is useful to ensure that the request comes from a webhook set by you.""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - url: str, - certificate: Optional[InputFile] = None, - ip_address: Optional[str] = None, - max_connections: Optional[int] = None, - allowed_updates: Optional[List[str]] = None, - drop_pending_updates: Optional[bool] = None, - secret_token: Optional[str] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - url=url, - certificate=certificate, - ip_address=ip_address, - max_connections=max_connections, - allowed_updates=allowed_updates, - drop_pending_updates=drop_pending_updates, - secret_token=secret_token, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/methods/stop_message_live_location.py b/env/Lib/site-packages/aiogram/methods/stop_message_live_location.py deleted file mode 100644 index f5fe335..0000000 --- a/env/Lib/site-packages/aiogram/methods/stop_message_live_location.py +++ /dev/null @@ -1,55 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Optional, Union - -from ..types import InlineKeyboardMarkup, Message -from .base import TelegramMethod - - -class StopMessageLiveLocation(TelegramMethod[Union[Message, bool]]): - """ - Use this method to stop updating a live location message before *live_period* expires. On success, if the message is not an inline message, the edited :class:`aiogram.types.message.Message` is returned, otherwise :code:`True` is returned. - - Source: https://core.telegram.org/bots/api#stopmessagelivelocation - """ - - __returning__ = Union[Message, bool] - __api_method__ = "stopMessageLiveLocation" - - business_connection_id: Optional[str] = None - """Unique identifier of the business connection on behalf of which the message to be edited was sent""" - chat_id: Optional[Union[int, str]] = None - """Required if *inline_message_id* is not specified. Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" - message_id: Optional[int] = None - """Required if *inline_message_id* is not specified. Identifier of the message with live location to stop""" - inline_message_id: Optional[str] = None - """Required if *chat_id* and *message_id* are not specified. Identifier of the inline message""" - reply_markup: Optional[InlineKeyboardMarkup] = None - """A JSON-serialized object for a new `inline keyboard `_.""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - business_connection_id: Optional[str] = None, - chat_id: Optional[Union[int, str]] = None, - message_id: Optional[int] = None, - inline_message_id: Optional[str] = None, - reply_markup: Optional[InlineKeyboardMarkup] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - business_connection_id=business_connection_id, - chat_id=chat_id, - message_id=message_id, - inline_message_id=inline_message_id, - reply_markup=reply_markup, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/methods/stop_poll.py b/env/Lib/site-packages/aiogram/methods/stop_poll.py deleted file mode 100644 index 8393a52..0000000 --- a/env/Lib/site-packages/aiogram/methods/stop_poll.py +++ /dev/null @@ -1,51 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Optional, Union - -from ..types import InlineKeyboardMarkup, Poll -from .base import TelegramMethod - - -class StopPoll(TelegramMethod[Poll]): - """ - Use this method to stop a poll which was sent by the bot. On success, the stopped :class:`aiogram.types.poll.Poll` is returned. - - Source: https://core.telegram.org/bots/api#stoppoll - """ - - __returning__ = Poll - __api_method__ = "stopPoll" - - chat_id: Union[int, str] - """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" - message_id: int - """Identifier of the original message with the poll""" - business_connection_id: Optional[str] = None - """Unique identifier of the business connection on behalf of which the message to be edited was sent""" - reply_markup: Optional[InlineKeyboardMarkup] = None - """A JSON-serialized object for a new message `inline keyboard `_.""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - chat_id: Union[int, str], - message_id: int, - business_connection_id: Optional[str] = None, - reply_markup: Optional[InlineKeyboardMarkup] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - chat_id=chat_id, - message_id=message_id, - business_connection_id=business_connection_id, - reply_markup=reply_markup, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/methods/unban_chat_member.py b/env/Lib/site-packages/aiogram/methods/unban_chat_member.py deleted file mode 100644 index 1094db5..0000000 --- a/env/Lib/site-packages/aiogram/methods/unban_chat_member.py +++ /dev/null @@ -1,46 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Optional, Union - -from .base import TelegramMethod - - -class UnbanChatMember(TelegramMethod[bool]): - """ - Use this method to unban a previously banned user in a supergroup or channel. The user will **not** return to the group or channel automatically, but will be able to join via link, etc. The bot must be an administrator for this to work. By default, this method guarantees that after the call the user is not a member of the chat, but will be able to join it. So if the user is a member of the chat they will also be **removed** from the chat. If you don't want this, use the parameter *only_if_banned*. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#unbanchatmember - """ - - __returning__ = bool - __api_method__ = "unbanChatMember" - - chat_id: Union[int, str] - """Unique identifier for the target group or username of the target supergroup or channel (in the format :code:`@channelusername`)""" - user_id: int - """Unique identifier of the target user""" - only_if_banned: Optional[bool] = None - """Do nothing if the user is not banned""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - chat_id: Union[int, str], - user_id: int, - only_if_banned: Optional[bool] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - chat_id=chat_id, - user_id=user_id, - only_if_banned=only_if_banned, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/methods/unban_chat_sender_chat.py b/env/Lib/site-packages/aiogram/methods/unban_chat_sender_chat.py deleted file mode 100644 index b981698..0000000 --- a/env/Lib/site-packages/aiogram/methods/unban_chat_sender_chat.py +++ /dev/null @@ -1,38 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Union - -from .base import TelegramMethod - - -class UnbanChatSenderChat(TelegramMethod[bool]): - """ - Use this method to unban a previously banned channel chat in a supergroup or channel. The bot must be an administrator for this to work and must have the appropriate administrator rights. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#unbanchatsenderchat - """ - - __returning__ = bool - __api_method__ = "unbanChatSenderChat" - - chat_id: Union[int, str] - """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" - sender_chat_id: int - """Unique identifier of the target sender chat""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - chat_id: Union[int, str], - sender_chat_id: int, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(chat_id=chat_id, sender_chat_id=sender_chat_id, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/methods/unhide_general_forum_topic.py b/env/Lib/site-packages/aiogram/methods/unhide_general_forum_topic.py deleted file mode 100644 index a9149bc..0000000 --- a/env/Lib/site-packages/aiogram/methods/unhide_general_forum_topic.py +++ /dev/null @@ -1,32 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Union - -from .base import TelegramMethod - - -class UnhideGeneralForumTopic(TelegramMethod[bool]): - """ - Use this method to unhide the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the *can_manage_topics* administrator rights. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#unhidegeneralforumtopic - """ - - __returning__ = bool - __api_method__ = "unhideGeneralForumTopic" - - chat_id: Union[int, str] - """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, *, chat_id: Union[int, str], **__pydantic_kwargs: Any - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(chat_id=chat_id, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/methods/unpin_all_chat_messages.py b/env/Lib/site-packages/aiogram/methods/unpin_all_chat_messages.py deleted file mode 100644 index aca090f..0000000 --- a/env/Lib/site-packages/aiogram/methods/unpin_all_chat_messages.py +++ /dev/null @@ -1,32 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Union - -from .base import TelegramMethod - - -class UnpinAllChatMessages(TelegramMethod[bool]): - """ - Use this method to clear the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#unpinallchatmessages - """ - - __returning__ = bool - __api_method__ = "unpinAllChatMessages" - - chat_id: Union[int, str] - """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, *, chat_id: Union[int, str], **__pydantic_kwargs: Any - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(chat_id=chat_id, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/methods/unpin_all_forum_topic_messages.py b/env/Lib/site-packages/aiogram/methods/unpin_all_forum_topic_messages.py deleted file mode 100644 index f1350ec..0000000 --- a/env/Lib/site-packages/aiogram/methods/unpin_all_forum_topic_messages.py +++ /dev/null @@ -1,40 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Union - -from .base import TelegramMethod - - -class UnpinAllForumTopicMessages(TelegramMethod[bool]): - """ - Use this method to clear the list of pinned messages in a forum topic. The bot must be an administrator in the chat for this to work and must have the *can_pin_messages* administrator right in the supergroup. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#unpinallforumtopicmessages - """ - - __returning__ = bool - __api_method__ = "unpinAllForumTopicMessages" - - chat_id: Union[int, str] - """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)""" - message_thread_id: int - """Unique identifier for the target message thread of the forum topic""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - chat_id: Union[int, str], - message_thread_id: int, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - chat_id=chat_id, message_thread_id=message_thread_id, **__pydantic_kwargs - ) diff --git a/env/Lib/site-packages/aiogram/methods/unpin_all_general_forum_topic_messages.py b/env/Lib/site-packages/aiogram/methods/unpin_all_general_forum_topic_messages.py deleted file mode 100644 index be76c19..0000000 --- a/env/Lib/site-packages/aiogram/methods/unpin_all_general_forum_topic_messages.py +++ /dev/null @@ -1,30 +0,0 @@ -from typing import TYPE_CHECKING, Any, Union - -from aiogram.methods import TelegramMethod - - -class UnpinAllGeneralForumTopicMessages(TelegramMethod[bool]): - """ - Use this method to clear the list of pinned messages in a General forum topic. The bot must be an administrator in the chat for this to work and must have the *can_pin_messages* administrator right in the supergroup. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#unpinallgeneralforumtopicmessages - """ - - __returning__ = bool - __api_method__ = "unpinAllGeneralForumTopicMessages" - - chat_id: Union[int, str] - """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, *, chat_id: Union[int, str], **__pydantic_kwargs: Any - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(chat_id=chat_id, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/methods/unpin_chat_message.py b/env/Lib/site-packages/aiogram/methods/unpin_chat_message.py deleted file mode 100644 index 249aee6..0000000 --- a/env/Lib/site-packages/aiogram/methods/unpin_chat_message.py +++ /dev/null @@ -1,46 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Optional, Union - -from .base import TelegramMethod - - -class UnpinChatMessage(TelegramMethod[bool]): - """ - Use this method to remove a message from the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#unpinchatmessage - """ - - __returning__ = bool - __api_method__ = "unpinChatMessage" - - chat_id: Union[int, str] - """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" - business_connection_id: Optional[str] = None - """Unique identifier of the business connection on behalf of which the message will be unpinned""" - message_id: Optional[int] = None - """Identifier of the message to unpin. Required if *business_connection_id* is specified. If not specified, the most recent pinned message (by sending date) will be unpinned.""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - chat_id: Union[int, str], - business_connection_id: Optional[str] = None, - message_id: Optional[int] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - chat_id=chat_id, - business_connection_id=business_connection_id, - message_id=message_id, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/methods/upload_sticker_file.py b/env/Lib/site-packages/aiogram/methods/upload_sticker_file.py deleted file mode 100644 index 600f83a..0000000 --- a/env/Lib/site-packages/aiogram/methods/upload_sticker_file.py +++ /dev/null @@ -1,47 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any - -from ..types import File, InputFile -from .base import TelegramMethod - - -class UploadStickerFile(TelegramMethod[File]): - """ - Use this method to upload a file with a sticker for later use in the :class:`aiogram.methods.create_new_sticker_set.CreateNewStickerSet`, :class:`aiogram.methods.add_sticker_to_set.AddStickerToSet`, or :class:`aiogram.methods.replace_sticker_in_set.ReplaceStickerInSet` methods (the file can be used multiple times). Returns the uploaded :class:`aiogram.types.file.File` on success. - - Source: https://core.telegram.org/bots/api#uploadstickerfile - """ - - __returning__ = File - __api_method__ = "uploadStickerFile" - - user_id: int - """User identifier of sticker file owner""" - sticker: InputFile - """A file with the sticker in .WEBP, .PNG, .TGS, or .WEBM format. See `https://core.telegram.org/stickers `_`https://core.telegram.org/stickers `_ for technical requirements. :ref:`More information on Sending Files » `""" - sticker_format: str - """Format of the sticker, must be one of 'static', 'animated', 'video'""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - user_id: int, - sticker: InputFile, - sticker_format: str, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - user_id=user_id, - sticker=sticker, - sticker_format=sticker_format, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/py.typed b/env/Lib/site-packages/aiogram/py.typed deleted file mode 100644 index e69de29..0000000 diff --git a/env/Lib/site-packages/aiogram/types/__init__.py b/env/Lib/site-packages/aiogram/types/__init__.py deleted file mode 100644 index 97442b3..0000000 --- a/env/Lib/site-packages/aiogram/types/__init__.py +++ /dev/null @@ -1,490 +0,0 @@ -from typing import List, Literal, Optional, Union - -from .animation import Animation -from .audio import Audio -from .background_fill import BackgroundFill -from .background_fill_freeform_gradient import BackgroundFillFreeformGradient -from .background_fill_gradient import BackgroundFillGradient -from .background_fill_solid import BackgroundFillSolid -from .background_type import BackgroundType -from .background_type_chat_theme import BackgroundTypeChatTheme -from .background_type_fill import BackgroundTypeFill -from .background_type_pattern import BackgroundTypePattern -from .background_type_wallpaper import BackgroundTypeWallpaper -from .base import UNSET_PARSE_MODE, TelegramObject -from .birthdate import Birthdate -from .bot_command import BotCommand -from .bot_command_scope import BotCommandScope -from .bot_command_scope_all_chat_administrators import ( - BotCommandScopeAllChatAdministrators, -) -from .bot_command_scope_all_group_chats import BotCommandScopeAllGroupChats -from .bot_command_scope_all_private_chats import BotCommandScopeAllPrivateChats -from .bot_command_scope_chat import BotCommandScopeChat -from .bot_command_scope_chat_administrators import BotCommandScopeChatAdministrators -from .bot_command_scope_chat_member import BotCommandScopeChatMember -from .bot_command_scope_default import BotCommandScopeDefault -from .bot_description import BotDescription -from .bot_name import BotName -from .bot_short_description import BotShortDescription -from .business_connection import BusinessConnection -from .business_intro import BusinessIntro -from .business_location import BusinessLocation -from .business_messages_deleted import BusinessMessagesDeleted -from .business_opening_hours import BusinessOpeningHours -from .business_opening_hours_interval import BusinessOpeningHoursInterval -from .callback_game import CallbackGame -from .callback_query import CallbackQuery -from .chat import Chat -from .chat_administrator_rights import ChatAdministratorRights -from .chat_background import ChatBackground -from .chat_boost import ChatBoost -from .chat_boost_added import ChatBoostAdded -from .chat_boost_removed import ChatBoostRemoved -from .chat_boost_source import ChatBoostSource -from .chat_boost_source_gift_code import ChatBoostSourceGiftCode -from .chat_boost_source_giveaway import ChatBoostSourceGiveaway -from .chat_boost_source_premium import ChatBoostSourcePremium -from .chat_boost_updated import ChatBoostUpdated -from .chat_full_info import ChatFullInfo -from .chat_invite_link import ChatInviteLink -from .chat_join_request import ChatJoinRequest -from .chat_location import ChatLocation -from .chat_member import ChatMember -from .chat_member_administrator import ChatMemberAdministrator -from .chat_member_banned import ChatMemberBanned -from .chat_member_left import ChatMemberLeft -from .chat_member_member import ChatMemberMember -from .chat_member_owner import ChatMemberOwner -from .chat_member_restricted import ChatMemberRestricted -from .chat_member_updated import ChatMemberUpdated -from .chat_permissions import ChatPermissions -from .chat_photo import ChatPhoto -from .chat_shared import ChatShared -from .chosen_inline_result import ChosenInlineResult -from .contact import Contact -from .custom import DateTime -from .dice import Dice -from .document import Document -from .downloadable import Downloadable -from .encrypted_credentials import EncryptedCredentials -from .encrypted_passport_element import EncryptedPassportElement -from .error_event import ErrorEvent -from .external_reply_info import ExternalReplyInfo -from .file import File -from .force_reply import ForceReply -from .forum_topic import ForumTopic -from .forum_topic_closed import ForumTopicClosed -from .forum_topic_created import ForumTopicCreated -from .forum_topic_edited import ForumTopicEdited -from .forum_topic_reopened import ForumTopicReopened -from .game import Game -from .game_high_score import GameHighScore -from .general_forum_topic_hidden import GeneralForumTopicHidden -from .general_forum_topic_unhidden import GeneralForumTopicUnhidden -from .giveaway import Giveaway -from .giveaway_completed import GiveawayCompleted -from .giveaway_created import GiveawayCreated -from .giveaway_winners import GiveawayWinners -from .inaccessible_message import InaccessibleMessage -from .inline_keyboard_button import InlineKeyboardButton -from .inline_keyboard_markup import InlineKeyboardMarkup -from .inline_query import InlineQuery -from .inline_query_result import InlineQueryResult -from .inline_query_result_article import InlineQueryResultArticle -from .inline_query_result_audio import InlineQueryResultAudio -from .inline_query_result_cached_audio import InlineQueryResultCachedAudio -from .inline_query_result_cached_document import InlineQueryResultCachedDocument -from .inline_query_result_cached_gif import InlineQueryResultCachedGif -from .inline_query_result_cached_mpeg4_gif import InlineQueryResultCachedMpeg4Gif -from .inline_query_result_cached_photo import InlineQueryResultCachedPhoto -from .inline_query_result_cached_sticker import InlineQueryResultCachedSticker -from .inline_query_result_cached_video import InlineQueryResultCachedVideo -from .inline_query_result_cached_voice import InlineQueryResultCachedVoice -from .inline_query_result_contact import InlineQueryResultContact -from .inline_query_result_document import InlineQueryResultDocument -from .inline_query_result_game import InlineQueryResultGame -from .inline_query_result_gif import InlineQueryResultGif -from .inline_query_result_location import InlineQueryResultLocation -from .inline_query_result_mpeg4_gif import InlineQueryResultMpeg4Gif -from .inline_query_result_photo import InlineQueryResultPhoto -from .inline_query_result_venue import InlineQueryResultVenue -from .inline_query_result_video import InlineQueryResultVideo -from .inline_query_result_voice import InlineQueryResultVoice -from .inline_query_results_button import InlineQueryResultsButton -from .input_contact_message_content import InputContactMessageContent -from .input_file import BufferedInputFile, FSInputFile, InputFile, URLInputFile -from .input_invoice_message_content import InputInvoiceMessageContent -from .input_location_message_content import InputLocationMessageContent -from .input_media import InputMedia -from .input_media_animation import InputMediaAnimation -from .input_media_audio import InputMediaAudio -from .input_media_document import InputMediaDocument -from .input_media_photo import InputMediaPhoto -from .input_media_video import InputMediaVideo -from .input_message_content import InputMessageContent -from .input_paid_media import InputPaidMedia -from .input_paid_media_photo import InputPaidMediaPhoto -from .input_paid_media_video import InputPaidMediaVideo -from .input_poll_option import InputPollOption -from .input_sticker import InputSticker -from .input_text_message_content import InputTextMessageContent -from .input_venue_message_content import InputVenueMessageContent -from .invoice import Invoice -from .keyboard_button import KeyboardButton -from .keyboard_button_poll_type import KeyboardButtonPollType -from .keyboard_button_request_chat import KeyboardButtonRequestChat -from .keyboard_button_request_user import KeyboardButtonRequestUser -from .keyboard_button_request_users import KeyboardButtonRequestUsers -from .labeled_price import LabeledPrice -from .link_preview_options import LinkPreviewOptions -from .location import Location -from .login_url import LoginUrl -from .mask_position import MaskPosition -from .maybe_inaccessible_message import MaybeInaccessibleMessage -from .menu_button import MenuButton -from .menu_button_commands import MenuButtonCommands -from .menu_button_default import MenuButtonDefault -from .menu_button_web_app import MenuButtonWebApp -from .message import ContentType, Message -from .message_auto_delete_timer_changed import MessageAutoDeleteTimerChanged -from .message_entity import MessageEntity -from .message_id import MessageId -from .message_origin import MessageOrigin -from .message_origin_channel import MessageOriginChannel -from .message_origin_chat import MessageOriginChat -from .message_origin_hidden_user import MessageOriginHiddenUser -from .message_origin_user import MessageOriginUser -from .message_reaction_count_updated import MessageReactionCountUpdated -from .message_reaction_updated import MessageReactionUpdated -from .order_info import OrderInfo -from .paid_media import PaidMedia -from .paid_media_info import PaidMediaInfo -from .paid_media_photo import PaidMediaPhoto -from .paid_media_preview import PaidMediaPreview -from .paid_media_video import PaidMediaVideo -from .passport_data import PassportData -from .passport_element_error import PassportElementError -from .passport_element_error_data_field import PassportElementErrorDataField -from .passport_element_error_file import PassportElementErrorFile -from .passport_element_error_files import PassportElementErrorFiles -from .passport_element_error_front_side import PassportElementErrorFrontSide -from .passport_element_error_reverse_side import PassportElementErrorReverseSide -from .passport_element_error_selfie import PassportElementErrorSelfie -from .passport_element_error_translation_file import PassportElementErrorTranslationFile -from .passport_element_error_translation_files import ( - PassportElementErrorTranslationFiles, -) -from .passport_element_error_unspecified import PassportElementErrorUnspecified -from .passport_file import PassportFile -from .photo_size import PhotoSize -from .poll import Poll -from .poll_answer import PollAnswer -from .poll_option import PollOption -from .pre_checkout_query import PreCheckoutQuery -from .proximity_alert_triggered import ProximityAlertTriggered -from .reaction_count import ReactionCount -from .reaction_type import ReactionType -from .reaction_type_custom_emoji import ReactionTypeCustomEmoji -from .reaction_type_emoji import ReactionTypeEmoji -from .reaction_type_paid import ReactionTypePaid -from .refunded_payment import RefundedPayment -from .reply_keyboard_markup import ReplyKeyboardMarkup -from .reply_keyboard_remove import ReplyKeyboardRemove -from .reply_parameters import ReplyParameters -from .response_parameters import ResponseParameters -from .revenue_withdrawal_state import RevenueWithdrawalState -from .revenue_withdrawal_state_failed import RevenueWithdrawalStateFailed -from .revenue_withdrawal_state_pending import RevenueWithdrawalStatePending -from .revenue_withdrawal_state_succeeded import RevenueWithdrawalStateSucceeded -from .sent_web_app_message import SentWebAppMessage -from .shared_user import SharedUser -from .shipping_address import ShippingAddress -from .shipping_option import ShippingOption -from .shipping_query import ShippingQuery -from .star_transaction import StarTransaction -from .star_transactions import StarTransactions -from .sticker import Sticker -from .sticker_set import StickerSet -from .story import Story -from .successful_payment import SuccessfulPayment -from .switch_inline_query_chosen_chat import SwitchInlineQueryChosenChat -from .text_quote import TextQuote -from .transaction_partner import TransactionPartner -from .transaction_partner_fragment import TransactionPartnerFragment -from .transaction_partner_other import TransactionPartnerOther -from .transaction_partner_telegram_ads import TransactionPartnerTelegramAds -from .transaction_partner_user import TransactionPartnerUser -from .update import Update -from .user import User -from .user_chat_boosts import UserChatBoosts -from .user_profile_photos import UserProfilePhotos -from .user_shared import UserShared -from .users_shared import UsersShared -from .venue import Venue -from .video import Video -from .video_chat_ended import VideoChatEnded -from .video_chat_participants_invited import VideoChatParticipantsInvited -from .video_chat_scheduled import VideoChatScheduled -from .video_chat_started import VideoChatStarted -from .video_note import VideoNote -from .voice import Voice -from .web_app_data import WebAppData -from .web_app_info import WebAppInfo -from .webhook_info import WebhookInfo -from .write_access_allowed import WriteAccessAllowed - -__all__ = ( - "Animation", - "Audio", - "BackgroundFill", - "BackgroundFillFreeformGradient", - "BackgroundFillGradient", - "BackgroundFillSolid", - "BackgroundType", - "BackgroundTypeChatTheme", - "BackgroundTypeFill", - "BackgroundTypePattern", - "BackgroundTypeWallpaper", - "Birthdate", - "BotCommand", - "BotCommandScope", - "BotCommandScopeAllChatAdministrators", - "BotCommandScopeAllGroupChats", - "BotCommandScopeAllPrivateChats", - "BotCommandScopeChat", - "BotCommandScopeChatAdministrators", - "BotCommandScopeChatMember", - "BotCommandScopeDefault", - "BotDescription", - "BotName", - "BotShortDescription", - "BufferedInputFile", - "BusinessConnection", - "BusinessIntro", - "BusinessLocation", - "BusinessMessagesDeleted", - "BusinessOpeningHours", - "BusinessOpeningHoursInterval", - "CallbackGame", - "CallbackQuery", - "Chat", - "ChatAdministratorRights", - "ChatBackground", - "ChatBoost", - "ChatBoostAdded", - "ChatBoostRemoved", - "ChatBoostSource", - "ChatBoostSourceGiftCode", - "ChatBoostSourceGiveaway", - "ChatBoostSourcePremium", - "ChatBoostUpdated", - "ChatFullInfo", - "ChatInviteLink", - "ChatJoinRequest", - "ChatLocation", - "ChatMember", - "ChatMemberAdministrator", - "ChatMemberBanned", - "ChatMemberLeft", - "ChatMemberMember", - "ChatMemberOwner", - "ChatMemberRestricted", - "ChatMemberUpdated", - "ChatPermissions", - "ChatPhoto", - "ChatShared", - "ChosenInlineResult", - "Contact", - "ContentType", - "DateTime", - "Dice", - "Document", - "Downloadable", - "EncryptedCredentials", - "EncryptedPassportElement", - "ErrorEvent", - "ExternalReplyInfo", - "FSInputFile", - "File", - "ForceReply", - "ForumTopic", - "ForumTopicClosed", - "ForumTopicCreated", - "ForumTopicEdited", - "ForumTopicReopened", - "Game", - "GameHighScore", - "GeneralForumTopicHidden", - "GeneralForumTopicUnhidden", - "Giveaway", - "GiveawayCompleted", - "GiveawayCreated", - "GiveawayWinners", - "InaccessibleMessage", - "InlineKeyboardButton", - "InlineKeyboardMarkup", - "InlineQuery", - "InlineQueryResult", - "InlineQueryResultArticle", - "InlineQueryResultAudio", - "InlineQueryResultCachedAudio", - "InlineQueryResultCachedDocument", - "InlineQueryResultCachedGif", - "InlineQueryResultCachedMpeg4Gif", - "InlineQueryResultCachedPhoto", - "InlineQueryResultCachedSticker", - "InlineQueryResultCachedVideo", - "InlineQueryResultCachedVoice", - "InlineQueryResultContact", - "InlineQueryResultDocument", - "InlineQueryResultGame", - "InlineQueryResultGif", - "InlineQueryResultLocation", - "InlineQueryResultMpeg4Gif", - "InlineQueryResultPhoto", - "InlineQueryResultVenue", - "InlineQueryResultVideo", - "InlineQueryResultVoice", - "InlineQueryResultsButton", - "InputContactMessageContent", - "InputFile", - "InputInvoiceMessageContent", - "InputLocationMessageContent", - "InputMedia", - "InputMediaAnimation", - "InputMediaAudio", - "InputMediaDocument", - "InputMediaPhoto", - "InputMediaVideo", - "InputMessageContent", - "InputPaidMedia", - "InputPaidMediaPhoto", - "InputPaidMediaVideo", - "InputPollOption", - "InputSticker", - "InputTextMessageContent", - "InputVenueMessageContent", - "Invoice", - "KeyboardButton", - "KeyboardButtonPollType", - "KeyboardButtonRequestChat", - "KeyboardButtonRequestUser", - "KeyboardButtonRequestUsers", - "LabeledPrice", - "LinkPreviewOptions", - "Location", - "LoginUrl", - "MaskPosition", - "MaybeInaccessibleMessage", - "MenuButton", - "MenuButtonCommands", - "MenuButtonDefault", - "MenuButtonWebApp", - "Message", - "MessageAutoDeleteTimerChanged", - "MessageEntity", - "MessageId", - "MessageOrigin", - "MessageOriginChannel", - "MessageOriginChat", - "MessageOriginHiddenUser", - "MessageOriginUser", - "MessageReactionCountUpdated", - "MessageReactionUpdated", - "OrderInfo", - "PaidMedia", - "PaidMediaInfo", - "PaidMediaPhoto", - "PaidMediaPreview", - "PaidMediaVideo", - "PassportData", - "PassportElementError", - "PassportElementErrorDataField", - "PassportElementErrorFile", - "PassportElementErrorFiles", - "PassportElementErrorFrontSide", - "PassportElementErrorReverseSide", - "PassportElementErrorSelfie", - "PassportElementErrorTranslationFile", - "PassportElementErrorTranslationFiles", - "PassportElementErrorUnspecified", - "PassportFile", - "PhotoSize", - "Poll", - "PollAnswer", - "PollOption", - "PreCheckoutQuery", - "ProximityAlertTriggered", - "ReactionCount", - "ReactionType", - "ReactionTypeCustomEmoji", - "ReactionTypeEmoji", - "ReactionTypePaid", - "RefundedPayment", - "ReplyKeyboardMarkup", - "ReplyKeyboardRemove", - "ReplyParameters", - "ResponseParameters", - "RevenueWithdrawalState", - "RevenueWithdrawalStateFailed", - "RevenueWithdrawalStatePending", - "RevenueWithdrawalStateSucceeded", - "SentWebAppMessage", - "SharedUser", - "ShippingAddress", - "ShippingOption", - "ShippingQuery", - "StarTransaction", - "StarTransactions", - "Sticker", - "StickerSet", - "Story", - "SuccessfulPayment", - "SwitchInlineQueryChosenChat", - "TelegramObject", - "TextQuote", - "TransactionPartner", - "TransactionPartnerFragment", - "TransactionPartnerOther", - "TransactionPartnerTelegramAds", - "TransactionPartnerUser", - "UNSET_PARSE_MODE", - "URLInputFile", - "Update", - "User", - "UserChatBoosts", - "UserProfilePhotos", - "UserShared", - "UsersShared", - "Venue", - "Video", - "VideoChatEnded", - "VideoChatParticipantsInvited", - "VideoChatScheduled", - "VideoChatStarted", - "VideoNote", - "Voice", - "WebAppData", - "WebAppInfo", - "WebhookInfo", - "WriteAccessAllowed", -) - -# Load typing forward refs for every TelegramObject -for _entity_name in __all__: - _entity = globals()[_entity_name] - if not hasattr(_entity, "model_rebuild"): - continue - _entity.model_rebuild( - _types_namespace={ - "List": List, - "Optional": Optional, - "Union": Union, - "Literal": Literal, - **{k: v for k, v in globals().items() if k in __all__}, - } - ) - -del _entity -del _entity_name diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/__init__.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/__init__.cpython-311.pyc deleted file mode 100644 index a2b9a11..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/__init__.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/animation.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/animation.cpython-311.pyc deleted file mode 100644 index a9479f9..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/animation.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/audio.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/audio.cpython-311.pyc deleted file mode 100644 index 3106a0a..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/audio.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/background_fill.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/background_fill.cpython-311.pyc deleted file mode 100644 index fd5e1ea..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/background_fill.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/background_fill_freeform_gradient.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/background_fill_freeform_gradient.cpython-311.pyc deleted file mode 100644 index f375c71..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/background_fill_freeform_gradient.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/background_fill_gradient.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/background_fill_gradient.cpython-311.pyc deleted file mode 100644 index 2444fa8..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/background_fill_gradient.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/background_fill_solid.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/background_fill_solid.cpython-311.pyc deleted file mode 100644 index 592570c..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/background_fill_solid.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/background_type.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/background_type.cpython-311.pyc deleted file mode 100644 index 153c961..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/background_type.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/background_type_chat_theme.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/background_type_chat_theme.cpython-311.pyc deleted file mode 100644 index bef87da..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/background_type_chat_theme.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/background_type_fill.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/background_type_fill.cpython-311.pyc deleted file mode 100644 index 2b6a97d..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/background_type_fill.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/background_type_pattern.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/background_type_pattern.cpython-311.pyc deleted file mode 100644 index d05c75e..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/background_type_pattern.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/background_type_wallpaper.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/background_type_wallpaper.cpython-311.pyc deleted file mode 100644 index 6668677..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/background_type_wallpaper.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/base.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/base.cpython-311.pyc deleted file mode 100644 index 8199e4d..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/base.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/birthdate.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/birthdate.cpython-311.pyc deleted file mode 100644 index ca1bfd4..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/birthdate.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/bot_command.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/bot_command.cpython-311.pyc deleted file mode 100644 index 34ee071..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/bot_command.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/bot_command_scope.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/bot_command_scope.cpython-311.pyc deleted file mode 100644 index 4b23afe..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/bot_command_scope.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/bot_command_scope_all_chat_administrators.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/bot_command_scope_all_chat_administrators.cpython-311.pyc deleted file mode 100644 index 467af53..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/bot_command_scope_all_chat_administrators.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/bot_command_scope_all_group_chats.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/bot_command_scope_all_group_chats.cpython-311.pyc deleted file mode 100644 index 50c7af2..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/bot_command_scope_all_group_chats.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/bot_command_scope_all_private_chats.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/bot_command_scope_all_private_chats.cpython-311.pyc deleted file mode 100644 index bcf8045..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/bot_command_scope_all_private_chats.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/bot_command_scope_chat.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/bot_command_scope_chat.cpython-311.pyc deleted file mode 100644 index bff4841..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/bot_command_scope_chat.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/bot_command_scope_chat_administrators.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/bot_command_scope_chat_administrators.cpython-311.pyc deleted file mode 100644 index 71e028e..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/bot_command_scope_chat_administrators.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/bot_command_scope_chat_member.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/bot_command_scope_chat_member.cpython-311.pyc deleted file mode 100644 index d06725d..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/bot_command_scope_chat_member.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/bot_command_scope_default.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/bot_command_scope_default.cpython-311.pyc deleted file mode 100644 index d639657..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/bot_command_scope_default.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/bot_description.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/bot_description.cpython-311.pyc deleted file mode 100644 index 60abf2b..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/bot_description.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/bot_name.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/bot_name.cpython-311.pyc deleted file mode 100644 index 3cf5955..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/bot_name.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/bot_short_description.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/bot_short_description.cpython-311.pyc deleted file mode 100644 index fb69b3e..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/bot_short_description.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/business_connection.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/business_connection.cpython-311.pyc deleted file mode 100644 index 92cb3cb..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/business_connection.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/business_intro.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/business_intro.cpython-311.pyc deleted file mode 100644 index d5dc4b3..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/business_intro.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/business_location.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/business_location.cpython-311.pyc deleted file mode 100644 index 08bfbc2..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/business_location.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/business_messages_deleted.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/business_messages_deleted.cpython-311.pyc deleted file mode 100644 index ea98910..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/business_messages_deleted.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/business_opening_hours.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/business_opening_hours.cpython-311.pyc deleted file mode 100644 index f704a12..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/business_opening_hours.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/business_opening_hours_interval.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/business_opening_hours_interval.cpython-311.pyc deleted file mode 100644 index 077ac41..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/business_opening_hours_interval.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/callback_game.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/callback_game.cpython-311.pyc deleted file mode 100644 index 749f55a..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/callback_game.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/callback_query.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/callback_query.cpython-311.pyc deleted file mode 100644 index 995ffe7..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/callback_query.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/chat.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/chat.cpython-311.pyc deleted file mode 100644 index 922a23d..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/chat.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/chat_administrator_rights.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/chat_administrator_rights.cpython-311.pyc deleted file mode 100644 index 531bd52..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/chat_administrator_rights.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/chat_background.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/chat_background.cpython-311.pyc deleted file mode 100644 index cacaec7..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/chat_background.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/chat_boost.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/chat_boost.cpython-311.pyc deleted file mode 100644 index c08148b..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/chat_boost.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/chat_boost_added.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/chat_boost_added.cpython-311.pyc deleted file mode 100644 index b239fdd..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/chat_boost_added.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/chat_boost_removed.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/chat_boost_removed.cpython-311.pyc deleted file mode 100644 index 920fa18..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/chat_boost_removed.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/chat_boost_source.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/chat_boost_source.cpython-311.pyc deleted file mode 100644 index d76db39..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/chat_boost_source.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/chat_boost_source_gift_code.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/chat_boost_source_gift_code.cpython-311.pyc deleted file mode 100644 index 068af11..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/chat_boost_source_gift_code.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/chat_boost_source_giveaway.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/chat_boost_source_giveaway.cpython-311.pyc deleted file mode 100644 index 6837edb..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/chat_boost_source_giveaway.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/chat_boost_source_premium.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/chat_boost_source_premium.cpython-311.pyc deleted file mode 100644 index 0159d5b..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/chat_boost_source_premium.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/chat_boost_updated.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/chat_boost_updated.cpython-311.pyc deleted file mode 100644 index 6d4a39c..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/chat_boost_updated.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/chat_full_info.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/chat_full_info.cpython-311.pyc deleted file mode 100644 index b638ac9..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/chat_full_info.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/chat_invite_link.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/chat_invite_link.cpython-311.pyc deleted file mode 100644 index cc462fd..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/chat_invite_link.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/chat_join_request.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/chat_join_request.cpython-311.pyc deleted file mode 100644 index a57e370..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/chat_join_request.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/chat_location.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/chat_location.cpython-311.pyc deleted file mode 100644 index 26a218b..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/chat_location.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/chat_member.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/chat_member.cpython-311.pyc deleted file mode 100644 index 1b89a5e..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/chat_member.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/chat_member_administrator.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/chat_member_administrator.cpython-311.pyc deleted file mode 100644 index 315bde1..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/chat_member_administrator.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/chat_member_banned.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/chat_member_banned.cpython-311.pyc deleted file mode 100644 index 7ed43f5..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/chat_member_banned.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/chat_member_left.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/chat_member_left.cpython-311.pyc deleted file mode 100644 index 161154d..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/chat_member_left.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/chat_member_member.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/chat_member_member.cpython-311.pyc deleted file mode 100644 index 37843c6..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/chat_member_member.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/chat_member_owner.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/chat_member_owner.cpython-311.pyc deleted file mode 100644 index 4158b97..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/chat_member_owner.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/chat_member_restricted.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/chat_member_restricted.cpython-311.pyc deleted file mode 100644 index 0bb342c..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/chat_member_restricted.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/chat_member_updated.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/chat_member_updated.cpython-311.pyc deleted file mode 100644 index a199fd1..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/chat_member_updated.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/chat_permissions.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/chat_permissions.cpython-311.pyc deleted file mode 100644 index 659fdfe..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/chat_permissions.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/chat_photo.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/chat_photo.cpython-311.pyc deleted file mode 100644 index 3797f52..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/chat_photo.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/chat_shared.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/chat_shared.cpython-311.pyc deleted file mode 100644 index 60dc75a..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/chat_shared.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/chosen_inline_result.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/chosen_inline_result.cpython-311.pyc deleted file mode 100644 index 0a0ecb0..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/chosen_inline_result.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/contact.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/contact.cpython-311.pyc deleted file mode 100644 index b6556b7..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/contact.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/custom.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/custom.cpython-311.pyc deleted file mode 100644 index 822891b..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/custom.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/dice.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/dice.cpython-311.pyc deleted file mode 100644 index 11f00a6..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/dice.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/document.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/document.cpython-311.pyc deleted file mode 100644 index 81389ab..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/document.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/downloadable.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/downloadable.cpython-311.pyc deleted file mode 100644 index 77828d5..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/downloadable.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/encrypted_credentials.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/encrypted_credentials.cpython-311.pyc deleted file mode 100644 index 782e04d..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/encrypted_credentials.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/encrypted_passport_element.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/encrypted_passport_element.cpython-311.pyc deleted file mode 100644 index b691eff..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/encrypted_passport_element.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/error_event.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/error_event.cpython-311.pyc deleted file mode 100644 index 2e96c85..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/error_event.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/external_reply_info.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/external_reply_info.cpython-311.pyc deleted file mode 100644 index cb15587..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/external_reply_info.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/file.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/file.cpython-311.pyc deleted file mode 100644 index ef730d8..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/file.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/force_reply.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/force_reply.cpython-311.pyc deleted file mode 100644 index ccf8ed6..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/force_reply.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/forum_topic.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/forum_topic.cpython-311.pyc deleted file mode 100644 index 9015b62..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/forum_topic.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/forum_topic_closed.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/forum_topic_closed.cpython-311.pyc deleted file mode 100644 index cb759b3..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/forum_topic_closed.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/forum_topic_created.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/forum_topic_created.cpython-311.pyc deleted file mode 100644 index e0637d3..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/forum_topic_created.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/forum_topic_edited.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/forum_topic_edited.cpython-311.pyc deleted file mode 100644 index 941eb8b..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/forum_topic_edited.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/forum_topic_reopened.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/forum_topic_reopened.cpython-311.pyc deleted file mode 100644 index d84d429..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/forum_topic_reopened.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/game.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/game.cpython-311.pyc deleted file mode 100644 index 3a2f37e..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/game.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/game_high_score.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/game_high_score.cpython-311.pyc deleted file mode 100644 index 34a6bf5..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/game_high_score.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/general_forum_topic_hidden.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/general_forum_topic_hidden.cpython-311.pyc deleted file mode 100644 index f40accd..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/general_forum_topic_hidden.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/general_forum_topic_unhidden.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/general_forum_topic_unhidden.cpython-311.pyc deleted file mode 100644 index 41260f0..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/general_forum_topic_unhidden.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/giveaway.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/giveaway.cpython-311.pyc deleted file mode 100644 index aa83d41..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/giveaway.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/giveaway_completed.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/giveaway_completed.cpython-311.pyc deleted file mode 100644 index 1a6e5d6..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/giveaway_completed.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/giveaway_created.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/giveaway_created.cpython-311.pyc deleted file mode 100644 index 8a06ef6..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/giveaway_created.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/giveaway_winners.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/giveaway_winners.cpython-311.pyc deleted file mode 100644 index c932048..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/giveaway_winners.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/inaccessible_message.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/inaccessible_message.cpython-311.pyc deleted file mode 100644 index 1d4661b..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/inaccessible_message.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/inline_keyboard_button.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/inline_keyboard_button.cpython-311.pyc deleted file mode 100644 index 376d8c6..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/inline_keyboard_button.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/inline_keyboard_markup.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/inline_keyboard_markup.cpython-311.pyc deleted file mode 100644 index c9505f9..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/inline_keyboard_markup.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/inline_query.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/inline_query.cpython-311.pyc deleted file mode 100644 index 54c86c0..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/inline_query.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/inline_query_result.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/inline_query_result.cpython-311.pyc deleted file mode 100644 index a127073..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/inline_query_result.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/inline_query_result_article.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/inline_query_result_article.cpython-311.pyc deleted file mode 100644 index 6bc4c67..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/inline_query_result_article.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/inline_query_result_audio.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/inline_query_result_audio.cpython-311.pyc deleted file mode 100644 index 299a86d..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/inline_query_result_audio.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/inline_query_result_cached_audio.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/inline_query_result_cached_audio.cpython-311.pyc deleted file mode 100644 index ad60d9c..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/inline_query_result_cached_audio.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/inline_query_result_cached_document.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/inline_query_result_cached_document.cpython-311.pyc deleted file mode 100644 index 2afa48d..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/inline_query_result_cached_document.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/inline_query_result_cached_gif.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/inline_query_result_cached_gif.cpython-311.pyc deleted file mode 100644 index dc38aff..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/inline_query_result_cached_gif.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/inline_query_result_cached_mpeg4_gif.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/inline_query_result_cached_mpeg4_gif.cpython-311.pyc deleted file mode 100644 index a593a8d..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/inline_query_result_cached_mpeg4_gif.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/inline_query_result_cached_photo.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/inline_query_result_cached_photo.cpython-311.pyc deleted file mode 100644 index ebee0bc..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/inline_query_result_cached_photo.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/inline_query_result_cached_sticker.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/inline_query_result_cached_sticker.cpython-311.pyc deleted file mode 100644 index d8982df..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/inline_query_result_cached_sticker.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/inline_query_result_cached_video.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/inline_query_result_cached_video.cpython-311.pyc deleted file mode 100644 index 7f648c7..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/inline_query_result_cached_video.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/inline_query_result_cached_voice.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/inline_query_result_cached_voice.cpython-311.pyc deleted file mode 100644 index 96e7a46..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/inline_query_result_cached_voice.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/inline_query_result_contact.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/inline_query_result_contact.cpython-311.pyc deleted file mode 100644 index ef8ecf4..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/inline_query_result_contact.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/inline_query_result_document.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/inline_query_result_document.cpython-311.pyc deleted file mode 100644 index 407571c..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/inline_query_result_document.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/inline_query_result_game.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/inline_query_result_game.cpython-311.pyc deleted file mode 100644 index e731d0d..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/inline_query_result_game.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/inline_query_result_gif.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/inline_query_result_gif.cpython-311.pyc deleted file mode 100644 index cdce8d0..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/inline_query_result_gif.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/inline_query_result_location.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/inline_query_result_location.cpython-311.pyc deleted file mode 100644 index f476f70..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/inline_query_result_location.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/inline_query_result_mpeg4_gif.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/inline_query_result_mpeg4_gif.cpython-311.pyc deleted file mode 100644 index 8549d03..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/inline_query_result_mpeg4_gif.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/inline_query_result_photo.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/inline_query_result_photo.cpython-311.pyc deleted file mode 100644 index d7cd99f..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/inline_query_result_photo.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/inline_query_result_venue.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/inline_query_result_venue.cpython-311.pyc deleted file mode 100644 index cb3e817..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/inline_query_result_venue.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/inline_query_result_video.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/inline_query_result_video.cpython-311.pyc deleted file mode 100644 index b191cc0..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/inline_query_result_video.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/inline_query_result_voice.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/inline_query_result_voice.cpython-311.pyc deleted file mode 100644 index bd719a8..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/inline_query_result_voice.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/inline_query_results_button.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/inline_query_results_button.cpython-311.pyc deleted file mode 100644 index 06c3c87..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/inline_query_results_button.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/input_contact_message_content.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/input_contact_message_content.cpython-311.pyc deleted file mode 100644 index db146dc..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/input_contact_message_content.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/input_file.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/input_file.cpython-311.pyc deleted file mode 100644 index bf05a26..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/input_file.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/input_invoice_message_content.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/input_invoice_message_content.cpython-311.pyc deleted file mode 100644 index c83de73..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/input_invoice_message_content.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/input_location_message_content.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/input_location_message_content.cpython-311.pyc deleted file mode 100644 index 64acb26..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/input_location_message_content.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/input_media.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/input_media.cpython-311.pyc deleted file mode 100644 index c39aaef..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/input_media.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/input_media_animation.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/input_media_animation.cpython-311.pyc deleted file mode 100644 index e014488..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/input_media_animation.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/input_media_audio.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/input_media_audio.cpython-311.pyc deleted file mode 100644 index 1f65173..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/input_media_audio.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/input_media_document.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/input_media_document.cpython-311.pyc deleted file mode 100644 index 8d4c173..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/input_media_document.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/input_media_photo.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/input_media_photo.cpython-311.pyc deleted file mode 100644 index 0c450b6..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/input_media_photo.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/input_media_video.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/input_media_video.cpython-311.pyc deleted file mode 100644 index d04f230..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/input_media_video.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/input_message_content.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/input_message_content.cpython-311.pyc deleted file mode 100644 index 81abad1..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/input_message_content.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/input_paid_media.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/input_paid_media.cpython-311.pyc deleted file mode 100644 index 79c686d..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/input_paid_media.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/input_paid_media_photo.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/input_paid_media_photo.cpython-311.pyc deleted file mode 100644 index c43e539..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/input_paid_media_photo.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/input_paid_media_video.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/input_paid_media_video.cpython-311.pyc deleted file mode 100644 index 51337fc..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/input_paid_media_video.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/input_poll_option.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/input_poll_option.cpython-311.pyc deleted file mode 100644 index 86c74ac..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/input_poll_option.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/input_sticker.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/input_sticker.cpython-311.pyc deleted file mode 100644 index 39a479d..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/input_sticker.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/input_text_message_content.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/input_text_message_content.cpython-311.pyc deleted file mode 100644 index 5ea0ee9..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/input_text_message_content.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/input_venue_message_content.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/input_venue_message_content.cpython-311.pyc deleted file mode 100644 index 6ef6fc8..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/input_venue_message_content.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/invoice.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/invoice.cpython-311.pyc deleted file mode 100644 index 82a1f5c..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/invoice.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/keyboard_button.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/keyboard_button.cpython-311.pyc deleted file mode 100644 index 2f2afd4..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/keyboard_button.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/keyboard_button_poll_type.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/keyboard_button_poll_type.cpython-311.pyc deleted file mode 100644 index 406f3b5..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/keyboard_button_poll_type.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/keyboard_button_request_chat.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/keyboard_button_request_chat.cpython-311.pyc deleted file mode 100644 index ef02824..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/keyboard_button_request_chat.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/keyboard_button_request_user.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/keyboard_button_request_user.cpython-311.pyc deleted file mode 100644 index fd9d842..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/keyboard_button_request_user.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/keyboard_button_request_users.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/keyboard_button_request_users.cpython-311.pyc deleted file mode 100644 index f54cad4..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/keyboard_button_request_users.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/labeled_price.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/labeled_price.cpython-311.pyc deleted file mode 100644 index ce8d2c0..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/labeled_price.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/link_preview_options.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/link_preview_options.cpython-311.pyc deleted file mode 100644 index dc019e6..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/link_preview_options.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/location.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/location.cpython-311.pyc deleted file mode 100644 index 512ef25..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/location.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/login_url.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/login_url.cpython-311.pyc deleted file mode 100644 index df163a3..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/login_url.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/mask_position.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/mask_position.cpython-311.pyc deleted file mode 100644 index 9441953..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/mask_position.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/maybe_inaccessible_message.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/maybe_inaccessible_message.cpython-311.pyc deleted file mode 100644 index 1b3d560..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/maybe_inaccessible_message.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/menu_button.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/menu_button.cpython-311.pyc deleted file mode 100644 index 6d1200f..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/menu_button.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/menu_button_commands.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/menu_button_commands.cpython-311.pyc deleted file mode 100644 index 4e66493..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/menu_button_commands.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/menu_button_default.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/menu_button_default.cpython-311.pyc deleted file mode 100644 index 6787bde..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/menu_button_default.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/menu_button_web_app.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/menu_button_web_app.cpython-311.pyc deleted file mode 100644 index 0af0a68..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/menu_button_web_app.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/message.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/message.cpython-311.pyc deleted file mode 100644 index 79bb2f1..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/message.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/message_auto_delete_timer_changed.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/message_auto_delete_timer_changed.cpython-311.pyc deleted file mode 100644 index b637a96..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/message_auto_delete_timer_changed.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/message_entity.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/message_entity.cpython-311.pyc deleted file mode 100644 index f0cef50..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/message_entity.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/message_id.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/message_id.cpython-311.pyc deleted file mode 100644 index bd94dba..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/message_id.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/message_origin.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/message_origin.cpython-311.pyc deleted file mode 100644 index 590bce1..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/message_origin.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/message_origin_channel.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/message_origin_channel.cpython-311.pyc deleted file mode 100644 index a41e8f1..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/message_origin_channel.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/message_origin_chat.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/message_origin_chat.cpython-311.pyc deleted file mode 100644 index 5383c42..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/message_origin_chat.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/message_origin_hidden_user.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/message_origin_hidden_user.cpython-311.pyc deleted file mode 100644 index 1f53c68..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/message_origin_hidden_user.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/message_origin_user.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/message_origin_user.cpython-311.pyc deleted file mode 100644 index 86b50c9..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/message_origin_user.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/message_reaction_count_updated.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/message_reaction_count_updated.cpython-311.pyc deleted file mode 100644 index 347ca66..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/message_reaction_count_updated.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/message_reaction_updated.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/message_reaction_updated.cpython-311.pyc deleted file mode 100644 index 7e864a0..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/message_reaction_updated.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/order_info.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/order_info.cpython-311.pyc deleted file mode 100644 index 08a9623..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/order_info.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/paid_media.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/paid_media.cpython-311.pyc deleted file mode 100644 index bc7f056..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/paid_media.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/paid_media_info.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/paid_media_info.cpython-311.pyc deleted file mode 100644 index 94d42ca..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/paid_media_info.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/paid_media_photo.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/paid_media_photo.cpython-311.pyc deleted file mode 100644 index c723aec..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/paid_media_photo.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/paid_media_preview.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/paid_media_preview.cpython-311.pyc deleted file mode 100644 index 93aed1e..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/paid_media_preview.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/paid_media_video.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/paid_media_video.cpython-311.pyc deleted file mode 100644 index fb5515c..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/paid_media_video.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/passport_data.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/passport_data.cpython-311.pyc deleted file mode 100644 index f6ae9d1..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/passport_data.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/passport_element_error.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/passport_element_error.cpython-311.pyc deleted file mode 100644 index f4eca19..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/passport_element_error.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/passport_element_error_data_field.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/passport_element_error_data_field.cpython-311.pyc deleted file mode 100644 index b9c89c6..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/passport_element_error_data_field.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/passport_element_error_file.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/passport_element_error_file.cpython-311.pyc deleted file mode 100644 index ba22cb9..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/passport_element_error_file.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/passport_element_error_files.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/passport_element_error_files.cpython-311.pyc deleted file mode 100644 index b0712e9..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/passport_element_error_files.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/passport_element_error_front_side.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/passport_element_error_front_side.cpython-311.pyc deleted file mode 100644 index 2e2b9ee..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/passport_element_error_front_side.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/passport_element_error_reverse_side.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/passport_element_error_reverse_side.cpython-311.pyc deleted file mode 100644 index 0f4c939..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/passport_element_error_reverse_side.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/passport_element_error_selfie.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/passport_element_error_selfie.cpython-311.pyc deleted file mode 100644 index 3226ac8..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/passport_element_error_selfie.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/passport_element_error_translation_file.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/passport_element_error_translation_file.cpython-311.pyc deleted file mode 100644 index b15c314..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/passport_element_error_translation_file.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/passport_element_error_translation_files.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/passport_element_error_translation_files.cpython-311.pyc deleted file mode 100644 index a530ad7..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/passport_element_error_translation_files.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/passport_element_error_unspecified.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/passport_element_error_unspecified.cpython-311.pyc deleted file mode 100644 index b01c7a4..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/passport_element_error_unspecified.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/passport_file.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/passport_file.cpython-311.pyc deleted file mode 100644 index 0886e2f..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/passport_file.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/photo_size.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/photo_size.cpython-311.pyc deleted file mode 100644 index b096e86..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/photo_size.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/poll.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/poll.cpython-311.pyc deleted file mode 100644 index 8ac5a10..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/poll.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/poll_answer.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/poll_answer.cpython-311.pyc deleted file mode 100644 index 6276b66..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/poll_answer.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/poll_option.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/poll_option.cpython-311.pyc deleted file mode 100644 index 26d011c..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/poll_option.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/pre_checkout_query.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/pre_checkout_query.cpython-311.pyc deleted file mode 100644 index c5a4704..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/pre_checkout_query.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/proximity_alert_triggered.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/proximity_alert_triggered.cpython-311.pyc deleted file mode 100644 index 8ade302..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/proximity_alert_triggered.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/reaction_count.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/reaction_count.cpython-311.pyc deleted file mode 100644 index 78f80f6..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/reaction_count.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/reaction_type.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/reaction_type.cpython-311.pyc deleted file mode 100644 index 7146427..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/reaction_type.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/reaction_type_custom_emoji.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/reaction_type_custom_emoji.cpython-311.pyc deleted file mode 100644 index 1733a5b..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/reaction_type_custom_emoji.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/reaction_type_emoji.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/reaction_type_emoji.cpython-311.pyc deleted file mode 100644 index a53f785..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/reaction_type_emoji.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/reaction_type_paid.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/reaction_type_paid.cpython-311.pyc deleted file mode 100644 index ba1c7de..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/reaction_type_paid.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/refunded_payment.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/refunded_payment.cpython-311.pyc deleted file mode 100644 index 044e426..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/refunded_payment.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/reply_keyboard_markup.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/reply_keyboard_markup.cpython-311.pyc deleted file mode 100644 index adf898c..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/reply_keyboard_markup.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/reply_keyboard_remove.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/reply_keyboard_remove.cpython-311.pyc deleted file mode 100644 index 318cd4d..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/reply_keyboard_remove.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/reply_parameters.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/reply_parameters.cpython-311.pyc deleted file mode 100644 index 40ea5e2..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/reply_parameters.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/response_parameters.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/response_parameters.cpython-311.pyc deleted file mode 100644 index 9a61df5..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/response_parameters.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/revenue_withdrawal_state.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/revenue_withdrawal_state.cpython-311.pyc deleted file mode 100644 index 0ad1d6a..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/revenue_withdrawal_state.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/revenue_withdrawal_state_failed.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/revenue_withdrawal_state_failed.cpython-311.pyc deleted file mode 100644 index 5a08e76..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/revenue_withdrawal_state_failed.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/revenue_withdrawal_state_pending.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/revenue_withdrawal_state_pending.cpython-311.pyc deleted file mode 100644 index 3e3af10..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/revenue_withdrawal_state_pending.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/revenue_withdrawal_state_succeeded.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/revenue_withdrawal_state_succeeded.cpython-311.pyc deleted file mode 100644 index 1561d50..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/revenue_withdrawal_state_succeeded.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/sent_web_app_message.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/sent_web_app_message.cpython-311.pyc deleted file mode 100644 index dcb85af..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/sent_web_app_message.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/shared_user.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/shared_user.cpython-311.pyc deleted file mode 100644 index 999ce70..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/shared_user.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/shipping_address.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/shipping_address.cpython-311.pyc deleted file mode 100644 index 2596a21..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/shipping_address.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/shipping_option.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/shipping_option.cpython-311.pyc deleted file mode 100644 index f0aceb4..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/shipping_option.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/shipping_query.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/shipping_query.cpython-311.pyc deleted file mode 100644 index 7978e0c..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/shipping_query.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/star_transaction.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/star_transaction.cpython-311.pyc deleted file mode 100644 index 62e25be..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/star_transaction.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/star_transactions.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/star_transactions.cpython-311.pyc deleted file mode 100644 index 7676adf..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/star_transactions.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/sticker.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/sticker.cpython-311.pyc deleted file mode 100644 index e37cf00..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/sticker.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/sticker_set.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/sticker_set.cpython-311.pyc deleted file mode 100644 index 16acbf2..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/sticker_set.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/story.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/story.cpython-311.pyc deleted file mode 100644 index b095c8e..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/story.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/successful_payment.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/successful_payment.cpython-311.pyc deleted file mode 100644 index b7a01a6..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/successful_payment.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/switch_inline_query_chosen_chat.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/switch_inline_query_chosen_chat.cpython-311.pyc deleted file mode 100644 index acd8955..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/switch_inline_query_chosen_chat.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/text_quote.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/text_quote.cpython-311.pyc deleted file mode 100644 index 42524f7..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/text_quote.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/transaction_partner.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/transaction_partner.cpython-311.pyc deleted file mode 100644 index 7dc88ae..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/transaction_partner.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/transaction_partner_fragment.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/transaction_partner_fragment.cpython-311.pyc deleted file mode 100644 index bc0135d..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/transaction_partner_fragment.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/transaction_partner_other.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/transaction_partner_other.cpython-311.pyc deleted file mode 100644 index cf3777c..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/transaction_partner_other.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/transaction_partner_telegram_ads.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/transaction_partner_telegram_ads.cpython-311.pyc deleted file mode 100644 index 92e0ee5..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/transaction_partner_telegram_ads.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/transaction_partner_user.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/transaction_partner_user.cpython-311.pyc deleted file mode 100644 index dd6a7cc..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/transaction_partner_user.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/update.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/update.cpython-311.pyc deleted file mode 100644 index 21e7fed..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/update.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/user.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/user.cpython-311.pyc deleted file mode 100644 index 7cc1edf..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/user.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/user_chat_boosts.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/user_chat_boosts.cpython-311.pyc deleted file mode 100644 index 9291076..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/user_chat_boosts.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/user_profile_photos.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/user_profile_photos.cpython-311.pyc deleted file mode 100644 index 8f895d2..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/user_profile_photos.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/user_shared.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/user_shared.cpython-311.pyc deleted file mode 100644 index 6f226d9..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/user_shared.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/users_shared.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/users_shared.cpython-311.pyc deleted file mode 100644 index e5b8632..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/users_shared.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/venue.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/venue.cpython-311.pyc deleted file mode 100644 index 7c73bc0..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/venue.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/video.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/video.cpython-311.pyc deleted file mode 100644 index b1a1162..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/video.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/video_chat_ended.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/video_chat_ended.cpython-311.pyc deleted file mode 100644 index 0530974..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/video_chat_ended.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/video_chat_participants_invited.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/video_chat_participants_invited.cpython-311.pyc deleted file mode 100644 index f6cf48c..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/video_chat_participants_invited.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/video_chat_scheduled.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/video_chat_scheduled.cpython-311.pyc deleted file mode 100644 index a0132f4..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/video_chat_scheduled.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/video_chat_started.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/video_chat_started.cpython-311.pyc deleted file mode 100644 index db02603..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/video_chat_started.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/video_note.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/video_note.cpython-311.pyc deleted file mode 100644 index cb6bef1..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/video_note.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/voice.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/voice.cpython-311.pyc deleted file mode 100644 index 26f4d06..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/voice.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/web_app_data.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/web_app_data.cpython-311.pyc deleted file mode 100644 index 0809f0b..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/web_app_data.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/web_app_info.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/web_app_info.cpython-311.pyc deleted file mode 100644 index 378c8bc..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/web_app_info.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/webhook_info.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/webhook_info.cpython-311.pyc deleted file mode 100644 index 4cef111..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/webhook_info.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/__pycache__/write_access_allowed.cpython-311.pyc b/env/Lib/site-packages/aiogram/types/__pycache__/write_access_allowed.cpython-311.pyc deleted file mode 100644 index c9f9229..0000000 Binary files a/env/Lib/site-packages/aiogram/types/__pycache__/write_access_allowed.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/types/animation.py b/env/Lib/site-packages/aiogram/types/animation.py deleted file mode 100644 index 1fb45b7..0000000 --- a/env/Lib/site-packages/aiogram/types/animation.py +++ /dev/null @@ -1,70 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Optional - -from .base import TelegramObject - -if TYPE_CHECKING: - from .photo_size import PhotoSize - - -class Animation(TelegramObject): - """ - This object represents an animation file (GIF or H.264/MPEG-4 AVC video without sound). - - Source: https://core.telegram.org/bots/api#animation - """ - - file_id: str - """Identifier for this file, which can be used to download or reuse the file""" - file_unique_id: str - """Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.""" - width: int - """Video width as defined by the sender""" - height: int - """Video height as defined by the sender""" - duration: int - """Duration of the video in seconds as defined by the sender""" - thumbnail: Optional[PhotoSize] = None - """*Optional*. Animation thumbnail as defined by the sender""" - file_name: Optional[str] = None - """*Optional*. Original animation filename as defined by the sender""" - mime_type: Optional[str] = None - """*Optional*. MIME type of the file as defined by the sender""" - file_size: Optional[int] = None - """*Optional*. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value.""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - file_id: str, - file_unique_id: str, - width: int, - height: int, - duration: int, - thumbnail: Optional[PhotoSize] = None, - file_name: Optional[str] = None, - mime_type: Optional[str] = None, - file_size: Optional[int] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - file_id=file_id, - file_unique_id=file_unique_id, - width=width, - height=height, - duration=duration, - thumbnail=thumbnail, - file_name=file_name, - mime_type=mime_type, - file_size=file_size, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/audio.py b/env/Lib/site-packages/aiogram/types/audio.py deleted file mode 100644 index 8c11412..0000000 --- a/env/Lib/site-packages/aiogram/types/audio.py +++ /dev/null @@ -1,70 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Optional - -from .base import TelegramObject - -if TYPE_CHECKING: - from .photo_size import PhotoSize - - -class Audio(TelegramObject): - """ - This object represents an audio file to be treated as music by the Telegram clients. - - Source: https://core.telegram.org/bots/api#audio - """ - - file_id: str - """Identifier for this file, which can be used to download or reuse the file""" - file_unique_id: str - """Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.""" - duration: int - """Duration of the audio in seconds as defined by the sender""" - performer: Optional[str] = None - """*Optional*. Performer of the audio as defined by the sender or by audio tags""" - title: Optional[str] = None - """*Optional*. Title of the audio as defined by the sender or by audio tags""" - file_name: Optional[str] = None - """*Optional*. Original filename as defined by the sender""" - mime_type: Optional[str] = None - """*Optional*. MIME type of the file as defined by the sender""" - file_size: Optional[int] = None - """*Optional*. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value.""" - thumbnail: Optional[PhotoSize] = None - """*Optional*. Thumbnail of the album cover to which the music file belongs""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - file_id: str, - file_unique_id: str, - duration: int, - performer: Optional[str] = None, - title: Optional[str] = None, - file_name: Optional[str] = None, - mime_type: Optional[str] = None, - file_size: Optional[int] = None, - thumbnail: Optional[PhotoSize] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - file_id=file_id, - file_unique_id=file_unique_id, - duration=duration, - performer=performer, - title=title, - file_name=file_name, - mime_type=mime_type, - file_size=file_size, - thumbnail=thumbnail, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/background_fill.py b/env/Lib/site-packages/aiogram/types/background_fill.py deleted file mode 100644 index dbeda46..0000000 --- a/env/Lib/site-packages/aiogram/types/background_fill.py +++ /dev/null @@ -1,13 +0,0 @@ -from .base import TelegramObject - - -class BackgroundFill(TelegramObject): - """ - This object describes the way a background is filled based on the selected colors. Currently, it can be one of - - - :class:`aiogram.types.background_fill_solid.BackgroundFillSolid` - - :class:`aiogram.types.background_fill_gradient.BackgroundFillGradient` - - :class:`aiogram.types.background_fill_freeform_gradient.BackgroundFillFreeformGradient` - - Source: https://core.telegram.org/bots/api#backgroundfill - """ diff --git a/env/Lib/site-packages/aiogram/types/background_fill_freeform_gradient.py b/env/Lib/site-packages/aiogram/types/background_fill_freeform_gradient.py deleted file mode 100644 index 916f6a7..0000000 --- a/env/Lib/site-packages/aiogram/types/background_fill_freeform_gradient.py +++ /dev/null @@ -1,33 +0,0 @@ -from typing import TYPE_CHECKING, Any, List, Literal - -from .background_fill import BackgroundFill - - -class BackgroundFillFreeformGradient(BackgroundFill): - """ - The background is a freeform gradient that rotates after every message in the chat. - - Source: https://core.telegram.org/bots/api#backgroundfillfreeformgradient - """ - - type: Literal["freeform_gradient"] = "freeform_gradient" - """Type of the background fill, always 'freeform_gradient'""" - colors: List[int] - """A list of the 3 or 4 base colors that are used to generate the freeform gradient in the RGB24 format""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - type: Literal["freeform_gradient"] = "freeform_gradient", - colors: List[int], - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(type=type, colors=colors, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/types/background_fill_gradient.py b/env/Lib/site-packages/aiogram/types/background_fill_gradient.py deleted file mode 100644 index abc485c..0000000 --- a/env/Lib/site-packages/aiogram/types/background_fill_gradient.py +++ /dev/null @@ -1,45 +0,0 @@ -from typing import TYPE_CHECKING, Any, Literal - -from .background_fill import BackgroundFill - - -class BackgroundFillGradient(BackgroundFill): - """ - The background is a gradient fill. - - Source: https://core.telegram.org/bots/api#backgroundfillgradient - """ - - type: Literal["gradient"] = "gradient" - """Type of the background fill, always 'gradient'""" - top_color: int - """Top color of the gradient in the RGB24 format""" - bottom_color: int - """Bottom color of the gradient in the RGB24 format""" - rotation_angle: int - """Clockwise rotation angle of the background fill in degrees; 0-359""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - type: Literal["gradient"] = "gradient", - top_color: int, - bottom_color: int, - rotation_angle: int, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - type=type, - top_color=top_color, - bottom_color=bottom_color, - rotation_angle=rotation_angle, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/background_fill_solid.py b/env/Lib/site-packages/aiogram/types/background_fill_solid.py deleted file mode 100644 index f9fe22f..0000000 --- a/env/Lib/site-packages/aiogram/types/background_fill_solid.py +++ /dev/null @@ -1,33 +0,0 @@ -from typing import TYPE_CHECKING, Any, Literal - -from .background_fill import BackgroundFill - - -class BackgroundFillSolid(BackgroundFill): - """ - The background is filled using the selected color. - - Source: https://core.telegram.org/bots/api#backgroundfillsolid - """ - - type: Literal["solid"] = "solid" - """Type of the background fill, always 'solid'""" - color: int - """The color of the background fill in the RGB24 format""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - type: Literal["solid"] = "solid", - color: int, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(type=type, color=color, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/types/background_type.py b/env/Lib/site-packages/aiogram/types/background_type.py deleted file mode 100644 index 6abccef..0000000 --- a/env/Lib/site-packages/aiogram/types/background_type.py +++ /dev/null @@ -1,14 +0,0 @@ -from .base import TelegramObject - - -class BackgroundType(TelegramObject): - """ - This object describes the type of a background. Currently, it can be one of - - - :class:`aiogram.types.background_type_fill.BackgroundTypeFill` - - :class:`aiogram.types.background_type_wallpaper.BackgroundTypeWallpaper` - - :class:`aiogram.types.background_type_pattern.BackgroundTypePattern` - - :class:`aiogram.types.background_type_chat_theme.BackgroundTypeChatTheme` - - Source: https://core.telegram.org/bots/api#backgroundtype - """ diff --git a/env/Lib/site-packages/aiogram/types/background_type_chat_theme.py b/env/Lib/site-packages/aiogram/types/background_type_chat_theme.py deleted file mode 100644 index ac93534..0000000 --- a/env/Lib/site-packages/aiogram/types/background_type_chat_theme.py +++ /dev/null @@ -1,33 +0,0 @@ -from typing import TYPE_CHECKING, Any, Literal - -from .background_type import BackgroundType - - -class BackgroundTypeChatTheme(BackgroundType): - """ - The background is taken directly from a built-in chat theme. - - Source: https://core.telegram.org/bots/api#backgroundtypechattheme - """ - - type: Literal["chat_theme"] = "chat_theme" - """Type of the background, always 'chat_theme'""" - theme_name: str - """Name of the chat theme, which is usually an emoji""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - type: Literal["chat_theme"] = "chat_theme", - theme_name: str, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(type=type, theme_name=theme_name, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/types/background_type_fill.py b/env/Lib/site-packages/aiogram/types/background_type_fill.py deleted file mode 100644 index c506e4e..0000000 --- a/env/Lib/site-packages/aiogram/types/background_type_fill.py +++ /dev/null @@ -1,47 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Literal, Union - -from .background_type import BackgroundType - -if TYPE_CHECKING: - from .background_fill_freeform_gradient import BackgroundFillFreeformGradient - from .background_fill_gradient import BackgroundFillGradient - from .background_fill_solid import BackgroundFillSolid - - -class BackgroundTypeFill(BackgroundType): - """ - The background is automatically filled based on the selected colors. - - Source: https://core.telegram.org/bots/api#backgroundtypefill - """ - - type: Literal["fill"] = "fill" - """Type of the background, always 'fill'""" - fill: Union[BackgroundFillSolid, BackgroundFillGradient, BackgroundFillFreeformGradient] - """The background fill""" - dark_theme_dimming: int - """Dimming of the background in dark themes, as a percentage; 0-100""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - type: Literal["fill"] = "fill", - fill: Union[ - BackgroundFillSolid, BackgroundFillGradient, BackgroundFillFreeformGradient - ], - dark_theme_dimming: int, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - type=type, fill=fill, dark_theme_dimming=dark_theme_dimming, **__pydantic_kwargs - ) diff --git a/env/Lib/site-packages/aiogram/types/background_type_pattern.py b/env/Lib/site-packages/aiogram/types/background_type_pattern.py deleted file mode 100644 index 29c383c..0000000 --- a/env/Lib/site-packages/aiogram/types/background_type_pattern.py +++ /dev/null @@ -1,63 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Literal, Optional, Union - -from .background_type import BackgroundType - -if TYPE_CHECKING: - from .background_fill_freeform_gradient import BackgroundFillFreeformGradient - from .background_fill_gradient import BackgroundFillGradient - from .background_fill_solid import BackgroundFillSolid - from .document import Document - - -class BackgroundTypePattern(BackgroundType): - """ - The background is a PNG or TGV (gzipped subset of SVG with MIME type 'application/x-tgwallpattern') pattern to be combined with the background fill chosen by the user. - - Source: https://core.telegram.org/bots/api#backgroundtypepattern - """ - - type: Literal["pattern"] = "pattern" - """Type of the background, always 'pattern'""" - document: Document - """Document with the pattern""" - fill: Union[BackgroundFillSolid, BackgroundFillGradient, BackgroundFillFreeformGradient] - """The background fill that is combined with the pattern""" - intensity: int - """Intensity of the pattern when it is shown above the filled background; 0-100""" - is_inverted: Optional[bool] = None - """*Optional*. :code:`True`, if the background fill must be applied only to the pattern itself. All other pixels are black in this case. For dark themes only""" - is_moving: Optional[bool] = None - """*Optional*. :code:`True`, if the background moves slightly when the device is tilted""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - type: Literal["pattern"] = "pattern", - document: Document, - fill: Union[ - BackgroundFillSolid, BackgroundFillGradient, BackgroundFillFreeformGradient - ], - intensity: int, - is_inverted: Optional[bool] = None, - is_moving: Optional[bool] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - type=type, - document=document, - fill=fill, - intensity=intensity, - is_inverted=is_inverted, - is_moving=is_moving, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/background_type_wallpaper.py b/env/Lib/site-packages/aiogram/types/background_type_wallpaper.py deleted file mode 100644 index 4ad2905..0000000 --- a/env/Lib/site-packages/aiogram/types/background_type_wallpaper.py +++ /dev/null @@ -1,54 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Literal, Optional - -from .background_type import BackgroundType - -if TYPE_CHECKING: - from .document import Document - - -class BackgroundTypeWallpaper(BackgroundType): - """ - The background is a wallpaper in the JPEG format. - - Source: https://core.telegram.org/bots/api#backgroundtypewallpaper - """ - - type: Literal["wallpaper"] = "wallpaper" - """Type of the background, always 'wallpaper'""" - document: Document - """Document with the wallpaper""" - dark_theme_dimming: int - """Dimming of the background in dark themes, as a percentage; 0-100""" - is_blurred: Optional[bool] = None - """*Optional*. :code:`True`, if the wallpaper is downscaled to fit in a 450x450 square and then box-blurred with radius 12""" - is_moving: Optional[bool] = None - """*Optional*. :code:`True`, if the background moves slightly when the device is tilted""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - type: Literal["wallpaper"] = "wallpaper", - document: Document, - dark_theme_dimming: int, - is_blurred: Optional[bool] = None, - is_moving: Optional[bool] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - type=type, - document=document, - dark_theme_dimming=dark_theme_dimming, - is_blurred=is_blurred, - is_moving=is_moving, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/base.py b/env/Lib/site-packages/aiogram/types/base.py deleted file mode 100644 index 7ae0052..0000000 --- a/env/Lib/site-packages/aiogram/types/base.py +++ /dev/null @@ -1,51 +0,0 @@ -from typing import Any, Dict -from unittest.mock import sentinel - -from pydantic import BaseModel, ConfigDict, model_validator - -from aiogram.client.context_controller import BotContextController -from aiogram.client.default import Default - - -class TelegramObject(BotContextController, BaseModel): - model_config = ConfigDict( - use_enum_values=True, - extra="allow", - validate_assignment=True, - frozen=True, - populate_by_name=True, - arbitrary_types_allowed=True, - defer_build=True, - ) - - @model_validator(mode="before") - @classmethod - def remove_unset(cls, values: Dict[str, Any]) -> Dict[str, Any]: - """ - Remove UNSET before fields validation. - - We use UNSET as a sentinel value for `parse_mode` and replace it to real value later. - It isn't a problem when it's just default value for a model field, - but UNSET might be passed to a model initialization from `Bot.method_name`, - so we must take care of it and remove it before fields validation. - """ - if not isinstance(values, dict): - return values - return {k: v for k, v in values.items() if not isinstance(v, UNSET_TYPE)} - - -class MutableTelegramObject(TelegramObject): - model_config = ConfigDict( - frozen=False, - ) - - -# special sentinel object which used in a situation when None might be a useful value -UNSET: Any = sentinel.UNSET -UNSET_TYPE: Any = type(UNSET) - -# Unused constants are needed only for backward compatibility with external -# libraries that a working with framework internals -UNSET_PARSE_MODE: Any = Default("parse_mode") -UNSET_DISABLE_WEB_PAGE_PREVIEW: Any = Default("link_preview_is_disabled") -UNSET_PROTECT_CONTENT: Any = Default("protect_content") diff --git a/env/Lib/site-packages/aiogram/types/birthdate.py b/env/Lib/site-packages/aiogram/types/birthdate.py deleted file mode 100644 index 6955554..0000000 --- a/env/Lib/site-packages/aiogram/types/birthdate.py +++ /dev/null @@ -1,38 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Optional - -from .base import TelegramObject - - -class Birthdate(TelegramObject): - """ - Describes the birthdate of a user. - - Source: https://core.telegram.org/bots/api#birthdate - """ - - day: int - """Day of the user's birth; 1-31""" - month: int - """Month of the user's birth; 1-12""" - year: Optional[int] = None - """*Optional*. Year of the user's birth""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - day: int, - month: int, - year: Optional[int] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(day=day, month=month, year=year, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/types/bot_command.py b/env/Lib/site-packages/aiogram/types/bot_command.py deleted file mode 100644 index e4e9175..0000000 --- a/env/Lib/site-packages/aiogram/types/bot_command.py +++ /dev/null @@ -1,31 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any - -from .base import MutableTelegramObject - - -class BotCommand(MutableTelegramObject): - """ - This object represents a bot command. - - Source: https://core.telegram.org/bots/api#botcommand - """ - - command: str - """Text of the command; 1-32 characters. Can contain only lowercase English letters, digits and underscores.""" - description: str - """Description of the command; 1-256 characters.""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, *, command: str, description: str, **__pydantic_kwargs: Any - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(command=command, description=description, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/types/bot_command_scope.py b/env/Lib/site-packages/aiogram/types/bot_command_scope.py deleted file mode 100644 index dfb1d52..0000000 --- a/env/Lib/site-packages/aiogram/types/bot_command_scope.py +++ /dev/null @@ -1,19 +0,0 @@ -from __future__ import annotations - -from .base import TelegramObject - - -class BotCommandScope(TelegramObject): - """ - This object represents the scope to which bot commands are applied. Currently, the following 7 scopes are supported: - - - :class:`aiogram.types.bot_command_scope_default.BotCommandScopeDefault` - - :class:`aiogram.types.bot_command_scope_all_private_chats.BotCommandScopeAllPrivateChats` - - :class:`aiogram.types.bot_command_scope_all_group_chats.BotCommandScopeAllGroupChats` - - :class:`aiogram.types.bot_command_scope_all_chat_administrators.BotCommandScopeAllChatAdministrators` - - :class:`aiogram.types.bot_command_scope_chat.BotCommandScopeChat` - - :class:`aiogram.types.bot_command_scope_chat_administrators.BotCommandScopeChatAdministrators` - - :class:`aiogram.types.bot_command_scope_chat_member.BotCommandScopeChatMember` - - Source: https://core.telegram.org/bots/api#botcommandscope - """ diff --git a/env/Lib/site-packages/aiogram/types/bot_command_scope_all_chat_administrators.py b/env/Lib/site-packages/aiogram/types/bot_command_scope_all_chat_administrators.py deleted file mode 100644 index 4417363..0000000 --- a/env/Lib/site-packages/aiogram/types/bot_command_scope_all_chat_administrators.py +++ /dev/null @@ -1,37 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Literal - -from ..enums import BotCommandScopeType -from .bot_command_scope import BotCommandScope - - -class BotCommandScopeAllChatAdministrators(BotCommandScope): - """ - Represents the `scope `_ of bot commands, covering all group and supergroup chat administrators. - - Source: https://core.telegram.org/bots/api#botcommandscopeallchatadministrators - """ - - type: Literal[BotCommandScopeType.ALL_CHAT_ADMINISTRATORS] = ( - BotCommandScopeType.ALL_CHAT_ADMINISTRATORS - ) - """Scope type, must be *all_chat_administrators*""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - type: Literal[ - BotCommandScopeType.ALL_CHAT_ADMINISTRATORS - ] = BotCommandScopeType.ALL_CHAT_ADMINISTRATORS, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(type=type, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/types/bot_command_scope_all_group_chats.py b/env/Lib/site-packages/aiogram/types/bot_command_scope_all_group_chats.py deleted file mode 100644 index a17a51d..0000000 --- a/env/Lib/site-packages/aiogram/types/bot_command_scope_all_group_chats.py +++ /dev/null @@ -1,35 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Literal - -from ..enums import BotCommandScopeType -from .bot_command_scope import BotCommandScope - - -class BotCommandScopeAllGroupChats(BotCommandScope): - """ - Represents the `scope `_ of bot commands, covering all group and supergroup chats. - - Source: https://core.telegram.org/bots/api#botcommandscopeallgroupchats - """ - - type: Literal[BotCommandScopeType.ALL_GROUP_CHATS] = BotCommandScopeType.ALL_GROUP_CHATS - """Scope type, must be *all_group_chats*""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - type: Literal[ - BotCommandScopeType.ALL_GROUP_CHATS - ] = BotCommandScopeType.ALL_GROUP_CHATS, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(type=type, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/types/bot_command_scope_all_private_chats.py b/env/Lib/site-packages/aiogram/types/bot_command_scope_all_private_chats.py deleted file mode 100644 index 54d406f..0000000 --- a/env/Lib/site-packages/aiogram/types/bot_command_scope_all_private_chats.py +++ /dev/null @@ -1,35 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Literal - -from ..enums import BotCommandScopeType -from .bot_command_scope import BotCommandScope - - -class BotCommandScopeAllPrivateChats(BotCommandScope): - """ - Represents the `scope `_ of bot commands, covering all private chats. - - Source: https://core.telegram.org/bots/api#botcommandscopeallprivatechats - """ - - type: Literal[BotCommandScopeType.ALL_PRIVATE_CHATS] = BotCommandScopeType.ALL_PRIVATE_CHATS - """Scope type, must be *all_private_chats*""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - type: Literal[ - BotCommandScopeType.ALL_PRIVATE_CHATS - ] = BotCommandScopeType.ALL_PRIVATE_CHATS, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(type=type, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/types/bot_command_scope_chat.py b/env/Lib/site-packages/aiogram/types/bot_command_scope_chat.py deleted file mode 100644 index f36c4a1..0000000 --- a/env/Lib/site-packages/aiogram/types/bot_command_scope_chat.py +++ /dev/null @@ -1,36 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Literal, Union - -from ..enums import BotCommandScopeType -from .bot_command_scope import BotCommandScope - - -class BotCommandScopeChat(BotCommandScope): - """ - Represents the `scope `_ of bot commands, covering a specific chat. - - Source: https://core.telegram.org/bots/api#botcommandscopechat - """ - - type: Literal[BotCommandScopeType.CHAT] = BotCommandScopeType.CHAT - """Scope type, must be *chat*""" - chat_id: Union[int, str] - """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - type: Literal[BotCommandScopeType.CHAT] = BotCommandScopeType.CHAT, - chat_id: Union[int, str], - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(type=type, chat_id=chat_id, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/types/bot_command_scope_chat_administrators.py b/env/Lib/site-packages/aiogram/types/bot_command_scope_chat_administrators.py deleted file mode 100644 index f90623e..0000000 --- a/env/Lib/site-packages/aiogram/types/bot_command_scope_chat_administrators.py +++ /dev/null @@ -1,40 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Literal, Union - -from ..enums import BotCommandScopeType -from .bot_command_scope import BotCommandScope - - -class BotCommandScopeChatAdministrators(BotCommandScope): - """ - Represents the `scope `_ of bot commands, covering all administrators of a specific group or supergroup chat. - - Source: https://core.telegram.org/bots/api#botcommandscopechatadministrators - """ - - type: Literal[BotCommandScopeType.CHAT_ADMINISTRATORS] = ( - BotCommandScopeType.CHAT_ADMINISTRATORS - ) - """Scope type, must be *chat_administrators*""" - chat_id: Union[int, str] - """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - type: Literal[ - BotCommandScopeType.CHAT_ADMINISTRATORS - ] = BotCommandScopeType.CHAT_ADMINISTRATORS, - chat_id: Union[int, str], - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(type=type, chat_id=chat_id, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/types/bot_command_scope_chat_member.py b/env/Lib/site-packages/aiogram/types/bot_command_scope_chat_member.py deleted file mode 100644 index 4d20b1f..0000000 --- a/env/Lib/site-packages/aiogram/types/bot_command_scope_chat_member.py +++ /dev/null @@ -1,39 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Literal, Union - -from ..enums import BotCommandScopeType -from .bot_command_scope import BotCommandScope - - -class BotCommandScopeChatMember(BotCommandScope): - """ - Represents the `scope `_ of bot commands, covering a specific member of a group or supergroup chat. - - Source: https://core.telegram.org/bots/api#botcommandscopechatmember - """ - - type: Literal[BotCommandScopeType.CHAT_MEMBER] = BotCommandScopeType.CHAT_MEMBER - """Scope type, must be *chat_member*""" - chat_id: Union[int, str] - """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)""" - user_id: int - """Unique identifier of the target user""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - type: Literal[BotCommandScopeType.CHAT_MEMBER] = BotCommandScopeType.CHAT_MEMBER, - chat_id: Union[int, str], - user_id: int, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(type=type, chat_id=chat_id, user_id=user_id, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/types/bot_command_scope_default.py b/env/Lib/site-packages/aiogram/types/bot_command_scope_default.py deleted file mode 100644 index 33b7a0c..0000000 --- a/env/Lib/site-packages/aiogram/types/bot_command_scope_default.py +++ /dev/null @@ -1,33 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Literal - -from ..enums import BotCommandScopeType -from .bot_command_scope import BotCommandScope - - -class BotCommandScopeDefault(BotCommandScope): - """ - Represents the default `scope `_ of bot commands. Default commands are used if no commands with a `narrower scope `_ are specified for the user. - - Source: https://core.telegram.org/bots/api#botcommandscopedefault - """ - - type: Literal[BotCommandScopeType.DEFAULT] = BotCommandScopeType.DEFAULT - """Scope type, must be *default*""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - type: Literal[BotCommandScopeType.DEFAULT] = BotCommandScopeType.DEFAULT, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(type=type, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/types/bot_description.py b/env/Lib/site-packages/aiogram/types/bot_description.py deleted file mode 100644 index 5d8646d..0000000 --- a/env/Lib/site-packages/aiogram/types/bot_description.py +++ /dev/null @@ -1,25 +0,0 @@ -from typing import TYPE_CHECKING, Any - -from aiogram.types import TelegramObject - - -class BotDescription(TelegramObject): - """ - This object represents the bot's description. - - Source: https://core.telegram.org/bots/api#botdescription - """ - - description: str - """The bot's description""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__(__pydantic__self__, *, description: str, **__pydantic_kwargs: Any) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(description=description, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/types/bot_name.py b/env/Lib/site-packages/aiogram/types/bot_name.py deleted file mode 100644 index f2dc074..0000000 --- a/env/Lib/site-packages/aiogram/types/bot_name.py +++ /dev/null @@ -1,25 +0,0 @@ -from typing import TYPE_CHECKING, Any - -from .base import TelegramObject - - -class BotName(TelegramObject): - """ - This object represents the bot's name. - - Source: https://core.telegram.org/bots/api#botname - """ - - name: str - """The bot's name""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__(__pydantic__self__, *, name: str, **__pydantic_kwargs: Any) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(name=name, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/types/bot_short_description.py b/env/Lib/site-packages/aiogram/types/bot_short_description.py deleted file mode 100644 index 86b11cf..0000000 --- a/env/Lib/site-packages/aiogram/types/bot_short_description.py +++ /dev/null @@ -1,27 +0,0 @@ -from typing import TYPE_CHECKING, Any - -from aiogram.types import TelegramObject - - -class BotShortDescription(TelegramObject): - """ - This object represents the bot's short description. - - Source: https://core.telegram.org/bots/api#botshortdescription - """ - - short_description: str - """The bot's short description""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, *, short_description: str, **__pydantic_kwargs: Any - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(short_description=short_description, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/types/business_connection.py b/env/Lib/site-packages/aiogram/types/business_connection.py deleted file mode 100644 index 80c472a..0000000 --- a/env/Lib/site-packages/aiogram/types/business_connection.py +++ /dev/null @@ -1,59 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any - -from .base import TelegramObject -from .custom import DateTime - -if TYPE_CHECKING: - from .user import User - - -class BusinessConnection(TelegramObject): - """ - Describes the connection of the bot with a business account. - - Source: https://core.telegram.org/bots/api#businessconnection - """ - - id: str - """Unique identifier of the business connection""" - user: User - """Business account user that created the business connection""" - user_chat_id: int - """Identifier of a private chat with the user who created the business connection. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier.""" - date: DateTime - """Date the connection was established in Unix time""" - can_reply: bool - """True, if the bot can act on behalf of the business account in chats that were active in the last 24 hours""" - is_enabled: bool - """True, if the connection is active""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - id: str, - user: User, - user_chat_id: int, - date: DateTime, - can_reply: bool, - is_enabled: bool, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - id=id, - user=user, - user_chat_id=user_chat_id, - date=date, - can_reply=can_reply, - is_enabled=is_enabled, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/business_intro.py b/env/Lib/site-packages/aiogram/types/business_intro.py deleted file mode 100644 index c360fbe..0000000 --- a/env/Lib/site-packages/aiogram/types/business_intro.py +++ /dev/null @@ -1,41 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Optional - -from .base import TelegramObject - -if TYPE_CHECKING: - from .sticker import Sticker - - -class BusinessIntro(TelegramObject): - """ - Contains information about the start page settings of a Telegram Business account. - - Source: https://core.telegram.org/bots/api#businessintro - """ - - title: Optional[str] = None - """*Optional*. Title text of the business intro""" - message: Optional[str] = None - """*Optional*. Message text of the business intro""" - sticker: Optional[Sticker] = None - """*Optional*. Sticker of the business intro""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - title: Optional[str] = None, - message: Optional[str] = None, - sticker: Optional[Sticker] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(title=title, message=message, sticker=sticker, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/types/business_location.py b/env/Lib/site-packages/aiogram/types/business_location.py deleted file mode 100644 index af7989a..0000000 --- a/env/Lib/site-packages/aiogram/types/business_location.py +++ /dev/null @@ -1,38 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Optional - -from .base import TelegramObject - -if TYPE_CHECKING: - from .location import Location - - -class BusinessLocation(TelegramObject): - """ - Contains information about the location of a Telegram Business account. - - Source: https://core.telegram.org/bots/api#businesslocation - """ - - address: str - """Address of the business""" - location: Optional[Location] = None - """*Optional*. Location of the business""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - address: str, - location: Optional[Location] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(address=address, location=location, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/types/business_messages_deleted.py b/env/Lib/site-packages/aiogram/types/business_messages_deleted.py deleted file mode 100644 index 44bc45f..0000000 --- a/env/Lib/site-packages/aiogram/types/business_messages_deleted.py +++ /dev/null @@ -1,46 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, List - -from .base import TelegramObject - -if TYPE_CHECKING: - from .chat import Chat - - -class BusinessMessagesDeleted(TelegramObject): - """ - This object is received when messages are deleted from a connected business account. - - Source: https://core.telegram.org/bots/api#businessmessagesdeleted - """ - - business_connection_id: str - """Unique identifier of the business connection""" - chat: Chat - """Information about a chat in the business account. The bot may not have access to the chat or the corresponding user.""" - message_ids: List[int] - """The list of identifiers of deleted messages in the chat of the business account""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - business_connection_id: str, - chat: Chat, - message_ids: List[int], - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - business_connection_id=business_connection_id, - chat=chat, - message_ids=message_ids, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/business_opening_hours.py b/env/Lib/site-packages/aiogram/types/business_opening_hours.py deleted file mode 100644 index 7fd5c75..0000000 --- a/env/Lib/site-packages/aiogram/types/business_opening_hours.py +++ /dev/null @@ -1,40 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, List - -from .base import TelegramObject - -if TYPE_CHECKING: - from .business_opening_hours_interval import BusinessOpeningHoursInterval - - -class BusinessOpeningHours(TelegramObject): - """ - Describes the opening hours of a business. - - Source: https://core.telegram.org/bots/api#businessopeninghours - """ - - time_zone_name: str - """Unique name of the time zone for which the opening hours are defined""" - opening_hours: List[BusinessOpeningHoursInterval] - """List of time intervals describing business opening hours""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - time_zone_name: str, - opening_hours: List[BusinessOpeningHoursInterval], - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - time_zone_name=time_zone_name, opening_hours=opening_hours, **__pydantic_kwargs - ) diff --git a/env/Lib/site-packages/aiogram/types/business_opening_hours_interval.py b/env/Lib/site-packages/aiogram/types/business_opening_hours_interval.py deleted file mode 100644 index 52efd2c..0000000 --- a/env/Lib/site-packages/aiogram/types/business_opening_hours_interval.py +++ /dev/null @@ -1,37 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any - -from .base import TelegramObject - - -class BusinessOpeningHoursInterval(TelegramObject): - """ - Describes an interval of time during which a business is open. - - Source: https://core.telegram.org/bots/api#businessopeninghoursinterval - """ - - opening_minute: int - """The minute's sequence number in a week, starting on Monday, marking the start of the time interval during which the business is open; 0 - 7 * 24 * 60""" - closing_minute: int - """The minute's sequence number in a week, starting on Monday, marking the end of the time interval during which the business is open; 0 - 8 * 24 * 60""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - opening_minute: int, - closing_minute: int, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - opening_minute=opening_minute, closing_minute=closing_minute, **__pydantic_kwargs - ) diff --git a/env/Lib/site-packages/aiogram/types/callback_game.py b/env/Lib/site-packages/aiogram/types/callback_game.py deleted file mode 100644 index 6d8c556..0000000 --- a/env/Lib/site-packages/aiogram/types/callback_game.py +++ /dev/null @@ -1,11 +0,0 @@ -from __future__ import annotations - -from .base import TelegramObject - - -class CallbackGame(TelegramObject): - """ - A placeholder, currently holds no information. Use `BotFather `_ to set up your game. - - Source: https://core.telegram.org/bots/api#callbackgame - """ diff --git a/env/Lib/site-packages/aiogram/types/callback_query.py b/env/Lib/site-packages/aiogram/types/callback_query.py deleted file mode 100644 index c3b33b5..0000000 --- a/env/Lib/site-packages/aiogram/types/callback_query.py +++ /dev/null @@ -1,109 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Optional, Union - -from pydantic import Field - -from .base import TelegramObject - -if TYPE_CHECKING: - from ..methods import AnswerCallbackQuery - from .inaccessible_message import InaccessibleMessage - from .message import Message - from .user import User - - -class CallbackQuery(TelegramObject): - """ - This object represents an incoming callback query from a callback button in an `inline keyboard `_. If the button that originated the query was attached to a message sent by the bot, the field *message* will be present. If the button was attached to a message sent via the bot (in `inline mode `_), the field *inline_message_id* will be present. Exactly one of the fields *data* or *game_short_name* will be present. - - **NOTE:** After the user presses a callback button, Telegram clients will display a progress bar until you call :class:`aiogram.methods.answer_callback_query.AnswerCallbackQuery`. It is, therefore, necessary to react by calling :class:`aiogram.methods.answer_callback_query.AnswerCallbackQuery` even if no notification to the user is needed (e.g., without specifying any of the optional parameters). - - Source: https://core.telegram.org/bots/api#callbackquery - """ - - id: str - """Unique identifier for this query""" - from_user: User = Field(..., alias="from") - """Sender""" - chat_instance: str - """Global identifier, uniquely corresponding to the chat to which the message with the callback button was sent. Useful for high scores in :class:`aiogram.methods.games.Games`.""" - message: Optional[Union[Message, InaccessibleMessage]] = None - """*Optional*. Message sent by the bot with the callback button that originated the query""" - inline_message_id: Optional[str] = None - """*Optional*. Identifier of the message sent via the bot in inline mode, that originated the query.""" - data: Optional[str] = None - """*Optional*. Data associated with the callback button. Be aware that the message originated the query can contain no callback buttons with this data.""" - game_short_name: Optional[str] = None - """*Optional*. Short name of a `Game `_ to be returned, serves as the unique identifier for the game""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - id: str, - from_user: User, - chat_instance: str, - message: Optional[Union[Message, InaccessibleMessage]] = None, - inline_message_id: Optional[str] = None, - data: Optional[str] = None, - game_short_name: Optional[str] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - id=id, - from_user=from_user, - chat_instance=chat_instance, - message=message, - inline_message_id=inline_message_id, - data=data, - game_short_name=game_short_name, - **__pydantic_kwargs, - ) - - def answer( - self, - text: Optional[str] = None, - show_alert: Optional[bool] = None, - url: Optional[str] = None, - cache_time: Optional[int] = None, - **kwargs: Any, - ) -> AnswerCallbackQuery: - """ - Shortcut for method :class:`aiogram.methods.answer_callback_query.AnswerCallbackQuery` - will automatically fill method attributes: - - - :code:`callback_query_id` - - Use this method to send answers to callback queries sent from `inline keyboards `_. The answer will be displayed to the user as a notification at the top of the chat screen or as an alert. On success, :code:`True` is returned. - - Alternatively, the user can be redirected to the specified Game URL. For this option to work, you must first create a game for your bot via `@BotFather `_ and accept the terms. Otherwise, you may use links like :code:`t.me/your_bot?start=XXXX` that open your bot with a parameter. - - Source: https://core.telegram.org/bots/api#answercallbackquery - - :param text: Text of the notification. If not specified, nothing will be shown to the user, 0-200 characters - :param show_alert: If :code:`True`, an alert will be shown by the client instead of a notification at the top of the chat screen. Defaults to *false*. - :param url: URL that will be opened by the user's client. If you have created a :class:`aiogram.types.game.Game` and accepted the conditions via `@BotFather `_, specify the URL that opens your game - note that this will only work if the query comes from a `https://core.telegram.org/bots/api#inlinekeyboardbutton `_ *callback_game* button. - :param cache_time: The maximum amount of time in seconds that the result of the callback query may be cached client-side. Telegram apps will support caching starting in version 3.14. Defaults to 0. - :return: instance of method :class:`aiogram.methods.answer_callback_query.AnswerCallbackQuery` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import AnswerCallbackQuery - - return AnswerCallbackQuery( - callback_query_id=self.id, - text=text, - show_alert=show_alert, - url=url, - cache_time=cache_time, - **kwargs, - ).as_(self._bot) diff --git a/env/Lib/site-packages/aiogram/types/chat.py b/env/Lib/site-packages/aiogram/types/chat.py deleted file mode 100644 index c4feba4..0000000 --- a/env/Lib/site-packages/aiogram/types/chat.py +++ /dev/null @@ -1,1320 +0,0 @@ -from __future__ import annotations - -import datetime -from typing import TYPE_CHECKING, Any, List, Optional, Union - -from pydantic import Field - -from .base import TelegramObject -from .custom import DateTime - -if TYPE_CHECKING: - from ..methods import ( - BanChatMember, - BanChatSenderChat, - CreateChatInviteLink, - DeleteChatPhoto, - DeleteChatStickerSet, - DeleteMessage, - EditChatInviteLink, - ExportChatInviteLink, - GetChatAdministrators, - GetChatMember, - GetChatMemberCount, - LeaveChat, - PinChatMessage, - PromoteChatMember, - RestrictChatMember, - RevokeChatInviteLink, - SendChatAction, - SetChatAdministratorCustomTitle, - SetChatDescription, - SetChatPermissions, - SetChatPhoto, - SetChatStickerSet, - SetChatTitle, - UnbanChatMember, - UnbanChatSenderChat, - UnpinAllChatMessages, - UnpinAllGeneralForumTopicMessages, - UnpinChatMessage, - ) - from .birthdate import Birthdate - from .business_intro import BusinessIntro - from .business_location import BusinessLocation - from .business_opening_hours import BusinessOpeningHours - from .chat_location import ChatLocation - from .chat_permissions import ChatPermissions - from .chat_photo import ChatPhoto - from .input_file import InputFile - from .message import Message - from .reaction_type_custom_emoji import ReactionTypeCustomEmoji - from .reaction_type_emoji import ReactionTypeEmoji - from .reaction_type_paid import ReactionTypePaid - - -class Chat(TelegramObject): - """ - This object represents a chat. - - Source: https://core.telegram.org/bots/api#chat - """ - - id: int - """Unique identifier for this chat. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier.""" - type: str - """Type of the chat, can be either 'private', 'group', 'supergroup' or 'channel'""" - title: Optional[str] = None - """*Optional*. Title, for supergroups, channels and group chats""" - username: Optional[str] = None - """*Optional*. Username, for private chats, supergroups and channels if available""" - first_name: Optional[str] = None - """*Optional*. First name of the other party in a private chat""" - last_name: Optional[str] = None - """*Optional*. Last name of the other party in a private chat""" - is_forum: Optional[bool] = None - """*Optional*. :code:`True`, if the supergroup chat is a forum (has `topics `_ enabled)""" - accent_color_id: Optional[int] = Field(None, json_schema_extra={"deprecated": True}) - """*Optional*. Identifier of the accent color for the chat name and backgrounds of the chat photo, reply header, and link preview. See `accent colors `_ for more details. Returned only in :class:`aiogram.methods.get_chat.GetChat`. Always returned in :class:`aiogram.methods.get_chat.GetChat`. - -.. deprecated:: API:7.3 - https://core.telegram.org/bots/api-changelog#may-6-2024""" - active_usernames: Optional[List[str]] = Field(None, json_schema_extra={"deprecated": True}) - """*Optional*. If non-empty, the list of all `active chat usernames `_; for private chats, supergroups and channels. Returned only in :class:`aiogram.methods.get_chat.GetChat`. - -.. deprecated:: API:7.3 - https://core.telegram.org/bots/api-changelog#may-6-2024""" - available_reactions: Optional[ - List[Union[ReactionTypeEmoji, ReactionTypeCustomEmoji, ReactionTypePaid]] - ] = Field(None, json_schema_extra={"deprecated": True}) - """*Optional*. List of available reactions allowed in the chat. If omitted, then all `emoji reactions `_ are allowed. Returned only in :class:`aiogram.methods.get_chat.GetChat`. - -.. deprecated:: API:7.3 - https://core.telegram.org/bots/api-changelog#may-6-2024""" - background_custom_emoji_id: Optional[str] = Field(None, json_schema_extra={"deprecated": True}) - """*Optional*. Custom emoji identifier of emoji chosen by the chat for the reply header and link preview background. Returned only in :class:`aiogram.methods.get_chat.GetChat`. - -.. deprecated:: API:7.3 - https://core.telegram.org/bots/api-changelog#may-6-2024""" - bio: Optional[str] = Field(None, json_schema_extra={"deprecated": True}) - """*Optional*. Bio of the other party in a private chat. Returned only in :class:`aiogram.methods.get_chat.GetChat`. - -.. deprecated:: API:7.3 - https://core.telegram.org/bots/api-changelog#may-6-2024""" - birthdate: Optional[Birthdate] = Field(None, json_schema_extra={"deprecated": True}) - """*Optional*. For private chats, the date of birth of the user. Returned only in :class:`aiogram.methods.get_chat.GetChat`. - -.. deprecated:: API:7.3 - https://core.telegram.org/bots/api-changelog#may-6-2024""" - business_intro: Optional[BusinessIntro] = Field(None, json_schema_extra={"deprecated": True}) - """*Optional*. For private chats with business accounts, the intro of the business. Returned only in :class:`aiogram.methods.get_chat.GetChat`. - -.. deprecated:: API:7.3 - https://core.telegram.org/bots/api-changelog#may-6-2024""" - business_location: Optional[BusinessLocation] = Field( - None, json_schema_extra={"deprecated": True} - ) - """*Optional*. For private chats with business accounts, the location of the business. Returned only in :class:`aiogram.methods.get_chat.GetChat`. - -.. deprecated:: API:7.3 - https://core.telegram.org/bots/api-changelog#may-6-2024""" - business_opening_hours: Optional[BusinessOpeningHours] = Field( - None, json_schema_extra={"deprecated": True} - ) - """*Optional*. For private chats with business accounts, the opening hours of the business. Returned only in :class:`aiogram.methods.get_chat.GetChat`. - -.. deprecated:: API:7.3 - https://core.telegram.org/bots/api-changelog#may-6-2024""" - can_set_sticker_set: Optional[bool] = Field(None, json_schema_extra={"deprecated": True}) - """*Optional*. :code:`True`, if the bot can change the group sticker set. Returned only in :class:`aiogram.methods.get_chat.GetChat`. - -.. deprecated:: API:7.3 - https://core.telegram.org/bots/api-changelog#may-6-2024""" - custom_emoji_sticker_set_name: Optional[str] = Field( - None, json_schema_extra={"deprecated": True} - ) - """*Optional*. For supergroups, the name of the group's custom emoji sticker set. Custom emoji from this set can be used by all users and bots in the group. Returned only in :class:`aiogram.methods.get_chat.GetChat`. - -.. deprecated:: API:7.3 - https://core.telegram.org/bots/api-changelog#may-6-2024""" - description: Optional[str] = Field(None, json_schema_extra={"deprecated": True}) - """*Optional*. Description, for groups, supergroups and channel chats. Returned only in :class:`aiogram.methods.get_chat.GetChat`. - -.. deprecated:: API:7.3 - https://core.telegram.org/bots/api-changelog#may-6-2024""" - emoji_status_custom_emoji_id: Optional[str] = Field( - None, json_schema_extra={"deprecated": True} - ) - """*Optional*. Custom emoji identifier of the emoji status of the chat or the other party in a private chat. Returned only in :class:`aiogram.methods.get_chat.GetChat`. - -.. deprecated:: API:7.3 - https://core.telegram.org/bots/api-changelog#may-6-2024""" - emoji_status_expiration_date: Optional[DateTime] = Field( - None, json_schema_extra={"deprecated": True} - ) - """*Optional*. Expiration date of the emoji status of the chat or the other party in a private chat, in Unix time, if any. Returned only in :class:`aiogram.methods.get_chat.GetChat`. - -.. deprecated:: API:7.3 - https://core.telegram.org/bots/api-changelog#may-6-2024""" - has_aggressive_anti_spam_enabled: Optional[bool] = Field( - None, json_schema_extra={"deprecated": True} - ) - """*Optional*. :code:`True`, if aggressive anti-spam checks are enabled in the supergroup. The field is only available to chat administrators. Returned only in :class:`aiogram.methods.get_chat.GetChat`. - -.. deprecated:: API:7.3 - https://core.telegram.org/bots/api-changelog#may-6-2024""" - has_hidden_members: Optional[bool] = Field(None, json_schema_extra={"deprecated": True}) - """*Optional*. :code:`True`, if non-administrators can only get the list of bots and administrators in the chat. Returned only in :class:`aiogram.methods.get_chat.GetChat`. - -.. deprecated:: API:7.3 - https://core.telegram.org/bots/api-changelog#may-6-2024""" - has_private_forwards: Optional[bool] = Field(None, json_schema_extra={"deprecated": True}) - """*Optional*. :code:`True`, if privacy settings of the other party in the private chat allows to use :code:`tg://user?id=` links only in chats with the user. Returned only in :class:`aiogram.methods.get_chat.GetChat`. - -.. deprecated:: API:7.3 - https://core.telegram.org/bots/api-changelog#may-6-2024""" - has_protected_content: Optional[bool] = Field(None, json_schema_extra={"deprecated": True}) - """*Optional*. :code:`True`, if messages from the chat can't be forwarded to other chats. Returned only in :class:`aiogram.methods.get_chat.GetChat`. - -.. deprecated:: API:7.3 - https://core.telegram.org/bots/api-changelog#may-6-2024""" - has_restricted_voice_and_video_messages: Optional[bool] = Field( - None, json_schema_extra={"deprecated": True} - ) - """*Optional*. :code:`True`, if the privacy settings of the other party restrict sending voice and video note messages in the private chat. Returned only in :class:`aiogram.methods.get_chat.GetChat`. - -.. deprecated:: API:7.3 - https://core.telegram.org/bots/api-changelog#may-6-2024""" - has_visible_history: Optional[bool] = Field(None, json_schema_extra={"deprecated": True}) - """*Optional*. :code:`True`, if new chat members will have access to old messages; available only to chat administrators. Returned only in :class:`aiogram.methods.get_chat.GetChat`. - -.. deprecated:: API:7.3 - https://core.telegram.org/bots/api-changelog#may-6-2024""" - invite_link: Optional[str] = Field(None, json_schema_extra={"deprecated": True}) - """*Optional*. Primary invite link, for groups, supergroups and channel chats. Returned only in :class:`aiogram.methods.get_chat.GetChat`. - -.. deprecated:: API:7.3 - https://core.telegram.org/bots/api-changelog#may-6-2024""" - join_by_request: Optional[bool] = Field(None, json_schema_extra={"deprecated": True}) - """*Optional*. :code:`True`, if all users directly joining the supergroup need to be approved by supergroup administrators. Returned only in :class:`aiogram.methods.get_chat.GetChat`. - -.. deprecated:: API:7.3 - https://core.telegram.org/bots/api-changelog#may-6-2024""" - join_to_send_messages: Optional[bool] = Field(None, json_schema_extra={"deprecated": True}) - """*Optional*. :code:`True`, if users need to join the supergroup before they can send messages. Returned only in :class:`aiogram.methods.get_chat.GetChat`. - -.. deprecated:: API:7.3 - https://core.telegram.org/bots/api-changelog#may-6-2024""" - linked_chat_id: Optional[int] = Field(None, json_schema_extra={"deprecated": True}) - """*Optional*. Unique identifier for the linked chat, i.e. the discussion group identifier for a channel and vice versa; for supergroups and channel chats. This identifier may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier. Returned only in :class:`aiogram.methods.get_chat.GetChat`. - -.. deprecated:: API:7.3 - https://core.telegram.org/bots/api-changelog#may-6-2024""" - location: Optional[ChatLocation] = Field(None, json_schema_extra={"deprecated": True}) - """*Optional*. For supergroups, the location to which the supergroup is connected. Returned only in :class:`aiogram.methods.get_chat.GetChat`. - -.. deprecated:: API:7.3 - https://core.telegram.org/bots/api-changelog#may-6-2024""" - message_auto_delete_time: Optional[int] = Field(None, json_schema_extra={"deprecated": True}) - """*Optional*. The time after which all messages sent to the chat will be automatically deleted; in seconds. Returned only in :class:`aiogram.methods.get_chat.GetChat`. - -.. deprecated:: API:7.3 - https://core.telegram.org/bots/api-changelog#may-6-2024""" - permissions: Optional[ChatPermissions] = Field(None, json_schema_extra={"deprecated": True}) - """*Optional*. Default chat member permissions, for groups and supergroups. Returned only in :class:`aiogram.methods.get_chat.GetChat`. - -.. deprecated:: API:7.3 - https://core.telegram.org/bots/api-changelog#may-6-2024""" - personal_chat: Optional[Chat] = Field(None, json_schema_extra={"deprecated": True}) - """*Optional*. For private chats, the personal channel of the user. Returned only in :class:`aiogram.methods.get_chat.GetChat`. - -.. deprecated:: API:7.3 - https://core.telegram.org/bots/api-changelog#may-6-2024""" - photo: Optional[ChatPhoto] = Field(None, json_schema_extra={"deprecated": True}) - """*Optional*. Chat photo. Returned only in :class:`aiogram.methods.get_chat.GetChat`. - -.. deprecated:: API:7.3 - https://core.telegram.org/bots/api-changelog#may-6-2024""" - pinned_message: Optional[Message] = Field(None, json_schema_extra={"deprecated": True}) - """*Optional*. The most recent pinned message (by sending date). Returned only in :class:`aiogram.methods.get_chat.GetChat`. - -.. deprecated:: API:7.3 - https://core.telegram.org/bots/api-changelog#may-6-2024""" - profile_accent_color_id: Optional[int] = Field(None, json_schema_extra={"deprecated": True}) - """*Optional*. Identifier of the accent color for the chat's profile background. See `profile accent colors `_ for more details. Returned only in :class:`aiogram.methods.get_chat.GetChat`. - -.. deprecated:: API:7.3 - https://core.telegram.org/bots/api-changelog#may-6-2024""" - profile_background_custom_emoji_id: Optional[str] = Field( - None, json_schema_extra={"deprecated": True} - ) - """*Optional*. Custom emoji identifier of the emoji chosen by the chat for its profile background. Returned only in :class:`aiogram.methods.get_chat.GetChat`. - -.. deprecated:: API:7.3 - https://core.telegram.org/bots/api-changelog#may-6-2024""" - slow_mode_delay: Optional[int] = Field(None, json_schema_extra={"deprecated": True}) - """*Optional*. For supergroups, the minimum allowed delay between consecutive messages sent by each unprivileged user; in seconds. Returned only in :class:`aiogram.methods.get_chat.GetChat`. - -.. deprecated:: API:7.3 - https://core.telegram.org/bots/api-changelog#may-6-2024""" - sticker_set_name: Optional[str] = Field(None, json_schema_extra={"deprecated": True}) - """*Optional*. For supergroups, name of group sticker set. Returned only in :class:`aiogram.methods.get_chat.GetChat`. - -.. deprecated:: API:7.3 - https://core.telegram.org/bots/api-changelog#may-6-2024""" - unrestrict_boost_count: Optional[int] = Field(None, json_schema_extra={"deprecated": True}) - """*Optional*. For supergroups, the minimum number of boosts that a non-administrator user needs to add in order to ignore slow mode and chat permissions. Returned only in :class:`aiogram.methods.get_chat.GetChat`. - -.. deprecated:: API:7.3 - https://core.telegram.org/bots/api-changelog#may-6-2024""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - id: int, - type: str, - title: Optional[str] = None, - username: Optional[str] = None, - first_name: Optional[str] = None, - last_name: Optional[str] = None, - is_forum: Optional[bool] = None, - accent_color_id: Optional[int] = None, - active_usernames: Optional[List[str]] = None, - available_reactions: Optional[ - List[Union[ReactionTypeEmoji, ReactionTypeCustomEmoji, ReactionTypePaid]] - ] = None, - background_custom_emoji_id: Optional[str] = None, - bio: Optional[str] = None, - birthdate: Optional[Birthdate] = None, - business_intro: Optional[BusinessIntro] = None, - business_location: Optional[BusinessLocation] = None, - business_opening_hours: Optional[BusinessOpeningHours] = None, - can_set_sticker_set: Optional[bool] = None, - custom_emoji_sticker_set_name: Optional[str] = None, - description: Optional[str] = None, - emoji_status_custom_emoji_id: Optional[str] = None, - emoji_status_expiration_date: Optional[DateTime] = None, - has_aggressive_anti_spam_enabled: Optional[bool] = None, - has_hidden_members: Optional[bool] = None, - has_private_forwards: Optional[bool] = None, - has_protected_content: Optional[bool] = None, - has_restricted_voice_and_video_messages: Optional[bool] = None, - has_visible_history: Optional[bool] = None, - invite_link: Optional[str] = None, - join_by_request: Optional[bool] = None, - join_to_send_messages: Optional[bool] = None, - linked_chat_id: Optional[int] = None, - location: Optional[ChatLocation] = None, - message_auto_delete_time: Optional[int] = None, - permissions: Optional[ChatPermissions] = None, - personal_chat: Optional[Chat] = None, - photo: Optional[ChatPhoto] = None, - pinned_message: Optional[Message] = None, - profile_accent_color_id: Optional[int] = None, - profile_background_custom_emoji_id: Optional[str] = None, - slow_mode_delay: Optional[int] = None, - sticker_set_name: Optional[str] = None, - unrestrict_boost_count: Optional[int] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - id=id, - type=type, - title=title, - username=username, - first_name=first_name, - last_name=last_name, - is_forum=is_forum, - accent_color_id=accent_color_id, - active_usernames=active_usernames, - available_reactions=available_reactions, - background_custom_emoji_id=background_custom_emoji_id, - bio=bio, - birthdate=birthdate, - business_intro=business_intro, - business_location=business_location, - business_opening_hours=business_opening_hours, - can_set_sticker_set=can_set_sticker_set, - custom_emoji_sticker_set_name=custom_emoji_sticker_set_name, - description=description, - emoji_status_custom_emoji_id=emoji_status_custom_emoji_id, - emoji_status_expiration_date=emoji_status_expiration_date, - has_aggressive_anti_spam_enabled=has_aggressive_anti_spam_enabled, - has_hidden_members=has_hidden_members, - has_private_forwards=has_private_forwards, - has_protected_content=has_protected_content, - has_restricted_voice_and_video_messages=has_restricted_voice_and_video_messages, - has_visible_history=has_visible_history, - invite_link=invite_link, - join_by_request=join_by_request, - join_to_send_messages=join_to_send_messages, - linked_chat_id=linked_chat_id, - location=location, - message_auto_delete_time=message_auto_delete_time, - permissions=permissions, - personal_chat=personal_chat, - photo=photo, - pinned_message=pinned_message, - profile_accent_color_id=profile_accent_color_id, - profile_background_custom_emoji_id=profile_background_custom_emoji_id, - slow_mode_delay=slow_mode_delay, - sticker_set_name=sticker_set_name, - unrestrict_boost_count=unrestrict_boost_count, - **__pydantic_kwargs, - ) - - @property - def shifted_id(self) -> int: - """ - Returns shifted chat ID (positive and without "-100" prefix). - Mostly used for private links like t.me/c/chat_id/message_id - - Currently supergroup/channel IDs have 10-digit ID after "-100" prefix removed. - However, these IDs might become 11-digit in future. So, first we remove "-100" - prefix and count remaining number length. Then we multiple - -1 * 10 ^ (number_length + 2) - Finally, self.id is substracted from that number - """ - short_id = str(self.id).replace("-100", "") - shift = int(-1 * pow(10, len(short_id) + 2)) - return shift - self.id - - @property - def full_name(self) -> str: - """Get full name of the Chat. - - For private chat it is first_name + last_name. - For other chat types it is title. - """ - if self.title is not None: - return self.title - - if self.last_name is not None: - return f"{self.first_name} {self.last_name}" - - return f"{self.first_name}" - - def ban_sender_chat( - self, - sender_chat_id: int, - **kwargs: Any, - ) -> BanChatSenderChat: - """ - Shortcut for method :class:`aiogram.methods.ban_chat_sender_chat.BanChatSenderChat` - will automatically fill method attributes: - - - :code:`chat_id` - - Use this method to ban a channel chat in a supergroup or a channel. Until the chat is `unbanned `_, the owner of the banned chat won't be able to send messages on behalf of **any of their channels**. The bot must be an administrator in the supergroup or channel for this to work and must have the appropriate administrator rights. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#banchatsenderchat - - :param sender_chat_id: Unique identifier of the target sender chat - :return: instance of method :class:`aiogram.methods.ban_chat_sender_chat.BanChatSenderChat` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import BanChatSenderChat - - return BanChatSenderChat( - chat_id=self.id, - sender_chat_id=sender_chat_id, - **kwargs, - ).as_(self._bot) - - def unban_sender_chat( - self, - sender_chat_id: int, - **kwargs: Any, - ) -> UnbanChatSenderChat: - """ - Shortcut for method :class:`aiogram.methods.unban_chat_sender_chat.UnbanChatSenderChat` - will automatically fill method attributes: - - - :code:`chat_id` - - Use this method to unban a previously banned channel chat in a supergroup or channel. The bot must be an administrator for this to work and must have the appropriate administrator rights. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#unbanchatsenderchat - - :param sender_chat_id: Unique identifier of the target sender chat - :return: instance of method :class:`aiogram.methods.unban_chat_sender_chat.UnbanChatSenderChat` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import UnbanChatSenderChat - - return UnbanChatSenderChat( - chat_id=self.id, - sender_chat_id=sender_chat_id, - **kwargs, - ).as_(self._bot) - - def get_administrators( - self, - **kwargs: Any, - ) -> GetChatAdministrators: - """ - Shortcut for method :class:`aiogram.methods.get_chat_administrators.GetChatAdministrators` - will automatically fill method attributes: - - - :code:`chat_id` - - Use this method to get a list of administrators in a chat, which aren't bots. Returns an Array of :class:`aiogram.types.chat_member.ChatMember` objects. - - Source: https://core.telegram.org/bots/api#getchatadministrators - - :return: instance of method :class:`aiogram.methods.get_chat_administrators.GetChatAdministrators` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import GetChatAdministrators - - return GetChatAdministrators( - chat_id=self.id, - **kwargs, - ).as_(self._bot) - - def delete_message( - self, - message_id: int, - **kwargs: Any, - ) -> DeleteMessage: - """ - Shortcut for method :class:`aiogram.methods.delete_message.DeleteMessage` - will automatically fill method attributes: - - - :code:`chat_id` - - Use this method to delete a message, including service messages, with the following limitations: - - - A message can only be deleted if it was sent less than 48 hours ago. - - - Service messages about a supergroup, channel, or forum topic creation can't be deleted. - - - A dice message in a private chat can only be deleted if it was sent more than 24 hours ago. - - - Bots can delete outgoing messages in private chats, groups, and supergroups. - - - Bots can delete incoming messages in private chats. - - - Bots granted *can_post_messages* permissions can delete outgoing messages in channels. - - - If the bot is an administrator of a group, it can delete any message there. - - - If the bot has *can_delete_messages* permission in a supergroup or a channel, it can delete any message there. - - Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#deletemessage - - :param message_id: Identifier of the message to delete - :return: instance of method :class:`aiogram.methods.delete_message.DeleteMessage` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import DeleteMessage - - return DeleteMessage( - chat_id=self.id, - message_id=message_id, - **kwargs, - ).as_(self._bot) - - def revoke_invite_link( - self, - invite_link: str, - **kwargs: Any, - ) -> RevokeChatInviteLink: - """ - Shortcut for method :class:`aiogram.methods.revoke_chat_invite_link.RevokeChatInviteLink` - will automatically fill method attributes: - - - :code:`chat_id` - - Use this method to revoke an invite link created by the bot. If the primary link is revoked, a new link is automatically generated. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the revoked invite link as :class:`aiogram.types.chat_invite_link.ChatInviteLink` object. - - Source: https://core.telegram.org/bots/api#revokechatinvitelink - - :param invite_link: The invite link to revoke - :return: instance of method :class:`aiogram.methods.revoke_chat_invite_link.RevokeChatInviteLink` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import RevokeChatInviteLink - - return RevokeChatInviteLink( - chat_id=self.id, - invite_link=invite_link, - **kwargs, - ).as_(self._bot) - - def edit_invite_link( - self, - invite_link: str, - name: Optional[str] = None, - expire_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None, - member_limit: Optional[int] = None, - creates_join_request: Optional[bool] = None, - **kwargs: Any, - ) -> EditChatInviteLink: - """ - Shortcut for method :class:`aiogram.methods.edit_chat_invite_link.EditChatInviteLink` - will automatically fill method attributes: - - - :code:`chat_id` - - Use this method to edit a non-primary invite link created by the bot. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the edited invite link as a :class:`aiogram.types.chat_invite_link.ChatInviteLink` object. - - Source: https://core.telegram.org/bots/api#editchatinvitelink - - :param invite_link: The invite link to edit - :param name: Invite link name; 0-32 characters - :param expire_date: Point in time (Unix timestamp) when the link will expire - :param member_limit: The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999 - :param creates_join_request: :code:`True`, if users joining the chat via the link need to be approved by chat administrators. If :code:`True`, *member_limit* can't be specified - :return: instance of method :class:`aiogram.methods.edit_chat_invite_link.EditChatInviteLink` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import EditChatInviteLink - - return EditChatInviteLink( - chat_id=self.id, - invite_link=invite_link, - name=name, - expire_date=expire_date, - member_limit=member_limit, - creates_join_request=creates_join_request, - **kwargs, - ).as_(self._bot) - - def create_invite_link( - self, - name: Optional[str] = None, - expire_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None, - member_limit: Optional[int] = None, - creates_join_request: Optional[bool] = None, - **kwargs: Any, - ) -> CreateChatInviteLink: - """ - Shortcut for method :class:`aiogram.methods.create_chat_invite_link.CreateChatInviteLink` - will automatically fill method attributes: - - - :code:`chat_id` - - Use this method to create an additional invite link for a chat. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. The link can be revoked using the method :class:`aiogram.methods.revoke_chat_invite_link.RevokeChatInviteLink`. Returns the new invite link as :class:`aiogram.types.chat_invite_link.ChatInviteLink` object. - - Source: https://core.telegram.org/bots/api#createchatinvitelink - - :param name: Invite link name; 0-32 characters - :param expire_date: Point in time (Unix timestamp) when the link will expire - :param member_limit: The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999 - :param creates_join_request: :code:`True`, if users joining the chat via the link need to be approved by chat administrators. If :code:`True`, *member_limit* can't be specified - :return: instance of method :class:`aiogram.methods.create_chat_invite_link.CreateChatInviteLink` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import CreateChatInviteLink - - return CreateChatInviteLink( - chat_id=self.id, - name=name, - expire_date=expire_date, - member_limit=member_limit, - creates_join_request=creates_join_request, - **kwargs, - ).as_(self._bot) - - def export_invite_link( - self, - **kwargs: Any, - ) -> ExportChatInviteLink: - """ - Shortcut for method :class:`aiogram.methods.export_chat_invite_link.ExportChatInviteLink` - will automatically fill method attributes: - - - :code:`chat_id` - - Use this method to generate a new primary invite link for a chat; any previously generated primary link is revoked. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the new invite link as *String* on success. - - Note: Each administrator in a chat generates their own invite links. Bots can't use invite links generated by other administrators. If you want your bot to work with invite links, it will need to generate its own link using :class:`aiogram.methods.export_chat_invite_link.ExportChatInviteLink` or by calling the :class:`aiogram.methods.get_chat.GetChat` method. If your bot needs to generate a new primary invite link replacing its previous one, use :class:`aiogram.methods.export_chat_invite_link.ExportChatInviteLink` again. - - Source: https://core.telegram.org/bots/api#exportchatinvitelink - - :return: instance of method :class:`aiogram.methods.export_chat_invite_link.ExportChatInviteLink` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import ExportChatInviteLink - - return ExportChatInviteLink( - chat_id=self.id, - **kwargs, - ).as_(self._bot) - - def do( - self, - action: str, - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - **kwargs: Any, - ) -> SendChatAction: - """ - Shortcut for method :class:`aiogram.methods.send_chat_action.SendChatAction` - will automatically fill method attributes: - - - :code:`chat_id` - - Use this method when you need to tell the user that something is happening on the bot's side. The status is set for 5 seconds or less (when a message arrives from your bot, Telegram clients clear its typing status). Returns :code:`True` on success. - - Example: The `ImageBot `_ needs some time to process a request and upload the image. Instead of sending a text message along the lines of 'Retrieving image, please wait…', the bot may use :class:`aiogram.methods.send_chat_action.SendChatAction` with *action* = *upload_photo*. The user will see a 'sending photo' status for the bot. - - We only recommend using this method when a response from the bot will take a **noticeable** amount of time to arrive. - - Source: https://core.telegram.org/bots/api#sendchataction - - :param action: Type of action to broadcast. Choose one, depending on what the user is about to receive: *typing* for `text messages `_, *upload_photo* for `photos `_, *record_video* or *upload_video* for `videos `_, *record_voice* or *upload_voice* for `voice notes `_, *upload_document* for `general files `_, *choose_sticker* for `stickers `_, *find_location* for `location data `_, *record_video_note* or *upload_video_note* for `video notes `_. - :param business_connection_id: Unique identifier of the business connection on behalf of which the action will be sent - :param message_thread_id: Unique identifier for the target message thread; for supergroups only - :return: instance of method :class:`aiogram.methods.send_chat_action.SendChatAction` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import SendChatAction - - return SendChatAction( - chat_id=self.id, - action=action, - business_connection_id=business_connection_id, - message_thread_id=message_thread_id, - **kwargs, - ).as_(self._bot) - - def delete_sticker_set( - self, - **kwargs: Any, - ) -> DeleteChatStickerSet: - """ - Shortcut for method :class:`aiogram.methods.delete_chat_sticker_set.DeleteChatStickerSet` - will automatically fill method attributes: - - - :code:`chat_id` - - Use this method to delete a group sticker set from a supergroup. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Use the field *can_set_sticker_set* optionally returned in :class:`aiogram.methods.get_chat.GetChat` requests to check if the bot can use this method. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#deletechatstickerset - - :return: instance of method :class:`aiogram.methods.delete_chat_sticker_set.DeleteChatStickerSet` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import DeleteChatStickerSet - - return DeleteChatStickerSet( - chat_id=self.id, - **kwargs, - ).as_(self._bot) - - def set_sticker_set( - self, - sticker_set_name: str, - **kwargs: Any, - ) -> SetChatStickerSet: - """ - Shortcut for method :class:`aiogram.methods.set_chat_sticker_set.SetChatStickerSet` - will automatically fill method attributes: - - - :code:`chat_id` - - Use this method to set a new group sticker set for a supergroup. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Use the field *can_set_sticker_set* optionally returned in :class:`aiogram.methods.get_chat.GetChat` requests to check if the bot can use this method. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#setchatstickerset - - :param sticker_set_name: Name of the sticker set to be set as the group sticker set - :return: instance of method :class:`aiogram.methods.set_chat_sticker_set.SetChatStickerSet` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import SetChatStickerSet - - return SetChatStickerSet( - chat_id=self.id, - sticker_set_name=sticker_set_name, - **kwargs, - ).as_(self._bot) - - def get_member( - self, - user_id: int, - **kwargs: Any, - ) -> GetChatMember: - """ - Shortcut for method :class:`aiogram.methods.get_chat_member.GetChatMember` - will automatically fill method attributes: - - - :code:`chat_id` - - Use this method to get information about a member of a chat. The method is only guaranteed to work for other users if the bot is an administrator in the chat. Returns a :class:`aiogram.types.chat_member.ChatMember` object on success. - - Source: https://core.telegram.org/bots/api#getchatmember - - :param user_id: Unique identifier of the target user - :return: instance of method :class:`aiogram.methods.get_chat_member.GetChatMember` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import GetChatMember - - return GetChatMember( - chat_id=self.id, - user_id=user_id, - **kwargs, - ).as_(self._bot) - - def get_member_count( - self, - **kwargs: Any, - ) -> GetChatMemberCount: - """ - Shortcut for method :class:`aiogram.methods.get_chat_member_count.GetChatMemberCount` - will automatically fill method attributes: - - - :code:`chat_id` - - Use this method to get the number of members in a chat. Returns *Int* on success. - - Source: https://core.telegram.org/bots/api#getchatmembercount - - :return: instance of method :class:`aiogram.methods.get_chat_member_count.GetChatMemberCount` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import GetChatMemberCount - - return GetChatMemberCount( - chat_id=self.id, - **kwargs, - ).as_(self._bot) - - def leave( - self, - **kwargs: Any, - ) -> LeaveChat: - """ - Shortcut for method :class:`aiogram.methods.leave_chat.LeaveChat` - will automatically fill method attributes: - - - :code:`chat_id` - - Use this method for your bot to leave a group, supergroup or channel. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#leavechat - - :return: instance of method :class:`aiogram.methods.leave_chat.LeaveChat` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import LeaveChat - - return LeaveChat( - chat_id=self.id, - **kwargs, - ).as_(self._bot) - - def unpin_all_messages( - self, - **kwargs: Any, - ) -> UnpinAllChatMessages: - """ - Shortcut for method :class:`aiogram.methods.unpin_all_chat_messages.UnpinAllChatMessages` - will automatically fill method attributes: - - - :code:`chat_id` - - Use this method to clear the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#unpinallchatmessages - - :return: instance of method :class:`aiogram.methods.unpin_all_chat_messages.UnpinAllChatMessages` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import UnpinAllChatMessages - - return UnpinAllChatMessages( - chat_id=self.id, - **kwargs, - ).as_(self._bot) - - def unpin_message( - self, - business_connection_id: Optional[str] = None, - message_id: Optional[int] = None, - **kwargs: Any, - ) -> UnpinChatMessage: - """ - Shortcut for method :class:`aiogram.methods.unpin_chat_message.UnpinChatMessage` - will automatically fill method attributes: - - - :code:`chat_id` - - Use this method to remove a message from the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#unpinchatmessage - - :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be unpinned - :param message_id: Identifier of the message to unpin. Required if *business_connection_id* is specified. If not specified, the most recent pinned message (by sending date) will be unpinned. - :return: instance of method :class:`aiogram.methods.unpin_chat_message.UnpinChatMessage` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import UnpinChatMessage - - return UnpinChatMessage( - chat_id=self.id, - business_connection_id=business_connection_id, - message_id=message_id, - **kwargs, - ).as_(self._bot) - - def pin_message( - self, - message_id: int, - business_connection_id: Optional[str] = None, - disable_notification: Optional[bool] = None, - **kwargs: Any, - ) -> PinChatMessage: - """ - Shortcut for method :class:`aiogram.methods.pin_chat_message.PinChatMessage` - will automatically fill method attributes: - - - :code:`chat_id` - - Use this method to add a message to the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#pinchatmessage - - :param message_id: Identifier of a message to pin - :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be pinned - :param disable_notification: Pass :code:`True` if it is not necessary to send a notification to all chat members about the new pinned message. Notifications are always disabled in channels and private chats. - :return: instance of method :class:`aiogram.methods.pin_chat_message.PinChatMessage` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import PinChatMessage - - return PinChatMessage( - chat_id=self.id, - message_id=message_id, - business_connection_id=business_connection_id, - disable_notification=disable_notification, - **kwargs, - ).as_(self._bot) - - def set_administrator_custom_title( - self, - user_id: int, - custom_title: str, - **kwargs: Any, - ) -> SetChatAdministratorCustomTitle: - """ - Shortcut for method :class:`aiogram.methods.set_chat_administrator_custom_title.SetChatAdministratorCustomTitle` - will automatically fill method attributes: - - - :code:`chat_id` - - Use this method to set a custom title for an administrator in a supergroup promoted by the bot. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#setchatadministratorcustomtitle - - :param user_id: Unique identifier of the target user - :param custom_title: New custom title for the administrator; 0-16 characters, emoji are not allowed - :return: instance of method :class:`aiogram.methods.set_chat_administrator_custom_title.SetChatAdministratorCustomTitle` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import SetChatAdministratorCustomTitle - - return SetChatAdministratorCustomTitle( - chat_id=self.id, - user_id=user_id, - custom_title=custom_title, - **kwargs, - ).as_(self._bot) - - def set_permissions( - self, - permissions: ChatPermissions, - use_independent_chat_permissions: Optional[bool] = None, - **kwargs: Any, - ) -> SetChatPermissions: - """ - Shortcut for method :class:`aiogram.methods.set_chat_permissions.SetChatPermissions` - will automatically fill method attributes: - - - :code:`chat_id` - - Use this method to set default chat permissions for all members. The bot must be an administrator in the group or a supergroup for this to work and must have the *can_restrict_members* administrator rights. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#setchatpermissions - - :param permissions: A JSON-serialized object for new default chat permissions - :param use_independent_chat_permissions: Pass :code:`True` if chat permissions are set independently. Otherwise, the *can_send_other_messages* and *can_add_web_page_previews* permissions will imply the *can_send_messages*, *can_send_audios*, *can_send_documents*, *can_send_photos*, *can_send_videos*, *can_send_video_notes*, and *can_send_voice_notes* permissions; the *can_send_polls* permission will imply the *can_send_messages* permission. - :return: instance of method :class:`aiogram.methods.set_chat_permissions.SetChatPermissions` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import SetChatPermissions - - return SetChatPermissions( - chat_id=self.id, - permissions=permissions, - use_independent_chat_permissions=use_independent_chat_permissions, - **kwargs, - ).as_(self._bot) - - def promote( - self, - user_id: int, - is_anonymous: Optional[bool] = None, - can_manage_chat: Optional[bool] = None, - can_delete_messages: Optional[bool] = None, - can_manage_video_chats: Optional[bool] = None, - can_restrict_members: Optional[bool] = None, - can_promote_members: Optional[bool] = None, - can_change_info: Optional[bool] = None, - can_invite_users: Optional[bool] = None, - can_post_stories: Optional[bool] = None, - can_edit_stories: Optional[bool] = None, - can_delete_stories: Optional[bool] = None, - can_post_messages: Optional[bool] = None, - can_edit_messages: Optional[bool] = None, - can_pin_messages: Optional[bool] = None, - can_manage_topics: Optional[bool] = None, - **kwargs: Any, - ) -> PromoteChatMember: - """ - Shortcut for method :class:`aiogram.methods.promote_chat_member.PromoteChatMember` - will automatically fill method attributes: - - - :code:`chat_id` - - Use this method to promote or demote a user in a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Pass :code:`False` for all boolean parameters to demote a user. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#promotechatmember - - :param user_id: Unique identifier of the target user - :param is_anonymous: Pass :code:`True` if the administrator's presence in the chat is hidden - :param can_manage_chat: Pass :code:`True` if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages and ignore slow mode. Implied by any other administrator privilege. - :param can_delete_messages: Pass :code:`True` if the administrator can delete messages of other users - :param can_manage_video_chats: Pass :code:`True` if the administrator can manage video chats - :param can_restrict_members: Pass :code:`True` if the administrator can restrict, ban or unban chat members, or access supergroup statistics - :param can_promote_members: Pass :code:`True` if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have promoted, directly or indirectly (promoted by administrators that were appointed by him) - :param can_change_info: Pass :code:`True` if the administrator can change chat title, photo and other settings - :param can_invite_users: Pass :code:`True` if the administrator can invite new users to the chat - :param can_post_stories: Pass :code:`True` if the administrator can post stories to the chat - :param can_edit_stories: Pass :code:`True` if the administrator can edit stories posted by other users, post stories to the chat page, pin chat stories, and access the chat's story archive - :param can_delete_stories: Pass :code:`True` if the administrator can delete stories posted by other users - :param can_post_messages: Pass :code:`True` if the administrator can post messages in the channel, or access channel statistics; for channels only - :param can_edit_messages: Pass :code:`True` if the administrator can edit messages of other users and can pin messages; for channels only - :param can_pin_messages: Pass :code:`True` if the administrator can pin messages; for supergroups only - :param can_manage_topics: Pass :code:`True` if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only - :return: instance of method :class:`aiogram.methods.promote_chat_member.PromoteChatMember` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import PromoteChatMember - - return PromoteChatMember( - chat_id=self.id, - user_id=user_id, - is_anonymous=is_anonymous, - can_manage_chat=can_manage_chat, - can_delete_messages=can_delete_messages, - can_manage_video_chats=can_manage_video_chats, - can_restrict_members=can_restrict_members, - can_promote_members=can_promote_members, - can_change_info=can_change_info, - can_invite_users=can_invite_users, - can_post_stories=can_post_stories, - can_edit_stories=can_edit_stories, - can_delete_stories=can_delete_stories, - can_post_messages=can_post_messages, - can_edit_messages=can_edit_messages, - can_pin_messages=can_pin_messages, - can_manage_topics=can_manage_topics, - **kwargs, - ).as_(self._bot) - - def restrict( - self, - user_id: int, - permissions: ChatPermissions, - use_independent_chat_permissions: Optional[bool] = None, - until_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None, - **kwargs: Any, - ) -> RestrictChatMember: - """ - Shortcut for method :class:`aiogram.methods.restrict_chat_member.RestrictChatMember` - will automatically fill method attributes: - - - :code:`chat_id` - - Use this method to restrict a user in a supergroup. The bot must be an administrator in the supergroup for this to work and must have the appropriate administrator rights. Pass :code:`True` for all permissions to lift restrictions from a user. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#restrictchatmember - - :param user_id: Unique identifier of the target user - :param permissions: A JSON-serialized object for new user permissions - :param use_independent_chat_permissions: Pass :code:`True` if chat permissions are set independently. Otherwise, the *can_send_other_messages* and *can_add_web_page_previews* permissions will imply the *can_send_messages*, *can_send_audios*, *can_send_documents*, *can_send_photos*, *can_send_videos*, *can_send_video_notes*, and *can_send_voice_notes* permissions; the *can_send_polls* permission will imply the *can_send_messages* permission. - :param until_date: Date when restrictions will be lifted for the user; Unix time. If user is restricted for more than 366 days or less than 30 seconds from the current time, they are considered to be restricted forever - :return: instance of method :class:`aiogram.methods.restrict_chat_member.RestrictChatMember` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import RestrictChatMember - - return RestrictChatMember( - chat_id=self.id, - user_id=user_id, - permissions=permissions, - use_independent_chat_permissions=use_independent_chat_permissions, - until_date=until_date, - **kwargs, - ).as_(self._bot) - - def unban( - self, - user_id: int, - only_if_banned: Optional[bool] = None, - **kwargs: Any, - ) -> UnbanChatMember: - """ - Shortcut for method :class:`aiogram.methods.unban_chat_member.UnbanChatMember` - will automatically fill method attributes: - - - :code:`chat_id` - - Use this method to unban a previously banned user in a supergroup or channel. The user will **not** return to the group or channel automatically, but will be able to join via link, etc. The bot must be an administrator for this to work. By default, this method guarantees that after the call the user is not a member of the chat, but will be able to join it. So if the user is a member of the chat they will also be **removed** from the chat. If you don't want this, use the parameter *only_if_banned*. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#unbanchatmember - - :param user_id: Unique identifier of the target user - :param only_if_banned: Do nothing if the user is not banned - :return: instance of method :class:`aiogram.methods.unban_chat_member.UnbanChatMember` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import UnbanChatMember - - return UnbanChatMember( - chat_id=self.id, - user_id=user_id, - only_if_banned=only_if_banned, - **kwargs, - ).as_(self._bot) - - def ban( - self, - user_id: int, - until_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None, - revoke_messages: Optional[bool] = None, - **kwargs: Any, - ) -> BanChatMember: - """ - Shortcut for method :class:`aiogram.methods.ban_chat_member.BanChatMember` - will automatically fill method attributes: - - - :code:`chat_id` - - Use this method to ban a user in a group, a supergroup or a channel. In the case of supergroups and channels, the user will not be able to return to the chat on their own using invite links, etc., unless `unbanned `_ first. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#banchatmember - - :param user_id: Unique identifier of the target user - :param until_date: Date when the user will be unbanned; Unix time. If user is banned for more than 366 days or less than 30 seconds from the current time they are considered to be banned forever. Applied for supergroups and channels only. - :param revoke_messages: Pass :code:`True` to delete all messages from the chat for the user that is being removed. If :code:`False`, the user will be able to see messages in the group that were sent before the user was removed. Always :code:`True` for supergroups and channels. - :return: instance of method :class:`aiogram.methods.ban_chat_member.BanChatMember` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import BanChatMember - - return BanChatMember( - chat_id=self.id, - user_id=user_id, - until_date=until_date, - revoke_messages=revoke_messages, - **kwargs, - ).as_(self._bot) - - def set_description( - self, - description: Optional[str] = None, - **kwargs: Any, - ) -> SetChatDescription: - """ - Shortcut for method :class:`aiogram.methods.set_chat_description.SetChatDescription` - will automatically fill method attributes: - - - :code:`chat_id` - - Use this method to change the description of a group, a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#setchatdescription - - :param description: New chat description, 0-255 characters - :return: instance of method :class:`aiogram.methods.set_chat_description.SetChatDescription` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import SetChatDescription - - return SetChatDescription( - chat_id=self.id, - description=description, - **kwargs, - ).as_(self._bot) - - def set_title( - self, - title: str, - **kwargs: Any, - ) -> SetChatTitle: - """ - Shortcut for method :class:`aiogram.methods.set_chat_title.SetChatTitle` - will automatically fill method attributes: - - - :code:`chat_id` - - Use this method to change the title of a chat. Titles can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#setchattitle - - :param title: New chat title, 1-128 characters - :return: instance of method :class:`aiogram.methods.set_chat_title.SetChatTitle` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import SetChatTitle - - return SetChatTitle( - chat_id=self.id, - title=title, - **kwargs, - ).as_(self._bot) - - def delete_photo( - self, - **kwargs: Any, - ) -> DeleteChatPhoto: - """ - Shortcut for method :class:`aiogram.methods.delete_chat_photo.DeleteChatPhoto` - will automatically fill method attributes: - - - :code:`chat_id` - - Use this method to delete a chat photo. Photos can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#deletechatphoto - - :return: instance of method :class:`aiogram.methods.delete_chat_photo.DeleteChatPhoto` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import DeleteChatPhoto - - return DeleteChatPhoto( - chat_id=self.id, - **kwargs, - ).as_(self._bot) - - def set_photo( - self, - photo: InputFile, - **kwargs: Any, - ) -> SetChatPhoto: - """ - Shortcut for method :class:`aiogram.methods.set_chat_photo.SetChatPhoto` - will automatically fill method attributes: - - - :code:`chat_id` - - Use this method to set a new profile photo for the chat. Photos can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#setchatphoto - - :param photo: New chat photo, uploaded using multipart/form-data - :return: instance of method :class:`aiogram.methods.set_chat_photo.SetChatPhoto` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import SetChatPhoto - - return SetChatPhoto( - chat_id=self.id, - photo=photo, - **kwargs, - ).as_(self._bot) - - def unpin_all_general_forum_topic_messages( - self, - **kwargs: Any, - ) -> UnpinAllGeneralForumTopicMessages: - """ - Shortcut for method :class:`aiogram.methods.unpin_all_general_forum_topic_messages.UnpinAllGeneralForumTopicMessages` - will automatically fill method attributes: - - - :code:`chat_id` - - Use this method to clear the list of pinned messages in a General forum topic. The bot must be an administrator in the chat for this to work and must have the *can_pin_messages* administrator right in the supergroup. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#unpinallgeneralforumtopicmessages - - :return: instance of method :class:`aiogram.methods.unpin_all_general_forum_topic_messages.UnpinAllGeneralForumTopicMessages` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import UnpinAllGeneralForumTopicMessages - - return UnpinAllGeneralForumTopicMessages( - chat_id=self.id, - **kwargs, - ).as_(self._bot) diff --git a/env/Lib/site-packages/aiogram/types/chat_administrator_rights.py b/env/Lib/site-packages/aiogram/types/chat_administrator_rights.py deleted file mode 100644 index 0b20578..0000000 --- a/env/Lib/site-packages/aiogram/types/chat_administrator_rights.py +++ /dev/null @@ -1,94 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Optional - -from .base import TelegramObject - -if TYPE_CHECKING: - pass - - -class ChatAdministratorRights(TelegramObject): - """ - Represents the rights of an administrator in a chat. - - Source: https://core.telegram.org/bots/api#chatadministratorrights - """ - - is_anonymous: bool - """:code:`True`, if the user's presence in the chat is hidden""" - can_manage_chat: bool - """:code:`True`, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages and ignore slow mode. Implied by any other administrator privilege.""" - can_delete_messages: bool - """:code:`True`, if the administrator can delete messages of other users""" - can_manage_video_chats: bool - """:code:`True`, if the administrator can manage video chats""" - can_restrict_members: bool - """:code:`True`, if the administrator can restrict, ban or unban chat members, or access supergroup statistics""" - can_promote_members: bool - """:code:`True`, if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have promoted, directly or indirectly (promoted by administrators that were appointed by the user)""" - can_change_info: bool - """:code:`True`, if the user is allowed to change the chat title, photo and other settings""" - can_invite_users: bool - """:code:`True`, if the user is allowed to invite new users to the chat""" - can_post_stories: bool - """:code:`True`, if the administrator can post stories to the chat""" - can_edit_stories: bool - """:code:`True`, if the administrator can edit stories posted by other users, post stories to the chat page, pin chat stories, and access the chat's story archive""" - can_delete_stories: bool - """:code:`True`, if the administrator can delete stories posted by other users""" - can_post_messages: Optional[bool] = None - """*Optional*. :code:`True`, if the administrator can post messages in the channel, or access channel statistics; for channels only""" - can_edit_messages: Optional[bool] = None - """*Optional*. :code:`True`, if the administrator can edit messages of other users and can pin messages; for channels only""" - can_pin_messages: Optional[bool] = None - """*Optional*. :code:`True`, if the user is allowed to pin messages; for groups and supergroups only""" - can_manage_topics: Optional[bool] = None - """*Optional*. :code:`True`, if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - is_anonymous: bool, - can_manage_chat: bool, - can_delete_messages: bool, - can_manage_video_chats: bool, - can_restrict_members: bool, - can_promote_members: bool, - can_change_info: bool, - can_invite_users: bool, - can_post_stories: bool, - can_edit_stories: bool, - can_delete_stories: bool, - can_post_messages: Optional[bool] = None, - can_edit_messages: Optional[bool] = None, - can_pin_messages: Optional[bool] = None, - can_manage_topics: Optional[bool] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - is_anonymous=is_anonymous, - can_manage_chat=can_manage_chat, - can_delete_messages=can_delete_messages, - can_manage_video_chats=can_manage_video_chats, - can_restrict_members=can_restrict_members, - can_promote_members=can_promote_members, - can_change_info=can_change_info, - can_invite_users=can_invite_users, - can_post_stories=can_post_stories, - can_edit_stories=can_edit_stories, - can_delete_stories=can_delete_stories, - can_post_messages=can_post_messages, - can_edit_messages=can_edit_messages, - can_pin_messages=can_pin_messages, - can_manage_topics=can_manage_topics, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/chat_background.py b/env/Lib/site-packages/aiogram/types/chat_background.py deleted file mode 100644 index 937b436..0000000 --- a/env/Lib/site-packages/aiogram/types/chat_background.py +++ /dev/null @@ -1,44 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Union - -if TYPE_CHECKING: - from .background_type_chat_theme import BackgroundTypeChatTheme - from .background_type_fill import BackgroundTypeFill - from .background_type_pattern import BackgroundTypePattern - from .background_type_wallpaper import BackgroundTypeWallpaper -from .base import TelegramObject - - -class ChatBackground(TelegramObject): - """ - This object represents a chat background. - - Source: https://core.telegram.org/bots/api#chatbackground - """ - - type: Union[ - BackgroundTypeFill, BackgroundTypeWallpaper, BackgroundTypePattern, BackgroundTypeChatTheme - ] - """Type of the background""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - type: Union[ - BackgroundTypeFill, - BackgroundTypeWallpaper, - BackgroundTypePattern, - BackgroundTypeChatTheme, - ], - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(type=type, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/types/chat_boost.py b/env/Lib/site-packages/aiogram/types/chat_boost.py deleted file mode 100644 index 96e444f..0000000 --- a/env/Lib/site-packages/aiogram/types/chat_boost.py +++ /dev/null @@ -1,55 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Union - -from .base import TelegramObject -from .custom import DateTime - -if TYPE_CHECKING: - from .chat_boost_source_gift_code import ChatBoostSourceGiftCode - from .chat_boost_source_giveaway import ChatBoostSourceGiveaway - from .chat_boost_source_premium import ChatBoostSourcePremium - - -class ChatBoost(TelegramObject): - """ - This object contains information about a chat boost. - - Source: https://core.telegram.org/bots/api#chatboost - """ - - boost_id: str - """Unique identifier of the boost""" - add_date: DateTime - """Point in time (Unix timestamp) when the chat was boosted""" - expiration_date: DateTime - """Point in time (Unix timestamp) when the boost will automatically expire, unless the booster's Telegram Premium subscription is prolonged""" - source: Union[ChatBoostSourcePremium, ChatBoostSourceGiftCode, ChatBoostSourceGiveaway] - """Source of the added boost""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - boost_id: str, - add_date: DateTime, - expiration_date: DateTime, - source: Union[ - ChatBoostSourcePremium, ChatBoostSourceGiftCode, ChatBoostSourceGiveaway - ], - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - boost_id=boost_id, - add_date=add_date, - expiration_date=expiration_date, - source=source, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/chat_boost_added.py b/env/Lib/site-packages/aiogram/types/chat_boost_added.py deleted file mode 100644 index 4473eae..0000000 --- a/env/Lib/site-packages/aiogram/types/chat_boost_added.py +++ /dev/null @@ -1,25 +0,0 @@ -from typing import TYPE_CHECKING, Any - -from .base import TelegramObject - - -class ChatBoostAdded(TelegramObject): - """ - This object represents a service message about a user boosting a chat. - - Source: https://core.telegram.org/bots/api#chatboostadded - """ - - boost_count: int - """Number of boosts added by the user""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__(__pydantic__self__, *, boost_count: int, **__pydantic_kwargs: Any) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(boost_count=boost_count, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/types/chat_boost_removed.py b/env/Lib/site-packages/aiogram/types/chat_boost_removed.py deleted file mode 100644 index 094b057..0000000 --- a/env/Lib/site-packages/aiogram/types/chat_boost_removed.py +++ /dev/null @@ -1,56 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Union - -from .base import TelegramObject -from .custom import DateTime - -if TYPE_CHECKING: - from .chat import Chat - from .chat_boost_source_gift_code import ChatBoostSourceGiftCode - from .chat_boost_source_giveaway import ChatBoostSourceGiveaway - from .chat_boost_source_premium import ChatBoostSourcePremium - - -class ChatBoostRemoved(TelegramObject): - """ - This object represents a boost removed from a chat. - - Source: https://core.telegram.org/bots/api#chatboostremoved - """ - - chat: Chat - """Chat which was boosted""" - boost_id: str - """Unique identifier of the boost""" - remove_date: DateTime - """Point in time (Unix timestamp) when the boost was removed""" - source: Union[ChatBoostSourcePremium, ChatBoostSourceGiftCode, ChatBoostSourceGiveaway] - """Source of the removed boost""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - chat: Chat, - boost_id: str, - remove_date: DateTime, - source: Union[ - ChatBoostSourcePremium, ChatBoostSourceGiftCode, ChatBoostSourceGiveaway - ], - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - chat=chat, - boost_id=boost_id, - remove_date=remove_date, - source=source, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/chat_boost_source.py b/env/Lib/site-packages/aiogram/types/chat_boost_source.py deleted file mode 100644 index 3d2c262..0000000 --- a/env/Lib/site-packages/aiogram/types/chat_boost_source.py +++ /dev/null @@ -1,13 +0,0 @@ -from aiogram.types import TelegramObject - - -class ChatBoostSource(TelegramObject): - """ - This object describes the source of a chat boost. It can be one of - - - :class:`aiogram.types.chat_boost_source_premium.ChatBoostSourcePremium` - - :class:`aiogram.types.chat_boost_source_gift_code.ChatBoostSourceGiftCode` - - :class:`aiogram.types.chat_boost_source_giveaway.ChatBoostSourceGiveaway` - - Source: https://core.telegram.org/bots/api#chatboostsource - """ diff --git a/env/Lib/site-packages/aiogram/types/chat_boost_source_gift_code.py b/env/Lib/site-packages/aiogram/types/chat_boost_source_gift_code.py deleted file mode 100644 index 554e58f..0000000 --- a/env/Lib/site-packages/aiogram/types/chat_boost_source_gift_code.py +++ /dev/null @@ -1,39 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Literal - -from ..enums import ChatBoostSourceType -from .chat_boost_source import ChatBoostSource - -if TYPE_CHECKING: - from .user import User - - -class ChatBoostSourceGiftCode(ChatBoostSource): - """ - The boost was obtained by the creation of Telegram Premium gift codes to boost a chat. Each such code boosts the chat 4 times for the duration of the corresponding Telegram Premium subscription. - - Source: https://core.telegram.org/bots/api#chatboostsourcegiftcode - """ - - source: Literal[ChatBoostSourceType.GIFT_CODE] = ChatBoostSourceType.GIFT_CODE - """Source of the boost, always 'gift_code'""" - user: User - """User for which the gift code was created""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - source: Literal[ChatBoostSourceType.GIFT_CODE] = ChatBoostSourceType.GIFT_CODE, - user: User, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(source=source, user=user, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/types/chat_boost_source_giveaway.py b/env/Lib/site-packages/aiogram/types/chat_boost_source_giveaway.py deleted file mode 100644 index dbb8150..0000000 --- a/env/Lib/site-packages/aiogram/types/chat_boost_source_giveaway.py +++ /dev/null @@ -1,51 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Literal, Optional - -from ..enums import ChatBoostSourceType -from .chat_boost_source import ChatBoostSource - -if TYPE_CHECKING: - from .user import User - - -class ChatBoostSourceGiveaway(ChatBoostSource): - """ - The boost was obtained by the creation of a Telegram Premium giveaway. This boosts the chat 4 times for the duration of the corresponding Telegram Premium subscription. - - Source: https://core.telegram.org/bots/api#chatboostsourcegiveaway - """ - - source: Literal[ChatBoostSourceType.GIVEAWAY] = ChatBoostSourceType.GIVEAWAY - """Source of the boost, always 'giveaway'""" - giveaway_message_id: int - """Identifier of a message in the chat with the giveaway; the message could have been deleted already. May be 0 if the message isn't sent yet.""" - user: Optional[User] = None - """*Optional*. User that won the prize in the giveaway if any""" - is_unclaimed: Optional[bool] = None - """*Optional*. True, if the giveaway was completed, but there was no user to win the prize""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - source: Literal[ChatBoostSourceType.GIVEAWAY] = ChatBoostSourceType.GIVEAWAY, - giveaway_message_id: int, - user: Optional[User] = None, - is_unclaimed: Optional[bool] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - source=source, - giveaway_message_id=giveaway_message_id, - user=user, - is_unclaimed=is_unclaimed, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/chat_boost_source_premium.py b/env/Lib/site-packages/aiogram/types/chat_boost_source_premium.py deleted file mode 100644 index 97b47e6..0000000 --- a/env/Lib/site-packages/aiogram/types/chat_boost_source_premium.py +++ /dev/null @@ -1,39 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Literal - -from ..enums import ChatBoostSourceType -from .chat_boost_source import ChatBoostSource - -if TYPE_CHECKING: - from .user import User - - -class ChatBoostSourcePremium(ChatBoostSource): - """ - The boost was obtained by subscribing to Telegram Premium or by gifting a Telegram Premium subscription to another user. - - Source: https://core.telegram.org/bots/api#chatboostsourcepremium - """ - - source: Literal[ChatBoostSourceType.PREMIUM] = ChatBoostSourceType.PREMIUM - """Source of the boost, always 'premium'""" - user: User - """User that boosted the chat""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - source: Literal[ChatBoostSourceType.PREMIUM] = ChatBoostSourceType.PREMIUM, - user: User, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(source=source, user=user, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/types/chat_boost_updated.py b/env/Lib/site-packages/aiogram/types/chat_boost_updated.py deleted file mode 100644 index 0921c96..0000000 --- a/env/Lib/site-packages/aiogram/types/chat_boost_updated.py +++ /dev/null @@ -1,35 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any - -from .base import TelegramObject - -if TYPE_CHECKING: - from .chat import Chat - from .chat_boost import ChatBoost - - -class ChatBoostUpdated(TelegramObject): - """ - This object represents a boost added to a chat or changed. - - Source: https://core.telegram.org/bots/api#chatboostupdated - """ - - chat: Chat - """Chat which was boosted""" - boost: ChatBoost - """Information about the chat boost""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, *, chat: Chat, boost: ChatBoost, **__pydantic_kwargs: Any - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(chat=chat, boost=boost, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/types/chat_full_info.py b/env/Lib/site-packages/aiogram/types/chat_full_info.py deleted file mode 100644 index c639939..0000000 --- a/env/Lib/site-packages/aiogram/types/chat_full_info.py +++ /dev/null @@ -1,225 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, List, Optional, Union - -from .chat import Chat -from .custom import DateTime - -if TYPE_CHECKING: - from .birthdate import Birthdate - from .business_intro import BusinessIntro - from .business_location import BusinessLocation - from .business_opening_hours import BusinessOpeningHours - from .chat_location import ChatLocation - from .chat_permissions import ChatPermissions - from .chat_photo import ChatPhoto - from .message import Message - from .reaction_type_custom_emoji import ReactionTypeCustomEmoji - from .reaction_type_emoji import ReactionTypeEmoji - from .reaction_type_paid import ReactionTypePaid - - -class ChatFullInfo(Chat): - """ - This object contains full information about a chat. - - Source: https://core.telegram.org/bots/api#chatfullinfo - """ - - id: int - """Unique identifier for this chat. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier.""" - type: str - """Type of the chat, can be either 'private', 'group', 'supergroup' or 'channel'""" - accent_color_id: int - """Identifier of the accent color for the chat name and backgrounds of the chat photo, reply header, and link preview. See `accent colors `_ for more details.""" - max_reaction_count: int - """The maximum number of reactions that can be set on a message in the chat""" - title: Optional[str] = None - """*Optional*. Title, for supergroups, channels and group chats""" - username: Optional[str] = None - """*Optional*. Username, for private chats, supergroups and channels if available""" - first_name: Optional[str] = None - """*Optional*. First name of the other party in a private chat""" - last_name: Optional[str] = None - """*Optional*. Last name of the other party in a private chat""" - is_forum: Optional[bool] = None - """*Optional*. :code:`True`, if the supergroup chat is a forum (has `topics `_ enabled)""" - photo: Optional[ChatPhoto] = None - """*Optional*. Chat photo""" - active_usernames: Optional[List[str]] = None - """*Optional*. If non-empty, the list of all `active chat usernames `_; for private chats, supergroups and channels""" - birthdate: Optional[Birthdate] = None - """*Optional*. For private chats, the date of birth of the user""" - business_intro: Optional[BusinessIntro] = None - """*Optional*. For private chats with business accounts, the intro of the business""" - business_location: Optional[BusinessLocation] = None - """*Optional*. For private chats with business accounts, the location of the business""" - business_opening_hours: Optional[BusinessOpeningHours] = None - """*Optional*. For private chats with business accounts, the opening hours of the business""" - personal_chat: Optional[Chat] = None - """*Optional*. For private chats, the personal channel of the user""" - available_reactions: Optional[ - List[Union[ReactionTypeEmoji, ReactionTypeCustomEmoji, ReactionTypePaid]] - ] = None - """*Optional*. List of available reactions allowed in the chat. If omitted, then all `emoji reactions `_ are allowed.""" - background_custom_emoji_id: Optional[str] = None - """*Optional*. Custom emoji identifier of the emoji chosen by the chat for the reply header and link preview background""" - profile_accent_color_id: Optional[int] = None - """*Optional*. Identifier of the accent color for the chat's profile background. See `profile accent colors `_ for more details.""" - profile_background_custom_emoji_id: Optional[str] = None - """*Optional*. Custom emoji identifier of the emoji chosen by the chat for its profile background""" - emoji_status_custom_emoji_id: Optional[str] = None - """*Optional*. Custom emoji identifier of the emoji status of the chat or the other party in a private chat""" - emoji_status_expiration_date: Optional[DateTime] = None - """*Optional*. Expiration date of the emoji status of the chat or the other party in a private chat, in Unix time, if any""" - bio: Optional[str] = None - """*Optional*. Bio of the other party in a private chat""" - has_private_forwards: Optional[bool] = None - """*Optional*. :code:`True`, if privacy settings of the other party in the private chat allows to use :code:`tg://user?id=` links only in chats with the user""" - has_restricted_voice_and_video_messages: Optional[bool] = None - """*Optional*. :code:`True`, if the privacy settings of the other party restrict sending voice and video note messages in the private chat""" - join_to_send_messages: Optional[bool] = None - """*Optional*. :code:`True`, if users need to join the supergroup before they can send messages""" - join_by_request: Optional[bool] = None - """*Optional*. :code:`True`, if all users directly joining the supergroup without using an invite link need to be approved by supergroup administrators""" - description: Optional[str] = None - """*Optional*. Description, for groups, supergroups and channel chats""" - invite_link: Optional[str] = None - """*Optional*. Primary invite link, for groups, supergroups and channel chats""" - pinned_message: Optional[Message] = None - """*Optional*. The most recent pinned message (by sending date)""" - permissions: Optional[ChatPermissions] = None - """*Optional*. Default chat member permissions, for groups and supergroups""" - can_send_paid_media: Optional[bool] = None - """*Optional*. :code:`True`, if paid media messages can be sent or forwarded to the channel chat. The field is available only for channel chats.""" - slow_mode_delay: Optional[int] = None - """*Optional*. For supergroups, the minimum allowed delay between consecutive messages sent by each unprivileged user; in seconds""" - unrestrict_boost_count: Optional[int] = None - """*Optional*. For supergroups, the minimum number of boosts that a non-administrator user needs to add in order to ignore slow mode and chat permissions""" - message_auto_delete_time: Optional[int] = None - """*Optional*. The time after which all messages sent to the chat will be automatically deleted; in seconds""" - has_aggressive_anti_spam_enabled: Optional[bool] = None - """*Optional*. :code:`True`, if aggressive anti-spam checks are enabled in the supergroup. The field is only available to chat administrators.""" - has_hidden_members: Optional[bool] = None - """*Optional*. :code:`True`, if non-administrators can only get the list of bots and administrators in the chat""" - has_protected_content: Optional[bool] = None - """*Optional*. :code:`True`, if messages from the chat can't be forwarded to other chats""" - has_visible_history: Optional[bool] = None - """*Optional*. :code:`True`, if new chat members will have access to old messages; available only to chat administrators""" - sticker_set_name: Optional[str] = None - """*Optional*. For supergroups, name of the group sticker set""" - can_set_sticker_set: Optional[bool] = None - """*Optional*. :code:`True`, if the bot can change the group sticker set""" - custom_emoji_sticker_set_name: Optional[str] = None - """*Optional*. For supergroups, the name of the group's custom emoji sticker set. Custom emoji from this set can be used by all users and bots in the group.""" - linked_chat_id: Optional[int] = None - """*Optional*. Unique identifier for the linked chat, i.e. the discussion group identifier for a channel and vice versa; for supergroups and channel chats. This identifier may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier.""" - location: Optional[ChatLocation] = None - """*Optional*. For supergroups, the location to which the supergroup is connected""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - id: int, - type: str, - accent_color_id: int, - max_reaction_count: int, - title: Optional[str] = None, - username: Optional[str] = None, - first_name: Optional[str] = None, - last_name: Optional[str] = None, - is_forum: Optional[bool] = None, - photo: Optional[ChatPhoto] = None, - active_usernames: Optional[List[str]] = None, - birthdate: Optional[Birthdate] = None, - business_intro: Optional[BusinessIntro] = None, - business_location: Optional[BusinessLocation] = None, - business_opening_hours: Optional[BusinessOpeningHours] = None, - personal_chat: Optional[Chat] = None, - available_reactions: Optional[ - List[Union[ReactionTypeEmoji, ReactionTypeCustomEmoji, ReactionTypePaid]] - ] = None, - background_custom_emoji_id: Optional[str] = None, - profile_accent_color_id: Optional[int] = None, - profile_background_custom_emoji_id: Optional[str] = None, - emoji_status_custom_emoji_id: Optional[str] = None, - emoji_status_expiration_date: Optional[DateTime] = None, - bio: Optional[str] = None, - has_private_forwards: Optional[bool] = None, - has_restricted_voice_and_video_messages: Optional[bool] = None, - join_to_send_messages: Optional[bool] = None, - join_by_request: Optional[bool] = None, - description: Optional[str] = None, - invite_link: Optional[str] = None, - pinned_message: Optional[Message] = None, - permissions: Optional[ChatPermissions] = None, - can_send_paid_media: Optional[bool] = None, - slow_mode_delay: Optional[int] = None, - unrestrict_boost_count: Optional[int] = None, - message_auto_delete_time: Optional[int] = None, - has_aggressive_anti_spam_enabled: Optional[bool] = None, - has_hidden_members: Optional[bool] = None, - has_protected_content: Optional[bool] = None, - has_visible_history: Optional[bool] = None, - sticker_set_name: Optional[str] = None, - can_set_sticker_set: Optional[bool] = None, - custom_emoji_sticker_set_name: Optional[str] = None, - linked_chat_id: Optional[int] = None, - location: Optional[ChatLocation] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - id=id, - type=type, - accent_color_id=accent_color_id, - max_reaction_count=max_reaction_count, - title=title, - username=username, - first_name=first_name, - last_name=last_name, - is_forum=is_forum, - photo=photo, - active_usernames=active_usernames, - birthdate=birthdate, - business_intro=business_intro, - business_location=business_location, - business_opening_hours=business_opening_hours, - personal_chat=personal_chat, - available_reactions=available_reactions, - background_custom_emoji_id=background_custom_emoji_id, - profile_accent_color_id=profile_accent_color_id, - profile_background_custom_emoji_id=profile_background_custom_emoji_id, - emoji_status_custom_emoji_id=emoji_status_custom_emoji_id, - emoji_status_expiration_date=emoji_status_expiration_date, - bio=bio, - has_private_forwards=has_private_forwards, - has_restricted_voice_and_video_messages=has_restricted_voice_and_video_messages, - join_to_send_messages=join_to_send_messages, - join_by_request=join_by_request, - description=description, - invite_link=invite_link, - pinned_message=pinned_message, - permissions=permissions, - can_send_paid_media=can_send_paid_media, - slow_mode_delay=slow_mode_delay, - unrestrict_boost_count=unrestrict_boost_count, - message_auto_delete_time=message_auto_delete_time, - has_aggressive_anti_spam_enabled=has_aggressive_anti_spam_enabled, - has_hidden_members=has_hidden_members, - has_protected_content=has_protected_content, - has_visible_history=has_visible_history, - sticker_set_name=sticker_set_name, - can_set_sticker_set=can_set_sticker_set, - custom_emoji_sticker_set_name=custom_emoji_sticker_set_name, - linked_chat_id=linked_chat_id, - location=location, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/chat_invite_link.py b/env/Lib/site-packages/aiogram/types/chat_invite_link.py deleted file mode 100644 index 7817c23..0000000 --- a/env/Lib/site-packages/aiogram/types/chat_invite_link.py +++ /dev/null @@ -1,71 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Optional - -from .base import TelegramObject -from .custom import DateTime - -if TYPE_CHECKING: - from .user import User - - -class ChatInviteLink(TelegramObject): - """ - Represents an invite link for a chat. - - Source: https://core.telegram.org/bots/api#chatinvitelink - """ - - invite_link: str - """The invite link. If the link was created by another chat administrator, then the second part of the link will be replaced with '…'.""" - creator: User - """Creator of the link""" - creates_join_request: bool - """:code:`True`, if users joining the chat via the link need to be approved by chat administrators""" - is_primary: bool - """:code:`True`, if the link is primary""" - is_revoked: bool - """:code:`True`, if the link is revoked""" - name: Optional[str] = None - """*Optional*. Invite link name""" - expire_date: Optional[DateTime] = None - """*Optional*. Point in time (Unix timestamp) when the link will expire or has been expired""" - member_limit: Optional[int] = None - """*Optional*. The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999""" - pending_join_request_count: Optional[int] = None - """*Optional*. Number of pending join requests created using this link""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - invite_link: str, - creator: User, - creates_join_request: bool, - is_primary: bool, - is_revoked: bool, - name: Optional[str] = None, - expire_date: Optional[DateTime] = None, - member_limit: Optional[int] = None, - pending_join_request_count: Optional[int] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - invite_link=invite_link, - creator=creator, - creates_join_request=creates_join_request, - is_primary=is_primary, - is_revoked=is_revoked, - name=name, - expire_date=expire_date, - member_limit=member_limit, - pending_join_request_count=pending_join_request_count, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/chat_join_request.py b/env/Lib/site-packages/aiogram/types/chat_join_request.py deleted file mode 100644 index 4a128f1..0000000 --- a/env/Lib/site-packages/aiogram/types/chat_join_request.py +++ /dev/null @@ -1,2702 +0,0 @@ -from __future__ import annotations - -import datetime -from typing import TYPE_CHECKING, Any, List, Optional, Union - -from pydantic import Field - -from ..client.default import Default -from .base import TelegramObject -from .custom import DateTime - -if TYPE_CHECKING: - from ..methods import ( - ApproveChatJoinRequest, - DeclineChatJoinRequest, - SendAnimation, - SendAudio, - SendContact, - SendDice, - SendDocument, - SendGame, - SendInvoice, - SendLocation, - SendMediaGroup, - SendMessage, - SendPhoto, - SendPoll, - SendSticker, - SendVenue, - SendVideo, - SendVideoNote, - SendVoice, - ) - from .chat import Chat - from .chat_invite_link import ChatInviteLink - from .force_reply import ForceReply - from .inline_keyboard_markup import InlineKeyboardMarkup - from .input_file import InputFile - from .input_media_audio import InputMediaAudio - from .input_media_document import InputMediaDocument - from .input_media_photo import InputMediaPhoto - from .input_media_video import InputMediaVideo - from .input_poll_option import InputPollOption - from .labeled_price import LabeledPrice - from .link_preview_options import LinkPreviewOptions - from .message_entity import MessageEntity - from .reply_keyboard_markup import ReplyKeyboardMarkup - from .reply_keyboard_remove import ReplyKeyboardRemove - from .reply_parameters import ReplyParameters - from .user import User - - -class ChatJoinRequest(TelegramObject): - """ - Represents a join request sent to a chat. - - Source: https://core.telegram.org/bots/api#chatjoinrequest - """ - - chat: Chat - """Chat to which the request was sent""" - from_user: User = Field(..., alias="from") - """User that sent the join request""" - user_chat_id: int - """Identifier of a private chat with the user who sent the join request. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier. The bot can use this identifier for 5 minutes to send messages until the join request is processed, assuming no other administrator contacted the user.""" - date: DateTime - """Date the request was sent in Unix time""" - bio: Optional[str] = None - """*Optional*. Bio of the user.""" - invite_link: Optional[ChatInviteLink] = None - """*Optional*. Chat invite link that was used by the user to send the join request""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - chat: Chat, - from_user: User, - user_chat_id: int, - date: DateTime, - bio: Optional[str] = None, - invite_link: Optional[ChatInviteLink] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - chat=chat, - from_user=from_user, - user_chat_id=user_chat_id, - date=date, - bio=bio, - invite_link=invite_link, - **__pydantic_kwargs, - ) - - def approve( - self, - **kwargs: Any, - ) -> ApproveChatJoinRequest: - """ - Shortcut for method :class:`aiogram.methods.approve_chat_join_request.ApproveChatJoinRequest` - will automatically fill method attributes: - - - :code:`chat_id` - - :code:`user_id` - - Use this method to approve a chat join request. The bot must be an administrator in the chat for this to work and must have the *can_invite_users* administrator right. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#approvechatjoinrequest - - :return: instance of method :class:`aiogram.methods.approve_chat_join_request.ApproveChatJoinRequest` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import ApproveChatJoinRequest - - return ApproveChatJoinRequest( - chat_id=self.chat.id, - user_id=self.from_user.id, - **kwargs, - ).as_(self._bot) - - def decline( - self, - **kwargs: Any, - ) -> DeclineChatJoinRequest: - """ - Shortcut for method :class:`aiogram.methods.decline_chat_join_request.DeclineChatJoinRequest` - will automatically fill method attributes: - - - :code:`chat_id` - - :code:`user_id` - - Use this method to decline a chat join request. The bot must be an administrator in the chat for this to work and must have the *can_invite_users* administrator right. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#declinechatjoinrequest - - :return: instance of method :class:`aiogram.methods.decline_chat_join_request.DeclineChatJoinRequest` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import DeclineChatJoinRequest - - return DeclineChatJoinRequest( - chat_id=self.chat.id, - user_id=self.from_user.id, - **kwargs, - ).as_(self._bot) - - def answer( - self, - text: str, - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - entities: Optional[List[MessageEntity]] = None, - link_preview_options: Optional[Union[LinkPreviewOptions, Default]] = Default( - "link_preview" - ), - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - disable_web_page_preview: Optional[Union[bool, Default]] = Default( - "link_preview_is_disabled" - ), - reply_to_message_id: Optional[int] = None, - **kwargs: Any, - ) -> SendMessage: - """ - Shortcut for method :class:`aiogram.methods.send_message.SendMessage` - will automatically fill method attributes: - - - :code:`chat_id` - - Use this method to send text messages. On success, the sent :class:`aiogram.types.message.Message` is returned. - - Source: https://core.telegram.org/bots/api#sendmessage - - :param text: Text of the message to be sent, 1-4096 characters after entities parsing - :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only - :param parse_mode: Mode for parsing entities in the message text. See `formatting options `_ for more details. - :param entities: A JSON-serialized list of special entities that appear in message text, which can be specified instead of *parse_mode* - :param link_preview_options: Link preview generation options for the message - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param disable_web_page_preview: Disables link previews for links in this message - :param reply_to_message_id: If the message is a reply, ID of the original message - :return: instance of method :class:`aiogram.methods.send_message.SendMessage` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import SendMessage - - return SendMessage( - chat_id=self.chat.id, - text=text, - business_connection_id=business_connection_id, - message_thread_id=message_thread_id, - parse_mode=parse_mode, - entities=entities, - link_preview_options=link_preview_options, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - disable_web_page_preview=disable_web_page_preview, - reply_to_message_id=reply_to_message_id, - **kwargs, - ).as_(self._bot) - - def answer_pm( - self, - text: str, - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - entities: Optional[List[MessageEntity]] = None, - link_preview_options: Optional[Union[LinkPreviewOptions, Default]] = Default( - "link_preview" - ), - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - disable_web_page_preview: Optional[Union[bool, Default]] = Default( - "link_preview_is_disabled" - ), - reply_to_message_id: Optional[int] = None, - **kwargs: Any, - ) -> SendMessage: - """ - Shortcut for method :class:`aiogram.methods.send_message.SendMessage` - will automatically fill method attributes: - - - :code:`chat_id` - - Use this method to send text messages. On success, the sent :class:`aiogram.types.message.Message` is returned. - - Source: https://core.telegram.org/bots/api#sendmessage - - :param text: Text of the message to be sent, 1-4096 characters after entities parsing - :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only - :param parse_mode: Mode for parsing entities in the message text. See `formatting options `_ for more details. - :param entities: A JSON-serialized list of special entities that appear in message text, which can be specified instead of *parse_mode* - :param link_preview_options: Link preview generation options for the message - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param disable_web_page_preview: Disables link previews for links in this message - :param reply_to_message_id: If the message is a reply, ID of the original message - :return: instance of method :class:`aiogram.methods.send_message.SendMessage` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import SendMessage - - return SendMessage( - chat_id=self.user_chat_id, - text=text, - business_connection_id=business_connection_id, - message_thread_id=message_thread_id, - parse_mode=parse_mode, - entities=entities, - link_preview_options=link_preview_options, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - disable_web_page_preview=disable_web_page_preview, - reply_to_message_id=reply_to_message_id, - **kwargs, - ).as_(self._bot) - - def answer_animation( - self, - animation: Union[InputFile, str], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - duration: Optional[int] = None, - width: Optional[int] = None, - height: Optional[int] = None, - thumbnail: Optional[InputFile] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - show_caption_above_media: Optional[Union[bool, Default]] = Default( - "show_caption_above_media" - ), - has_spoiler: Optional[bool] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - **kwargs: Any, - ) -> SendAnimation: - """ - Shortcut for method :class:`aiogram.methods.send_animation.SendAnimation` - will automatically fill method attributes: - - - :code:`chat_id` - - Use this method to send animation files (GIF or H.264/MPEG-4 AVC video without sound). On success, the sent :class:`aiogram.types.message.Message` is returned. Bots can currently send animation files of up to 50 MB in size, this limit may be changed in the future. - - Source: https://core.telegram.org/bots/api#sendanimation - - :param animation: Animation to send. Pass a file_id as String to send an animation that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an animation from the Internet, or upload a new animation using multipart/form-data. :ref:`More information on Sending Files » ` - :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only - :param duration: Duration of sent animation in seconds - :param width: Animation width - :param height: Animation height - :param thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More information on Sending Files » ` - :param caption: Animation caption (may also be used when resending animation by *file_id*), 0-1024 characters after entities parsing - :param parse_mode: Mode for parsing entities in the animation caption. See `formatting options `_ for more details. - :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode* - :param show_caption_above_media: Pass :code:`True`, if the caption must be shown above the message media - :param has_spoiler: Pass :code:`True` if the animation needs to be covered with a spoiler animation - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param reply_to_message_id: If the message is a reply, ID of the original message - :return: instance of method :class:`aiogram.methods.send_animation.SendAnimation` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import SendAnimation - - return SendAnimation( - chat_id=self.chat.id, - animation=animation, - business_connection_id=business_connection_id, - message_thread_id=message_thread_id, - duration=duration, - width=width, - height=height, - thumbnail=thumbnail, - caption=caption, - parse_mode=parse_mode, - caption_entities=caption_entities, - show_caption_above_media=show_caption_above_media, - has_spoiler=has_spoiler, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - reply_to_message_id=reply_to_message_id, - **kwargs, - ).as_(self._bot) - - def answer_animation_pm( - self, - animation: Union[InputFile, str], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - duration: Optional[int] = None, - width: Optional[int] = None, - height: Optional[int] = None, - thumbnail: Optional[InputFile] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - show_caption_above_media: Optional[Union[bool, Default]] = Default( - "show_caption_above_media" - ), - has_spoiler: Optional[bool] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - **kwargs: Any, - ) -> SendAnimation: - """ - Shortcut for method :class:`aiogram.methods.send_animation.SendAnimation` - will automatically fill method attributes: - - - :code:`chat_id` - - Use this method to send animation files (GIF or H.264/MPEG-4 AVC video without sound). On success, the sent :class:`aiogram.types.message.Message` is returned. Bots can currently send animation files of up to 50 MB in size, this limit may be changed in the future. - - Source: https://core.telegram.org/bots/api#sendanimation - - :param animation: Animation to send. Pass a file_id as String to send an animation that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an animation from the Internet, or upload a new animation using multipart/form-data. :ref:`More information on Sending Files » ` - :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only - :param duration: Duration of sent animation in seconds - :param width: Animation width - :param height: Animation height - :param thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More information on Sending Files » ` - :param caption: Animation caption (may also be used when resending animation by *file_id*), 0-1024 characters after entities parsing - :param parse_mode: Mode for parsing entities in the animation caption. See `formatting options `_ for more details. - :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode* - :param show_caption_above_media: Pass :code:`True`, if the caption must be shown above the message media - :param has_spoiler: Pass :code:`True` if the animation needs to be covered with a spoiler animation - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param reply_to_message_id: If the message is a reply, ID of the original message - :return: instance of method :class:`aiogram.methods.send_animation.SendAnimation` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import SendAnimation - - return SendAnimation( - chat_id=self.user_chat_id, - animation=animation, - business_connection_id=business_connection_id, - message_thread_id=message_thread_id, - duration=duration, - width=width, - height=height, - thumbnail=thumbnail, - caption=caption, - parse_mode=parse_mode, - caption_entities=caption_entities, - show_caption_above_media=show_caption_above_media, - has_spoiler=has_spoiler, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - reply_to_message_id=reply_to_message_id, - **kwargs, - ).as_(self._bot) - - def answer_audio( - self, - audio: Union[InputFile, str], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - duration: Optional[int] = None, - performer: Optional[str] = None, - title: Optional[str] = None, - thumbnail: Optional[InputFile] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - **kwargs: Any, - ) -> SendAudio: - """ - Shortcut for method :class:`aiogram.methods.send_audio.SendAudio` - will automatically fill method attributes: - - - :code:`chat_id` - - Use this method to send audio files, if you want Telegram clients to display them in the music player. Your audio must be in the .MP3 or .M4A format. On success, the sent :class:`aiogram.types.message.Message` is returned. Bots can currently send audio files of up to 50 MB in size, this limit may be changed in the future. - For sending voice messages, use the :class:`aiogram.methods.send_voice.SendVoice` method instead. - - Source: https://core.telegram.org/bots/api#sendaudio - - :param audio: Audio file to send. Pass a file_id as String to send an audio file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an audio file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » ` - :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only - :param caption: Audio caption, 0-1024 characters after entities parsing - :param parse_mode: Mode for parsing entities in the audio caption. See `formatting options `_ for more details. - :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode* - :param duration: Duration of the audio in seconds - :param performer: Performer - :param title: Track name - :param thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More information on Sending Files » ` - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param reply_to_message_id: If the message is a reply, ID of the original message - :return: instance of method :class:`aiogram.methods.send_audio.SendAudio` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import SendAudio - - return SendAudio( - chat_id=self.chat.id, - audio=audio, - business_connection_id=business_connection_id, - message_thread_id=message_thread_id, - caption=caption, - parse_mode=parse_mode, - caption_entities=caption_entities, - duration=duration, - performer=performer, - title=title, - thumbnail=thumbnail, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - reply_to_message_id=reply_to_message_id, - **kwargs, - ).as_(self._bot) - - def answer_audio_pm( - self, - audio: Union[InputFile, str], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - duration: Optional[int] = None, - performer: Optional[str] = None, - title: Optional[str] = None, - thumbnail: Optional[InputFile] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - **kwargs: Any, - ) -> SendAudio: - """ - Shortcut for method :class:`aiogram.methods.send_audio.SendAudio` - will automatically fill method attributes: - - - :code:`chat_id` - - Use this method to send audio files, if you want Telegram clients to display them in the music player. Your audio must be in the .MP3 or .M4A format. On success, the sent :class:`aiogram.types.message.Message` is returned. Bots can currently send audio files of up to 50 MB in size, this limit may be changed in the future. - For sending voice messages, use the :class:`aiogram.methods.send_voice.SendVoice` method instead. - - Source: https://core.telegram.org/bots/api#sendaudio - - :param audio: Audio file to send. Pass a file_id as String to send an audio file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an audio file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » ` - :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only - :param caption: Audio caption, 0-1024 characters after entities parsing - :param parse_mode: Mode for parsing entities in the audio caption. See `formatting options `_ for more details. - :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode* - :param duration: Duration of the audio in seconds - :param performer: Performer - :param title: Track name - :param thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More information on Sending Files » ` - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param reply_to_message_id: If the message is a reply, ID of the original message - :return: instance of method :class:`aiogram.methods.send_audio.SendAudio` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import SendAudio - - return SendAudio( - chat_id=self.user_chat_id, - audio=audio, - business_connection_id=business_connection_id, - message_thread_id=message_thread_id, - caption=caption, - parse_mode=parse_mode, - caption_entities=caption_entities, - duration=duration, - performer=performer, - title=title, - thumbnail=thumbnail, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - reply_to_message_id=reply_to_message_id, - **kwargs, - ).as_(self._bot) - - def answer_contact( - self, - phone_number: str, - first_name: str, - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - last_name: Optional[str] = None, - vcard: Optional[str] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - **kwargs: Any, - ) -> SendContact: - """ - Shortcut for method :class:`aiogram.methods.send_contact.SendContact` - will automatically fill method attributes: - - - :code:`chat_id` - - Use this method to send phone contacts. On success, the sent :class:`aiogram.types.message.Message` is returned. - - Source: https://core.telegram.org/bots/api#sendcontact - - :param phone_number: Contact's phone number - :param first_name: Contact's first name - :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only - :param last_name: Contact's last name - :param vcard: Additional data about the contact in the form of a `vCard `_, 0-2048 bytes - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param reply_to_message_id: If the message is a reply, ID of the original message - :return: instance of method :class:`aiogram.methods.send_contact.SendContact` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import SendContact - - return SendContact( - chat_id=self.chat.id, - phone_number=phone_number, - first_name=first_name, - business_connection_id=business_connection_id, - message_thread_id=message_thread_id, - last_name=last_name, - vcard=vcard, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - reply_to_message_id=reply_to_message_id, - **kwargs, - ).as_(self._bot) - - def answer_contact_pm( - self, - phone_number: str, - first_name: str, - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - last_name: Optional[str] = None, - vcard: Optional[str] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - **kwargs: Any, - ) -> SendContact: - """ - Shortcut for method :class:`aiogram.methods.send_contact.SendContact` - will automatically fill method attributes: - - - :code:`chat_id` - - Use this method to send phone contacts. On success, the sent :class:`aiogram.types.message.Message` is returned. - - Source: https://core.telegram.org/bots/api#sendcontact - - :param phone_number: Contact's phone number - :param first_name: Contact's first name - :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only - :param last_name: Contact's last name - :param vcard: Additional data about the contact in the form of a `vCard `_, 0-2048 bytes - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param reply_to_message_id: If the message is a reply, ID of the original message - :return: instance of method :class:`aiogram.methods.send_contact.SendContact` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import SendContact - - return SendContact( - chat_id=self.user_chat_id, - phone_number=phone_number, - first_name=first_name, - business_connection_id=business_connection_id, - message_thread_id=message_thread_id, - last_name=last_name, - vcard=vcard, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - reply_to_message_id=reply_to_message_id, - **kwargs, - ).as_(self._bot) - - def answer_document( - self, - document: Union[InputFile, str], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - thumbnail: Optional[InputFile] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - disable_content_type_detection: Optional[bool] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - **kwargs: Any, - ) -> SendDocument: - """ - Shortcut for method :class:`aiogram.methods.send_document.SendDocument` - will automatically fill method attributes: - - - :code:`chat_id` - - Use this method to send general files. On success, the sent :class:`aiogram.types.message.Message` is returned. Bots can currently send files of any type of up to 50 MB in size, this limit may be changed in the future. - - Source: https://core.telegram.org/bots/api#senddocument - - :param document: File to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » ` - :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only - :param thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More information on Sending Files » ` - :param caption: Document caption (may also be used when resending documents by *file_id*), 0-1024 characters after entities parsing - :param parse_mode: Mode for parsing entities in the document caption. See `formatting options `_ for more details. - :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode* - :param disable_content_type_detection: Disables automatic server-side content type detection for files uploaded using multipart/form-data - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param reply_to_message_id: If the message is a reply, ID of the original message - :return: instance of method :class:`aiogram.methods.send_document.SendDocument` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import SendDocument - - return SendDocument( - chat_id=self.chat.id, - document=document, - business_connection_id=business_connection_id, - message_thread_id=message_thread_id, - thumbnail=thumbnail, - caption=caption, - parse_mode=parse_mode, - caption_entities=caption_entities, - disable_content_type_detection=disable_content_type_detection, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - reply_to_message_id=reply_to_message_id, - **kwargs, - ).as_(self._bot) - - def answer_document_pm( - self, - document: Union[InputFile, str], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - thumbnail: Optional[InputFile] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - disable_content_type_detection: Optional[bool] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - **kwargs: Any, - ) -> SendDocument: - """ - Shortcut for method :class:`aiogram.methods.send_document.SendDocument` - will automatically fill method attributes: - - - :code:`chat_id` - - Use this method to send general files. On success, the sent :class:`aiogram.types.message.Message` is returned. Bots can currently send files of any type of up to 50 MB in size, this limit may be changed in the future. - - Source: https://core.telegram.org/bots/api#senddocument - - :param document: File to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » ` - :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only - :param thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More information on Sending Files » ` - :param caption: Document caption (may also be used when resending documents by *file_id*), 0-1024 characters after entities parsing - :param parse_mode: Mode for parsing entities in the document caption. See `formatting options `_ for more details. - :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode* - :param disable_content_type_detection: Disables automatic server-side content type detection for files uploaded using multipart/form-data - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param reply_to_message_id: If the message is a reply, ID of the original message - :return: instance of method :class:`aiogram.methods.send_document.SendDocument` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import SendDocument - - return SendDocument( - chat_id=self.user_chat_id, - document=document, - business_connection_id=business_connection_id, - message_thread_id=message_thread_id, - thumbnail=thumbnail, - caption=caption, - parse_mode=parse_mode, - caption_entities=caption_entities, - disable_content_type_detection=disable_content_type_detection, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - reply_to_message_id=reply_to_message_id, - **kwargs, - ).as_(self._bot) - - def answer_game( - self, - game_short_name: str, - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[InlineKeyboardMarkup] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - **kwargs: Any, - ) -> SendGame: - """ - Shortcut for method :class:`aiogram.methods.send_game.SendGame` - will automatically fill method attributes: - - - :code:`chat_id` - - Use this method to send a game. On success, the sent :class:`aiogram.types.message.Message` is returned. - - Source: https://core.telegram.org/bots/api#sendgame - - :param game_short_name: Short name of the game, serves as the unique identifier for the game. Set up your games via `@BotFather `_. - :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_parameters: Description of the message to reply to - :param reply_markup: A JSON-serialized object for an `inline keyboard `_. If empty, one 'Play game_title' button will be shown. If not empty, the first button must launch the game. - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param reply_to_message_id: If the message is a reply, ID of the original message - :return: instance of method :class:`aiogram.methods.send_game.SendGame` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import SendGame - - return SendGame( - chat_id=self.chat.id, - game_short_name=game_short_name, - business_connection_id=business_connection_id, - message_thread_id=message_thread_id, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - reply_to_message_id=reply_to_message_id, - **kwargs, - ).as_(self._bot) - - def answer_game_pm( - self, - game_short_name: str, - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[InlineKeyboardMarkup] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - **kwargs: Any, - ) -> SendGame: - """ - Shortcut for method :class:`aiogram.methods.send_game.SendGame` - will automatically fill method attributes: - - - :code:`chat_id` - - Use this method to send a game. On success, the sent :class:`aiogram.types.message.Message` is returned. - - Source: https://core.telegram.org/bots/api#sendgame - - :param game_short_name: Short name of the game, serves as the unique identifier for the game. Set up your games via `@BotFather `_. - :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_parameters: Description of the message to reply to - :param reply_markup: A JSON-serialized object for an `inline keyboard `_. If empty, one 'Play game_title' button will be shown. If not empty, the first button must launch the game. - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param reply_to_message_id: If the message is a reply, ID of the original message - :return: instance of method :class:`aiogram.methods.send_game.SendGame` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import SendGame - - return SendGame( - chat_id=self.user_chat_id, - game_short_name=game_short_name, - business_connection_id=business_connection_id, - message_thread_id=message_thread_id, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - reply_to_message_id=reply_to_message_id, - **kwargs, - ).as_(self._bot) - - def answer_invoice( - self, - title: str, - description: str, - payload: str, - currency: str, - prices: List[LabeledPrice], - message_thread_id: Optional[int] = None, - provider_token: Optional[str] = None, - max_tip_amount: Optional[int] = None, - suggested_tip_amounts: Optional[List[int]] = None, - start_parameter: Optional[str] = None, - provider_data: Optional[str] = None, - photo_url: Optional[str] = None, - photo_size: Optional[int] = None, - photo_width: Optional[int] = None, - photo_height: Optional[int] = None, - need_name: Optional[bool] = None, - need_phone_number: Optional[bool] = None, - need_email: Optional[bool] = None, - need_shipping_address: Optional[bool] = None, - send_phone_number_to_provider: Optional[bool] = None, - send_email_to_provider: Optional[bool] = None, - is_flexible: Optional[bool] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[InlineKeyboardMarkup] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - **kwargs: Any, - ) -> SendInvoice: - """ - Shortcut for method :class:`aiogram.methods.send_invoice.SendInvoice` - will automatically fill method attributes: - - - :code:`chat_id` - - Use this method to send invoices. On success, the sent :class:`aiogram.types.message.Message` is returned. - - Source: https://core.telegram.org/bots/api#sendinvoice - - :param title: Product name, 1-32 characters - :param description: Product description, 1-255 characters - :param payload: Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes. - :param currency: Three-letter ISO 4217 currency code, see `more on currencies `_. Pass 'XTR' for payments in `Telegram Stars `_. - :param prices: Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.). Must contain exactly one item for payments in `Telegram Stars `_. - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only - :param provider_token: Payment provider token, obtained via `@BotFather `_. Pass an empty string for payments in `Telegram Stars `_. - :param max_tip_amount: The maximum accepted amount for tips in the *smallest units* of the currency (integer, **not** float/double). For example, for a maximum tip of :code:`US$ 1.45` pass :code:`max_tip_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). Defaults to 0. Not supported for payments in `Telegram Stars `_. - :param suggested_tip_amounts: A JSON-serialized array 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*. - :param start_parameter: Unique deep-linking parameter. If left empty, **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. If non-empty, 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 - :param provider_data: JSON-serialized 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. - :param photo_url: 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. - :param photo_size: Photo size in bytes - :param photo_width: Photo width - :param photo_height: Photo height - :param need_name: Pass :code:`True` if you require the user's full name to complete the order. Ignored for payments in `Telegram Stars `_. - :param need_phone_number: Pass :code:`True` if you require the user's phone number to complete the order. Ignored for payments in `Telegram Stars `_. - :param need_email: Pass :code:`True` if you require the user's email address to complete the order. Ignored for payments in `Telegram Stars `_. - :param need_shipping_address: Pass :code:`True` if you require the user's shipping address to complete the order. Ignored for payments in `Telegram Stars `_. - :param send_phone_number_to_provider: Pass :code:`True` if the user's phone number should be sent to the provider. Ignored for payments in `Telegram Stars `_. - :param send_email_to_provider: Pass :code:`True` if the user's email address should be sent to the provider. Ignored for payments in `Telegram Stars `_. - :param is_flexible: Pass :code:`True` if the final price depends on the shipping method. Ignored for payments in `Telegram Stars `_. - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_parameters: Description of the message to reply to - :param reply_markup: A JSON-serialized object for an `inline keyboard `_. If empty, one 'Pay :code:`total price`' button will be shown. If not empty, the first button must be a Pay button. - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param reply_to_message_id: If the message is a reply, ID of the original message - :return: instance of method :class:`aiogram.methods.send_invoice.SendInvoice` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import SendInvoice - - return SendInvoice( - chat_id=self.chat.id, - title=title, - description=description, - payload=payload, - currency=currency, - prices=prices, - message_thread_id=message_thread_id, - provider_token=provider_token, - max_tip_amount=max_tip_amount, - suggested_tip_amounts=suggested_tip_amounts, - start_parameter=start_parameter, - provider_data=provider_data, - photo_url=photo_url, - photo_size=photo_size, - photo_width=photo_width, - photo_height=photo_height, - need_name=need_name, - need_phone_number=need_phone_number, - need_email=need_email, - need_shipping_address=need_shipping_address, - send_phone_number_to_provider=send_phone_number_to_provider, - send_email_to_provider=send_email_to_provider, - is_flexible=is_flexible, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - reply_to_message_id=reply_to_message_id, - **kwargs, - ).as_(self._bot) - - def answer_invoice_pm( - self, - title: str, - description: str, - payload: str, - currency: str, - prices: List[LabeledPrice], - message_thread_id: Optional[int] = None, - provider_token: Optional[str] = None, - max_tip_amount: Optional[int] = None, - suggested_tip_amounts: Optional[List[int]] = None, - start_parameter: Optional[str] = None, - provider_data: Optional[str] = None, - photo_url: Optional[str] = None, - photo_size: Optional[int] = None, - photo_width: Optional[int] = None, - photo_height: Optional[int] = None, - need_name: Optional[bool] = None, - need_phone_number: Optional[bool] = None, - need_email: Optional[bool] = None, - need_shipping_address: Optional[bool] = None, - send_phone_number_to_provider: Optional[bool] = None, - send_email_to_provider: Optional[bool] = None, - is_flexible: Optional[bool] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[InlineKeyboardMarkup] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - **kwargs: Any, - ) -> SendInvoice: - """ - Shortcut for method :class:`aiogram.methods.send_invoice.SendInvoice` - will automatically fill method attributes: - - - :code:`chat_id` - - Use this method to send invoices. On success, the sent :class:`aiogram.types.message.Message` is returned. - - Source: https://core.telegram.org/bots/api#sendinvoice - - :param title: Product name, 1-32 characters - :param description: Product description, 1-255 characters - :param payload: Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes. - :param currency: Three-letter ISO 4217 currency code, see `more on currencies `_. Pass 'XTR' for payments in `Telegram Stars `_. - :param prices: Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.). Must contain exactly one item for payments in `Telegram Stars `_. - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only - :param provider_token: Payment provider token, obtained via `@BotFather `_. Pass an empty string for payments in `Telegram Stars `_. - :param max_tip_amount: The maximum accepted amount for tips in the *smallest units* of the currency (integer, **not** float/double). For example, for a maximum tip of :code:`US$ 1.45` pass :code:`max_tip_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). Defaults to 0. Not supported for payments in `Telegram Stars `_. - :param suggested_tip_amounts: A JSON-serialized array 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*. - :param start_parameter: Unique deep-linking parameter. If left empty, **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. If non-empty, 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 - :param provider_data: JSON-serialized 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. - :param photo_url: 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. - :param photo_size: Photo size in bytes - :param photo_width: Photo width - :param photo_height: Photo height - :param need_name: Pass :code:`True` if you require the user's full name to complete the order. Ignored for payments in `Telegram Stars `_. - :param need_phone_number: Pass :code:`True` if you require the user's phone number to complete the order. Ignored for payments in `Telegram Stars `_. - :param need_email: Pass :code:`True` if you require the user's email address to complete the order. Ignored for payments in `Telegram Stars `_. - :param need_shipping_address: Pass :code:`True` if you require the user's shipping address to complete the order. Ignored for payments in `Telegram Stars `_. - :param send_phone_number_to_provider: Pass :code:`True` if the user's phone number should be sent to the provider. Ignored for payments in `Telegram Stars `_. - :param send_email_to_provider: Pass :code:`True` if the user's email address should be sent to the provider. Ignored for payments in `Telegram Stars `_. - :param is_flexible: Pass :code:`True` if the final price depends on the shipping method. Ignored for payments in `Telegram Stars `_. - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_parameters: Description of the message to reply to - :param reply_markup: A JSON-serialized object for an `inline keyboard `_. If empty, one 'Pay :code:`total price`' button will be shown. If not empty, the first button must be a Pay button. - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param reply_to_message_id: If the message is a reply, ID of the original message - :return: instance of method :class:`aiogram.methods.send_invoice.SendInvoice` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import SendInvoice - - return SendInvoice( - chat_id=self.user_chat_id, - title=title, - description=description, - payload=payload, - currency=currency, - prices=prices, - message_thread_id=message_thread_id, - provider_token=provider_token, - max_tip_amount=max_tip_amount, - suggested_tip_amounts=suggested_tip_amounts, - start_parameter=start_parameter, - provider_data=provider_data, - photo_url=photo_url, - photo_size=photo_size, - photo_width=photo_width, - photo_height=photo_height, - need_name=need_name, - need_phone_number=need_phone_number, - need_email=need_email, - need_shipping_address=need_shipping_address, - send_phone_number_to_provider=send_phone_number_to_provider, - send_email_to_provider=send_email_to_provider, - is_flexible=is_flexible, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - reply_to_message_id=reply_to_message_id, - **kwargs, - ).as_(self._bot) - - def answer_location( - self, - latitude: float, - longitude: float, - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - horizontal_accuracy: Optional[float] = None, - live_period: Optional[int] = None, - heading: Optional[int] = None, - proximity_alert_radius: Optional[int] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - **kwargs: Any, - ) -> SendLocation: - """ - Shortcut for method :class:`aiogram.methods.send_location.SendLocation` - will automatically fill method attributes: - - - :code:`chat_id` - - Use this method to send point on the map. On success, the sent :class:`aiogram.types.message.Message` is returned. - - Source: https://core.telegram.org/bots/api#sendlocation - - :param latitude: Latitude of the location - :param longitude: Longitude of the location - :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only - :param horizontal_accuracy: The radius of uncertainty for the location, measured in meters; 0-1500 - :param live_period: Period in seconds during which the location will be updated (see `Live Locations `_, should be between 60 and 86400, or 0x7FFFFFFF for live locations that can be edited indefinitely. - :param heading: For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified. - :param proximity_alert_radius: For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified. - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param reply_to_message_id: If the message is a reply, ID of the original message - :return: instance of method :class:`aiogram.methods.send_location.SendLocation` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import SendLocation - - return SendLocation( - chat_id=self.chat.id, - latitude=latitude, - longitude=longitude, - business_connection_id=business_connection_id, - message_thread_id=message_thread_id, - horizontal_accuracy=horizontal_accuracy, - live_period=live_period, - heading=heading, - proximity_alert_radius=proximity_alert_radius, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - reply_to_message_id=reply_to_message_id, - **kwargs, - ).as_(self._bot) - - def answer_location_pm( - self, - latitude: float, - longitude: float, - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - horizontal_accuracy: Optional[float] = None, - live_period: Optional[int] = None, - heading: Optional[int] = None, - proximity_alert_radius: Optional[int] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - **kwargs: Any, - ) -> SendLocation: - """ - Shortcut for method :class:`aiogram.methods.send_location.SendLocation` - will automatically fill method attributes: - - - :code:`chat_id` - - Use this method to send point on the map. On success, the sent :class:`aiogram.types.message.Message` is returned. - - Source: https://core.telegram.org/bots/api#sendlocation - - :param latitude: Latitude of the location - :param longitude: Longitude of the location - :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only - :param horizontal_accuracy: The radius of uncertainty for the location, measured in meters; 0-1500 - :param live_period: Period in seconds during which the location will be updated (see `Live Locations `_, should be between 60 and 86400, or 0x7FFFFFFF for live locations that can be edited indefinitely. - :param heading: For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified. - :param proximity_alert_radius: For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified. - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param reply_to_message_id: If the message is a reply, ID of the original message - :return: instance of method :class:`aiogram.methods.send_location.SendLocation` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import SendLocation - - return SendLocation( - chat_id=self.user_chat_id, - latitude=latitude, - longitude=longitude, - business_connection_id=business_connection_id, - message_thread_id=message_thread_id, - horizontal_accuracy=horizontal_accuracy, - live_period=live_period, - heading=heading, - proximity_alert_radius=proximity_alert_radius, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - reply_to_message_id=reply_to_message_id, - **kwargs, - ).as_(self._bot) - - def answer_media_group( - self, - media: List[Union[InputMediaAudio, InputMediaDocument, InputMediaPhoto, InputMediaVideo]], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - **kwargs: Any, - ) -> SendMediaGroup: - """ - Shortcut for method :class:`aiogram.methods.send_media_group.SendMediaGroup` - will automatically fill method attributes: - - - :code:`chat_id` - - Use this method to send a group of photos, videos, documents or audios as an album. Documents and audio files can be only grouped in an album with messages of the same type. On success, an array of `Messages `_ that were sent is returned. - - Source: https://core.telegram.org/bots/api#sendmediagroup - - :param media: A JSON-serialized array describing messages to be sent, must include 2-10 items - :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only - :param disable_notification: Sends messages `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent messages from forwarding and saving - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_parameters: Description of the message to reply to - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param reply_to_message_id: If the messages are a reply, ID of the original message - :return: instance of method :class:`aiogram.methods.send_media_group.SendMediaGroup` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import SendMediaGroup - - return SendMediaGroup( - chat_id=self.chat.id, - media=media, - business_connection_id=business_connection_id, - message_thread_id=message_thread_id, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - allow_sending_without_reply=allow_sending_without_reply, - reply_to_message_id=reply_to_message_id, - **kwargs, - ).as_(self._bot) - - def answer_media_group_pm( - self, - media: List[Union[InputMediaAudio, InputMediaDocument, InputMediaPhoto, InputMediaVideo]], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - **kwargs: Any, - ) -> SendMediaGroup: - """ - Shortcut for method :class:`aiogram.methods.send_media_group.SendMediaGroup` - will automatically fill method attributes: - - - :code:`chat_id` - - Use this method to send a group of photos, videos, documents or audios as an album. Documents and audio files can be only grouped in an album with messages of the same type. On success, an array of `Messages `_ that were sent is returned. - - Source: https://core.telegram.org/bots/api#sendmediagroup - - :param media: A JSON-serialized array describing messages to be sent, must include 2-10 items - :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only - :param disable_notification: Sends messages `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent messages from forwarding and saving - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_parameters: Description of the message to reply to - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param reply_to_message_id: If the messages are a reply, ID of the original message - :return: instance of method :class:`aiogram.methods.send_media_group.SendMediaGroup` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import SendMediaGroup - - return SendMediaGroup( - chat_id=self.user_chat_id, - media=media, - business_connection_id=business_connection_id, - message_thread_id=message_thread_id, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - allow_sending_without_reply=allow_sending_without_reply, - reply_to_message_id=reply_to_message_id, - **kwargs, - ).as_(self._bot) - - def answer_photo( - self, - photo: Union[InputFile, str], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - show_caption_above_media: Optional[Union[bool, Default]] = Default( - "show_caption_above_media" - ), - has_spoiler: Optional[bool] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - **kwargs: Any, - ) -> SendPhoto: - """ - Shortcut for method :class:`aiogram.methods.send_photo.SendPhoto` - will automatically fill method attributes: - - - :code:`chat_id` - - Use this method to send photos. On success, the sent :class:`aiogram.types.message.Message` is returned. - - Source: https://core.telegram.org/bots/api#sendphoto - - :param photo: Photo to send. Pass a file_id as String to send a photo that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a photo from the Internet, or upload a new photo using multipart/form-data. The photo must be at most 10 MB in size. The photo's width and height must not exceed 10000 in total. Width and height ratio must be at most 20. :ref:`More information on Sending Files » ` - :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only - :param caption: Photo caption (may also be used when resending photos by *file_id*), 0-1024 characters after entities parsing - :param parse_mode: Mode for parsing entities in the photo caption. See `formatting options `_ for more details. - :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode* - :param show_caption_above_media: Pass :code:`True`, if the caption must be shown above the message media - :param has_spoiler: Pass :code:`True` if the photo needs to be covered with a spoiler animation - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param reply_to_message_id: If the message is a reply, ID of the original message - :return: instance of method :class:`aiogram.methods.send_photo.SendPhoto` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import SendPhoto - - return SendPhoto( - chat_id=self.chat.id, - photo=photo, - business_connection_id=business_connection_id, - message_thread_id=message_thread_id, - caption=caption, - parse_mode=parse_mode, - caption_entities=caption_entities, - show_caption_above_media=show_caption_above_media, - has_spoiler=has_spoiler, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - reply_to_message_id=reply_to_message_id, - **kwargs, - ).as_(self._bot) - - def answer_photo_pm( - self, - photo: Union[InputFile, str], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - show_caption_above_media: Optional[Union[bool, Default]] = Default( - "show_caption_above_media" - ), - has_spoiler: Optional[bool] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - **kwargs: Any, - ) -> SendPhoto: - """ - Shortcut for method :class:`aiogram.methods.send_photo.SendPhoto` - will automatically fill method attributes: - - - :code:`chat_id` - - Use this method to send photos. On success, the sent :class:`aiogram.types.message.Message` is returned. - - Source: https://core.telegram.org/bots/api#sendphoto - - :param photo: Photo to send. Pass a file_id as String to send a photo that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a photo from the Internet, or upload a new photo using multipart/form-data. The photo must be at most 10 MB in size. The photo's width and height must not exceed 10000 in total. Width and height ratio must be at most 20. :ref:`More information on Sending Files » ` - :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only - :param caption: Photo caption (may also be used when resending photos by *file_id*), 0-1024 characters after entities parsing - :param parse_mode: Mode for parsing entities in the photo caption. See `formatting options `_ for more details. - :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode* - :param show_caption_above_media: Pass :code:`True`, if the caption must be shown above the message media - :param has_spoiler: Pass :code:`True` if the photo needs to be covered with a spoiler animation - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param reply_to_message_id: If the message is a reply, ID of the original message - :return: instance of method :class:`aiogram.methods.send_photo.SendPhoto` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import SendPhoto - - return SendPhoto( - chat_id=self.user_chat_id, - photo=photo, - business_connection_id=business_connection_id, - message_thread_id=message_thread_id, - caption=caption, - parse_mode=parse_mode, - caption_entities=caption_entities, - show_caption_above_media=show_caption_above_media, - has_spoiler=has_spoiler, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - reply_to_message_id=reply_to_message_id, - **kwargs, - ).as_(self._bot) - - def answer_poll( - self, - question: str, - options: List[Union[InputPollOption, str]], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - question_parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - question_entities: Optional[List[MessageEntity]] = None, - is_anonymous: Optional[bool] = None, - type: Optional[str] = None, - allows_multiple_answers: Optional[bool] = None, - correct_option_id: Optional[int] = None, - explanation: Optional[str] = None, - explanation_parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - explanation_entities: Optional[List[MessageEntity]] = None, - open_period: Optional[int] = None, - close_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None, - is_closed: Optional[bool] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - **kwargs: Any, - ) -> SendPoll: - """ - Shortcut for method :class:`aiogram.methods.send_poll.SendPoll` - will automatically fill method attributes: - - - :code:`chat_id` - - Use this method to send a native poll. On success, the sent :class:`aiogram.types.message.Message` is returned. - - Source: https://core.telegram.org/bots/api#sendpoll - - :param question: Poll question, 1-300 characters - :param options: A JSON-serialized list of 2-10 answer options - :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only - :param question_parse_mode: Mode for parsing entities in the question. See `formatting options `_ for more details. Currently, only custom emoji entities are allowed - :param question_entities: A JSON-serialized list of special entities that appear in the poll question. It can be specified instead of *question_parse_mode* - :param is_anonymous: :code:`True`, if the poll needs to be anonymous, defaults to :code:`True` - :param type: Poll type, 'quiz' or 'regular', defaults to 'regular' - :param allows_multiple_answers: :code:`True`, if the poll allows multiple answers, ignored for polls in quiz mode, defaults to :code:`False` - :param correct_option_id: 0-based identifier of the correct answer option, required for polls in quiz mode - :param explanation: Text that is shown when a user chooses an incorrect answer or taps on the lamp icon in a quiz-style poll, 0-200 characters with at most 2 line feeds after entities parsing - :param explanation_parse_mode: Mode for parsing entities in the explanation. See `formatting options `_ for more details. - :param explanation_entities: A JSON-serialized list of special entities that appear in the poll explanation. It can be specified instead of *explanation_parse_mode* - :param open_period: Amount of time in seconds the poll will be active after creation, 5-600. Can't be used together with *close_date*. - :param close_date: 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 *open_period*. - :param is_closed: Pass :code:`True` if the poll needs to be immediately closed. This can be useful for poll preview. - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param reply_to_message_id: If the message is a reply, ID of the original message - :return: instance of method :class:`aiogram.methods.send_poll.SendPoll` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import SendPoll - - return SendPoll( - chat_id=self.chat.id, - question=question, - options=options, - business_connection_id=business_connection_id, - message_thread_id=message_thread_id, - question_parse_mode=question_parse_mode, - question_entities=question_entities, - is_anonymous=is_anonymous, - type=type, - allows_multiple_answers=allows_multiple_answers, - correct_option_id=correct_option_id, - explanation=explanation, - explanation_parse_mode=explanation_parse_mode, - explanation_entities=explanation_entities, - open_period=open_period, - close_date=close_date, - is_closed=is_closed, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - reply_to_message_id=reply_to_message_id, - **kwargs, - ).as_(self._bot) - - def answer_poll_pm( - self, - question: str, - options: List[Union[InputPollOption, str]], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - question_parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - question_entities: Optional[List[MessageEntity]] = None, - is_anonymous: Optional[bool] = None, - type: Optional[str] = None, - allows_multiple_answers: Optional[bool] = None, - correct_option_id: Optional[int] = None, - explanation: Optional[str] = None, - explanation_parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - explanation_entities: Optional[List[MessageEntity]] = None, - open_period: Optional[int] = None, - close_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None, - is_closed: Optional[bool] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - **kwargs: Any, - ) -> SendPoll: - """ - Shortcut for method :class:`aiogram.methods.send_poll.SendPoll` - will automatically fill method attributes: - - - :code:`chat_id` - - Use this method to send a native poll. On success, the sent :class:`aiogram.types.message.Message` is returned. - - Source: https://core.telegram.org/bots/api#sendpoll - - :param question: Poll question, 1-300 characters - :param options: A JSON-serialized list of 2-10 answer options - :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only - :param question_parse_mode: Mode for parsing entities in the question. See `formatting options `_ for more details. Currently, only custom emoji entities are allowed - :param question_entities: A JSON-serialized list of special entities that appear in the poll question. It can be specified instead of *question_parse_mode* - :param is_anonymous: :code:`True`, if the poll needs to be anonymous, defaults to :code:`True` - :param type: Poll type, 'quiz' or 'regular', defaults to 'regular' - :param allows_multiple_answers: :code:`True`, if the poll allows multiple answers, ignored for polls in quiz mode, defaults to :code:`False` - :param correct_option_id: 0-based identifier of the correct answer option, required for polls in quiz mode - :param explanation: Text that is shown when a user chooses an incorrect answer or taps on the lamp icon in a quiz-style poll, 0-200 characters with at most 2 line feeds after entities parsing - :param explanation_parse_mode: Mode for parsing entities in the explanation. See `formatting options `_ for more details. - :param explanation_entities: A JSON-serialized list of special entities that appear in the poll explanation. It can be specified instead of *explanation_parse_mode* - :param open_period: Amount of time in seconds the poll will be active after creation, 5-600. Can't be used together with *close_date*. - :param close_date: 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 *open_period*. - :param is_closed: Pass :code:`True` if the poll needs to be immediately closed. This can be useful for poll preview. - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param reply_to_message_id: If the message is a reply, ID of the original message - :return: instance of method :class:`aiogram.methods.send_poll.SendPoll` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import SendPoll - - return SendPoll( - chat_id=self.user_chat_id, - question=question, - options=options, - business_connection_id=business_connection_id, - message_thread_id=message_thread_id, - question_parse_mode=question_parse_mode, - question_entities=question_entities, - is_anonymous=is_anonymous, - type=type, - allows_multiple_answers=allows_multiple_answers, - correct_option_id=correct_option_id, - explanation=explanation, - explanation_parse_mode=explanation_parse_mode, - explanation_entities=explanation_entities, - open_period=open_period, - close_date=close_date, - is_closed=is_closed, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - reply_to_message_id=reply_to_message_id, - **kwargs, - ).as_(self._bot) - - def answer_dice( - self, - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - emoji: Optional[str] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - **kwargs: Any, - ) -> SendDice: - """ - Shortcut for method :class:`aiogram.methods.send_dice.SendDice` - will automatically fill method attributes: - - - :code:`chat_id` - - Use this method to send an animated emoji that will display a random value. On success, the sent :class:`aiogram.types.message.Message` is returned. - - Source: https://core.telegram.org/bots/api#senddice - - :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only - :param emoji: Emoji on which the dice throw animation is based. Currently, must be one of '🎲', '🎯', '🏀', '⚽', '🎳', or '🎰'. Dice can have values 1-6 for '🎲', '🎯' and '🎳', values 1-5 for '🏀' and '⚽', and values 1-64 for '🎰'. Defaults to '🎲' - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param reply_to_message_id: If the message is a reply, ID of the original message - :return: instance of method :class:`aiogram.methods.send_dice.SendDice` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import SendDice - - return SendDice( - chat_id=self.chat.id, - business_connection_id=business_connection_id, - message_thread_id=message_thread_id, - emoji=emoji, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - reply_to_message_id=reply_to_message_id, - **kwargs, - ).as_(self._bot) - - def answer_dice_pm( - self, - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - emoji: Optional[str] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - **kwargs: Any, - ) -> SendDice: - """ - Shortcut for method :class:`aiogram.methods.send_dice.SendDice` - will automatically fill method attributes: - - - :code:`chat_id` - - Use this method to send an animated emoji that will display a random value. On success, the sent :class:`aiogram.types.message.Message` is returned. - - Source: https://core.telegram.org/bots/api#senddice - - :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only - :param emoji: Emoji on which the dice throw animation is based. Currently, must be one of '🎲', '🎯', '🏀', '⚽', '🎳', or '🎰'. Dice can have values 1-6 for '🎲', '🎯' and '🎳', values 1-5 for '🏀' and '⚽', and values 1-64 for '🎰'. Defaults to '🎲' - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param reply_to_message_id: If the message is a reply, ID of the original message - :return: instance of method :class:`aiogram.methods.send_dice.SendDice` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import SendDice - - return SendDice( - chat_id=self.user_chat_id, - business_connection_id=business_connection_id, - message_thread_id=message_thread_id, - emoji=emoji, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - reply_to_message_id=reply_to_message_id, - **kwargs, - ).as_(self._bot) - - def answer_sticker( - self, - sticker: Union[InputFile, str], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - emoji: Optional[str] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - **kwargs: Any, - ) -> SendSticker: - """ - Shortcut for method :class:`aiogram.methods.send_sticker.SendSticker` - will automatically fill method attributes: - - - :code:`chat_id` - - Use this method to send static .WEBP, `animated `_ .TGS, or `video `_ .WEBM stickers. On success, the sent :class:`aiogram.types.message.Message` is returned. - - Source: https://core.telegram.org/bots/api#sendsticker - - :param sticker: Sticker to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a .WEBP sticker from the Internet, or upload a new .WEBP, .TGS, or .WEBM sticker using multipart/form-data. :ref:`More information on Sending Files » `. Video and animated stickers can't be sent via an HTTP URL. - :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only - :param emoji: Emoji associated with the sticker; only for just uploaded stickers - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param reply_to_message_id: If the message is a reply, ID of the original message - :return: instance of method :class:`aiogram.methods.send_sticker.SendSticker` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import SendSticker - - return SendSticker( - chat_id=self.chat.id, - sticker=sticker, - business_connection_id=business_connection_id, - message_thread_id=message_thread_id, - emoji=emoji, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - reply_to_message_id=reply_to_message_id, - **kwargs, - ).as_(self._bot) - - def answer_sticker_pm( - self, - sticker: Union[InputFile, str], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - emoji: Optional[str] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - **kwargs: Any, - ) -> SendSticker: - """ - Shortcut for method :class:`aiogram.methods.send_sticker.SendSticker` - will automatically fill method attributes: - - - :code:`chat_id` - - Use this method to send static .WEBP, `animated `_ .TGS, or `video `_ .WEBM stickers. On success, the sent :class:`aiogram.types.message.Message` is returned. - - Source: https://core.telegram.org/bots/api#sendsticker - - :param sticker: Sticker to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a .WEBP sticker from the Internet, or upload a new .WEBP, .TGS, or .WEBM sticker using multipart/form-data. :ref:`More information on Sending Files » `. Video and animated stickers can't be sent via an HTTP URL. - :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only - :param emoji: Emoji associated with the sticker; only for just uploaded stickers - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param reply_to_message_id: If the message is a reply, ID of the original message - :return: instance of method :class:`aiogram.methods.send_sticker.SendSticker` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import SendSticker - - return SendSticker( - chat_id=self.user_chat_id, - sticker=sticker, - business_connection_id=business_connection_id, - message_thread_id=message_thread_id, - emoji=emoji, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - reply_to_message_id=reply_to_message_id, - **kwargs, - ).as_(self._bot) - - def answer_venue( - self, - latitude: float, - longitude: float, - title: str, - address: str, - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - foursquare_id: Optional[str] = None, - foursquare_type: Optional[str] = None, - google_place_id: Optional[str] = None, - google_place_type: Optional[str] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - **kwargs: Any, - ) -> SendVenue: - """ - Shortcut for method :class:`aiogram.methods.send_venue.SendVenue` - will automatically fill method attributes: - - - :code:`chat_id` - - Use this method to send information about a venue. On success, the sent :class:`aiogram.types.message.Message` is returned. - - Source: https://core.telegram.org/bots/api#sendvenue - - :param latitude: Latitude of the venue - :param longitude: Longitude of the venue - :param title: Name of the venue - :param address: Address of the venue - :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only - :param foursquare_id: Foursquare identifier of the venue - :param foursquare_type: Foursquare type of the venue, if known. (For example, 'arts_entertainment/default', 'arts_entertainment/aquarium' or 'food/icecream'.) - :param google_place_id: Google Places identifier of the venue - :param google_place_type: Google Places type of the venue. (See `supported types `_.) - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param reply_to_message_id: If the message is a reply, ID of the original message - :return: instance of method :class:`aiogram.methods.send_venue.SendVenue` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import SendVenue - - return SendVenue( - chat_id=self.chat.id, - latitude=latitude, - longitude=longitude, - title=title, - address=address, - business_connection_id=business_connection_id, - message_thread_id=message_thread_id, - foursquare_id=foursquare_id, - foursquare_type=foursquare_type, - google_place_id=google_place_id, - google_place_type=google_place_type, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - reply_to_message_id=reply_to_message_id, - **kwargs, - ).as_(self._bot) - - def answer_venue_pm( - self, - latitude: float, - longitude: float, - title: str, - address: str, - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - foursquare_id: Optional[str] = None, - foursquare_type: Optional[str] = None, - google_place_id: Optional[str] = None, - google_place_type: Optional[str] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - **kwargs: Any, - ) -> SendVenue: - """ - Shortcut for method :class:`aiogram.methods.send_venue.SendVenue` - will automatically fill method attributes: - - - :code:`chat_id` - - Use this method to send information about a venue. On success, the sent :class:`aiogram.types.message.Message` is returned. - - Source: https://core.telegram.org/bots/api#sendvenue - - :param latitude: Latitude of the venue - :param longitude: Longitude of the venue - :param title: Name of the venue - :param address: Address of the venue - :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only - :param foursquare_id: Foursquare identifier of the venue - :param foursquare_type: Foursquare type of the venue, if known. (For example, 'arts_entertainment/default', 'arts_entertainment/aquarium' or 'food/icecream'.) - :param google_place_id: Google Places identifier of the venue - :param google_place_type: Google Places type of the venue. (See `supported types `_.) - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param reply_to_message_id: If the message is a reply, ID of the original message - :return: instance of method :class:`aiogram.methods.send_venue.SendVenue` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import SendVenue - - return SendVenue( - chat_id=self.user_chat_id, - latitude=latitude, - longitude=longitude, - title=title, - address=address, - business_connection_id=business_connection_id, - message_thread_id=message_thread_id, - foursquare_id=foursquare_id, - foursquare_type=foursquare_type, - google_place_id=google_place_id, - google_place_type=google_place_type, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - reply_to_message_id=reply_to_message_id, - **kwargs, - ).as_(self._bot) - - def answer_video( - self, - video: Union[InputFile, str], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - duration: Optional[int] = None, - width: Optional[int] = None, - height: Optional[int] = None, - thumbnail: Optional[InputFile] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - show_caption_above_media: Optional[Union[bool, Default]] = Default( - "show_caption_above_media" - ), - has_spoiler: Optional[bool] = None, - supports_streaming: Optional[bool] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - **kwargs: Any, - ) -> SendVideo: - """ - Shortcut for method :class:`aiogram.methods.send_video.SendVideo` - will automatically fill method attributes: - - - :code:`chat_id` - - Use this method to send video files, Telegram clients support MPEG4 videos (other formats may be sent as :class:`aiogram.types.document.Document`). On success, the sent :class:`aiogram.types.message.Message` is returned. Bots can currently send video files of up to 50 MB in size, this limit may be changed in the future. - - Source: https://core.telegram.org/bots/api#sendvideo - - :param video: Video to send. Pass a file_id as String to send a video that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a video from the Internet, or upload a new video using multipart/form-data. :ref:`More information on Sending Files » ` - :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only - :param duration: Duration of sent video in seconds - :param width: Video width - :param height: Video height - :param thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More information on Sending Files » ` - :param caption: Video caption (may also be used when resending videos by *file_id*), 0-1024 characters after entities parsing - :param parse_mode: Mode for parsing entities in the video caption. See `formatting options `_ for more details. - :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode* - :param show_caption_above_media: Pass :code:`True`, if the caption must be shown above the message media - :param has_spoiler: Pass :code:`True` if the video needs to be covered with a spoiler animation - :param supports_streaming: Pass :code:`True` if the uploaded video is suitable for streaming - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param reply_to_message_id: If the message is a reply, ID of the original message - :return: instance of method :class:`aiogram.methods.send_video.SendVideo` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import SendVideo - - return SendVideo( - chat_id=self.chat.id, - video=video, - business_connection_id=business_connection_id, - message_thread_id=message_thread_id, - duration=duration, - width=width, - height=height, - thumbnail=thumbnail, - caption=caption, - parse_mode=parse_mode, - caption_entities=caption_entities, - show_caption_above_media=show_caption_above_media, - has_spoiler=has_spoiler, - supports_streaming=supports_streaming, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - reply_to_message_id=reply_to_message_id, - **kwargs, - ).as_(self._bot) - - def answer_video_pm( - self, - video: Union[InputFile, str], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - duration: Optional[int] = None, - width: Optional[int] = None, - height: Optional[int] = None, - thumbnail: Optional[InputFile] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - show_caption_above_media: Optional[Union[bool, Default]] = Default( - "show_caption_above_media" - ), - has_spoiler: Optional[bool] = None, - supports_streaming: Optional[bool] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - **kwargs: Any, - ) -> SendVideo: - """ - Shortcut for method :class:`aiogram.methods.send_video.SendVideo` - will automatically fill method attributes: - - - :code:`chat_id` - - Use this method to send video files, Telegram clients support MPEG4 videos (other formats may be sent as :class:`aiogram.types.document.Document`). On success, the sent :class:`aiogram.types.message.Message` is returned. Bots can currently send video files of up to 50 MB in size, this limit may be changed in the future. - - Source: https://core.telegram.org/bots/api#sendvideo - - :param video: Video to send. Pass a file_id as String to send a video that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a video from the Internet, or upload a new video using multipart/form-data. :ref:`More information on Sending Files » ` - :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only - :param duration: Duration of sent video in seconds - :param width: Video width - :param height: Video height - :param thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More information on Sending Files » ` - :param caption: Video caption (may also be used when resending videos by *file_id*), 0-1024 characters after entities parsing - :param parse_mode: Mode for parsing entities in the video caption. See `formatting options `_ for more details. - :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode* - :param show_caption_above_media: Pass :code:`True`, if the caption must be shown above the message media - :param has_spoiler: Pass :code:`True` if the video needs to be covered with a spoiler animation - :param supports_streaming: Pass :code:`True` if the uploaded video is suitable for streaming - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param reply_to_message_id: If the message is a reply, ID of the original message - :return: instance of method :class:`aiogram.methods.send_video.SendVideo` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import SendVideo - - return SendVideo( - chat_id=self.user_chat_id, - video=video, - business_connection_id=business_connection_id, - message_thread_id=message_thread_id, - duration=duration, - width=width, - height=height, - thumbnail=thumbnail, - caption=caption, - parse_mode=parse_mode, - caption_entities=caption_entities, - show_caption_above_media=show_caption_above_media, - has_spoiler=has_spoiler, - supports_streaming=supports_streaming, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - reply_to_message_id=reply_to_message_id, - **kwargs, - ).as_(self._bot) - - def answer_video_note( - self, - video_note: Union[InputFile, str], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - duration: Optional[int] = None, - length: Optional[int] = None, - thumbnail: Optional[InputFile] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - **kwargs: Any, - ) -> SendVideoNote: - """ - Shortcut for method :class:`aiogram.methods.send_video_note.SendVideoNote` - will automatically fill method attributes: - - - :code:`chat_id` - - As of `v.4.0 `_, Telegram clients support rounded square MPEG4 videos of up to 1 minute long. Use this method to send video messages. On success, the sent :class:`aiogram.types.message.Message` is returned. - - Source: https://core.telegram.org/bots/api#sendvideonote - - :param video_note: Video note to send. Pass a file_id as String to send a video note that exists on the Telegram servers (recommended) or upload a new video using multipart/form-data. :ref:`More information on Sending Files » `. Sending video notes by a URL is currently unsupported - :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only - :param duration: Duration of sent video in seconds - :param length: Video width and height, i.e. diameter of the video message - :param thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More information on Sending Files » ` - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param reply_to_message_id: If the message is a reply, ID of the original message - :return: instance of method :class:`aiogram.methods.send_video_note.SendVideoNote` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import SendVideoNote - - return SendVideoNote( - chat_id=self.chat.id, - video_note=video_note, - business_connection_id=business_connection_id, - message_thread_id=message_thread_id, - duration=duration, - length=length, - thumbnail=thumbnail, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - reply_to_message_id=reply_to_message_id, - **kwargs, - ).as_(self._bot) - - def answer_video_note_pm( - self, - video_note: Union[InputFile, str], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - duration: Optional[int] = None, - length: Optional[int] = None, - thumbnail: Optional[InputFile] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - **kwargs: Any, - ) -> SendVideoNote: - """ - Shortcut for method :class:`aiogram.methods.send_video_note.SendVideoNote` - will automatically fill method attributes: - - - :code:`chat_id` - - As of `v.4.0 `_, Telegram clients support rounded square MPEG4 videos of up to 1 minute long. Use this method to send video messages. On success, the sent :class:`aiogram.types.message.Message` is returned. - - Source: https://core.telegram.org/bots/api#sendvideonote - - :param video_note: Video note to send. Pass a file_id as String to send a video note that exists on the Telegram servers (recommended) or upload a new video using multipart/form-data. :ref:`More information on Sending Files » `. Sending video notes by a URL is currently unsupported - :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only - :param duration: Duration of sent video in seconds - :param length: Video width and height, i.e. diameter of the video message - :param thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More information on Sending Files » ` - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param reply_to_message_id: If the message is a reply, ID of the original message - :return: instance of method :class:`aiogram.methods.send_video_note.SendVideoNote` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import SendVideoNote - - return SendVideoNote( - chat_id=self.user_chat_id, - video_note=video_note, - business_connection_id=business_connection_id, - message_thread_id=message_thread_id, - duration=duration, - length=length, - thumbnail=thumbnail, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - reply_to_message_id=reply_to_message_id, - **kwargs, - ).as_(self._bot) - - def answer_voice( - self, - voice: Union[InputFile, str], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - duration: Optional[int] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - **kwargs: Any, - ) -> SendVoice: - """ - Shortcut for method :class:`aiogram.methods.send_voice.SendVoice` - will automatically fill method attributes: - - - :code:`chat_id` - - Use this method to send audio files, if you want Telegram clients to display the file as a playable voice message. For this to work, your audio must be in an .OGG file encoded with OPUS, or in .MP3 format, or in .M4A format (other formats may be sent as :class:`aiogram.types.audio.Audio` or :class:`aiogram.types.document.Document`). On success, the sent :class:`aiogram.types.message.Message` is returned. Bots can currently send voice messages of up to 50 MB in size, this limit may be changed in the future. - - Source: https://core.telegram.org/bots/api#sendvoice - - :param voice: Audio file to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » ` - :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only - :param caption: Voice message caption, 0-1024 characters after entities parsing - :param parse_mode: Mode for parsing entities in the voice message caption. See `formatting options `_ for more details. - :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode* - :param duration: Duration of the voice message in seconds - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param reply_to_message_id: If the message is a reply, ID of the original message - :return: instance of method :class:`aiogram.methods.send_voice.SendVoice` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import SendVoice - - return SendVoice( - chat_id=self.chat.id, - voice=voice, - business_connection_id=business_connection_id, - message_thread_id=message_thread_id, - caption=caption, - parse_mode=parse_mode, - caption_entities=caption_entities, - duration=duration, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - reply_to_message_id=reply_to_message_id, - **kwargs, - ).as_(self._bot) - - def answer_voice_pm( - self, - voice: Union[InputFile, str], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - duration: Optional[int] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - **kwargs: Any, - ) -> SendVoice: - """ - Shortcut for method :class:`aiogram.methods.send_voice.SendVoice` - will automatically fill method attributes: - - - :code:`chat_id` - - Use this method to send audio files, if you want Telegram clients to display the file as a playable voice message. For this to work, your audio must be in an .OGG file encoded with OPUS, or in .MP3 format, or in .M4A format (other formats may be sent as :class:`aiogram.types.audio.Audio` or :class:`aiogram.types.document.Document`). On success, the sent :class:`aiogram.types.message.Message` is returned. Bots can currently send voice messages of up to 50 MB in size, this limit may be changed in the future. - - Source: https://core.telegram.org/bots/api#sendvoice - - :param voice: Audio file to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » ` - :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only - :param caption: Voice message caption, 0-1024 characters after entities parsing - :param parse_mode: Mode for parsing entities in the voice message caption. See `formatting options `_ for more details. - :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode* - :param duration: Duration of the voice message in seconds - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param reply_to_message_id: If the message is a reply, ID of the original message - :return: instance of method :class:`aiogram.methods.send_voice.SendVoice` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import SendVoice - - return SendVoice( - chat_id=self.user_chat_id, - voice=voice, - business_connection_id=business_connection_id, - message_thread_id=message_thread_id, - caption=caption, - parse_mode=parse_mode, - caption_entities=caption_entities, - duration=duration, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - reply_to_message_id=reply_to_message_id, - **kwargs, - ).as_(self._bot) diff --git a/env/Lib/site-packages/aiogram/types/chat_location.py b/env/Lib/site-packages/aiogram/types/chat_location.py deleted file mode 100644 index ad64a3c..0000000 --- a/env/Lib/site-packages/aiogram/types/chat_location.py +++ /dev/null @@ -1,34 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any - -from .base import TelegramObject - -if TYPE_CHECKING: - from .location import Location - - -class ChatLocation(TelegramObject): - """ - Represents a location to which a chat is connected. - - Source: https://core.telegram.org/bots/api#chatlocation - """ - - location: Location - """The location to which the supergroup is connected. Can't be a live location.""" - address: str - """Location address; 1-64 characters, as defined by the chat owner""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, *, location: Location, address: str, **__pydantic_kwargs: Any - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(location=location, address=address, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/types/chat_member.py b/env/Lib/site-packages/aiogram/types/chat_member.py deleted file mode 100644 index 018bebd..0000000 --- a/env/Lib/site-packages/aiogram/types/chat_member.py +++ /dev/null @@ -1,18 +0,0 @@ -from __future__ import annotations - -from .base import TelegramObject - - -class ChatMember(TelegramObject): - """ - This object contains information about one member of a chat. Currently, the following 6 types of chat members are supported: - - - :class:`aiogram.types.chat_member_owner.ChatMemberOwner` - - :class:`aiogram.types.chat_member_administrator.ChatMemberAdministrator` - - :class:`aiogram.types.chat_member_member.ChatMemberMember` - - :class:`aiogram.types.chat_member_restricted.ChatMemberRestricted` - - :class:`aiogram.types.chat_member_left.ChatMemberLeft` - - :class:`aiogram.types.chat_member_banned.ChatMemberBanned` - - Source: https://core.telegram.org/bots/api#chatmember - """ diff --git a/env/Lib/site-packages/aiogram/types/chat_member_administrator.py b/env/Lib/site-packages/aiogram/types/chat_member_administrator.py deleted file mode 100644 index 10552f7..0000000 --- a/env/Lib/site-packages/aiogram/types/chat_member_administrator.py +++ /dev/null @@ -1,111 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Literal, Optional - -from ..enums import ChatMemberStatus -from .chat_member import ChatMember - -if TYPE_CHECKING: - from .user import User - - -class ChatMemberAdministrator(ChatMember): - """ - Represents a `chat member `_ that has some additional privileges. - - Source: https://core.telegram.org/bots/api#chatmemberadministrator - """ - - status: Literal[ChatMemberStatus.ADMINISTRATOR] = ChatMemberStatus.ADMINISTRATOR - """The member's status in the chat, always 'administrator'""" - user: User - """Information about the user""" - can_be_edited: bool - """:code:`True`, if the bot is allowed to edit administrator privileges of that user""" - is_anonymous: bool - """:code:`True`, if the user's presence in the chat is hidden""" - can_manage_chat: bool - """:code:`True`, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages and ignore slow mode. Implied by any other administrator privilege.""" - can_delete_messages: bool - """:code:`True`, if the administrator can delete messages of other users""" - can_manage_video_chats: bool - """:code:`True`, if the administrator can manage video chats""" - can_restrict_members: bool - """:code:`True`, if the administrator can restrict, ban or unban chat members, or access supergroup statistics""" - can_promote_members: bool - """:code:`True`, if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have promoted, directly or indirectly (promoted by administrators that were appointed by the user)""" - can_change_info: bool - """:code:`True`, if the user is allowed to change the chat title, photo and other settings""" - can_invite_users: bool - """:code:`True`, if the user is allowed to invite new users to the chat""" - can_post_stories: bool - """:code:`True`, if the administrator can post stories to the chat""" - can_edit_stories: bool - """:code:`True`, if the administrator can edit stories posted by other users, post stories to the chat page, pin chat stories, and access the chat's story archive""" - can_delete_stories: bool - """:code:`True`, if the administrator can delete stories posted by other users""" - can_post_messages: Optional[bool] = None - """*Optional*. :code:`True`, if the administrator can post messages in the channel, or access channel statistics; for channels only""" - can_edit_messages: Optional[bool] = None - """*Optional*. :code:`True`, if the administrator can edit messages of other users and can pin messages; for channels only""" - can_pin_messages: Optional[bool] = None - """*Optional*. :code:`True`, if the user is allowed to pin messages; for groups and supergroups only""" - can_manage_topics: Optional[bool] = None - """*Optional*. :code:`True`, if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only""" - custom_title: Optional[str] = None - """*Optional*. Custom title for this user""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - status: Literal[ChatMemberStatus.ADMINISTRATOR] = ChatMemberStatus.ADMINISTRATOR, - user: User, - can_be_edited: bool, - is_anonymous: bool, - can_manage_chat: bool, - can_delete_messages: bool, - can_manage_video_chats: bool, - can_restrict_members: bool, - can_promote_members: bool, - can_change_info: bool, - can_invite_users: bool, - can_post_stories: bool, - can_edit_stories: bool, - can_delete_stories: bool, - can_post_messages: Optional[bool] = None, - can_edit_messages: Optional[bool] = None, - can_pin_messages: Optional[bool] = None, - can_manage_topics: Optional[bool] = None, - custom_title: Optional[str] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - status=status, - user=user, - can_be_edited=can_be_edited, - is_anonymous=is_anonymous, - can_manage_chat=can_manage_chat, - can_delete_messages=can_delete_messages, - can_manage_video_chats=can_manage_video_chats, - can_restrict_members=can_restrict_members, - can_promote_members=can_promote_members, - can_change_info=can_change_info, - can_invite_users=can_invite_users, - can_post_stories=can_post_stories, - can_edit_stories=can_edit_stories, - can_delete_stories=can_delete_stories, - can_post_messages=can_post_messages, - can_edit_messages=can_edit_messages, - can_pin_messages=can_pin_messages, - can_manage_topics=can_manage_topics, - custom_title=custom_title, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/chat_member_banned.py b/env/Lib/site-packages/aiogram/types/chat_member_banned.py deleted file mode 100644 index 65776c5..0000000 --- a/env/Lib/site-packages/aiogram/types/chat_member_banned.py +++ /dev/null @@ -1,43 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Literal - -from ..enums import ChatMemberStatus -from .chat_member import ChatMember -from .custom import DateTime - -if TYPE_CHECKING: - from .user import User - - -class ChatMemberBanned(ChatMember): - """ - Represents a `chat member `_ that was banned in the chat and can't return to the chat or view chat messages. - - Source: https://core.telegram.org/bots/api#chatmemberbanned - """ - - status: Literal[ChatMemberStatus.KICKED] = ChatMemberStatus.KICKED - """The member's status in the chat, always 'kicked'""" - user: User - """Information about the user""" - until_date: DateTime - """Date when restrictions will be lifted for this user; Unix time. If 0, then the user is banned forever""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - status: Literal[ChatMemberStatus.KICKED] = ChatMemberStatus.KICKED, - user: User, - until_date: DateTime, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(status=status, user=user, until_date=until_date, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/types/chat_member_left.py b/env/Lib/site-packages/aiogram/types/chat_member_left.py deleted file mode 100644 index 3870d17..0000000 --- a/env/Lib/site-packages/aiogram/types/chat_member_left.py +++ /dev/null @@ -1,39 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Literal - -from ..enums import ChatMemberStatus -from .chat_member import ChatMember - -if TYPE_CHECKING: - from .user import User - - -class ChatMemberLeft(ChatMember): - """ - Represents a `chat member `_ that isn't currently a member of the chat, but may join it themselves. - - Source: https://core.telegram.org/bots/api#chatmemberleft - """ - - status: Literal[ChatMemberStatus.LEFT] = ChatMemberStatus.LEFT - """The member's status in the chat, always 'left'""" - user: User - """Information about the user""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - status: Literal[ChatMemberStatus.LEFT] = ChatMemberStatus.LEFT, - user: User, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(status=status, user=user, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/types/chat_member_member.py b/env/Lib/site-packages/aiogram/types/chat_member_member.py deleted file mode 100644 index 12ef33e..0000000 --- a/env/Lib/site-packages/aiogram/types/chat_member_member.py +++ /dev/null @@ -1,43 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Literal, Optional - -from ..enums import ChatMemberStatus -from .chat_member import ChatMember -from .custom import DateTime - -if TYPE_CHECKING: - from .user import User - - -class ChatMemberMember(ChatMember): - """ - Represents a `chat member `_ that has no additional privileges or restrictions. - - Source: https://core.telegram.org/bots/api#chatmembermember - """ - - status: Literal[ChatMemberStatus.MEMBER] = ChatMemberStatus.MEMBER - """The member's status in the chat, always 'member'""" - user: User - """Information about the user""" - until_date: Optional[DateTime] = None - """*Optional*. Date when the user's subscription will expire; Unix time""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - status: Literal[ChatMemberStatus.MEMBER] = ChatMemberStatus.MEMBER, - user: User, - until_date: Optional[DateTime] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(status=status, user=user, until_date=until_date, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/types/chat_member_owner.py b/env/Lib/site-packages/aiogram/types/chat_member_owner.py deleted file mode 100644 index 1429435..0000000 --- a/env/Lib/site-packages/aiogram/types/chat_member_owner.py +++ /dev/null @@ -1,51 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Literal, Optional - -from ..enums import ChatMemberStatus -from .chat_member import ChatMember - -if TYPE_CHECKING: - from .user import User - - -class ChatMemberOwner(ChatMember): - """ - Represents a `chat member `_ that owns the chat and has all administrator privileges. - - Source: https://core.telegram.org/bots/api#chatmemberowner - """ - - status: Literal[ChatMemberStatus.CREATOR] = ChatMemberStatus.CREATOR - """The member's status in the chat, always 'creator'""" - user: User - """Information about the user""" - is_anonymous: bool - """:code:`True`, if the user's presence in the chat is hidden""" - custom_title: Optional[str] = None - """*Optional*. Custom title for this user""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - status: Literal[ChatMemberStatus.CREATOR] = ChatMemberStatus.CREATOR, - user: User, - is_anonymous: bool, - custom_title: Optional[str] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - status=status, - user=user, - is_anonymous=is_anonymous, - custom_title=custom_title, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/chat_member_restricted.py b/env/Lib/site-packages/aiogram/types/chat_member_restricted.py deleted file mode 100644 index edda75e..0000000 --- a/env/Lib/site-packages/aiogram/types/chat_member_restricted.py +++ /dev/null @@ -1,108 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Literal - -from ..enums import ChatMemberStatus -from .chat_member import ChatMember -from .custom import DateTime - -if TYPE_CHECKING: - from .user import User - - -class ChatMemberRestricted(ChatMember): - """ - Represents a `chat member `_ that is under certain restrictions in the chat. Supergroups only. - - Source: https://core.telegram.org/bots/api#chatmemberrestricted - """ - - status: Literal[ChatMemberStatus.RESTRICTED] = ChatMemberStatus.RESTRICTED - """The member's status in the chat, always 'restricted'""" - user: User - """Information about the user""" - is_member: bool - """:code:`True`, if the user is a member of the chat at the moment of the request""" - can_send_messages: bool - """:code:`True`, if the user is allowed to send text messages, contacts, giveaways, giveaway winners, invoices, locations and venues""" - can_send_audios: bool - """:code:`True`, if the user is allowed to send audios""" - can_send_documents: bool - """:code:`True`, if the user is allowed to send documents""" - can_send_photos: bool - """:code:`True`, if the user is allowed to send photos""" - can_send_videos: bool - """:code:`True`, if the user is allowed to send videos""" - can_send_video_notes: bool - """:code:`True`, if the user is allowed to send video notes""" - can_send_voice_notes: bool - """:code:`True`, if the user is allowed to send voice notes""" - can_send_polls: bool - """:code:`True`, if the user is allowed to send polls""" - can_send_other_messages: bool - """:code:`True`, if the user is allowed to send animations, games, stickers and use inline bots""" - can_add_web_page_previews: bool - """:code:`True`, if the user is allowed to add web page previews to their messages""" - can_change_info: bool - """:code:`True`, if the user is allowed to change the chat title, photo and other settings""" - can_invite_users: bool - """:code:`True`, if the user is allowed to invite new users to the chat""" - can_pin_messages: bool - """:code:`True`, if the user is allowed to pin messages""" - can_manage_topics: bool - """:code:`True`, if the user is allowed to create forum topics""" - until_date: DateTime - """Date when restrictions will be lifted for this user; Unix time. If 0, then the user is restricted forever""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - status: Literal[ChatMemberStatus.RESTRICTED] = ChatMemberStatus.RESTRICTED, - user: User, - is_member: bool, - can_send_messages: bool, - can_send_audios: bool, - can_send_documents: bool, - can_send_photos: bool, - can_send_videos: bool, - can_send_video_notes: bool, - can_send_voice_notes: bool, - can_send_polls: bool, - can_send_other_messages: bool, - can_add_web_page_previews: bool, - can_change_info: bool, - can_invite_users: bool, - can_pin_messages: bool, - can_manage_topics: bool, - until_date: DateTime, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - status=status, - user=user, - is_member=is_member, - can_send_messages=can_send_messages, - can_send_audios=can_send_audios, - can_send_documents=can_send_documents, - can_send_photos=can_send_photos, - can_send_videos=can_send_videos, - can_send_video_notes=can_send_video_notes, - can_send_voice_notes=can_send_voice_notes, - can_send_polls=can_send_polls, - can_send_other_messages=can_send_other_messages, - can_add_web_page_previews=can_add_web_page_previews, - can_change_info=can_change_info, - can_invite_users=can_invite_users, - can_pin_messages=can_pin_messages, - can_manage_topics=can_manage_topics, - until_date=until_date, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/chat_member_updated.py b/env/Lib/site-packages/aiogram/types/chat_member_updated.py deleted file mode 100644 index 48c3e9d..0000000 --- a/env/Lib/site-packages/aiogram/types/chat_member_updated.py +++ /dev/null @@ -1,1413 +0,0 @@ -from __future__ import annotations - -import datetime -from typing import TYPE_CHECKING, Any, List, Optional, Union - -from pydantic import Field - -from ..client.default import Default -from .base import TelegramObject -from .custom import DateTime - -if TYPE_CHECKING: - from ..methods import ( - SendAnimation, - SendAudio, - SendContact, - SendDice, - SendDocument, - SendGame, - SendInvoice, - SendLocation, - SendMediaGroup, - SendMessage, - SendPhoto, - SendPoll, - SendSticker, - SendVenue, - SendVideo, - SendVideoNote, - SendVoice, - ) - from .chat import Chat - from .chat_invite_link import ChatInviteLink - from .chat_member_administrator import ChatMemberAdministrator - from .chat_member_banned import ChatMemberBanned - from .chat_member_left import ChatMemberLeft - from .chat_member_member import ChatMemberMember - from .chat_member_owner import ChatMemberOwner - from .chat_member_restricted import ChatMemberRestricted - from .force_reply import ForceReply - from .inline_keyboard_markup import InlineKeyboardMarkup - from .input_file import InputFile - from .input_media_audio import InputMediaAudio - from .input_media_document import InputMediaDocument - from .input_media_photo import InputMediaPhoto - from .input_media_video import InputMediaVideo - from .input_poll_option import InputPollOption - from .labeled_price import LabeledPrice - from .link_preview_options import LinkPreviewOptions - from .message_entity import MessageEntity - from .reply_keyboard_markup import ReplyKeyboardMarkup - from .reply_keyboard_remove import ReplyKeyboardRemove - from .reply_parameters import ReplyParameters - from .user import User - - -class ChatMemberUpdated(TelegramObject): - """ - This object represents changes in the status of a chat member. - - Source: https://core.telegram.org/bots/api#chatmemberupdated - """ - - chat: Chat - """Chat the user belongs to""" - from_user: User = Field(..., alias="from") - """Performer of the action, which resulted in the change""" - date: DateTime - """Date the change was done in Unix time""" - old_chat_member: Union[ - ChatMemberOwner, - ChatMemberAdministrator, - ChatMemberMember, - ChatMemberRestricted, - ChatMemberLeft, - ChatMemberBanned, - ] - """Previous information about the chat member""" - new_chat_member: Union[ - ChatMemberOwner, - ChatMemberAdministrator, - ChatMemberMember, - ChatMemberRestricted, - ChatMemberLeft, - ChatMemberBanned, - ] - """New information about the chat member""" - invite_link: Optional[ChatInviteLink] = None - """*Optional*. Chat invite link, which was used by the user to join the chat; for joining by invite link events only.""" - via_join_request: Optional[bool] = None - """*Optional*. True, if the user joined the chat after sending a direct join request without using an invite link and being approved by an administrator""" - via_chat_folder_invite_link: Optional[bool] = None - """*Optional*. True, if the user joined the chat via a chat folder invite link""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - chat: Chat, - from_user: User, - date: DateTime, - old_chat_member: Union[ - ChatMemberOwner, - ChatMemberAdministrator, - ChatMemberMember, - ChatMemberRestricted, - ChatMemberLeft, - ChatMemberBanned, - ], - new_chat_member: Union[ - ChatMemberOwner, - ChatMemberAdministrator, - ChatMemberMember, - ChatMemberRestricted, - ChatMemberLeft, - ChatMemberBanned, - ], - invite_link: Optional[ChatInviteLink] = None, - via_join_request: Optional[bool] = None, - via_chat_folder_invite_link: Optional[bool] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - chat=chat, - from_user=from_user, - date=date, - old_chat_member=old_chat_member, - new_chat_member=new_chat_member, - invite_link=invite_link, - via_join_request=via_join_request, - via_chat_folder_invite_link=via_chat_folder_invite_link, - **__pydantic_kwargs, - ) - - def answer( - self, - text: str, - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - entities: Optional[List[MessageEntity]] = None, - link_preview_options: Optional[Union[LinkPreviewOptions, Default]] = Default( - "link_preview" - ), - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - disable_web_page_preview: Optional[Union[bool, Default]] = Default( - "link_preview_is_disabled" - ), - reply_to_message_id: Optional[int] = None, - **kwargs: Any, - ) -> SendMessage: - """ - Shortcut for method :class:`aiogram.methods.send_message.SendMessage` - will automatically fill method attributes: - - - :code:`chat_id` - - Use this method to send text messages. On success, the sent :class:`aiogram.types.message.Message` is returned. - - Source: https://core.telegram.org/bots/api#sendmessage - - :param text: Text of the message to be sent, 1-4096 characters after entities parsing - :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only - :param parse_mode: Mode for parsing entities in the message text. See `formatting options `_ for more details. - :param entities: A JSON-serialized list of special entities that appear in message text, which can be specified instead of *parse_mode* - :param link_preview_options: Link preview generation options for the message - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param disable_web_page_preview: Disables link previews for links in this message - :param reply_to_message_id: If the message is a reply, ID of the original message - :return: instance of method :class:`aiogram.methods.send_message.SendMessage` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import SendMessage - - return SendMessage( - chat_id=self.chat.id, - text=text, - business_connection_id=business_connection_id, - message_thread_id=message_thread_id, - parse_mode=parse_mode, - entities=entities, - link_preview_options=link_preview_options, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - disable_web_page_preview=disable_web_page_preview, - reply_to_message_id=reply_to_message_id, - **kwargs, - ).as_(self._bot) - - def answer_animation( - self, - animation: Union[InputFile, str], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - duration: Optional[int] = None, - width: Optional[int] = None, - height: Optional[int] = None, - thumbnail: Optional[InputFile] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - show_caption_above_media: Optional[Union[bool, Default]] = Default( - "show_caption_above_media" - ), - has_spoiler: Optional[bool] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - **kwargs: Any, - ) -> SendAnimation: - """ - Shortcut for method :class:`aiogram.methods.send_animation.SendAnimation` - will automatically fill method attributes: - - - :code:`chat_id` - - Use this method to send animation files (GIF or H.264/MPEG-4 AVC video without sound). On success, the sent :class:`aiogram.types.message.Message` is returned. Bots can currently send animation files of up to 50 MB in size, this limit may be changed in the future. - - Source: https://core.telegram.org/bots/api#sendanimation - - :param animation: Animation to send. Pass a file_id as String to send an animation that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an animation from the Internet, or upload a new animation using multipart/form-data. :ref:`More information on Sending Files » ` - :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only - :param duration: Duration of sent animation in seconds - :param width: Animation width - :param height: Animation height - :param thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More information on Sending Files » ` - :param caption: Animation caption (may also be used when resending animation by *file_id*), 0-1024 characters after entities parsing - :param parse_mode: Mode for parsing entities in the animation caption. See `formatting options `_ for more details. - :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode* - :param show_caption_above_media: Pass :code:`True`, if the caption must be shown above the message media - :param has_spoiler: Pass :code:`True` if the animation needs to be covered with a spoiler animation - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param reply_to_message_id: If the message is a reply, ID of the original message - :return: instance of method :class:`aiogram.methods.send_animation.SendAnimation` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import SendAnimation - - return SendAnimation( - chat_id=self.chat.id, - animation=animation, - business_connection_id=business_connection_id, - message_thread_id=message_thread_id, - duration=duration, - width=width, - height=height, - thumbnail=thumbnail, - caption=caption, - parse_mode=parse_mode, - caption_entities=caption_entities, - show_caption_above_media=show_caption_above_media, - has_spoiler=has_spoiler, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - reply_to_message_id=reply_to_message_id, - **kwargs, - ).as_(self._bot) - - def answer_audio( - self, - audio: Union[InputFile, str], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - duration: Optional[int] = None, - performer: Optional[str] = None, - title: Optional[str] = None, - thumbnail: Optional[InputFile] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - **kwargs: Any, - ) -> SendAudio: - """ - Shortcut for method :class:`aiogram.methods.send_audio.SendAudio` - will automatically fill method attributes: - - - :code:`chat_id` - - Use this method to send audio files, if you want Telegram clients to display them in the music player. Your audio must be in the .MP3 or .M4A format. On success, the sent :class:`aiogram.types.message.Message` is returned. Bots can currently send audio files of up to 50 MB in size, this limit may be changed in the future. - For sending voice messages, use the :class:`aiogram.methods.send_voice.SendVoice` method instead. - - Source: https://core.telegram.org/bots/api#sendaudio - - :param audio: Audio file to send. Pass a file_id as String to send an audio file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an audio file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » ` - :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only - :param caption: Audio caption, 0-1024 characters after entities parsing - :param parse_mode: Mode for parsing entities in the audio caption. See `formatting options `_ for more details. - :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode* - :param duration: Duration of the audio in seconds - :param performer: Performer - :param title: Track name - :param thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More information on Sending Files » ` - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param reply_to_message_id: If the message is a reply, ID of the original message - :return: instance of method :class:`aiogram.methods.send_audio.SendAudio` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import SendAudio - - return SendAudio( - chat_id=self.chat.id, - audio=audio, - business_connection_id=business_connection_id, - message_thread_id=message_thread_id, - caption=caption, - parse_mode=parse_mode, - caption_entities=caption_entities, - duration=duration, - performer=performer, - title=title, - thumbnail=thumbnail, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - reply_to_message_id=reply_to_message_id, - **kwargs, - ).as_(self._bot) - - def answer_contact( - self, - phone_number: str, - first_name: str, - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - last_name: Optional[str] = None, - vcard: Optional[str] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - **kwargs: Any, - ) -> SendContact: - """ - Shortcut for method :class:`aiogram.methods.send_contact.SendContact` - will automatically fill method attributes: - - - :code:`chat_id` - - Use this method to send phone contacts. On success, the sent :class:`aiogram.types.message.Message` is returned. - - Source: https://core.telegram.org/bots/api#sendcontact - - :param phone_number: Contact's phone number - :param first_name: Contact's first name - :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only - :param last_name: Contact's last name - :param vcard: Additional data about the contact in the form of a `vCard `_, 0-2048 bytes - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param reply_to_message_id: If the message is a reply, ID of the original message - :return: instance of method :class:`aiogram.methods.send_contact.SendContact` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import SendContact - - return SendContact( - chat_id=self.chat.id, - phone_number=phone_number, - first_name=first_name, - business_connection_id=business_connection_id, - message_thread_id=message_thread_id, - last_name=last_name, - vcard=vcard, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - reply_to_message_id=reply_to_message_id, - **kwargs, - ).as_(self._bot) - - def answer_document( - self, - document: Union[InputFile, str], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - thumbnail: Optional[InputFile] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - disable_content_type_detection: Optional[bool] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - **kwargs: Any, - ) -> SendDocument: - """ - Shortcut for method :class:`aiogram.methods.send_document.SendDocument` - will automatically fill method attributes: - - - :code:`chat_id` - - Use this method to send general files. On success, the sent :class:`aiogram.types.message.Message` is returned. Bots can currently send files of any type of up to 50 MB in size, this limit may be changed in the future. - - Source: https://core.telegram.org/bots/api#senddocument - - :param document: File to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » ` - :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only - :param thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More information on Sending Files » ` - :param caption: Document caption (may also be used when resending documents by *file_id*), 0-1024 characters after entities parsing - :param parse_mode: Mode for parsing entities in the document caption. See `formatting options `_ for more details. - :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode* - :param disable_content_type_detection: Disables automatic server-side content type detection for files uploaded using multipart/form-data - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param reply_to_message_id: If the message is a reply, ID of the original message - :return: instance of method :class:`aiogram.methods.send_document.SendDocument` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import SendDocument - - return SendDocument( - chat_id=self.chat.id, - document=document, - business_connection_id=business_connection_id, - message_thread_id=message_thread_id, - thumbnail=thumbnail, - caption=caption, - parse_mode=parse_mode, - caption_entities=caption_entities, - disable_content_type_detection=disable_content_type_detection, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - reply_to_message_id=reply_to_message_id, - **kwargs, - ).as_(self._bot) - - def answer_game( - self, - game_short_name: str, - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[InlineKeyboardMarkup] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - **kwargs: Any, - ) -> SendGame: - """ - Shortcut for method :class:`aiogram.methods.send_game.SendGame` - will automatically fill method attributes: - - - :code:`chat_id` - - Use this method to send a game. On success, the sent :class:`aiogram.types.message.Message` is returned. - - Source: https://core.telegram.org/bots/api#sendgame - - :param game_short_name: Short name of the game, serves as the unique identifier for the game. Set up your games via `@BotFather `_. - :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_parameters: Description of the message to reply to - :param reply_markup: A JSON-serialized object for an `inline keyboard `_. If empty, one 'Play game_title' button will be shown. If not empty, the first button must launch the game. - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param reply_to_message_id: If the message is a reply, ID of the original message - :return: instance of method :class:`aiogram.methods.send_game.SendGame` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import SendGame - - return SendGame( - chat_id=self.chat.id, - game_short_name=game_short_name, - business_connection_id=business_connection_id, - message_thread_id=message_thread_id, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - reply_to_message_id=reply_to_message_id, - **kwargs, - ).as_(self._bot) - - def answer_invoice( - self, - title: str, - description: str, - payload: str, - currency: str, - prices: List[LabeledPrice], - message_thread_id: Optional[int] = None, - provider_token: Optional[str] = None, - max_tip_amount: Optional[int] = None, - suggested_tip_amounts: Optional[List[int]] = None, - start_parameter: Optional[str] = None, - provider_data: Optional[str] = None, - photo_url: Optional[str] = None, - photo_size: Optional[int] = None, - photo_width: Optional[int] = None, - photo_height: Optional[int] = None, - need_name: Optional[bool] = None, - need_phone_number: Optional[bool] = None, - need_email: Optional[bool] = None, - need_shipping_address: Optional[bool] = None, - send_phone_number_to_provider: Optional[bool] = None, - send_email_to_provider: Optional[bool] = None, - is_flexible: Optional[bool] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[InlineKeyboardMarkup] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - **kwargs: Any, - ) -> SendInvoice: - """ - Shortcut for method :class:`aiogram.methods.send_invoice.SendInvoice` - will automatically fill method attributes: - - - :code:`chat_id` - - Use this method to send invoices. On success, the sent :class:`aiogram.types.message.Message` is returned. - - Source: https://core.telegram.org/bots/api#sendinvoice - - :param title: Product name, 1-32 characters - :param description: Product description, 1-255 characters - :param payload: Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes. - :param currency: Three-letter ISO 4217 currency code, see `more on currencies `_. Pass 'XTR' for payments in `Telegram Stars `_. - :param prices: Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.). Must contain exactly one item for payments in `Telegram Stars `_. - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only - :param provider_token: Payment provider token, obtained via `@BotFather `_. Pass an empty string for payments in `Telegram Stars `_. - :param max_tip_amount: The maximum accepted amount for tips in the *smallest units* of the currency (integer, **not** float/double). For example, for a maximum tip of :code:`US$ 1.45` pass :code:`max_tip_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). Defaults to 0. Not supported for payments in `Telegram Stars `_. - :param suggested_tip_amounts: A JSON-serialized array 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*. - :param start_parameter: Unique deep-linking parameter. If left empty, **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. If non-empty, 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 - :param provider_data: JSON-serialized 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. - :param photo_url: 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. - :param photo_size: Photo size in bytes - :param photo_width: Photo width - :param photo_height: Photo height - :param need_name: Pass :code:`True` if you require the user's full name to complete the order. Ignored for payments in `Telegram Stars `_. - :param need_phone_number: Pass :code:`True` if you require the user's phone number to complete the order. Ignored for payments in `Telegram Stars `_. - :param need_email: Pass :code:`True` if you require the user's email address to complete the order. Ignored for payments in `Telegram Stars `_. - :param need_shipping_address: Pass :code:`True` if you require the user's shipping address to complete the order. Ignored for payments in `Telegram Stars `_. - :param send_phone_number_to_provider: Pass :code:`True` if the user's phone number should be sent to the provider. Ignored for payments in `Telegram Stars `_. - :param send_email_to_provider: Pass :code:`True` if the user's email address should be sent to the provider. Ignored for payments in `Telegram Stars `_. - :param is_flexible: Pass :code:`True` if the final price depends on the shipping method. Ignored for payments in `Telegram Stars `_. - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_parameters: Description of the message to reply to - :param reply_markup: A JSON-serialized object for an `inline keyboard `_. If empty, one 'Pay :code:`total price`' button will be shown. If not empty, the first button must be a Pay button. - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param reply_to_message_id: If the message is a reply, ID of the original message - :return: instance of method :class:`aiogram.methods.send_invoice.SendInvoice` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import SendInvoice - - return SendInvoice( - chat_id=self.chat.id, - title=title, - description=description, - payload=payload, - currency=currency, - prices=prices, - message_thread_id=message_thread_id, - provider_token=provider_token, - max_tip_amount=max_tip_amount, - suggested_tip_amounts=suggested_tip_amounts, - start_parameter=start_parameter, - provider_data=provider_data, - photo_url=photo_url, - photo_size=photo_size, - photo_width=photo_width, - photo_height=photo_height, - need_name=need_name, - need_phone_number=need_phone_number, - need_email=need_email, - need_shipping_address=need_shipping_address, - send_phone_number_to_provider=send_phone_number_to_provider, - send_email_to_provider=send_email_to_provider, - is_flexible=is_flexible, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - reply_to_message_id=reply_to_message_id, - **kwargs, - ).as_(self._bot) - - def answer_location( - self, - latitude: float, - longitude: float, - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - horizontal_accuracy: Optional[float] = None, - live_period: Optional[int] = None, - heading: Optional[int] = None, - proximity_alert_radius: Optional[int] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - **kwargs: Any, - ) -> SendLocation: - """ - Shortcut for method :class:`aiogram.methods.send_location.SendLocation` - will automatically fill method attributes: - - - :code:`chat_id` - - Use this method to send point on the map. On success, the sent :class:`aiogram.types.message.Message` is returned. - - Source: https://core.telegram.org/bots/api#sendlocation - - :param latitude: Latitude of the location - :param longitude: Longitude of the location - :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only - :param horizontal_accuracy: The radius of uncertainty for the location, measured in meters; 0-1500 - :param live_period: Period in seconds during which the location will be updated (see `Live Locations `_, should be between 60 and 86400, or 0x7FFFFFFF for live locations that can be edited indefinitely. - :param heading: For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified. - :param proximity_alert_radius: For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified. - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param reply_to_message_id: If the message is a reply, ID of the original message - :return: instance of method :class:`aiogram.methods.send_location.SendLocation` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import SendLocation - - return SendLocation( - chat_id=self.chat.id, - latitude=latitude, - longitude=longitude, - business_connection_id=business_connection_id, - message_thread_id=message_thread_id, - horizontal_accuracy=horizontal_accuracy, - live_period=live_period, - heading=heading, - proximity_alert_radius=proximity_alert_radius, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - reply_to_message_id=reply_to_message_id, - **kwargs, - ).as_(self._bot) - - def answer_media_group( - self, - media: List[Union[InputMediaAudio, InputMediaDocument, InputMediaPhoto, InputMediaVideo]], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - **kwargs: Any, - ) -> SendMediaGroup: - """ - Shortcut for method :class:`aiogram.methods.send_media_group.SendMediaGroup` - will automatically fill method attributes: - - - :code:`chat_id` - - Use this method to send a group of photos, videos, documents or audios as an album. Documents and audio files can be only grouped in an album with messages of the same type. On success, an array of `Messages `_ that were sent is returned. - - Source: https://core.telegram.org/bots/api#sendmediagroup - - :param media: A JSON-serialized array describing messages to be sent, must include 2-10 items - :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only - :param disable_notification: Sends messages `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent messages from forwarding and saving - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_parameters: Description of the message to reply to - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param reply_to_message_id: If the messages are a reply, ID of the original message - :return: instance of method :class:`aiogram.methods.send_media_group.SendMediaGroup` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import SendMediaGroup - - return SendMediaGroup( - chat_id=self.chat.id, - media=media, - business_connection_id=business_connection_id, - message_thread_id=message_thread_id, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - allow_sending_without_reply=allow_sending_without_reply, - reply_to_message_id=reply_to_message_id, - **kwargs, - ).as_(self._bot) - - def answer_photo( - self, - photo: Union[InputFile, str], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - show_caption_above_media: Optional[Union[bool, Default]] = Default( - "show_caption_above_media" - ), - has_spoiler: Optional[bool] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - **kwargs: Any, - ) -> SendPhoto: - """ - Shortcut for method :class:`aiogram.methods.send_photo.SendPhoto` - will automatically fill method attributes: - - - :code:`chat_id` - - Use this method to send photos. On success, the sent :class:`aiogram.types.message.Message` is returned. - - Source: https://core.telegram.org/bots/api#sendphoto - - :param photo: Photo to send. Pass a file_id as String to send a photo that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a photo from the Internet, or upload a new photo using multipart/form-data. The photo must be at most 10 MB in size. The photo's width and height must not exceed 10000 in total. Width and height ratio must be at most 20. :ref:`More information on Sending Files » ` - :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only - :param caption: Photo caption (may also be used when resending photos by *file_id*), 0-1024 characters after entities parsing - :param parse_mode: Mode for parsing entities in the photo caption. See `formatting options `_ for more details. - :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode* - :param show_caption_above_media: Pass :code:`True`, if the caption must be shown above the message media - :param has_spoiler: Pass :code:`True` if the photo needs to be covered with a spoiler animation - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param reply_to_message_id: If the message is a reply, ID of the original message - :return: instance of method :class:`aiogram.methods.send_photo.SendPhoto` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import SendPhoto - - return SendPhoto( - chat_id=self.chat.id, - photo=photo, - business_connection_id=business_connection_id, - message_thread_id=message_thread_id, - caption=caption, - parse_mode=parse_mode, - caption_entities=caption_entities, - show_caption_above_media=show_caption_above_media, - has_spoiler=has_spoiler, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - reply_to_message_id=reply_to_message_id, - **kwargs, - ).as_(self._bot) - - def answer_poll( - self, - question: str, - options: List[Union[InputPollOption, str]], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - question_parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - question_entities: Optional[List[MessageEntity]] = None, - is_anonymous: Optional[bool] = None, - type: Optional[str] = None, - allows_multiple_answers: Optional[bool] = None, - correct_option_id: Optional[int] = None, - explanation: Optional[str] = None, - explanation_parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - explanation_entities: Optional[List[MessageEntity]] = None, - open_period: Optional[int] = None, - close_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None, - is_closed: Optional[bool] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - **kwargs: Any, - ) -> SendPoll: - """ - Shortcut for method :class:`aiogram.methods.send_poll.SendPoll` - will automatically fill method attributes: - - - :code:`chat_id` - - Use this method to send a native poll. On success, the sent :class:`aiogram.types.message.Message` is returned. - - Source: https://core.telegram.org/bots/api#sendpoll - - :param question: Poll question, 1-300 characters - :param options: A JSON-serialized list of 2-10 answer options - :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only - :param question_parse_mode: Mode for parsing entities in the question. See `formatting options `_ for more details. Currently, only custom emoji entities are allowed - :param question_entities: A JSON-serialized list of special entities that appear in the poll question. It can be specified instead of *question_parse_mode* - :param is_anonymous: :code:`True`, if the poll needs to be anonymous, defaults to :code:`True` - :param type: Poll type, 'quiz' or 'regular', defaults to 'regular' - :param allows_multiple_answers: :code:`True`, if the poll allows multiple answers, ignored for polls in quiz mode, defaults to :code:`False` - :param correct_option_id: 0-based identifier of the correct answer option, required for polls in quiz mode - :param explanation: Text that is shown when a user chooses an incorrect answer or taps on the lamp icon in a quiz-style poll, 0-200 characters with at most 2 line feeds after entities parsing - :param explanation_parse_mode: Mode for parsing entities in the explanation. See `formatting options `_ for more details. - :param explanation_entities: A JSON-serialized list of special entities that appear in the poll explanation. It can be specified instead of *explanation_parse_mode* - :param open_period: Amount of time in seconds the poll will be active after creation, 5-600. Can't be used together with *close_date*. - :param close_date: 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 *open_period*. - :param is_closed: Pass :code:`True` if the poll needs to be immediately closed. This can be useful for poll preview. - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param reply_to_message_id: If the message is a reply, ID of the original message - :return: instance of method :class:`aiogram.methods.send_poll.SendPoll` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import SendPoll - - return SendPoll( - chat_id=self.chat.id, - question=question, - options=options, - business_connection_id=business_connection_id, - message_thread_id=message_thread_id, - question_parse_mode=question_parse_mode, - question_entities=question_entities, - is_anonymous=is_anonymous, - type=type, - allows_multiple_answers=allows_multiple_answers, - correct_option_id=correct_option_id, - explanation=explanation, - explanation_parse_mode=explanation_parse_mode, - explanation_entities=explanation_entities, - open_period=open_period, - close_date=close_date, - is_closed=is_closed, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - reply_to_message_id=reply_to_message_id, - **kwargs, - ).as_(self._bot) - - def answer_dice( - self, - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - emoji: Optional[str] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - **kwargs: Any, - ) -> SendDice: - """ - Shortcut for method :class:`aiogram.methods.send_dice.SendDice` - will automatically fill method attributes: - - - :code:`chat_id` - - Use this method to send an animated emoji that will display a random value. On success, the sent :class:`aiogram.types.message.Message` is returned. - - Source: https://core.telegram.org/bots/api#senddice - - :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only - :param emoji: Emoji on which the dice throw animation is based. Currently, must be one of '🎲', '🎯', '🏀', '⚽', '🎳', or '🎰'. Dice can have values 1-6 for '🎲', '🎯' and '🎳', values 1-5 for '🏀' and '⚽', and values 1-64 for '🎰'. Defaults to '🎲' - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param reply_to_message_id: If the message is a reply, ID of the original message - :return: instance of method :class:`aiogram.methods.send_dice.SendDice` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import SendDice - - return SendDice( - chat_id=self.chat.id, - business_connection_id=business_connection_id, - message_thread_id=message_thread_id, - emoji=emoji, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - reply_to_message_id=reply_to_message_id, - **kwargs, - ).as_(self._bot) - - def answer_sticker( - self, - sticker: Union[InputFile, str], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - emoji: Optional[str] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - **kwargs: Any, - ) -> SendSticker: - """ - Shortcut for method :class:`aiogram.methods.send_sticker.SendSticker` - will automatically fill method attributes: - - - :code:`chat_id` - - Use this method to send static .WEBP, `animated `_ .TGS, or `video `_ .WEBM stickers. On success, the sent :class:`aiogram.types.message.Message` is returned. - - Source: https://core.telegram.org/bots/api#sendsticker - - :param sticker: Sticker to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a .WEBP sticker from the Internet, or upload a new .WEBP, .TGS, or .WEBM sticker using multipart/form-data. :ref:`More information on Sending Files » `. Video and animated stickers can't be sent via an HTTP URL. - :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only - :param emoji: Emoji associated with the sticker; only for just uploaded stickers - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param reply_to_message_id: If the message is a reply, ID of the original message - :return: instance of method :class:`aiogram.methods.send_sticker.SendSticker` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import SendSticker - - return SendSticker( - chat_id=self.chat.id, - sticker=sticker, - business_connection_id=business_connection_id, - message_thread_id=message_thread_id, - emoji=emoji, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - reply_to_message_id=reply_to_message_id, - **kwargs, - ).as_(self._bot) - - def answer_venue( - self, - latitude: float, - longitude: float, - title: str, - address: str, - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - foursquare_id: Optional[str] = None, - foursquare_type: Optional[str] = None, - google_place_id: Optional[str] = None, - google_place_type: Optional[str] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - **kwargs: Any, - ) -> SendVenue: - """ - Shortcut for method :class:`aiogram.methods.send_venue.SendVenue` - will automatically fill method attributes: - - - :code:`chat_id` - - Use this method to send information about a venue. On success, the sent :class:`aiogram.types.message.Message` is returned. - - Source: https://core.telegram.org/bots/api#sendvenue - - :param latitude: Latitude of the venue - :param longitude: Longitude of the venue - :param title: Name of the venue - :param address: Address of the venue - :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only - :param foursquare_id: Foursquare identifier of the venue - :param foursquare_type: Foursquare type of the venue, if known. (For example, 'arts_entertainment/default', 'arts_entertainment/aquarium' or 'food/icecream'.) - :param google_place_id: Google Places identifier of the venue - :param google_place_type: Google Places type of the venue. (See `supported types `_.) - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param reply_to_message_id: If the message is a reply, ID of the original message - :return: instance of method :class:`aiogram.methods.send_venue.SendVenue` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import SendVenue - - return SendVenue( - chat_id=self.chat.id, - latitude=latitude, - longitude=longitude, - title=title, - address=address, - business_connection_id=business_connection_id, - message_thread_id=message_thread_id, - foursquare_id=foursquare_id, - foursquare_type=foursquare_type, - google_place_id=google_place_id, - google_place_type=google_place_type, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - reply_to_message_id=reply_to_message_id, - **kwargs, - ).as_(self._bot) - - def answer_video( - self, - video: Union[InputFile, str], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - duration: Optional[int] = None, - width: Optional[int] = None, - height: Optional[int] = None, - thumbnail: Optional[InputFile] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - show_caption_above_media: Optional[Union[bool, Default]] = Default( - "show_caption_above_media" - ), - has_spoiler: Optional[bool] = None, - supports_streaming: Optional[bool] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - **kwargs: Any, - ) -> SendVideo: - """ - Shortcut for method :class:`aiogram.methods.send_video.SendVideo` - will automatically fill method attributes: - - - :code:`chat_id` - - Use this method to send video files, Telegram clients support MPEG4 videos (other formats may be sent as :class:`aiogram.types.document.Document`). On success, the sent :class:`aiogram.types.message.Message` is returned. Bots can currently send video files of up to 50 MB in size, this limit may be changed in the future. - - Source: https://core.telegram.org/bots/api#sendvideo - - :param video: Video to send. Pass a file_id as String to send a video that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a video from the Internet, or upload a new video using multipart/form-data. :ref:`More information on Sending Files » ` - :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only - :param duration: Duration of sent video in seconds - :param width: Video width - :param height: Video height - :param thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More information on Sending Files » ` - :param caption: Video caption (may also be used when resending videos by *file_id*), 0-1024 characters after entities parsing - :param parse_mode: Mode for parsing entities in the video caption. See `formatting options `_ for more details. - :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode* - :param show_caption_above_media: Pass :code:`True`, if the caption must be shown above the message media - :param has_spoiler: Pass :code:`True` if the video needs to be covered with a spoiler animation - :param supports_streaming: Pass :code:`True` if the uploaded video is suitable for streaming - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param reply_to_message_id: If the message is a reply, ID of the original message - :return: instance of method :class:`aiogram.methods.send_video.SendVideo` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import SendVideo - - return SendVideo( - chat_id=self.chat.id, - video=video, - business_connection_id=business_connection_id, - message_thread_id=message_thread_id, - duration=duration, - width=width, - height=height, - thumbnail=thumbnail, - caption=caption, - parse_mode=parse_mode, - caption_entities=caption_entities, - show_caption_above_media=show_caption_above_media, - has_spoiler=has_spoiler, - supports_streaming=supports_streaming, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - reply_to_message_id=reply_to_message_id, - **kwargs, - ).as_(self._bot) - - def answer_video_note( - self, - video_note: Union[InputFile, str], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - duration: Optional[int] = None, - length: Optional[int] = None, - thumbnail: Optional[InputFile] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - **kwargs: Any, - ) -> SendVideoNote: - """ - Shortcut for method :class:`aiogram.methods.send_video_note.SendVideoNote` - will automatically fill method attributes: - - - :code:`chat_id` - - As of `v.4.0 `_, Telegram clients support rounded square MPEG4 videos of up to 1 minute long. Use this method to send video messages. On success, the sent :class:`aiogram.types.message.Message` is returned. - - Source: https://core.telegram.org/bots/api#sendvideonote - - :param video_note: Video note to send. Pass a file_id as String to send a video note that exists on the Telegram servers (recommended) or upload a new video using multipart/form-data. :ref:`More information on Sending Files » `. Sending video notes by a URL is currently unsupported - :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only - :param duration: Duration of sent video in seconds - :param length: Video width and height, i.e. diameter of the video message - :param thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More information on Sending Files » ` - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param reply_to_message_id: If the message is a reply, ID of the original message - :return: instance of method :class:`aiogram.methods.send_video_note.SendVideoNote` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import SendVideoNote - - return SendVideoNote( - chat_id=self.chat.id, - video_note=video_note, - business_connection_id=business_connection_id, - message_thread_id=message_thread_id, - duration=duration, - length=length, - thumbnail=thumbnail, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - reply_to_message_id=reply_to_message_id, - **kwargs, - ).as_(self._bot) - - def answer_voice( - self, - voice: Union[InputFile, str], - business_connection_id: Optional[str] = None, - message_thread_id: Optional[int] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - duration: Optional[int] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - **kwargs: Any, - ) -> SendVoice: - """ - Shortcut for method :class:`aiogram.methods.send_voice.SendVoice` - will automatically fill method attributes: - - - :code:`chat_id` - - Use this method to send audio files, if you want Telegram clients to display the file as a playable voice message. For this to work, your audio must be in an .OGG file encoded with OPUS, or in .MP3 format, or in .M4A format (other formats may be sent as :class:`aiogram.types.audio.Audio` or :class:`aiogram.types.document.Document`). On success, the sent :class:`aiogram.types.message.Message` is returned. Bots can currently send voice messages of up to 50 MB in size, this limit may be changed in the future. - - Source: https://core.telegram.org/bots/api#sendvoice - - :param voice: Audio file to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » ` - :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only - :param caption: Voice message caption, 0-1024 characters after entities parsing - :param parse_mode: Mode for parsing entities in the voice message caption. See `formatting options `_ for more details. - :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode* - :param duration: Duration of the voice message in seconds - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param reply_to_message_id: If the message is a reply, ID of the original message - :return: instance of method :class:`aiogram.methods.send_voice.SendVoice` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import SendVoice - - return SendVoice( - chat_id=self.chat.id, - voice=voice, - business_connection_id=business_connection_id, - message_thread_id=message_thread_id, - caption=caption, - parse_mode=parse_mode, - caption_entities=caption_entities, - duration=duration, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - reply_to_message_id=reply_to_message_id, - **kwargs, - ).as_(self._bot) diff --git a/env/Lib/site-packages/aiogram/types/chat_permissions.py b/env/Lib/site-packages/aiogram/types/chat_permissions.py deleted file mode 100644 index 6270cc3..0000000 --- a/env/Lib/site-packages/aiogram/types/chat_permissions.py +++ /dev/null @@ -1,87 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Optional - -from .base import MutableTelegramObject - - -class ChatPermissions(MutableTelegramObject): - """ - Describes actions that a non-administrator user is allowed to take in a chat. - - Source: https://core.telegram.org/bots/api#chatpermissions - """ - - can_send_messages: Optional[bool] = None - """*Optional*. :code:`True`, if the user is allowed to send text messages, contacts, giveaways, giveaway winners, invoices, locations and venues""" - can_send_audios: Optional[bool] = None - """*Optional*. :code:`True`, if the user is allowed to send audios""" - can_send_documents: Optional[bool] = None - """*Optional*. :code:`True`, if the user is allowed to send documents""" - can_send_photos: Optional[bool] = None - """*Optional*. :code:`True`, if the user is allowed to send photos""" - can_send_videos: Optional[bool] = None - """*Optional*. :code:`True`, if the user is allowed to send videos""" - can_send_video_notes: Optional[bool] = None - """*Optional*. :code:`True`, if the user is allowed to send video notes""" - can_send_voice_notes: Optional[bool] = None - """*Optional*. :code:`True`, if the user is allowed to send voice notes""" - can_send_polls: Optional[bool] = None - """*Optional*. :code:`True`, if the user is allowed to send polls""" - can_send_other_messages: Optional[bool] = None - """*Optional*. :code:`True`, if the user is allowed to send animations, games, stickers and use inline bots""" - can_add_web_page_previews: Optional[bool] = None - """*Optional*. :code:`True`, if the user is allowed to add web page previews to their messages""" - can_change_info: Optional[bool] = None - """*Optional*. :code:`True`, if the user is allowed to change the chat title, photo and other settings. Ignored in public supergroups""" - can_invite_users: Optional[bool] = None - """*Optional*. :code:`True`, if the user is allowed to invite new users to the chat""" - can_pin_messages: Optional[bool] = None - """*Optional*. :code:`True`, if the user is allowed to pin messages. Ignored in public supergroups""" - can_manage_topics: Optional[bool] = None - """*Optional*. :code:`True`, if the user is allowed to create forum topics. If omitted defaults to the value of can_pin_messages""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - can_send_messages: Optional[bool] = None, - can_send_audios: Optional[bool] = None, - can_send_documents: Optional[bool] = None, - can_send_photos: Optional[bool] = None, - can_send_videos: Optional[bool] = None, - can_send_video_notes: Optional[bool] = None, - can_send_voice_notes: Optional[bool] = None, - can_send_polls: Optional[bool] = None, - can_send_other_messages: Optional[bool] = None, - can_add_web_page_previews: Optional[bool] = None, - can_change_info: Optional[bool] = None, - can_invite_users: Optional[bool] = None, - can_pin_messages: Optional[bool] = None, - can_manage_topics: Optional[bool] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - can_send_messages=can_send_messages, - can_send_audios=can_send_audios, - can_send_documents=can_send_documents, - can_send_photos=can_send_photos, - can_send_videos=can_send_videos, - can_send_video_notes=can_send_video_notes, - can_send_voice_notes=can_send_voice_notes, - can_send_polls=can_send_polls, - can_send_other_messages=can_send_other_messages, - can_add_web_page_previews=can_add_web_page_previews, - can_change_info=can_change_info, - can_invite_users=can_invite_users, - can_pin_messages=can_pin_messages, - can_manage_topics=can_manage_topics, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/chat_photo.py b/env/Lib/site-packages/aiogram/types/chat_photo.py deleted file mode 100644 index 1a64aeb..0000000 --- a/env/Lib/site-packages/aiogram/types/chat_photo.py +++ /dev/null @@ -1,47 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any - -from .base import TelegramObject - - -class ChatPhoto(TelegramObject): - """ - This object represents a chat photo. - - Source: https://core.telegram.org/bots/api#chatphoto - """ - - small_file_id: str - """File identifier of small (160x160) chat photo. This file_id can be used only for photo download and only for as long as the photo is not changed.""" - small_file_unique_id: str - """Unique file identifier of small (160x160) chat photo, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.""" - big_file_id: str - """File identifier of big (640x640) chat photo. This file_id can be used only for photo download and only for as long as the photo is not changed.""" - big_file_unique_id: str - """Unique file identifier of big (640x640) chat photo, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - small_file_id: str, - small_file_unique_id: str, - big_file_id: str, - big_file_unique_id: str, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - small_file_id=small_file_id, - small_file_unique_id=small_file_unique_id, - big_file_id=big_file_id, - big_file_unique_id=big_file_unique_id, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/chat_shared.py b/env/Lib/site-packages/aiogram/types/chat_shared.py deleted file mode 100644 index 92d6231..0000000 --- a/env/Lib/site-packages/aiogram/types/chat_shared.py +++ /dev/null @@ -1,54 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, List, Optional - -from aiogram.types import TelegramObject - -if TYPE_CHECKING: - from .photo_size import PhotoSize - - -class ChatShared(TelegramObject): - """ - This object contains information about a chat that was shared with the bot using a :class:`aiogram.types.keyboard_button_request_chat.KeyboardButtonRequestChat` button. - - Source: https://core.telegram.org/bots/api#chatshared - """ - - request_id: int - """Identifier of the request""" - chat_id: int - """Identifier of the shared chat. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier. The bot may not have access to the chat and could be unable to use this identifier, unless the chat is already known to the bot by some other means.""" - title: Optional[str] = None - """*Optional*. Title of the chat, if the title was requested by the bot.""" - username: Optional[str] = None - """*Optional*. Username of the chat, if the username was requested by the bot and available.""" - photo: Optional[List[PhotoSize]] = None - """*Optional*. Available sizes of the chat photo, if the photo was requested by the bot""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - request_id: int, - chat_id: int, - title: Optional[str] = None, - username: Optional[str] = None, - photo: Optional[List[PhotoSize]] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - request_id=request_id, - chat_id=chat_id, - title=title, - username=username, - photo=photo, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/chosen_inline_result.py b/env/Lib/site-packages/aiogram/types/chosen_inline_result.py deleted file mode 100644 index 510a0e1..0000000 --- a/env/Lib/site-packages/aiogram/types/chosen_inline_result.py +++ /dev/null @@ -1,58 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Optional - -from pydantic import Field - -from .base import TelegramObject - -if TYPE_CHECKING: - from .location import Location - from .user import User - - -class ChosenInlineResult(TelegramObject): - """ - Represents a `result `_ of an inline query that was chosen by the user and sent to their chat partner. - **Note:** It is necessary to enable `inline feedback `_ via `@BotFather `_ in order to receive these objects in updates. - - Source: https://core.telegram.org/bots/api#choseninlineresult - """ - - result_id: str - """The unique identifier for the result that was chosen""" - from_user: User = Field(..., alias="from") - """The user that chose the result""" - query: str - """The query that was used to obtain the result""" - location: Optional[Location] = None - """*Optional*. Sender location, only for bots that require user location""" - inline_message_id: Optional[str] = None - """*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.""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - result_id: str, - from_user: User, - query: str, - location: Optional[Location] = None, - inline_message_id: Optional[str] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - result_id=result_id, - from_user=from_user, - query=query, - location=location, - inline_message_id=inline_message_id, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/contact.py b/env/Lib/site-packages/aiogram/types/contact.py deleted file mode 100644 index 1fb7f83..0000000 --- a/env/Lib/site-packages/aiogram/types/contact.py +++ /dev/null @@ -1,51 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Optional - -from .base import TelegramObject - - -class Contact(TelegramObject): - """ - This object represents a phone contact. - - Source: https://core.telegram.org/bots/api#contact - """ - - phone_number: str - """Contact's phone number""" - first_name: str - """Contact's first name""" - last_name: Optional[str] = None - """*Optional*. Contact's last name""" - user_id: Optional[int] = None - """*Optional*. Contact's user identifier in Telegram. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier.""" - vcard: Optional[str] = None - """*Optional*. Additional data about the contact in the form of a `vCard `_""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - phone_number: str, - first_name: str, - last_name: Optional[str] = None, - user_id: Optional[int] = None, - vcard: Optional[str] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - phone_number=phone_number, - first_name=first_name, - last_name=last_name, - user_id=user_id, - vcard=vcard, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/custom.py b/env/Lib/site-packages/aiogram/types/custom.py deleted file mode 100644 index 8617fa6..0000000 --- a/env/Lib/site-packages/aiogram/types/custom.py +++ /dev/null @@ -1,30 +0,0 @@ -import sys -from datetime import datetime, timezone - -from pydantic import PlainSerializer -from typing_extensions import Annotated - -if sys.platform == "win32": # pragma: no cover - - def _datetime_serializer(value: datetime) -> int: - tz = timezone.utc if value.tzinfo else None - - # https://github.com/aiogram/aiogram/issues/349 - # https://github.com/aiogram/aiogram/pull/880 - return round((value - datetime(1970, 1, 1, tzinfo=tz)).total_seconds()) - -else: # pragma: no cover - - def _datetime_serializer(value: datetime) -> int: - return round(value.timestamp()) - - -# Make datetime compatible with Telegram Bot API (unixtime) -DateTime = Annotated[ - datetime, - PlainSerializer( - func=_datetime_serializer, - return_type=int, - when_used="unless-none", - ), -] diff --git a/env/Lib/site-packages/aiogram/types/dice.py b/env/Lib/site-packages/aiogram/types/dice.py deleted file mode 100644 index 56b84f4..0000000 --- a/env/Lib/site-packages/aiogram/types/dice.py +++ /dev/null @@ -1,40 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any - -from .base import TelegramObject - - -class Dice(TelegramObject): - """ - This object represents an animated emoji that displays a random value. - - Source: https://core.telegram.org/bots/api#dice - """ - - emoji: str - """Emoji on which the dice throw animation is based""" - value: int - """Value of the dice, 1-6 for '🎲', '🎯' and '🎳' base emoji, 1-5 for '🏀' and '⚽' base emoji, 1-64 for '🎰' base emoji""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, *, emoji: str, value: int, **__pydantic_kwargs: Any - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(emoji=emoji, value=value, **__pydantic_kwargs) - - -class DiceEmoji: - DICE = "🎲" - DART = "🎯" - BASKETBALL = "🏀" - FOOTBALL = "⚽" - SLOT_MACHINE = "🎰" - BOWLING = "🎳" diff --git a/env/Lib/site-packages/aiogram/types/document.py b/env/Lib/site-packages/aiogram/types/document.py deleted file mode 100644 index 18acff7..0000000 --- a/env/Lib/site-packages/aiogram/types/document.py +++ /dev/null @@ -1,58 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Optional - -from .base import TelegramObject - -if TYPE_CHECKING: - from .photo_size import PhotoSize - - -class Document(TelegramObject): - """ - This object represents a general file (as opposed to `photos `_, `voice messages `_ and `audio files `_). - - Source: https://core.telegram.org/bots/api#document - """ - - file_id: str - """Identifier for this file, which can be used to download or reuse the file""" - file_unique_id: str - """Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.""" - thumbnail: Optional[PhotoSize] = None - """*Optional*. Document thumbnail as defined by the sender""" - file_name: Optional[str] = None - """*Optional*. Original filename as defined by the sender""" - mime_type: Optional[str] = None - """*Optional*. MIME type of the file as defined by the sender""" - file_size: Optional[int] = None - """*Optional*. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value.""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - file_id: str, - file_unique_id: str, - thumbnail: Optional[PhotoSize] = None, - file_name: Optional[str] = None, - mime_type: Optional[str] = None, - file_size: Optional[int] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - file_id=file_id, - file_unique_id=file_unique_id, - thumbnail=thumbnail, - file_name=file_name, - mime_type=mime_type, - file_size=file_size, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/downloadable.py b/env/Lib/site-packages/aiogram/types/downloadable.py deleted file mode 100644 index be80829..0000000 --- a/env/Lib/site-packages/aiogram/types/downloadable.py +++ /dev/null @@ -1,5 +0,0 @@ -from typing import Protocol - - -class Downloadable(Protocol): - file_id: str diff --git a/env/Lib/site-packages/aiogram/types/encrypted_credentials.py b/env/Lib/site-packages/aiogram/types/encrypted_credentials.py deleted file mode 100644 index ca03e2a..0000000 --- a/env/Lib/site-packages/aiogram/types/encrypted_credentials.py +++ /dev/null @@ -1,33 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any - -from .base import TelegramObject - - -class EncryptedCredentials(TelegramObject): - """ - Describes data required for decrypting and authenticating :class:`aiogram.types.encrypted_passport_element.EncryptedPassportElement`. See the `Telegram Passport Documentation `_ for a complete description of the data decryption and authentication processes. - - Source: https://core.telegram.org/bots/api#encryptedcredentials - """ - - data: str - """Base64-encoded encrypted JSON-serialized data with unique user's payload, data hashes and secrets required for :class:`aiogram.types.encrypted_passport_element.EncryptedPassportElement` decryption and authentication""" - hash: str - """Base64-encoded data hash for data authentication""" - secret: str - """Base64-encoded secret, encrypted with the bot's public RSA key, required for data decryption""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, *, data: str, hash: str, secret: str, **__pydantic_kwargs: Any - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(data=data, hash=hash, secret=secret, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/types/encrypted_passport_element.py b/env/Lib/site-packages/aiogram/types/encrypted_passport_element.py deleted file mode 100644 index c1e8be1..0000000 --- a/env/Lib/site-packages/aiogram/types/encrypted_passport_element.py +++ /dev/null @@ -1,74 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, List, Optional - -from .base import TelegramObject - -if TYPE_CHECKING: - from .passport_file import PassportFile - - -class EncryptedPassportElement(TelegramObject): - """ - Describes documents or other Telegram Passport elements shared with the bot by the user. - - Source: https://core.telegram.org/bots/api#encryptedpassportelement - """ - - type: str - """Element type. One of 'personal_details', 'passport', 'driver_license', 'identity_card', 'internal_passport', 'address', 'utility_bill', 'bank_statement', 'rental_agreement', 'passport_registration', 'temporary_registration', 'phone_number', 'email'.""" - hash: str - """Base64-encoded element hash for using in :class:`aiogram.types.passport_element_error_unspecified.PassportElementErrorUnspecified`""" - data: Optional[str] = None - """*Optional*. Base64-encoded encrypted Telegram Passport element data provided by the user; available only for 'personal_details', 'passport', 'driver_license', 'identity_card', 'internal_passport' and 'address' types. Can be decrypted and verified using the accompanying :class:`aiogram.types.encrypted_credentials.EncryptedCredentials`.""" - phone_number: Optional[str] = None - """*Optional*. User's verified phone number; available only for 'phone_number' type""" - email: Optional[str] = None - """*Optional*. User's verified email address; available only for 'email' type""" - files: Optional[List[PassportFile]] = None - """*Optional*. Array of encrypted files with documents provided by the user; available only for 'utility_bill', 'bank_statement', 'rental_agreement', 'passport_registration' and 'temporary_registration' types. Files can be decrypted and verified using the accompanying :class:`aiogram.types.encrypted_credentials.EncryptedCredentials`.""" - front_side: Optional[PassportFile] = None - """*Optional*. Encrypted file with the front side of the document, provided by the user; available only for 'passport', 'driver_license', 'identity_card' and 'internal_passport'. The file can be decrypted and verified using the accompanying :class:`aiogram.types.encrypted_credentials.EncryptedCredentials`.""" - reverse_side: Optional[PassportFile] = None - """*Optional*. Encrypted file with the reverse side of the document, provided by the user; available only for 'driver_license' and 'identity_card'. The file can be decrypted and verified using the accompanying :class:`aiogram.types.encrypted_credentials.EncryptedCredentials`.""" - selfie: Optional[PassportFile] = None - """*Optional*. Encrypted file with the selfie of the user holding a document, provided by the user; available if requested for 'passport', 'driver_license', 'identity_card' and 'internal_passport'. The file can be decrypted and verified using the accompanying :class:`aiogram.types.encrypted_credentials.EncryptedCredentials`.""" - translation: Optional[List[PassportFile]] = None - """*Optional*. Array of encrypted files with translated versions of documents provided by the user; available if requested for 'passport', 'driver_license', 'identity_card', 'internal_passport', 'utility_bill', 'bank_statement', 'rental_agreement', 'passport_registration' and 'temporary_registration' types. Files can be decrypted and verified using the accompanying :class:`aiogram.types.encrypted_credentials.EncryptedCredentials`.""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - type: str, - hash: str, - data: Optional[str] = None, - phone_number: Optional[str] = None, - email: Optional[str] = None, - files: Optional[List[PassportFile]] = None, - front_side: Optional[PassportFile] = None, - reverse_side: Optional[PassportFile] = None, - selfie: Optional[PassportFile] = None, - translation: Optional[List[PassportFile]] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - type=type, - hash=hash, - data=data, - phone_number=phone_number, - email=email, - files=files, - front_side=front_side, - reverse_side=reverse_side, - selfie=selfie, - translation=translation, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/error_event.py b/env/Lib/site-packages/aiogram/types/error_event.py deleted file mode 100644 index e5eafc9..0000000 --- a/env/Lib/site-packages/aiogram/types/error_event.py +++ /dev/null @@ -1,28 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any - -from aiogram.types.base import TelegramObject - -if TYPE_CHECKING: - from .update import Update - - -class ErrorEvent(TelegramObject): - """ - Internal event, should be used to receive errors while processing Updates from Telegram - - Source: https://core.telegram.org/bots/api#error-event - """ - - update: Update - """Received update""" - exception: Exception - """Exception""" - - if TYPE_CHECKING: - - def __init__( - __pydantic_self__, *, update: Update, exception: Exception, **__pydantic_kwargs: Any - ) -> None: - super().__init__(update=update, exception=exception, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/types/external_reply_info.py b/env/Lib/site-packages/aiogram/types/external_reply_info.py deleted file mode 100644 index 0f13a85..0000000 --- a/env/Lib/site-packages/aiogram/types/external_reply_info.py +++ /dev/null @@ -1,158 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, List, Optional, Union - -from .base import TelegramObject - -if TYPE_CHECKING: - from .animation import Animation - from .audio import Audio - from .chat import Chat - from .contact import Contact - from .dice import Dice - from .document import Document - from .game import Game - from .giveaway import Giveaway - from .giveaway_winners import GiveawayWinners - from .invoice import Invoice - from .link_preview_options import LinkPreviewOptions - from .location import Location - from .message_origin_channel import MessageOriginChannel - from .message_origin_chat import MessageOriginChat - from .message_origin_hidden_user import MessageOriginHiddenUser - from .message_origin_user import MessageOriginUser - from .paid_media_info import PaidMediaInfo - from .photo_size import PhotoSize - from .poll import Poll - from .sticker import Sticker - from .story import Story - from .venue import Venue - from .video import Video - from .video_note import VideoNote - from .voice import Voice - - -class ExternalReplyInfo(TelegramObject): - """ - This object contains information about a message that is being replied to, which may come from another chat or forum topic. - - Source: https://core.telegram.org/bots/api#externalreplyinfo - """ - - origin: Union[ - MessageOriginUser, MessageOriginHiddenUser, MessageOriginChat, MessageOriginChannel - ] - """Origin of the message replied to by the given message""" - chat: Optional[Chat] = None - """*Optional*. Chat the original message belongs to. Available only if the chat is a supergroup or a channel.""" - message_id: Optional[int] = None - """*Optional*. Unique message identifier inside the original chat. Available only if the original chat is a supergroup or a channel.""" - link_preview_options: Optional[LinkPreviewOptions] = None - """*Optional*. Options used for link preview generation for the original message, if it is a text message""" - animation: Optional[Animation] = None - """*Optional*. Message is an animation, information about the animation""" - audio: Optional[Audio] = None - """*Optional*. Message is an audio file, information about the file""" - document: Optional[Document] = None - """*Optional*. Message is a general file, information about the file""" - paid_media: Optional[PaidMediaInfo] = None - """*Optional*. Message contains paid media; information about the paid media""" - photo: Optional[List[PhotoSize]] = None - """*Optional*. Message is a photo, available sizes of the photo""" - sticker: Optional[Sticker] = None - """*Optional*. Message is a sticker, information about the sticker""" - story: Optional[Story] = None - """*Optional*. Message is a forwarded story""" - video: Optional[Video] = None - """*Optional*. Message is a video, information about the video""" - video_note: Optional[VideoNote] = None - """*Optional*. Message is a `video note `_, information about the video message""" - voice: Optional[Voice] = None - """*Optional*. Message is a voice message, information about the file""" - has_media_spoiler: Optional[bool] = None - """*Optional*. :code:`True`, if the message media is covered by a spoiler animation""" - contact: Optional[Contact] = None - """*Optional*. Message is a shared contact, information about the contact""" - dice: Optional[Dice] = None - """*Optional*. Message is a dice with random value""" - game: Optional[Game] = None - """*Optional*. Message is a game, information about the game. `More about games » `_""" - giveaway: Optional[Giveaway] = None - """*Optional*. Message is a scheduled giveaway, information about the giveaway""" - giveaway_winners: Optional[GiveawayWinners] = None - """*Optional*. A giveaway with public winners was completed""" - invoice: Optional[Invoice] = None - """*Optional*. Message is an invoice for a `payment `_, information about the invoice. `More about payments » `_""" - location: Optional[Location] = None - """*Optional*. Message is a shared location, information about the location""" - poll: Optional[Poll] = None - """*Optional*. Message is a native poll, information about the poll""" - venue: Optional[Venue] = None - """*Optional*. Message is a venue, information about the venue""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - origin: Union[ - MessageOriginUser, MessageOriginHiddenUser, MessageOriginChat, MessageOriginChannel - ], - chat: Optional[Chat] = None, - message_id: Optional[int] = None, - link_preview_options: Optional[LinkPreviewOptions] = None, - animation: Optional[Animation] = None, - audio: Optional[Audio] = None, - document: Optional[Document] = None, - paid_media: Optional[PaidMediaInfo] = None, - photo: Optional[List[PhotoSize]] = None, - sticker: Optional[Sticker] = None, - story: Optional[Story] = None, - video: Optional[Video] = None, - video_note: Optional[VideoNote] = None, - voice: Optional[Voice] = None, - has_media_spoiler: Optional[bool] = None, - contact: Optional[Contact] = None, - dice: Optional[Dice] = None, - game: Optional[Game] = None, - giveaway: Optional[Giveaway] = None, - giveaway_winners: Optional[GiveawayWinners] = None, - invoice: Optional[Invoice] = None, - location: Optional[Location] = None, - poll: Optional[Poll] = None, - venue: Optional[Venue] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - origin=origin, - chat=chat, - message_id=message_id, - link_preview_options=link_preview_options, - animation=animation, - audio=audio, - document=document, - paid_media=paid_media, - photo=photo, - sticker=sticker, - story=story, - video=video, - video_note=video_note, - voice=voice, - has_media_spoiler=has_media_spoiler, - contact=contact, - dice=dice, - game=game, - giveaway=giveaway, - giveaway_winners=giveaway_winners, - invoice=invoice, - location=location, - poll=poll, - venue=venue, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/file.py b/env/Lib/site-packages/aiogram/types/file.py deleted file mode 100644 index 252c230..0000000 --- a/env/Lib/site-packages/aiogram/types/file.py +++ /dev/null @@ -1,49 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Optional - -from .base import TelegramObject - - -class File(TelegramObject): - """ - This object represents a file ready to be downloaded. The file can be downloaded via the link :code:`https://api.telegram.org/file/bot/`. It is guaranteed that the link will be valid for at least 1 hour. When the link expires, a new one can be requested by calling :class:`aiogram.methods.get_file.GetFile`. - - The maximum file size to download is 20 MB - - Source: https://core.telegram.org/bots/api#file - """ - - file_id: str - """Identifier for this file, which can be used to download or reuse the file""" - file_unique_id: str - """Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.""" - file_size: Optional[int] = None - """*Optional*. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value.""" - file_path: Optional[str] = None - """*Optional*. File path. Use :code:`https://api.telegram.org/file/bot/` to get the file.""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - file_id: str, - file_unique_id: str, - file_size: Optional[int] = None, - file_path: Optional[str] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - file_id=file_id, - file_unique_id=file_unique_id, - file_size=file_size, - file_path=file_path, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/force_reply.py b/env/Lib/site-packages/aiogram/types/force_reply.py deleted file mode 100644 index 14b9c1c..0000000 --- a/env/Lib/site-packages/aiogram/types/force_reply.py +++ /dev/null @@ -1,50 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Literal, Optional - -from .base import MutableTelegramObject - - -class ForceReply(MutableTelegramObject): - """ - Upon receiving a message with this object, Telegram clients will display a reply interface to the user (act as if the user has selected the bot's message and tapped 'Reply'). This can be extremely useful if you want to create user-friendly step-by-step interfaces without having to sacrifice `privacy mode `_. Not supported in channels and for messages sent on behalf of a Telegram Business account. - - **Example:** A `poll bot `_ for groups runs in privacy mode (only receives commands, replies to its messages and mentions). There could be two ways to create a new poll: - - - Explain the user how to send a command with parameters (e.g. /newpoll question answer1 answer2). May be appealing for hardcore users but lacks modern day polish. - - Guide the user through a step-by-step process. 'Please send me your question', 'Cool, now let's add the first answer option', 'Great. Keep adding answer options, then send /done when you're ready'. - - The last option is definitely more attractive. And if you use :class:`aiogram.types.force_reply.ForceReply` in your bot's questions, it will receive the user's answers even if it only receives replies, commands and mentions - without any extra work for the user. - - Source: https://core.telegram.org/bots/api#forcereply - """ - - force_reply: Literal[True] = True - """Shows reply interface to the user, as if they manually selected the bot's message and tapped 'Reply'""" - input_field_placeholder: Optional[str] = None - """*Optional*. The placeholder to be shown in the input field when the reply is active; 1-64 characters""" - selective: Optional[bool] = None - """*Optional*. Use this parameter if you want to force reply from specific users only. Targets: 1) users that are @mentioned in the *text* of the :class:`aiogram.types.message.Message` object; 2) if the bot's message is a reply to a message in the same chat and forum topic, sender of the original message.""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - force_reply: Literal[True] = True, - input_field_placeholder: Optional[str] = None, - selective: Optional[bool] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - force_reply=force_reply, - input_field_placeholder=input_field_placeholder, - selective=selective, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/forum_topic.py b/env/Lib/site-packages/aiogram/types/forum_topic.py deleted file mode 100644 index a6464bc..0000000 --- a/env/Lib/site-packages/aiogram/types/forum_topic.py +++ /dev/null @@ -1,47 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Optional - -from .base import TelegramObject - - -class ForumTopic(TelegramObject): - """ - This object represents a forum topic. - - Source: https://core.telegram.org/bots/api#forumtopic - """ - - message_thread_id: int - """Unique identifier of the forum topic""" - name: str - """Name of the topic""" - icon_color: int - """Color of the topic icon in RGB format""" - icon_custom_emoji_id: Optional[str] = None - """*Optional*. Unique identifier of the custom emoji shown as the topic icon""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - message_thread_id: int, - name: str, - icon_color: int, - icon_custom_emoji_id: Optional[str] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - message_thread_id=message_thread_id, - name=name, - icon_color=icon_color, - icon_custom_emoji_id=icon_custom_emoji_id, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/forum_topic_closed.py b/env/Lib/site-packages/aiogram/types/forum_topic_closed.py deleted file mode 100644 index 390b331..0000000 --- a/env/Lib/site-packages/aiogram/types/forum_topic_closed.py +++ /dev/null @@ -1,11 +0,0 @@ -from __future__ import annotations - -from .base import TelegramObject - - -class ForumTopicClosed(TelegramObject): - """ - This object represents a service message about a forum topic closed in the chat. Currently holds no information. - - Source: https://core.telegram.org/bots/api#forumtopicclosed - """ diff --git a/env/Lib/site-packages/aiogram/types/forum_topic_created.py b/env/Lib/site-packages/aiogram/types/forum_topic_created.py deleted file mode 100644 index 513df95..0000000 --- a/env/Lib/site-packages/aiogram/types/forum_topic_created.py +++ /dev/null @@ -1,43 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Optional - -from .base import TelegramObject - - -class ForumTopicCreated(TelegramObject): - """ - This object represents a service message about a new forum topic created in the chat. - - Source: https://core.telegram.org/bots/api#forumtopiccreated - """ - - name: str - """Name of the topic""" - icon_color: int - """Color of the topic icon in RGB format""" - icon_custom_emoji_id: Optional[str] = None - """*Optional*. Unique identifier of the custom emoji shown as the topic icon""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - name: str, - icon_color: int, - icon_custom_emoji_id: Optional[str] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - name=name, - icon_color=icon_color, - icon_custom_emoji_id=icon_custom_emoji_id, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/forum_topic_edited.py b/env/Lib/site-packages/aiogram/types/forum_topic_edited.py deleted file mode 100644 index b7b6196..0000000 --- a/env/Lib/site-packages/aiogram/types/forum_topic_edited.py +++ /dev/null @@ -1,35 +0,0 @@ -from typing import TYPE_CHECKING, Any, Optional - -from aiogram.types import TelegramObject - - -class ForumTopicEdited(TelegramObject): - """ - This object represents a service message about an edited forum topic. - - Source: https://core.telegram.org/bots/api#forumtopicedited - """ - - name: Optional[str] = None - """*Optional*. New name of the topic, if it was edited""" - icon_custom_emoji_id: Optional[str] = None - """*Optional*. New identifier of the custom emoji shown as the topic icon, if it was edited; an empty string if the icon was removed""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - name: Optional[str] = None, - icon_custom_emoji_id: Optional[str] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - name=name, icon_custom_emoji_id=icon_custom_emoji_id, **__pydantic_kwargs - ) diff --git a/env/Lib/site-packages/aiogram/types/forum_topic_reopened.py b/env/Lib/site-packages/aiogram/types/forum_topic_reopened.py deleted file mode 100644 index e02fbaf..0000000 --- a/env/Lib/site-packages/aiogram/types/forum_topic_reopened.py +++ /dev/null @@ -1,11 +0,0 @@ -from __future__ import annotations - -from .base import TelegramObject - - -class ForumTopicReopened(TelegramObject): - """ - This object represents a service message about a forum topic reopened in the chat. Currently holds no information. - - Source: https://core.telegram.org/bots/api#forumtopicreopened - """ diff --git a/env/Lib/site-packages/aiogram/types/game.py b/env/Lib/site-packages/aiogram/types/game.py deleted file mode 100644 index 294f26b..0000000 --- a/env/Lib/site-packages/aiogram/types/game.py +++ /dev/null @@ -1,60 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, List, Optional - -from .base import TelegramObject - -if TYPE_CHECKING: - from .animation import Animation - from .message_entity import MessageEntity - from .photo_size import PhotoSize - - -class Game(TelegramObject): - """ - This object represents a game. Use BotFather to create and edit games, their short names will act as unique identifiers. - - Source: https://core.telegram.org/bots/api#game - """ - - title: str - """Title of the game""" - description: str - """Description of the game""" - photo: List[PhotoSize] - """Photo that will be displayed in the game message in chats.""" - text: Optional[str] = None - """*Optional*. Brief description of the game or high scores included in the game message. Can be automatically edited to include current high scores for the game when the bot calls :class:`aiogram.methods.set_game_score.SetGameScore`, or manually edited using :class:`aiogram.methods.edit_message_text.EditMessageText`. 0-4096 characters.""" - text_entities: Optional[List[MessageEntity]] = None - """*Optional*. Special entities that appear in *text*, such as usernames, URLs, bot commands, etc.""" - animation: Optional[Animation] = None - """*Optional*. Animation that will be displayed in the game message in chats. Upload via `BotFather `_""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - title: str, - description: str, - photo: List[PhotoSize], - text: Optional[str] = None, - text_entities: Optional[List[MessageEntity]] = None, - animation: Optional[Animation] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - title=title, - description=description, - photo=photo, - text=text, - text_entities=text_entities, - animation=animation, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/game_high_score.py b/env/Lib/site-packages/aiogram/types/game_high_score.py deleted file mode 100644 index 5364be6..0000000 --- a/env/Lib/site-packages/aiogram/types/game_high_score.py +++ /dev/null @@ -1,39 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any - -from .base import TelegramObject - -if TYPE_CHECKING: - from .user import User - - -class GameHighScore(TelegramObject): - """ - This object represents one row of the high scores table for a game. - And that's about all we've got for now. - - If you've got any questions, please check out our `https://core.telegram.org/bots/faq `_ **Bot FAQ »** - - Source: https://core.telegram.org/bots/api#gamehighscore - """ - - position: int - """Position in high score table for the game""" - user: User - """User""" - score: int - """Score""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, *, position: int, user: User, score: int, **__pydantic_kwargs: Any - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(position=position, user=user, score=score, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/types/general_forum_topic_hidden.py b/env/Lib/site-packages/aiogram/types/general_forum_topic_hidden.py deleted file mode 100644 index 136a275..0000000 --- a/env/Lib/site-packages/aiogram/types/general_forum_topic_hidden.py +++ /dev/null @@ -1,9 +0,0 @@ -from aiogram.types import TelegramObject - - -class GeneralForumTopicHidden(TelegramObject): - """ - This object represents a service message about General forum topic hidden in the chat. Currently holds no information. - - Source: https://core.telegram.org/bots/api#generalforumtopichidden - """ diff --git a/env/Lib/site-packages/aiogram/types/general_forum_topic_unhidden.py b/env/Lib/site-packages/aiogram/types/general_forum_topic_unhidden.py deleted file mode 100644 index 9637a02..0000000 --- a/env/Lib/site-packages/aiogram/types/general_forum_topic_unhidden.py +++ /dev/null @@ -1,9 +0,0 @@ -from aiogram.types import TelegramObject - - -class GeneralForumTopicUnhidden(TelegramObject): - """ - This object represents a service message about General forum topic unhidden in the chat. Currently holds no information. - - Source: https://core.telegram.org/bots/api#generalforumtopicunhidden - """ diff --git a/env/Lib/site-packages/aiogram/types/giveaway.py b/env/Lib/site-packages/aiogram/types/giveaway.py deleted file mode 100644 index 1fa4f50..0000000 --- a/env/Lib/site-packages/aiogram/types/giveaway.py +++ /dev/null @@ -1,67 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, List, Optional - -from .base import TelegramObject - -if TYPE_CHECKING: - from .chat import Chat - from .custom import DateTime - - -class Giveaway(TelegramObject): - """ - This object represents a message about a scheduled giveaway. - - Source: https://core.telegram.org/bots/api#giveaway - """ - - chats: List[Chat] - """The list of chats which the user must join to participate in the giveaway""" - winners_selection_date: DateTime - """Point in time (Unix timestamp) when winners of the giveaway will be selected""" - winner_count: int - """The number of users which are supposed to be selected as winners of the giveaway""" - only_new_members: Optional[bool] = None - """*Optional*. :code:`True`, if only users who join the chats after the giveaway started should be eligible to win""" - has_public_winners: Optional[bool] = None - """*Optional*. :code:`True`, if the list of giveaway winners will be visible to everyone""" - prize_description: Optional[str] = None - """*Optional*. Description of additional giveaway prize""" - country_codes: Optional[List[str]] = None - """*Optional*. A list of two-letter `ISO 3166-1 alpha-2 `_ country codes indicating the countries from which eligible users for the giveaway must come. If empty, then all users can participate in the giveaway. Users with a phone number that was bought on Fragment can always participate in giveaways.""" - premium_subscription_month_count: Optional[int] = None - """*Optional*. The number of months the Telegram Premium subscription won from the giveaway will be active for""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - chats: List[Chat], - winners_selection_date: DateTime, - winner_count: int, - only_new_members: Optional[bool] = None, - has_public_winners: Optional[bool] = None, - prize_description: Optional[str] = None, - country_codes: Optional[List[str]] = None, - premium_subscription_month_count: Optional[int] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - chats=chats, - winners_selection_date=winners_selection_date, - winner_count=winner_count, - only_new_members=only_new_members, - has_public_winners=has_public_winners, - prize_description=prize_description, - country_codes=country_codes, - premium_subscription_month_count=premium_subscription_month_count, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/giveaway_completed.py b/env/Lib/site-packages/aiogram/types/giveaway_completed.py deleted file mode 100644 index 71d525a..0000000 --- a/env/Lib/site-packages/aiogram/types/giveaway_completed.py +++ /dev/null @@ -1,46 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Optional - -from .base import TelegramObject - -if TYPE_CHECKING: - from .message import Message - - -class GiveawayCompleted(TelegramObject): - """ - This object represents a service message about the completion of a giveaway without public winners. - - Source: https://core.telegram.org/bots/api#giveawaycompleted - """ - - winner_count: int - """Number of winners in the giveaway""" - unclaimed_prize_count: Optional[int] = None - """*Optional*. Number of undistributed prizes""" - giveaway_message: Optional[Message] = None - """*Optional*. Message with the giveaway that was completed, if it wasn't deleted""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - winner_count: int, - unclaimed_prize_count: Optional[int] = None, - giveaway_message: Optional[Message] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - winner_count=winner_count, - unclaimed_prize_count=unclaimed_prize_count, - giveaway_message=giveaway_message, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/giveaway_created.py b/env/Lib/site-packages/aiogram/types/giveaway_created.py deleted file mode 100644 index cd66d75..0000000 --- a/env/Lib/site-packages/aiogram/types/giveaway_created.py +++ /dev/null @@ -1,9 +0,0 @@ -from .base import TelegramObject - - -class GiveawayCreated(TelegramObject): - """ - This object represents a service message about the creation of a scheduled giveaway. Currently holds no information. - - Source: https://core.telegram.org/bots/api#giveawaycreated - """ diff --git a/env/Lib/site-packages/aiogram/types/giveaway_winners.py b/env/Lib/site-packages/aiogram/types/giveaway_winners.py deleted file mode 100644 index 8a501f8..0000000 --- a/env/Lib/site-packages/aiogram/types/giveaway_winners.py +++ /dev/null @@ -1,80 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, List, Optional - -from .base import TelegramObject - -if TYPE_CHECKING: - from .chat import Chat - from .custom import DateTime - from .user import User - - -class GiveawayWinners(TelegramObject): - """ - This object represents a message about the completion of a giveaway with public winners. - - Source: https://core.telegram.org/bots/api#giveawaywinners - """ - - chat: Chat - """The chat that created the giveaway""" - giveaway_message_id: int - """Identifier of the message with the giveaway in the chat""" - winners_selection_date: DateTime - """Point in time (Unix timestamp) when winners of the giveaway were selected""" - winner_count: int - """Total number of winners in the giveaway""" - winners: List[User] - """List of up to 100 winners of the giveaway""" - additional_chat_count: Optional[int] = None - """*Optional*. The number of other chats the user had to join in order to be eligible for the giveaway""" - premium_subscription_month_count: Optional[int] = None - """*Optional*. The number of months the Telegram Premium subscription won from the giveaway will be active for""" - unclaimed_prize_count: Optional[int] = None - """*Optional*. Number of undistributed prizes""" - only_new_members: Optional[bool] = None - """*Optional*. :code:`True`, if only users who had joined the chats after the giveaway started were eligible to win""" - was_refunded: Optional[bool] = None - """*Optional*. :code:`True`, if the giveaway was canceled because the payment for it was refunded""" - prize_description: Optional[str] = None - """*Optional*. Description of additional giveaway prize""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - chat: Chat, - giveaway_message_id: int, - winners_selection_date: DateTime, - winner_count: int, - winners: List[User], - additional_chat_count: Optional[int] = None, - premium_subscription_month_count: Optional[int] = None, - unclaimed_prize_count: Optional[int] = None, - only_new_members: Optional[bool] = None, - was_refunded: Optional[bool] = None, - prize_description: Optional[str] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - chat=chat, - giveaway_message_id=giveaway_message_id, - winners_selection_date=winners_selection_date, - winner_count=winner_count, - winners=winners, - additional_chat_count=additional_chat_count, - premium_subscription_month_count=premium_subscription_month_count, - unclaimed_prize_count=unclaimed_prize_count, - only_new_members=only_new_members, - was_refunded=was_refunded, - prize_description=prize_description, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/inaccessible_message.py b/env/Lib/site-packages/aiogram/types/inaccessible_message.py deleted file mode 100644 index 6ed38fe..0000000 --- a/env/Lib/site-packages/aiogram/types/inaccessible_message.py +++ /dev/null @@ -1,41 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Literal - -from .maybe_inaccessible_message import MaybeInaccessibleMessage - -if TYPE_CHECKING: - from .chat import Chat - - -class InaccessibleMessage(MaybeInaccessibleMessage): - """ - This object describes a message that was deleted or is otherwise inaccessible to the bot. - - Source: https://core.telegram.org/bots/api#inaccessiblemessage - """ - - chat: Chat - """Chat the message belonged to""" - message_id: int - """Unique message identifier inside the chat""" - date: Literal[0] = 0 - """Always 0. The field can be used to differentiate regular and inaccessible messages.""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - chat: Chat, - message_id: int, - date: Literal[0] = 0, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(chat=chat, message_id=message_id, date=date, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/types/inline_keyboard_button.py b/env/Lib/site-packages/aiogram/types/inline_keyboard_button.py deleted file mode 100644 index fa801f2..0000000 --- a/env/Lib/site-packages/aiogram/types/inline_keyboard_button.py +++ /dev/null @@ -1,77 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Optional - -from .base import MutableTelegramObject - -if TYPE_CHECKING: - from .callback_game import CallbackGame - from .login_url import LoginUrl - from .switch_inline_query_chosen_chat import SwitchInlineQueryChosenChat - from .web_app_info import WebAppInfo - - -class InlineKeyboardButton(MutableTelegramObject): - """ - This object represents one button of an inline keyboard. Exactly one of the optional fields must be used to specify type of the button. - - Source: https://core.telegram.org/bots/api#inlinekeyboardbutton - """ - - text: str - """Label text on the button""" - url: Optional[str] = None - """*Optional*. HTTP or tg:// URL to be opened when the button is pressed. Links :code:`tg://user?id=` can be used to mention a user by their identifier without using a username, if this is allowed by their privacy settings.""" - callback_data: Optional[str] = None - """*Optional*. Data to be sent in a `callback query `_ to the bot when the button is pressed, 1-64 bytes""" - web_app: Optional[WebAppInfo] = None - """*Optional*. Description of the `Web App `_ that will be launched when the user presses the button. The Web App will be able to send an arbitrary message on behalf of the user using the method :class:`aiogram.methods.answer_web_app_query.AnswerWebAppQuery`. Available only in private chats between a user and the bot. Not supported for messages sent on behalf of a Telegram Business account.""" - login_url: Optional[LoginUrl] = None - """*Optional*. An HTTPS URL used to automatically authorize the user. Can be used as a replacement for the `Telegram Login Widget `_.""" - switch_inline_query: Optional[str] = None - """*Optional*. If set, 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. May be empty, in which case just the bot's username will be inserted. Not supported for messages sent on behalf of a Telegram Business account.""" - switch_inline_query_current_chat: Optional[str] = None - """*Optional*. If set, pressing the button will insert the bot's username and the specified inline query in the current chat's input field. May be empty, in which case only the bot's username will be inserted.""" - switch_inline_query_chosen_chat: Optional[SwitchInlineQueryChosenChat] = None - """*Optional*. If set, pressing the button will prompt the user to select one of their chats of the specified type, open that chat and insert the bot's username and the specified inline query in the input field. Not supported for messages sent on behalf of a Telegram Business account.""" - callback_game: Optional[CallbackGame] = None - """*Optional*. Description of the game that will be launched when the user presses the button.""" - pay: Optional[bool] = None - """*Optional*. Specify :code:`True`, to send a `Pay button `_. Substrings '⭐' and 'XTR' in the buttons's text will be replaced with a Telegram Star icon.""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - text: str, - url: Optional[str] = None, - callback_data: Optional[str] = None, - web_app: Optional[WebAppInfo] = None, - login_url: Optional[LoginUrl] = None, - switch_inline_query: Optional[str] = None, - switch_inline_query_current_chat: Optional[str] = None, - switch_inline_query_chosen_chat: Optional[SwitchInlineQueryChosenChat] = None, - callback_game: Optional[CallbackGame] = None, - pay: Optional[bool] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - text=text, - url=url, - callback_data=callback_data, - web_app=web_app, - login_url=login_url, - switch_inline_query=switch_inline_query, - switch_inline_query_current_chat=switch_inline_query_current_chat, - switch_inline_query_chosen_chat=switch_inline_query_chosen_chat, - callback_game=callback_game, - pay=pay, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/inline_keyboard_markup.py b/env/Lib/site-packages/aiogram/types/inline_keyboard_markup.py deleted file mode 100644 index e5b8967..0000000 --- a/env/Lib/site-packages/aiogram/types/inline_keyboard_markup.py +++ /dev/null @@ -1,35 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, List - -from .base import MutableTelegramObject - -if TYPE_CHECKING: - from .inline_keyboard_button import InlineKeyboardButton - - -class InlineKeyboardMarkup(MutableTelegramObject): - """ - This object represents an `inline keyboard `_ that appears right next to the message it belongs to. - - Source: https://core.telegram.org/bots/api#inlinekeyboardmarkup - """ - - inline_keyboard: List[List[InlineKeyboardButton]] - """Array of button rows, each represented by an Array of :class:`aiogram.types.inline_keyboard_button.InlineKeyboardButton` objects""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - inline_keyboard: List[List[InlineKeyboardButton]], - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(inline_keyboard=inline_keyboard, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/types/inline_query.py b/env/Lib/site-packages/aiogram/types/inline_query.py deleted file mode 100644 index a0cad31..0000000 --- a/env/Lib/site-packages/aiogram/types/inline_query.py +++ /dev/null @@ -1,155 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, List, Optional, Union - -from pydantic import Field - -from .base import TelegramObject - -if TYPE_CHECKING: - from ..methods import AnswerInlineQuery - from .inline_query_result_article import InlineQueryResultArticle - from .inline_query_result_audio import InlineQueryResultAudio - from .inline_query_result_cached_audio import InlineQueryResultCachedAudio - from .inline_query_result_cached_document import InlineQueryResultCachedDocument - from .inline_query_result_cached_gif import InlineQueryResultCachedGif - from .inline_query_result_cached_mpeg4_gif import InlineQueryResultCachedMpeg4Gif - from .inline_query_result_cached_photo import InlineQueryResultCachedPhoto - from .inline_query_result_cached_sticker import InlineQueryResultCachedSticker - from .inline_query_result_cached_video import InlineQueryResultCachedVideo - from .inline_query_result_cached_voice import InlineQueryResultCachedVoice - from .inline_query_result_contact import InlineQueryResultContact - from .inline_query_result_document import InlineQueryResultDocument - from .inline_query_result_game import InlineQueryResultGame - from .inline_query_result_gif import InlineQueryResultGif - from .inline_query_result_location import InlineQueryResultLocation - from .inline_query_result_mpeg4_gif import InlineQueryResultMpeg4Gif - from .inline_query_result_photo import InlineQueryResultPhoto - from .inline_query_result_venue import InlineQueryResultVenue - from .inline_query_result_video import InlineQueryResultVideo - from .inline_query_result_voice import InlineQueryResultVoice - from .inline_query_results_button import InlineQueryResultsButton - from .location import Location - from .user import User - - -class InlineQuery(TelegramObject): - """ - This object represents an incoming inline query. When the user sends an empty query, your bot could return some default or trending results. - - Source: https://core.telegram.org/bots/api#inlinequery - """ - - id: str - """Unique identifier for this query""" - from_user: User = Field(..., alias="from") - """Sender""" - query: str - """Text of the query (up to 256 characters)""" - offset: str - """Offset of the results to be returned, can be controlled by the bot""" - chat_type: Optional[str] = None - """*Optional*. Type of the chat from which the inline query was sent. Can be either 'sender' for a private chat with the inline query sender, 'private', 'group', 'supergroup', or 'channel'. The chat type should be always known for requests sent from official clients and most third-party clients, unless the request was sent from a secret chat""" - location: Optional[Location] = None - """*Optional*. Sender location, only for bots that request user location""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - id: str, - from_user: User, - query: str, - offset: str, - chat_type: Optional[str] = None, - location: Optional[Location] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - id=id, - from_user=from_user, - query=query, - offset=offset, - chat_type=chat_type, - location=location, - **__pydantic_kwargs, - ) - - def answer( - self, - results: List[ - Union[ - InlineQueryResultCachedAudio, - InlineQueryResultCachedDocument, - InlineQueryResultCachedGif, - InlineQueryResultCachedMpeg4Gif, - InlineQueryResultCachedPhoto, - InlineQueryResultCachedSticker, - InlineQueryResultCachedVideo, - InlineQueryResultCachedVoice, - InlineQueryResultArticle, - InlineQueryResultAudio, - InlineQueryResultContact, - InlineQueryResultGame, - InlineQueryResultDocument, - InlineQueryResultGif, - InlineQueryResultLocation, - InlineQueryResultMpeg4Gif, - InlineQueryResultPhoto, - InlineQueryResultVenue, - InlineQueryResultVideo, - InlineQueryResultVoice, - ] - ], - cache_time: Optional[int] = None, - is_personal: Optional[bool] = None, - next_offset: Optional[str] = None, - button: Optional[InlineQueryResultsButton] = None, - switch_pm_parameter: Optional[str] = None, - switch_pm_text: Optional[str] = None, - **kwargs: Any, - ) -> AnswerInlineQuery: - """ - Shortcut for method :class:`aiogram.methods.answer_inline_query.AnswerInlineQuery` - will automatically fill method attributes: - - - :code:`inline_query_id` - - Use this method to send answers to an inline query. On success, :code:`True` is returned. - - No more than **50** results per query are allowed. - - Source: https://core.telegram.org/bots/api#answerinlinequery - - :param results: A JSON-serialized array of results for the inline query - :param cache_time: The maximum amount of time in seconds that the result of the inline query may be cached on the server. Defaults to 300. - :param is_personal: Pass :code:`True` 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. - :param next_offset: 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. - :param button: A JSON-serialized object describing a button to be shown above inline query results - :param switch_pm_parameter: `Deep-linking `_ parameter for the /start message sent to the bot when user presses the switch button. 1-64 characters, only :code:`A-Z`, :code:`a-z`, :code:`0-9`, :code:`_` and :code:`-` are allowed. - :param switch_pm_text: If passed, clients will display a button with specified text that switches the user to a private chat with the bot and sends the bot a start message with the parameter *switch_pm_parameter* - :return: instance of method :class:`aiogram.methods.answer_inline_query.AnswerInlineQuery` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import AnswerInlineQuery - - return AnswerInlineQuery( - inline_query_id=self.id, - results=results, - cache_time=cache_time, - is_personal=is_personal, - next_offset=next_offset, - button=button, - switch_pm_parameter=switch_pm_parameter, - switch_pm_text=switch_pm_text, - **kwargs, - ).as_(self._bot) diff --git a/env/Lib/site-packages/aiogram/types/inline_query_result.py b/env/Lib/site-packages/aiogram/types/inline_query_result.py deleted file mode 100644 index b615aa2..0000000 --- a/env/Lib/site-packages/aiogram/types/inline_query_result.py +++ /dev/null @@ -1,34 +0,0 @@ -from __future__ import annotations - -from .base import MutableTelegramObject - - -class InlineQueryResult(MutableTelegramObject): - """ - This object represents one result of an inline query. Telegram clients currently support results of the following 20 types: - - - :class:`aiogram.types.inline_query_result_cached_audio.InlineQueryResultCachedAudio` - - :class:`aiogram.types.inline_query_result_cached_document.InlineQueryResultCachedDocument` - - :class:`aiogram.types.inline_query_result_cached_gif.InlineQueryResultCachedGif` - - :class:`aiogram.types.inline_query_result_cached_mpeg4_gif.InlineQueryResultCachedMpeg4Gif` - - :class:`aiogram.types.inline_query_result_cached_photo.InlineQueryResultCachedPhoto` - - :class:`aiogram.types.inline_query_result_cached_sticker.InlineQueryResultCachedSticker` - - :class:`aiogram.types.inline_query_result_cached_video.InlineQueryResultCachedVideo` - - :class:`aiogram.types.inline_query_result_cached_voice.InlineQueryResultCachedVoice` - - :class:`aiogram.types.inline_query_result_article.InlineQueryResultArticle` - - :class:`aiogram.types.inline_query_result_audio.InlineQueryResultAudio` - - :class:`aiogram.types.inline_query_result_contact.InlineQueryResultContact` - - :class:`aiogram.types.inline_query_result_game.InlineQueryResultGame` - - :class:`aiogram.types.inline_query_result_document.InlineQueryResultDocument` - - :class:`aiogram.types.inline_query_result_gif.InlineQueryResultGif` - - :class:`aiogram.types.inline_query_result_location.InlineQueryResultLocation` - - :class:`aiogram.types.inline_query_result_mpeg4_gif.InlineQueryResultMpeg4Gif` - - :class:`aiogram.types.inline_query_result_photo.InlineQueryResultPhoto` - - :class:`aiogram.types.inline_query_result_venue.InlineQueryResultVenue` - - :class:`aiogram.types.inline_query_result_video.InlineQueryResultVideo` - - :class:`aiogram.types.inline_query_result_voice.InlineQueryResultVoice` - - **Note:** All URLs passed in inline query results will be available to end users and therefore must be assumed to be **public**. - - Source: https://core.telegram.org/bots/api#inlinequeryresult - """ diff --git a/env/Lib/site-packages/aiogram/types/inline_query_result_article.py b/env/Lib/site-packages/aiogram/types/inline_query_result_article.py deleted file mode 100644 index c998738..0000000 --- a/env/Lib/site-packages/aiogram/types/inline_query_result_article.py +++ /dev/null @@ -1,96 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Literal, Optional, Union - -from ..enums import InlineQueryResultType -from .inline_query_result import InlineQueryResult - -if TYPE_CHECKING: - from .inline_keyboard_markup import InlineKeyboardMarkup - from .input_contact_message_content import InputContactMessageContent - from .input_invoice_message_content import InputInvoiceMessageContent - from .input_location_message_content import InputLocationMessageContent - from .input_text_message_content import InputTextMessageContent - from .input_venue_message_content import InputVenueMessageContent - - -class InlineQueryResultArticle(InlineQueryResult): - """ - Represents a link to an article or web page. - - Source: https://core.telegram.org/bots/api#inlinequeryresultarticle - """ - - type: Literal[InlineQueryResultType.ARTICLE] = InlineQueryResultType.ARTICLE - """Type of the result, must be *article*""" - id: str - """Unique identifier for this result, 1-64 Bytes""" - title: str - """Title of the result""" - input_message_content: Union[ - InputTextMessageContent, - InputLocationMessageContent, - InputVenueMessageContent, - InputContactMessageContent, - InputInvoiceMessageContent, - ] - """Content of the message to be sent""" - reply_markup: Optional[InlineKeyboardMarkup] = None - """*Optional*. `Inline keyboard `_ attached to the message""" - url: Optional[str] = None - """*Optional*. URL of the result""" - hide_url: Optional[bool] = None - """*Optional*. Pass :code:`True` if you don't want the URL to be shown in the message""" - description: Optional[str] = None - """*Optional*. Short description of the result""" - thumbnail_url: Optional[str] = None - """*Optional*. Url of the thumbnail for the result""" - thumbnail_width: Optional[int] = None - """*Optional*. Thumbnail width""" - thumbnail_height: Optional[int] = None - """*Optional*. Thumbnail height""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - type: Literal[InlineQueryResultType.ARTICLE] = InlineQueryResultType.ARTICLE, - id: str, - title: str, - input_message_content: Union[ - InputTextMessageContent, - InputLocationMessageContent, - InputVenueMessageContent, - InputContactMessageContent, - InputInvoiceMessageContent, - ], - reply_markup: Optional[InlineKeyboardMarkup] = None, - url: Optional[str] = None, - hide_url: Optional[bool] = None, - description: Optional[str] = None, - thumbnail_url: Optional[str] = None, - thumbnail_width: Optional[int] = None, - thumbnail_height: Optional[int] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - type=type, - id=id, - title=title, - input_message_content=input_message_content, - reply_markup=reply_markup, - url=url, - hide_url=hide_url, - description=description, - thumbnail_url=thumbnail_url, - thumbnail_width=thumbnail_width, - thumbnail_height=thumbnail_height, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/inline_query_result_audio.py b/env/Lib/site-packages/aiogram/types/inline_query_result_audio.py deleted file mode 100644 index 56ef5f5..0000000 --- a/env/Lib/site-packages/aiogram/types/inline_query_result_audio.py +++ /dev/null @@ -1,102 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, List, Literal, Optional, Union - -from ..client.default import Default -from ..enums import InlineQueryResultType -from .inline_query_result import InlineQueryResult - -if TYPE_CHECKING: - from .inline_keyboard_markup import InlineKeyboardMarkup - from .input_contact_message_content import InputContactMessageContent - from .input_invoice_message_content import InputInvoiceMessageContent - from .input_location_message_content import InputLocationMessageContent - from .input_text_message_content import InputTextMessageContent - from .input_venue_message_content import InputVenueMessageContent - from .message_entity import MessageEntity - - -class InlineQueryResultAudio(InlineQueryResult): - """ - Represents a link to an MP3 audio file. By default, this audio file will be sent by the user. Alternatively, you can use *input_message_content* to send a message with the specified content instead of the audio. - - Source: https://core.telegram.org/bots/api#inlinequeryresultaudio - """ - - type: Literal[InlineQueryResultType.AUDIO] = InlineQueryResultType.AUDIO - """Type of the result, must be *audio*""" - id: str - """Unique identifier for this result, 1-64 bytes""" - audio_url: str - """A valid URL for the audio file""" - title: str - """Title""" - caption: Optional[str] = None - """*Optional*. Caption, 0-1024 characters after entities parsing""" - parse_mode: Optional[Union[str, Default]] = Default("parse_mode") - """*Optional*. Mode for parsing entities in the audio caption. See `formatting options `_ for more details.""" - caption_entities: Optional[List[MessageEntity]] = None - """*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*""" - performer: Optional[str] = None - """*Optional*. Performer""" - audio_duration: Optional[int] = None - """*Optional*. Audio duration in seconds""" - reply_markup: Optional[InlineKeyboardMarkup] = None - """*Optional*. `Inline keyboard `_ attached to the message""" - input_message_content: Optional[ - Union[ - InputTextMessageContent, - InputLocationMessageContent, - InputVenueMessageContent, - InputContactMessageContent, - InputInvoiceMessageContent, - ] - ] = None - """*Optional*. Content of the message to be sent instead of the audio""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - type: Literal[InlineQueryResultType.AUDIO] = InlineQueryResultType.AUDIO, - id: str, - audio_url: str, - title: str, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - performer: Optional[str] = None, - audio_duration: Optional[int] = None, - reply_markup: Optional[InlineKeyboardMarkup] = None, - input_message_content: Optional[ - Union[ - InputTextMessageContent, - InputLocationMessageContent, - InputVenueMessageContent, - InputContactMessageContent, - InputInvoiceMessageContent, - ] - ] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - type=type, - id=id, - audio_url=audio_url, - title=title, - caption=caption, - parse_mode=parse_mode, - caption_entities=caption_entities, - performer=performer, - audio_duration=audio_duration, - reply_markup=reply_markup, - input_message_content=input_message_content, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/inline_query_result_cached_audio.py b/env/Lib/site-packages/aiogram/types/inline_query_result_cached_audio.py deleted file mode 100644 index 27d923f..0000000 --- a/env/Lib/site-packages/aiogram/types/inline_query_result_cached_audio.py +++ /dev/null @@ -1,90 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, List, Literal, Optional, Union - -from ..client.default import Default -from ..enums import InlineQueryResultType -from .inline_query_result import InlineQueryResult - -if TYPE_CHECKING: - from .inline_keyboard_markup import InlineKeyboardMarkup - from .input_contact_message_content import InputContactMessageContent - from .input_invoice_message_content import InputInvoiceMessageContent - from .input_location_message_content import InputLocationMessageContent - from .input_text_message_content import InputTextMessageContent - from .input_venue_message_content import InputVenueMessageContent - from .message_entity import MessageEntity - - -class InlineQueryResultCachedAudio(InlineQueryResult): - """ - Represents a link to an MP3 audio file stored on the Telegram servers. By default, this audio file will be sent by the user. Alternatively, you can use *input_message_content* to send a message with the specified content instead of the audio. - - Source: https://core.telegram.org/bots/api#inlinequeryresultcachedaudio - """ - - type: Literal[InlineQueryResultType.AUDIO] = InlineQueryResultType.AUDIO - """Type of the result, must be *audio*""" - id: str - """Unique identifier for this result, 1-64 bytes""" - audio_file_id: str - """A valid file identifier for the audio file""" - caption: Optional[str] = None - """*Optional*. Caption, 0-1024 characters after entities parsing""" - parse_mode: Optional[Union[str, Default]] = Default("parse_mode") - """*Optional*. Mode for parsing entities in the audio caption. See `formatting options `_ for more details.""" - caption_entities: Optional[List[MessageEntity]] = None - """*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*""" - reply_markup: Optional[InlineKeyboardMarkup] = None - """*Optional*. `Inline keyboard `_ attached to the message""" - input_message_content: Optional[ - Union[ - InputTextMessageContent, - InputLocationMessageContent, - InputVenueMessageContent, - InputContactMessageContent, - InputInvoiceMessageContent, - ] - ] = None - """*Optional*. Content of the message to be sent instead of the audio""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - type: Literal[InlineQueryResultType.AUDIO] = InlineQueryResultType.AUDIO, - id: str, - audio_file_id: str, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - reply_markup: Optional[InlineKeyboardMarkup] = None, - input_message_content: Optional[ - Union[ - InputTextMessageContent, - InputLocationMessageContent, - InputVenueMessageContent, - InputContactMessageContent, - InputInvoiceMessageContent, - ] - ] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - type=type, - id=id, - audio_file_id=audio_file_id, - caption=caption, - parse_mode=parse_mode, - caption_entities=caption_entities, - reply_markup=reply_markup, - input_message_content=input_message_content, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/inline_query_result_cached_document.py b/env/Lib/site-packages/aiogram/types/inline_query_result_cached_document.py deleted file mode 100644 index 8e0355e..0000000 --- a/env/Lib/site-packages/aiogram/types/inline_query_result_cached_document.py +++ /dev/null @@ -1,98 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, List, Literal, Optional, Union - -from ..client.default import Default -from ..enums import InlineQueryResultType -from .inline_query_result import InlineQueryResult - -if TYPE_CHECKING: - from .inline_keyboard_markup import InlineKeyboardMarkup - from .input_contact_message_content import InputContactMessageContent - from .input_invoice_message_content import InputInvoiceMessageContent - from .input_location_message_content import InputLocationMessageContent - from .input_text_message_content import InputTextMessageContent - from .input_venue_message_content import InputVenueMessageContent - from .message_entity import MessageEntity - - -class InlineQueryResultCachedDocument(InlineQueryResult): - """ - Represents a link to a file stored on the Telegram servers. By default, this file will be sent by the user with an optional caption. Alternatively, you can use *input_message_content* to send a message with the specified content instead of the file. - - Source: https://core.telegram.org/bots/api#inlinequeryresultcacheddocument - """ - - type: Literal[InlineQueryResultType.DOCUMENT] = InlineQueryResultType.DOCUMENT - """Type of the result, must be *document*""" - id: str - """Unique identifier for this result, 1-64 bytes""" - title: str - """Title for the result""" - document_file_id: str - """A valid file identifier for the file""" - description: Optional[str] = None - """*Optional*. Short description of the result""" - caption: Optional[str] = None - """*Optional*. Caption of the document to be sent, 0-1024 characters after entities parsing""" - parse_mode: Optional[Union[str, Default]] = Default("parse_mode") - """*Optional*. Mode for parsing entities in the document caption. See `formatting options `_ for more details.""" - caption_entities: Optional[List[MessageEntity]] = None - """*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*""" - reply_markup: Optional[InlineKeyboardMarkup] = None - """*Optional*. `Inline keyboard `_ attached to the message""" - input_message_content: Optional[ - Union[ - InputTextMessageContent, - InputLocationMessageContent, - InputVenueMessageContent, - InputContactMessageContent, - InputInvoiceMessageContent, - ] - ] = None - """*Optional*. Content of the message to be sent instead of the file""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - type: Literal[InlineQueryResultType.DOCUMENT] = InlineQueryResultType.DOCUMENT, - id: str, - title: str, - document_file_id: str, - description: Optional[str] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - reply_markup: Optional[InlineKeyboardMarkup] = None, - input_message_content: Optional[ - Union[ - InputTextMessageContent, - InputLocationMessageContent, - InputVenueMessageContent, - InputContactMessageContent, - InputInvoiceMessageContent, - ] - ] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - type=type, - id=id, - title=title, - document_file_id=document_file_id, - description=description, - caption=caption, - parse_mode=parse_mode, - caption_entities=caption_entities, - reply_markup=reply_markup, - input_message_content=input_message_content, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/inline_query_result_cached_gif.py b/env/Lib/site-packages/aiogram/types/inline_query_result_cached_gif.py deleted file mode 100644 index 277454c..0000000 --- a/env/Lib/site-packages/aiogram/types/inline_query_result_cached_gif.py +++ /dev/null @@ -1,100 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, List, Literal, Optional, Union - -from ..client.default import Default -from ..enums import InlineQueryResultType -from .inline_query_result import InlineQueryResult - -if TYPE_CHECKING: - from .inline_keyboard_markup import InlineKeyboardMarkup - from .input_contact_message_content import InputContactMessageContent - from .input_invoice_message_content import InputInvoiceMessageContent - from .input_location_message_content import InputLocationMessageContent - from .input_text_message_content import InputTextMessageContent - from .input_venue_message_content import InputVenueMessageContent - from .message_entity import MessageEntity - - -class InlineQueryResultCachedGif(InlineQueryResult): - """ - Represents a link to an animated GIF file stored on the Telegram servers. By default, this animated GIF file will be sent by the user with an optional caption. Alternatively, you can use *input_message_content* to send a message with specified content instead of the animation. - - Source: https://core.telegram.org/bots/api#inlinequeryresultcachedgif - """ - - type: Literal[InlineQueryResultType.GIF] = InlineQueryResultType.GIF - """Type of the result, must be *gif*""" - id: str - """Unique identifier for this result, 1-64 bytes""" - gif_file_id: str - """A valid file identifier for the GIF file""" - title: Optional[str] = None - """*Optional*. Title for the result""" - caption: Optional[str] = None - """*Optional*. Caption of the GIF file to be sent, 0-1024 characters after entities parsing""" - parse_mode: Optional[Union[str, Default]] = Default("parse_mode") - """*Optional*. Mode for parsing entities in the caption. See `formatting options `_ for more details.""" - caption_entities: Optional[List[MessageEntity]] = None - """*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*""" - show_caption_above_media: Optional[Union[bool, Default]] = Default("show_caption_above_media") - """*Optional*. Pass :code:`True`, if the caption must be shown above the message media""" - reply_markup: Optional[InlineKeyboardMarkup] = None - """*Optional*. `Inline keyboard `_ attached to the message""" - input_message_content: Optional[ - Union[ - InputTextMessageContent, - InputLocationMessageContent, - InputVenueMessageContent, - InputContactMessageContent, - InputInvoiceMessageContent, - ] - ] = None - """*Optional*. Content of the message to be sent instead of the GIF animation""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - type: Literal[InlineQueryResultType.GIF] = InlineQueryResultType.GIF, - id: str, - gif_file_id: str, - title: Optional[str] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - show_caption_above_media: Optional[Union[bool, Default]] = Default( - "show_caption_above_media" - ), - reply_markup: Optional[InlineKeyboardMarkup] = None, - input_message_content: Optional[ - Union[ - InputTextMessageContent, - InputLocationMessageContent, - InputVenueMessageContent, - InputContactMessageContent, - InputInvoiceMessageContent, - ] - ] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - type=type, - id=id, - gif_file_id=gif_file_id, - title=title, - caption=caption, - parse_mode=parse_mode, - caption_entities=caption_entities, - show_caption_above_media=show_caption_above_media, - reply_markup=reply_markup, - input_message_content=input_message_content, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/inline_query_result_cached_mpeg4_gif.py b/env/Lib/site-packages/aiogram/types/inline_query_result_cached_mpeg4_gif.py deleted file mode 100644 index ec04386..0000000 --- a/env/Lib/site-packages/aiogram/types/inline_query_result_cached_mpeg4_gif.py +++ /dev/null @@ -1,100 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, List, Literal, Optional, Union - -from ..client.default import Default -from ..enums import InlineQueryResultType -from .inline_query_result import InlineQueryResult - -if TYPE_CHECKING: - from .inline_keyboard_markup import InlineKeyboardMarkup - from .input_contact_message_content import InputContactMessageContent - from .input_invoice_message_content import InputInvoiceMessageContent - from .input_location_message_content import InputLocationMessageContent - from .input_text_message_content import InputTextMessageContent - from .input_venue_message_content import InputVenueMessageContent - from .message_entity import MessageEntity - - -class InlineQueryResultCachedMpeg4Gif(InlineQueryResult): - """ - Represents a link to a video animation (H.264/MPEG-4 AVC video without sound) stored on the Telegram servers. By default, this animated MPEG-4 file will be sent by the user with an optional caption. Alternatively, you can use *input_message_content* to send a message with the specified content instead of the animation. - - Source: https://core.telegram.org/bots/api#inlinequeryresultcachedmpeg4gif - """ - - type: Literal[InlineQueryResultType.MPEG4_GIF] = InlineQueryResultType.MPEG4_GIF - """Type of the result, must be *mpeg4_gif*""" - id: str - """Unique identifier for this result, 1-64 bytes""" - mpeg4_file_id: str - """A valid file identifier for the MPEG4 file""" - title: Optional[str] = None - """*Optional*. Title for the result""" - caption: Optional[str] = None - """*Optional*. Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing""" - parse_mode: Optional[Union[str, Default]] = Default("parse_mode") - """*Optional*. Mode for parsing entities in the caption. See `formatting options `_ for more details.""" - caption_entities: Optional[List[MessageEntity]] = None - """*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*""" - show_caption_above_media: Optional[Union[bool, Default]] = Default("show_caption_above_media") - """*Optional*. Pass :code:`True`, if the caption must be shown above the message media""" - reply_markup: Optional[InlineKeyboardMarkup] = None - """*Optional*. `Inline keyboard `_ attached to the message""" - input_message_content: Optional[ - Union[ - InputTextMessageContent, - InputLocationMessageContent, - InputVenueMessageContent, - InputContactMessageContent, - InputInvoiceMessageContent, - ] - ] = None - """*Optional*. Content of the message to be sent instead of the video animation""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - type: Literal[InlineQueryResultType.MPEG4_GIF] = InlineQueryResultType.MPEG4_GIF, - id: str, - mpeg4_file_id: str, - title: Optional[str] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - show_caption_above_media: Optional[Union[bool, Default]] = Default( - "show_caption_above_media" - ), - reply_markup: Optional[InlineKeyboardMarkup] = None, - input_message_content: Optional[ - Union[ - InputTextMessageContent, - InputLocationMessageContent, - InputVenueMessageContent, - InputContactMessageContent, - InputInvoiceMessageContent, - ] - ] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - type=type, - id=id, - mpeg4_file_id=mpeg4_file_id, - title=title, - caption=caption, - parse_mode=parse_mode, - caption_entities=caption_entities, - show_caption_above_media=show_caption_above_media, - reply_markup=reply_markup, - input_message_content=input_message_content, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/inline_query_result_cached_photo.py b/env/Lib/site-packages/aiogram/types/inline_query_result_cached_photo.py deleted file mode 100644 index f40b203..0000000 --- a/env/Lib/site-packages/aiogram/types/inline_query_result_cached_photo.py +++ /dev/null @@ -1,104 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, List, Literal, Optional, Union - -from ..client.default import Default -from ..enums import InlineQueryResultType -from .inline_query_result import InlineQueryResult - -if TYPE_CHECKING: - from .inline_keyboard_markup import InlineKeyboardMarkup - from .input_contact_message_content import InputContactMessageContent - from .input_invoice_message_content import InputInvoiceMessageContent - from .input_location_message_content import InputLocationMessageContent - from .input_text_message_content import InputTextMessageContent - from .input_venue_message_content import InputVenueMessageContent - from .message_entity import MessageEntity - - -class InlineQueryResultCachedPhoto(InlineQueryResult): - """ - Represents a link to a photo stored on the Telegram servers. By default, this photo will be sent by the user with an optional caption. Alternatively, you can use *input_message_content* to send a message with the specified content instead of the photo. - - Source: https://core.telegram.org/bots/api#inlinequeryresultcachedphoto - """ - - type: Literal[InlineQueryResultType.PHOTO] = InlineQueryResultType.PHOTO - """Type of the result, must be *photo*""" - id: str - """Unique identifier for this result, 1-64 bytes""" - photo_file_id: str - """A valid file identifier of the photo""" - title: Optional[str] = None - """*Optional*. Title for the result""" - description: Optional[str] = None - """*Optional*. Short description of the result""" - caption: Optional[str] = None - """*Optional*. Caption of the photo to be sent, 0-1024 characters after entities parsing""" - parse_mode: Optional[Union[str, Default]] = Default("parse_mode") - """*Optional*. Mode for parsing entities in the photo caption. See `formatting options `_ for more details.""" - caption_entities: Optional[List[MessageEntity]] = None - """*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*""" - show_caption_above_media: Optional[Union[bool, Default]] = Default("show_caption_above_media") - """*Optional*. Pass :code:`True`, if the caption must be shown above the message media""" - reply_markup: Optional[InlineKeyboardMarkup] = None - """*Optional*. `Inline keyboard `_ attached to the message""" - input_message_content: Optional[ - Union[ - InputTextMessageContent, - InputLocationMessageContent, - InputVenueMessageContent, - InputContactMessageContent, - InputInvoiceMessageContent, - ] - ] = None - """*Optional*. Content of the message to be sent instead of the photo""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - type: Literal[InlineQueryResultType.PHOTO] = InlineQueryResultType.PHOTO, - id: str, - photo_file_id: str, - title: Optional[str] = None, - description: Optional[str] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - show_caption_above_media: Optional[Union[bool, Default]] = Default( - "show_caption_above_media" - ), - reply_markup: Optional[InlineKeyboardMarkup] = None, - input_message_content: Optional[ - Union[ - InputTextMessageContent, - InputLocationMessageContent, - InputVenueMessageContent, - InputContactMessageContent, - InputInvoiceMessageContent, - ] - ] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - type=type, - id=id, - photo_file_id=photo_file_id, - title=title, - description=description, - caption=caption, - parse_mode=parse_mode, - caption_entities=caption_entities, - show_caption_above_media=show_caption_above_media, - reply_markup=reply_markup, - input_message_content=input_message_content, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/inline_query_result_cached_sticker.py b/env/Lib/site-packages/aiogram/types/inline_query_result_cached_sticker.py deleted file mode 100644 index 4300023..0000000 --- a/env/Lib/site-packages/aiogram/types/inline_query_result_cached_sticker.py +++ /dev/null @@ -1,76 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Literal, Optional, Union - -from ..enums import InlineQueryResultType -from .inline_query_result import InlineQueryResult - -if TYPE_CHECKING: - from .inline_keyboard_markup import InlineKeyboardMarkup - from .input_contact_message_content import InputContactMessageContent - from .input_invoice_message_content import InputInvoiceMessageContent - from .input_location_message_content import InputLocationMessageContent - from .input_text_message_content import InputTextMessageContent - from .input_venue_message_content import InputVenueMessageContent - - -class InlineQueryResultCachedSticker(InlineQueryResult): - """ - Represents a link to a sticker stored on the Telegram servers. By default, this sticker will be sent by the user. Alternatively, you can use *input_message_content* to send a message with the specified content instead of the sticker. - - Source: https://core.telegram.org/bots/api#inlinequeryresultcachedsticker - """ - - type: Literal[InlineQueryResultType.STICKER] = InlineQueryResultType.STICKER - """Type of the result, must be *sticker*""" - id: str - """Unique identifier for this result, 1-64 bytes""" - sticker_file_id: str - """A valid file identifier of the sticker""" - reply_markup: Optional[InlineKeyboardMarkup] = None - """*Optional*. `Inline keyboard `_ attached to the message""" - input_message_content: Optional[ - Union[ - InputTextMessageContent, - InputLocationMessageContent, - InputVenueMessageContent, - InputContactMessageContent, - InputInvoiceMessageContent, - ] - ] = None - """*Optional*. Content of the message to be sent instead of the sticker""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - type: Literal[InlineQueryResultType.STICKER] = InlineQueryResultType.STICKER, - id: str, - sticker_file_id: str, - reply_markup: Optional[InlineKeyboardMarkup] = None, - input_message_content: Optional[ - Union[ - InputTextMessageContent, - InputLocationMessageContent, - InputVenueMessageContent, - InputContactMessageContent, - InputInvoiceMessageContent, - ] - ] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - type=type, - id=id, - sticker_file_id=sticker_file_id, - reply_markup=reply_markup, - input_message_content=input_message_content, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/inline_query_result_cached_video.py b/env/Lib/site-packages/aiogram/types/inline_query_result_cached_video.py deleted file mode 100644 index 4095ab9..0000000 --- a/env/Lib/site-packages/aiogram/types/inline_query_result_cached_video.py +++ /dev/null @@ -1,104 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, List, Literal, Optional, Union - -from ..client.default import Default -from ..enums import InlineQueryResultType -from .inline_query_result import InlineQueryResult - -if TYPE_CHECKING: - from .inline_keyboard_markup import InlineKeyboardMarkup - from .input_contact_message_content import InputContactMessageContent - from .input_invoice_message_content import InputInvoiceMessageContent - from .input_location_message_content import InputLocationMessageContent - from .input_text_message_content import InputTextMessageContent - from .input_venue_message_content import InputVenueMessageContent - from .message_entity import MessageEntity - - -class InlineQueryResultCachedVideo(InlineQueryResult): - """ - Represents a link to a video file stored on the Telegram servers. By default, this video file will be sent by the user with an optional caption. Alternatively, you can use *input_message_content* to send a message with the specified content instead of the video. - - Source: https://core.telegram.org/bots/api#inlinequeryresultcachedvideo - """ - - type: Literal[InlineQueryResultType.VIDEO] = InlineQueryResultType.VIDEO - """Type of the result, must be *video*""" - id: str - """Unique identifier for this result, 1-64 bytes""" - video_file_id: str - """A valid file identifier for the video file""" - title: str - """Title for the result""" - description: Optional[str] = None - """*Optional*. Short description of the result""" - caption: Optional[str] = None - """*Optional*. Caption of the video to be sent, 0-1024 characters after entities parsing""" - parse_mode: Optional[Union[str, Default]] = Default("parse_mode") - """*Optional*. Mode for parsing entities in the video caption. See `formatting options `_ for more details.""" - caption_entities: Optional[List[MessageEntity]] = None - """*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*""" - show_caption_above_media: Optional[Union[bool, Default]] = Default("show_caption_above_media") - """*Optional*. Pass :code:`True`, if the caption must be shown above the message media""" - reply_markup: Optional[InlineKeyboardMarkup] = None - """*Optional*. `Inline keyboard `_ attached to the message""" - input_message_content: Optional[ - Union[ - InputTextMessageContent, - InputLocationMessageContent, - InputVenueMessageContent, - InputContactMessageContent, - InputInvoiceMessageContent, - ] - ] = None - """*Optional*. Content of the message to be sent instead of the video""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - type: Literal[InlineQueryResultType.VIDEO] = InlineQueryResultType.VIDEO, - id: str, - video_file_id: str, - title: str, - description: Optional[str] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - show_caption_above_media: Optional[Union[bool, Default]] = Default( - "show_caption_above_media" - ), - reply_markup: Optional[InlineKeyboardMarkup] = None, - input_message_content: Optional[ - Union[ - InputTextMessageContent, - InputLocationMessageContent, - InputVenueMessageContent, - InputContactMessageContent, - InputInvoiceMessageContent, - ] - ] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - type=type, - id=id, - video_file_id=video_file_id, - title=title, - description=description, - caption=caption, - parse_mode=parse_mode, - caption_entities=caption_entities, - show_caption_above_media=show_caption_above_media, - reply_markup=reply_markup, - input_message_content=input_message_content, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/inline_query_result_cached_voice.py b/env/Lib/site-packages/aiogram/types/inline_query_result_cached_voice.py deleted file mode 100644 index 4cff896..0000000 --- a/env/Lib/site-packages/aiogram/types/inline_query_result_cached_voice.py +++ /dev/null @@ -1,94 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, List, Literal, Optional, Union - -from ..client.default import Default -from ..enums import InlineQueryResultType -from .inline_query_result import InlineQueryResult - -if TYPE_CHECKING: - from .inline_keyboard_markup import InlineKeyboardMarkup - from .input_contact_message_content import InputContactMessageContent - from .input_invoice_message_content import InputInvoiceMessageContent - from .input_location_message_content import InputLocationMessageContent - from .input_text_message_content import InputTextMessageContent - from .input_venue_message_content import InputVenueMessageContent - from .message_entity import MessageEntity - - -class InlineQueryResultCachedVoice(InlineQueryResult): - """ - Represents a link to a voice message stored on the Telegram servers. By default, this voice message will be sent by the user. Alternatively, you can use *input_message_content* to send a message with the specified content instead of the voice message. - - Source: https://core.telegram.org/bots/api#inlinequeryresultcachedvoice - """ - - type: Literal[InlineQueryResultType.VOICE] = InlineQueryResultType.VOICE - """Type of the result, must be *voice*""" - id: str - """Unique identifier for this result, 1-64 bytes""" - voice_file_id: str - """A valid file identifier for the voice message""" - title: str - """Voice message title""" - caption: Optional[str] = None - """*Optional*. Caption, 0-1024 characters after entities parsing""" - parse_mode: Optional[Union[str, Default]] = Default("parse_mode") - """*Optional*. Mode for parsing entities in the voice message caption. See `formatting options `_ for more details.""" - caption_entities: Optional[List[MessageEntity]] = None - """*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*""" - reply_markup: Optional[InlineKeyboardMarkup] = None - """*Optional*. `Inline keyboard `_ attached to the message""" - input_message_content: Optional[ - Union[ - InputTextMessageContent, - InputLocationMessageContent, - InputVenueMessageContent, - InputContactMessageContent, - InputInvoiceMessageContent, - ] - ] = None - """*Optional*. Content of the message to be sent instead of the voice message""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - type: Literal[InlineQueryResultType.VOICE] = InlineQueryResultType.VOICE, - id: str, - voice_file_id: str, - title: str, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - reply_markup: Optional[InlineKeyboardMarkup] = None, - input_message_content: Optional[ - Union[ - InputTextMessageContent, - InputLocationMessageContent, - InputVenueMessageContent, - InputContactMessageContent, - InputInvoiceMessageContent, - ] - ] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - type=type, - id=id, - voice_file_id=voice_file_id, - title=title, - caption=caption, - parse_mode=parse_mode, - caption_entities=caption_entities, - reply_markup=reply_markup, - input_message_content=input_message_content, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/inline_query_result_contact.py b/env/Lib/site-packages/aiogram/types/inline_query_result_contact.py deleted file mode 100644 index cc2900c..0000000 --- a/env/Lib/site-packages/aiogram/types/inline_query_result_contact.py +++ /dev/null @@ -1,100 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Literal, Optional, Union - -from ..enums import InlineQueryResultType -from .inline_query_result import InlineQueryResult - -if TYPE_CHECKING: - from .inline_keyboard_markup import InlineKeyboardMarkup - from .input_contact_message_content import InputContactMessageContent - from .input_invoice_message_content import InputInvoiceMessageContent - from .input_location_message_content import InputLocationMessageContent - from .input_text_message_content import InputTextMessageContent - from .input_venue_message_content import InputVenueMessageContent - - -class InlineQueryResultContact(InlineQueryResult): - """ - Represents a contact with a phone number. By default, this contact will be sent by the user. Alternatively, you can use *input_message_content* to send a message with the specified content instead of the contact. - - Source: https://core.telegram.org/bots/api#inlinequeryresultcontact - """ - - type: Literal[InlineQueryResultType.CONTACT] = InlineQueryResultType.CONTACT - """Type of the result, must be *contact*""" - id: str - """Unique identifier for this result, 1-64 Bytes""" - phone_number: str - """Contact's phone number""" - first_name: str - """Contact's first name""" - last_name: Optional[str] = None - """*Optional*. Contact's last name""" - vcard: Optional[str] = None - """*Optional*. Additional data about the contact in the form of a `vCard `_, 0-2048 bytes""" - reply_markup: Optional[InlineKeyboardMarkup] = None - """*Optional*. `Inline keyboard `_ attached to the message""" - input_message_content: Optional[ - Union[ - InputTextMessageContent, - InputLocationMessageContent, - InputVenueMessageContent, - InputContactMessageContent, - InputInvoiceMessageContent, - ] - ] = None - """*Optional*. Content of the message to be sent instead of the contact""" - thumbnail_url: Optional[str] = None - """*Optional*. Url of the thumbnail for the result""" - thumbnail_width: Optional[int] = None - """*Optional*. Thumbnail width""" - thumbnail_height: Optional[int] = None - """*Optional*. Thumbnail height""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - type: Literal[InlineQueryResultType.CONTACT] = InlineQueryResultType.CONTACT, - id: str, - phone_number: str, - first_name: str, - last_name: Optional[str] = None, - vcard: Optional[str] = None, - reply_markup: Optional[InlineKeyboardMarkup] = None, - input_message_content: Optional[ - Union[ - InputTextMessageContent, - InputLocationMessageContent, - InputVenueMessageContent, - InputContactMessageContent, - InputInvoiceMessageContent, - ] - ] = None, - thumbnail_url: Optional[str] = None, - thumbnail_width: Optional[int] = None, - thumbnail_height: Optional[int] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - type=type, - id=id, - phone_number=phone_number, - first_name=first_name, - last_name=last_name, - vcard=vcard, - reply_markup=reply_markup, - input_message_content=input_message_content, - thumbnail_url=thumbnail_url, - thumbnail_width=thumbnail_width, - thumbnail_height=thumbnail_height, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/inline_query_result_document.py b/env/Lib/site-packages/aiogram/types/inline_query_result_document.py deleted file mode 100644 index 86ae993..0000000 --- a/env/Lib/site-packages/aiogram/types/inline_query_result_document.py +++ /dev/null @@ -1,114 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, List, Literal, Optional, Union - -from ..client.default import Default -from ..enums import InlineQueryResultType -from .inline_query_result import InlineQueryResult - -if TYPE_CHECKING: - from .inline_keyboard_markup import InlineKeyboardMarkup - from .input_contact_message_content import InputContactMessageContent - from .input_invoice_message_content import InputInvoiceMessageContent - from .input_location_message_content import InputLocationMessageContent - from .input_text_message_content import InputTextMessageContent - from .input_venue_message_content import InputVenueMessageContent - from .message_entity import MessageEntity - - -class InlineQueryResultDocument(InlineQueryResult): - """ - Represents a link to a file. By default, this file will be sent by the user with an optional caption. Alternatively, you can use *input_message_content* to send a message with the specified content instead of the file. Currently, only **.PDF** and **.ZIP** files can be sent using this method. - - Source: https://core.telegram.org/bots/api#inlinequeryresultdocument - """ - - type: Literal[InlineQueryResultType.DOCUMENT] = InlineQueryResultType.DOCUMENT - """Type of the result, must be *document*""" - id: str - """Unique identifier for this result, 1-64 bytes""" - title: str - """Title for the result""" - document_url: str - """A valid URL for the file""" - mime_type: str - """MIME type of the content of the file, either 'application/pdf' or 'application/zip'""" - caption: Optional[str] = None - """*Optional*. Caption of the document to be sent, 0-1024 characters after entities parsing""" - parse_mode: Optional[Union[str, Default]] = Default("parse_mode") - """*Optional*. Mode for parsing entities in the document caption. See `formatting options `_ for more details.""" - caption_entities: Optional[List[MessageEntity]] = None - """*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*""" - description: Optional[str] = None - """*Optional*. Short description of the result""" - reply_markup: Optional[InlineKeyboardMarkup] = None - """*Optional*. Inline keyboard attached to the message""" - input_message_content: Optional[ - Union[ - InputTextMessageContent, - InputLocationMessageContent, - InputVenueMessageContent, - InputContactMessageContent, - InputInvoiceMessageContent, - ] - ] = None - """*Optional*. Content of the message to be sent instead of the file""" - thumbnail_url: Optional[str] = None - """*Optional*. URL of the thumbnail (JPEG only) for the file""" - thumbnail_width: Optional[int] = None - """*Optional*. Thumbnail width""" - thumbnail_height: Optional[int] = None - """*Optional*. Thumbnail height""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - type: Literal[InlineQueryResultType.DOCUMENT] = InlineQueryResultType.DOCUMENT, - id: str, - title: str, - document_url: str, - mime_type: str, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - description: Optional[str] = None, - reply_markup: Optional[InlineKeyboardMarkup] = None, - input_message_content: Optional[ - Union[ - InputTextMessageContent, - InputLocationMessageContent, - InputVenueMessageContent, - InputContactMessageContent, - InputInvoiceMessageContent, - ] - ] = None, - thumbnail_url: Optional[str] = None, - thumbnail_width: Optional[int] = None, - thumbnail_height: Optional[int] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - type=type, - id=id, - title=title, - document_url=document_url, - mime_type=mime_type, - caption=caption, - parse_mode=parse_mode, - caption_entities=caption_entities, - description=description, - reply_markup=reply_markup, - input_message_content=input_message_content, - thumbnail_url=thumbnail_url, - thumbnail_width=thumbnail_width, - thumbnail_height=thumbnail_height, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/inline_query_result_game.py b/env/Lib/site-packages/aiogram/types/inline_query_result_game.py deleted file mode 100644 index 3c7dcde..0000000 --- a/env/Lib/site-packages/aiogram/types/inline_query_result_game.py +++ /dev/null @@ -1,51 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Literal, Optional - -from ..enums import InlineQueryResultType -from .inline_query_result import InlineQueryResult - -if TYPE_CHECKING: - from .inline_keyboard_markup import InlineKeyboardMarkup - - -class InlineQueryResultGame(InlineQueryResult): - """ - Represents a `Game `_. - - Source: https://core.telegram.org/bots/api#inlinequeryresultgame - """ - - type: Literal[InlineQueryResultType.GAME] = InlineQueryResultType.GAME - """Type of the result, must be *game*""" - id: str - """Unique identifier for this result, 1-64 bytes""" - game_short_name: str - """Short name of the game""" - reply_markup: Optional[InlineKeyboardMarkup] = None - """*Optional*. `Inline keyboard `_ attached to the message""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - type: Literal[InlineQueryResultType.GAME] = InlineQueryResultType.GAME, - id: str, - game_short_name: str, - reply_markup: Optional[InlineKeyboardMarkup] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - type=type, - id=id, - game_short_name=game_short_name, - reply_markup=reply_markup, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/inline_query_result_gif.py b/env/Lib/site-packages/aiogram/types/inline_query_result_gif.py deleted file mode 100644 index 3ad0eef..0000000 --- a/env/Lib/site-packages/aiogram/types/inline_query_result_gif.py +++ /dev/null @@ -1,121 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, List, Literal, Optional, Union - -from ..client.default import Default -from ..enums import InlineQueryResultType -from .base import UNSET_PARSE_MODE -from .inline_query_result import InlineQueryResult - -if TYPE_CHECKING: - from .inline_keyboard_markup import InlineKeyboardMarkup - from .input_contact_message_content import InputContactMessageContent - from .input_invoice_message_content import InputInvoiceMessageContent - from .input_location_message_content import InputLocationMessageContent - from .input_text_message_content import InputTextMessageContent - from .input_venue_message_content import InputVenueMessageContent - from .message_entity import MessageEntity - - -class InlineQueryResultGif(InlineQueryResult): - """ - Represents a link to an animated GIF file. By default, this animated GIF file will be sent by the user with optional caption. Alternatively, you can use *input_message_content* to send a message with the specified content instead of the animation. - - Source: https://core.telegram.org/bots/api#inlinequeryresultgif - """ - - type: Literal[InlineQueryResultType.GIF] = InlineQueryResultType.GIF - """Type of the result, must be *gif*""" - id: str - """Unique identifier for this result, 1-64 bytes""" - gif_url: str - """A valid URL for the GIF file. File size must not exceed 1MB""" - thumbnail_url: str - """URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result""" - gif_width: Optional[int] = None - """*Optional*. Width of the GIF""" - gif_height: Optional[int] = None - """*Optional*. Height of the GIF""" - gif_duration: Optional[int] = None - """*Optional*. Duration of the GIF in seconds""" - thumbnail_mime_type: Optional[str] = None - """*Optional*. MIME type of the thumbnail, must be one of 'image/jpeg', 'image/gif', or 'video/mp4'. Defaults to 'image/jpeg'""" - title: Optional[str] = None - """*Optional*. Title for the result""" - caption: Optional[str] = None - """*Optional*. Caption of the GIF file to be sent, 0-1024 characters after entities parsing""" - parse_mode: Optional[Union[str, Default]] = Default("parse_mode") - """*Optional*. Mode for parsing entities in the caption. See `formatting options `_ for more details.""" - caption_entities: Optional[List[MessageEntity]] = None - """*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*""" - show_caption_above_media: Optional[Union[bool, Default]] = Default("show_caption_above_media") - """*Optional*. Pass :code:`True`, if the caption must be shown above the message media""" - reply_markup: Optional[InlineKeyboardMarkup] = None - """*Optional*. `Inline keyboard `_ attached to the message""" - input_message_content: Optional[ - Union[ - InputTextMessageContent, - InputLocationMessageContent, - InputVenueMessageContent, - InputContactMessageContent, - InputInvoiceMessageContent, - ] - ] = None - """*Optional*. Content of the message to be sent instead of the GIF animation""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - type: Literal[InlineQueryResultType.GIF] = InlineQueryResultType.GIF, - id: str, - gif_url: str, - thumbnail_url: str, - gif_width: Optional[int] = None, - gif_height: Optional[int] = None, - gif_duration: Optional[int] = None, - thumbnail_mime_type: Optional[str] = None, - title: Optional[str] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - show_caption_above_media: Optional[Union[bool, Default]] = Default( - "show_caption_above_media" - ), - reply_markup: Optional[InlineKeyboardMarkup] = None, - input_message_content: Optional[ - Union[ - InputTextMessageContent, - InputLocationMessageContent, - InputVenueMessageContent, - InputContactMessageContent, - InputInvoiceMessageContent, - ] - ] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - type=type, - id=id, - gif_url=gif_url, - thumbnail_url=thumbnail_url, - gif_width=gif_width, - gif_height=gif_height, - gif_duration=gif_duration, - thumbnail_mime_type=thumbnail_mime_type, - title=title, - caption=caption, - parse_mode=parse_mode, - caption_entities=caption_entities, - show_caption_above_media=show_caption_above_media, - reply_markup=reply_markup, - input_message_content=input_message_content, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/inline_query_result_location.py b/env/Lib/site-packages/aiogram/types/inline_query_result_location.py deleted file mode 100644 index 50b3ed8..0000000 --- a/env/Lib/site-packages/aiogram/types/inline_query_result_location.py +++ /dev/null @@ -1,112 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Literal, Optional, Union - -from ..enums import InlineQueryResultType -from .inline_query_result import InlineQueryResult - -if TYPE_CHECKING: - from .inline_keyboard_markup import InlineKeyboardMarkup - from .input_contact_message_content import InputContactMessageContent - from .input_invoice_message_content import InputInvoiceMessageContent - from .input_location_message_content import InputLocationMessageContent - from .input_text_message_content import InputTextMessageContent - from .input_venue_message_content import InputVenueMessageContent - - -class InlineQueryResultLocation(InlineQueryResult): - """ - Represents a location on a map. By default, the location will be sent by the user. Alternatively, you can use *input_message_content* to send a message with the specified content instead of the location. - - Source: https://core.telegram.org/bots/api#inlinequeryresultlocation - """ - - type: Literal[InlineQueryResultType.LOCATION] = InlineQueryResultType.LOCATION - """Type of the result, must be *location*""" - id: str - """Unique identifier for this result, 1-64 Bytes""" - latitude: float - """Location latitude in degrees""" - longitude: float - """Location longitude in degrees""" - title: str - """Location title""" - horizontal_accuracy: Optional[float] = None - """*Optional*. The radius of uncertainty for the location, measured in meters; 0-1500""" - live_period: Optional[int] = None - """*Optional*. Period in seconds during which the location can be updated, should be between 60 and 86400, or 0x7FFFFFFF for live locations that can be edited indefinitely.""" - heading: Optional[int] = None - """*Optional*. For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.""" - proximity_alert_radius: Optional[int] = None - """*Optional*. For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.""" - reply_markup: Optional[InlineKeyboardMarkup] = None - """*Optional*. `Inline keyboard `_ attached to the message""" - input_message_content: Optional[ - Union[ - InputTextMessageContent, - InputLocationMessageContent, - InputVenueMessageContent, - InputContactMessageContent, - InputInvoiceMessageContent, - ] - ] = None - """*Optional*. Content of the message to be sent instead of the location""" - thumbnail_url: Optional[str] = None - """*Optional*. Url of the thumbnail for the result""" - thumbnail_width: Optional[int] = None - """*Optional*. Thumbnail width""" - thumbnail_height: Optional[int] = None - """*Optional*. Thumbnail height""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - type: Literal[InlineQueryResultType.LOCATION] = InlineQueryResultType.LOCATION, - id: str, - latitude: float, - longitude: float, - title: str, - horizontal_accuracy: Optional[float] = None, - live_period: Optional[int] = None, - heading: Optional[int] = None, - proximity_alert_radius: Optional[int] = None, - reply_markup: Optional[InlineKeyboardMarkup] = None, - input_message_content: Optional[ - Union[ - InputTextMessageContent, - InputLocationMessageContent, - InputVenueMessageContent, - InputContactMessageContent, - InputInvoiceMessageContent, - ] - ] = None, - thumbnail_url: Optional[str] = None, - thumbnail_width: Optional[int] = None, - thumbnail_height: Optional[int] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - type=type, - id=id, - latitude=latitude, - longitude=longitude, - title=title, - horizontal_accuracy=horizontal_accuracy, - live_period=live_period, - heading=heading, - proximity_alert_radius=proximity_alert_radius, - reply_markup=reply_markup, - input_message_content=input_message_content, - thumbnail_url=thumbnail_url, - thumbnail_width=thumbnail_width, - thumbnail_height=thumbnail_height, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/inline_query_result_mpeg4_gif.py b/env/Lib/site-packages/aiogram/types/inline_query_result_mpeg4_gif.py deleted file mode 100644 index 6ca282e..0000000 --- a/env/Lib/site-packages/aiogram/types/inline_query_result_mpeg4_gif.py +++ /dev/null @@ -1,120 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, List, Literal, Optional, Union - -from ..client.default import Default -from ..enums import InlineQueryResultType -from .inline_query_result import InlineQueryResult - -if TYPE_CHECKING: - from .inline_keyboard_markup import InlineKeyboardMarkup - from .input_contact_message_content import InputContactMessageContent - from .input_invoice_message_content import InputInvoiceMessageContent - from .input_location_message_content import InputLocationMessageContent - from .input_text_message_content import InputTextMessageContent - from .input_venue_message_content import InputVenueMessageContent - from .message_entity import MessageEntity - - -class InlineQueryResultMpeg4Gif(InlineQueryResult): - """ - Represents a link to a video animation (H.264/MPEG-4 AVC video without sound). By default, this animated MPEG-4 file will be sent by the user with optional caption. Alternatively, you can use *input_message_content* to send a message with the specified content instead of the animation. - - Source: https://core.telegram.org/bots/api#inlinequeryresultmpeg4gif - """ - - type: Literal[InlineQueryResultType.MPEG4_GIF] = InlineQueryResultType.MPEG4_GIF - """Type of the result, must be *mpeg4_gif*""" - id: str - """Unique identifier for this result, 1-64 bytes""" - mpeg4_url: str - """A valid URL for the MPEG4 file. File size must not exceed 1MB""" - thumbnail_url: str - """URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result""" - mpeg4_width: Optional[int] = None - """*Optional*. Video width""" - mpeg4_height: Optional[int] = None - """*Optional*. Video height""" - mpeg4_duration: Optional[int] = None - """*Optional*. Video duration in seconds""" - thumbnail_mime_type: Optional[str] = None - """*Optional*. MIME type of the thumbnail, must be one of 'image/jpeg', 'image/gif', or 'video/mp4'. Defaults to 'image/jpeg'""" - title: Optional[str] = None - """*Optional*. Title for the result""" - caption: Optional[str] = None - """*Optional*. Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing""" - parse_mode: Optional[Union[str, Default]] = Default("parse_mode") - """*Optional*. Mode for parsing entities in the caption. See `formatting options `_ for more details.""" - caption_entities: Optional[List[MessageEntity]] = None - """*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*""" - show_caption_above_media: Optional[Union[bool, Default]] = Default("show_caption_above_media") - """*Optional*. Pass :code:`True`, if the caption must be shown above the message media""" - reply_markup: Optional[InlineKeyboardMarkup] = None - """*Optional*. `Inline keyboard `_ attached to the message""" - input_message_content: Optional[ - Union[ - InputTextMessageContent, - InputLocationMessageContent, - InputVenueMessageContent, - InputContactMessageContent, - InputInvoiceMessageContent, - ] - ] = None - """*Optional*. Content of the message to be sent instead of the video animation""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - type: Literal[InlineQueryResultType.MPEG4_GIF] = InlineQueryResultType.MPEG4_GIF, - id: str, - mpeg4_url: str, - thumbnail_url: str, - mpeg4_width: Optional[int] = None, - mpeg4_height: Optional[int] = None, - mpeg4_duration: Optional[int] = None, - thumbnail_mime_type: Optional[str] = None, - title: Optional[str] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - show_caption_above_media: Optional[Union[bool, Default]] = Default( - "show_caption_above_media" - ), - reply_markup: Optional[InlineKeyboardMarkup] = None, - input_message_content: Optional[ - Union[ - InputTextMessageContent, - InputLocationMessageContent, - InputVenueMessageContent, - InputContactMessageContent, - InputInvoiceMessageContent, - ] - ] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - type=type, - id=id, - mpeg4_url=mpeg4_url, - thumbnail_url=thumbnail_url, - mpeg4_width=mpeg4_width, - mpeg4_height=mpeg4_height, - mpeg4_duration=mpeg4_duration, - thumbnail_mime_type=thumbnail_mime_type, - title=title, - caption=caption, - parse_mode=parse_mode, - caption_entities=caption_entities, - show_caption_above_media=show_caption_above_media, - reply_markup=reply_markup, - input_message_content=input_message_content, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/inline_query_result_photo.py b/env/Lib/site-packages/aiogram/types/inline_query_result_photo.py deleted file mode 100644 index 02f6841..0000000 --- a/env/Lib/site-packages/aiogram/types/inline_query_result_photo.py +++ /dev/null @@ -1,116 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, List, Literal, Optional, Union - -from ..client.default import Default -from ..enums import InlineQueryResultType -from .inline_query_result import InlineQueryResult - -if TYPE_CHECKING: - from .inline_keyboard_markup import InlineKeyboardMarkup - from .input_contact_message_content import InputContactMessageContent - from .input_invoice_message_content import InputInvoiceMessageContent - from .input_location_message_content import InputLocationMessageContent - from .input_text_message_content import InputTextMessageContent - from .input_venue_message_content import InputVenueMessageContent - from .message_entity import MessageEntity - - -class InlineQueryResultPhoto(InlineQueryResult): - """ - Represents a link to a photo. By default, this photo will be sent by the user with optional caption. Alternatively, you can use *input_message_content* to send a message with the specified content instead of the photo. - - Source: https://core.telegram.org/bots/api#inlinequeryresultphoto - """ - - type: Literal[InlineQueryResultType.PHOTO] = InlineQueryResultType.PHOTO - """Type of the result, must be *photo*""" - id: str - """Unique identifier for this result, 1-64 bytes""" - photo_url: str - """A valid URL of the photo. Photo must be in **JPEG** format. Photo size must not exceed 5MB""" - thumbnail_url: str - """URL of the thumbnail for the photo""" - photo_width: Optional[int] = None - """*Optional*. Width of the photo""" - photo_height: Optional[int] = None - """*Optional*. Height of the photo""" - title: Optional[str] = None - """*Optional*. Title for the result""" - description: Optional[str] = None - """*Optional*. Short description of the result""" - caption: Optional[str] = None - """*Optional*. Caption of the photo to be sent, 0-1024 characters after entities parsing""" - parse_mode: Optional[Union[str, Default]] = Default("parse_mode") - """*Optional*. Mode for parsing entities in the photo caption. See `formatting options `_ for more details.""" - caption_entities: Optional[List[MessageEntity]] = None - """*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*""" - show_caption_above_media: Optional[Union[bool, Default]] = Default("show_caption_above_media") - """*Optional*. Pass :code:`True`, if the caption must be shown above the message media""" - reply_markup: Optional[InlineKeyboardMarkup] = None - """*Optional*. `Inline keyboard `_ attached to the message""" - input_message_content: Optional[ - Union[ - InputTextMessageContent, - InputLocationMessageContent, - InputVenueMessageContent, - InputContactMessageContent, - InputInvoiceMessageContent, - ] - ] = None - """*Optional*. Content of the message to be sent instead of the photo""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - type: Literal[InlineQueryResultType.PHOTO] = InlineQueryResultType.PHOTO, - id: str, - photo_url: str, - thumbnail_url: str, - photo_width: Optional[int] = None, - photo_height: Optional[int] = None, - title: Optional[str] = None, - description: Optional[str] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - show_caption_above_media: Optional[Union[bool, Default]] = Default( - "show_caption_above_media" - ), - reply_markup: Optional[InlineKeyboardMarkup] = None, - input_message_content: Optional[ - Union[ - InputTextMessageContent, - InputLocationMessageContent, - InputVenueMessageContent, - InputContactMessageContent, - InputInvoiceMessageContent, - ] - ] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - type=type, - id=id, - photo_url=photo_url, - thumbnail_url=thumbnail_url, - photo_width=photo_width, - photo_height=photo_height, - title=title, - description=description, - caption=caption, - parse_mode=parse_mode, - caption_entities=caption_entities, - show_caption_above_media=show_caption_above_media, - reply_markup=reply_markup, - input_message_content=input_message_content, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/inline_query_result_venue.py b/env/Lib/site-packages/aiogram/types/inline_query_result_venue.py deleted file mode 100644 index b8775b6..0000000 --- a/env/Lib/site-packages/aiogram/types/inline_query_result_venue.py +++ /dev/null @@ -1,116 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Literal, Optional, Union - -from ..enums import InlineQueryResultType -from .inline_query_result import InlineQueryResult - -if TYPE_CHECKING: - from .inline_keyboard_markup import InlineKeyboardMarkup - from .input_contact_message_content import InputContactMessageContent - from .input_invoice_message_content import InputInvoiceMessageContent - from .input_location_message_content import InputLocationMessageContent - from .input_text_message_content import InputTextMessageContent - from .input_venue_message_content import InputVenueMessageContent - - -class InlineQueryResultVenue(InlineQueryResult): - """ - Represents a venue. By default, the venue will be sent by the user. Alternatively, you can use *input_message_content* to send a message with the specified content instead of the venue. - - Source: https://core.telegram.org/bots/api#inlinequeryresultvenue - """ - - type: Literal[InlineQueryResultType.VENUE] = InlineQueryResultType.VENUE - """Type of the result, must be *venue*""" - id: str - """Unique identifier for this result, 1-64 Bytes""" - latitude: float - """Latitude of the venue location in degrees""" - longitude: float - """Longitude of the venue location in degrees""" - title: str - """Title of the venue""" - address: str - """Address of the venue""" - foursquare_id: Optional[str] = None - """*Optional*. Foursquare identifier of the venue if known""" - foursquare_type: Optional[str] = None - """*Optional*. Foursquare type of the venue, if known. (For example, 'arts_entertainment/default', 'arts_entertainment/aquarium' or 'food/icecream'.)""" - google_place_id: Optional[str] = None - """*Optional*. Google Places identifier of the venue""" - google_place_type: Optional[str] = None - """*Optional*. Google Places type of the venue. (See `supported types `_.)""" - reply_markup: Optional[InlineKeyboardMarkup] = None - """*Optional*. `Inline keyboard `_ attached to the message""" - input_message_content: Optional[ - Union[ - InputTextMessageContent, - InputLocationMessageContent, - InputVenueMessageContent, - InputContactMessageContent, - InputInvoiceMessageContent, - ] - ] = None - """*Optional*. Content of the message to be sent instead of the venue""" - thumbnail_url: Optional[str] = None - """*Optional*. Url of the thumbnail for the result""" - thumbnail_width: Optional[int] = None - """*Optional*. Thumbnail width""" - thumbnail_height: Optional[int] = None - """*Optional*. Thumbnail height""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - type: Literal[InlineQueryResultType.VENUE] = InlineQueryResultType.VENUE, - id: str, - latitude: float, - longitude: float, - title: str, - address: str, - foursquare_id: Optional[str] = None, - foursquare_type: Optional[str] = None, - google_place_id: Optional[str] = None, - google_place_type: Optional[str] = None, - reply_markup: Optional[InlineKeyboardMarkup] = None, - input_message_content: Optional[ - Union[ - InputTextMessageContent, - InputLocationMessageContent, - InputVenueMessageContent, - InputContactMessageContent, - InputInvoiceMessageContent, - ] - ] = None, - thumbnail_url: Optional[str] = None, - thumbnail_width: Optional[int] = None, - thumbnail_height: Optional[int] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - type=type, - id=id, - latitude=latitude, - longitude=longitude, - title=title, - address=address, - foursquare_id=foursquare_id, - foursquare_type=foursquare_type, - google_place_id=google_place_id, - google_place_type=google_place_type, - reply_markup=reply_markup, - input_message_content=input_message_content, - thumbnail_url=thumbnail_url, - thumbnail_width=thumbnail_width, - thumbnail_height=thumbnail_height, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/inline_query_result_video.py b/env/Lib/site-packages/aiogram/types/inline_query_result_video.py deleted file mode 100644 index 52332fd..0000000 --- a/env/Lib/site-packages/aiogram/types/inline_query_result_video.py +++ /dev/null @@ -1,126 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, List, Literal, Optional, Union - -from ..client.default import Default -from ..enums import InlineQueryResultType -from .inline_query_result import InlineQueryResult - -if TYPE_CHECKING: - from .inline_keyboard_markup import InlineKeyboardMarkup - from .input_contact_message_content import InputContactMessageContent - from .input_invoice_message_content import InputInvoiceMessageContent - from .input_location_message_content import InputLocationMessageContent - from .input_text_message_content import InputTextMessageContent - from .input_venue_message_content import InputVenueMessageContent - from .message_entity import MessageEntity - - -class InlineQueryResultVideo(InlineQueryResult): - """ - Represents a link to a page containing an embedded video player or a video file. By default, this video file will be sent by the user with an optional caption. Alternatively, you can use *input_message_content* to send a message with the specified content instead of the video. - - If an InlineQueryResultVideo message contains an embedded video (e.g., YouTube), you **must** replace its content using *input_message_content*. - - Source: https://core.telegram.org/bots/api#inlinequeryresultvideo - """ - - type: Literal[InlineQueryResultType.VIDEO] = InlineQueryResultType.VIDEO - """Type of the result, must be *video*""" - id: str - """Unique identifier for this result, 1-64 bytes""" - video_url: str - """A valid URL for the embedded video player or video file""" - mime_type: str - """MIME type of the content of the video URL, 'text/html' or 'video/mp4'""" - thumbnail_url: str - """URL of the thumbnail (JPEG only) for the video""" - title: str - """Title for the result""" - caption: Optional[str] = None - """*Optional*. Caption of the video to be sent, 0-1024 characters after entities parsing""" - parse_mode: Optional[Union[str, Default]] = Default("parse_mode") - """*Optional*. Mode for parsing entities in the video caption. See `formatting options `_ for more details.""" - caption_entities: Optional[List[MessageEntity]] = None - """*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*""" - show_caption_above_media: Optional[Union[bool, Default]] = Default("show_caption_above_media") - """*Optional*. Pass :code:`True`, if the caption must be shown above the message media""" - video_width: Optional[int] = None - """*Optional*. Video width""" - video_height: Optional[int] = None - """*Optional*. Video height""" - video_duration: Optional[int] = None - """*Optional*. Video duration in seconds""" - description: Optional[str] = None - """*Optional*. Short description of the result""" - reply_markup: Optional[InlineKeyboardMarkup] = None - """*Optional*. `Inline keyboard `_ attached to the message""" - input_message_content: Optional[ - Union[ - InputTextMessageContent, - InputLocationMessageContent, - InputVenueMessageContent, - InputContactMessageContent, - InputInvoiceMessageContent, - ] - ] = None - """*Optional*. Content of the message to be sent instead of the video. This field is **required** if InlineQueryResultVideo is used to send an HTML-page as a result (e.g., a YouTube video).""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - type: Literal[InlineQueryResultType.VIDEO] = InlineQueryResultType.VIDEO, - id: str, - video_url: str, - mime_type: str, - thumbnail_url: str, - title: str, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - show_caption_above_media: Optional[Union[bool, Default]] = Default( - "show_caption_above_media" - ), - video_width: Optional[int] = None, - video_height: Optional[int] = None, - video_duration: Optional[int] = None, - description: Optional[str] = None, - reply_markup: Optional[InlineKeyboardMarkup] = None, - input_message_content: Optional[ - Union[ - InputTextMessageContent, - InputLocationMessageContent, - InputVenueMessageContent, - InputContactMessageContent, - InputInvoiceMessageContent, - ] - ] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - type=type, - id=id, - video_url=video_url, - mime_type=mime_type, - thumbnail_url=thumbnail_url, - title=title, - caption=caption, - parse_mode=parse_mode, - caption_entities=caption_entities, - show_caption_above_media=show_caption_above_media, - video_width=video_width, - video_height=video_height, - video_duration=video_duration, - description=description, - reply_markup=reply_markup, - input_message_content=input_message_content, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/inline_query_result_voice.py b/env/Lib/site-packages/aiogram/types/inline_query_result_voice.py deleted file mode 100644 index a781fc6..0000000 --- a/env/Lib/site-packages/aiogram/types/inline_query_result_voice.py +++ /dev/null @@ -1,98 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, List, Literal, Optional, Union - -from ..client.default import Default -from ..enums import InlineQueryResultType -from .inline_query_result import InlineQueryResult - -if TYPE_CHECKING: - from .inline_keyboard_markup import InlineKeyboardMarkup - from .input_contact_message_content import InputContactMessageContent - from .input_invoice_message_content import InputInvoiceMessageContent - from .input_location_message_content import InputLocationMessageContent - from .input_text_message_content import InputTextMessageContent - from .input_venue_message_content import InputVenueMessageContent - from .message_entity import MessageEntity - - -class InlineQueryResultVoice(InlineQueryResult): - """ - Represents a link to a voice recording in an .OGG container encoded with OPUS. By default, this voice recording will be sent by the user. Alternatively, you can use *input_message_content* to send a message with the specified content instead of the the voice message. - - Source: https://core.telegram.org/bots/api#inlinequeryresultvoice - """ - - type: Literal[InlineQueryResultType.VOICE] = InlineQueryResultType.VOICE - """Type of the result, must be *voice*""" - id: str - """Unique identifier for this result, 1-64 bytes""" - voice_url: str - """A valid URL for the voice recording""" - title: str - """Recording title""" - caption: Optional[str] = None - """*Optional*. Caption, 0-1024 characters after entities parsing""" - parse_mode: Optional[Union[str, Default]] = Default("parse_mode") - """*Optional*. Mode for parsing entities in the voice message caption. See `formatting options `_ for more details.""" - caption_entities: Optional[List[MessageEntity]] = None - """*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*""" - voice_duration: Optional[int] = None - """*Optional*. Recording duration in seconds""" - reply_markup: Optional[InlineKeyboardMarkup] = None - """*Optional*. `Inline keyboard `_ attached to the message""" - input_message_content: Optional[ - Union[ - InputTextMessageContent, - InputLocationMessageContent, - InputVenueMessageContent, - InputContactMessageContent, - InputInvoiceMessageContent, - ] - ] = None - """*Optional*. Content of the message to be sent instead of the voice recording""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - type: Literal[InlineQueryResultType.VOICE] = InlineQueryResultType.VOICE, - id: str, - voice_url: str, - title: str, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - voice_duration: Optional[int] = None, - reply_markup: Optional[InlineKeyboardMarkup] = None, - input_message_content: Optional[ - Union[ - InputTextMessageContent, - InputLocationMessageContent, - InputVenueMessageContent, - InputContactMessageContent, - InputInvoiceMessageContent, - ] - ] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - type=type, - id=id, - voice_url=voice_url, - title=title, - caption=caption, - parse_mode=parse_mode, - caption_entities=caption_entities, - voice_duration=voice_duration, - reply_markup=reply_markup, - input_message_content=input_message_content, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/inline_query_results_button.py b/env/Lib/site-packages/aiogram/types/inline_query_results_button.py deleted file mode 100644 index 6943fb8..0000000 --- a/env/Lib/site-packages/aiogram/types/inline_query_results_button.py +++ /dev/null @@ -1,43 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Optional - -from .base import TelegramObject - -if TYPE_CHECKING: - from .web_app_info import WebAppInfo - - -class InlineQueryResultsButton(TelegramObject): - """ - This object represents a button to be shown above inline query results. You **must** use exactly one of the optional fields. - - Source: https://core.telegram.org/bots/api#inlinequeryresultsbutton - """ - - text: str - """Label text on the button""" - web_app: Optional[WebAppInfo] = None - """*Optional*. Description of the `Web App `_ that will be launched when the user presses the button. The Web App will be able to switch back to the inline mode using the method `switchInlineQuery `_ inside the Web App.""" - start_parameter: Optional[str] = None - """*Optional*. `Deep-linking `_ parameter for the /start message sent to the bot when a user presses the button. 1-64 characters, only :code:`A-Z`, :code:`a-z`, :code:`0-9`, :code:`_` and :code:`-` are allowed.""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - text: str, - web_app: Optional[WebAppInfo] = None, - start_parameter: Optional[str] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - text=text, web_app=web_app, start_parameter=start_parameter, **__pydantic_kwargs - ) diff --git a/env/Lib/site-packages/aiogram/types/input_contact_message_content.py b/env/Lib/site-packages/aiogram/types/input_contact_message_content.py deleted file mode 100644 index 8bcb581..0000000 --- a/env/Lib/site-packages/aiogram/types/input_contact_message_content.py +++ /dev/null @@ -1,47 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Optional - -from .input_message_content import InputMessageContent - - -class InputContactMessageContent(InputMessageContent): - """ - Represents the `content `_ of a contact message to be sent as the result of an inline query. - - Source: https://core.telegram.org/bots/api#inputcontactmessagecontent - """ - - phone_number: str - """Contact's phone number""" - first_name: str - """Contact's first name""" - last_name: Optional[str] = None - """*Optional*. Contact's last name""" - vcard: Optional[str] = None - """*Optional*. Additional data about the contact in the form of a `vCard `_, 0-2048 bytes""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - phone_number: str, - first_name: str, - last_name: Optional[str] = None, - vcard: Optional[str] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - phone_number=phone_number, - first_name=first_name, - last_name=last_name, - vcard=vcard, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/input_file.py b/env/Lib/site-packages/aiogram/types/input_file.py deleted file mode 100644 index 5b73059..0000000 --- a/env/Lib/site-packages/aiogram/types/input_file.py +++ /dev/null @@ -1,149 +0,0 @@ -from __future__ import annotations - -import io -import os -from abc import ABC, abstractmethod -from pathlib import Path -from typing import TYPE_CHECKING, Any, AsyncGenerator, Dict, Optional, Union - -import aiofiles - -if TYPE_CHECKING: - from aiogram.client.bot import Bot - -DEFAULT_CHUNK_SIZE = 64 * 1024 # 64 kb - - -class InputFile(ABC): - """ - This object represents the contents of a file to be uploaded. Must be posted using multipart/form-data in the usual way that files are uploaded via the browser. - - Source: https://core.telegram.org/bots/api#inputfile - """ - - def __init__(self, filename: Optional[str] = None, chunk_size: int = DEFAULT_CHUNK_SIZE): - """ - Base class for input files. Should not be used directly. - Look at :class:`BufferedInputFile`, :class:`FSInputFile` :class:`URLInputFile` - - :param filename: name of the given file - :param chunk_size: reader chunks size - """ - self.filename = filename - self.chunk_size = chunk_size - - @abstractmethod - async def read(self, bot: "Bot") -> AsyncGenerator[bytes, None]: # pragma: no cover - yield b"" - - -class BufferedInputFile(InputFile): - def __init__(self, file: bytes, filename: str, chunk_size: int = DEFAULT_CHUNK_SIZE): - """ - Represents object for uploading files from filesystem - - :param file: Bytes - :param filename: Filename to be propagated to telegram. - :param chunk_size: Uploading chunk size - """ - super().__init__(filename=filename, chunk_size=chunk_size) - - self.data = file - - @classmethod - def from_file( - cls, - path: Union[str, Path], - filename: Optional[str] = None, - chunk_size: int = DEFAULT_CHUNK_SIZE, - ) -> BufferedInputFile: - """ - Create buffer from file - - :param path: Path to file - :param filename: Filename to be propagated to telegram. - By default, will be parsed from path - :param chunk_size: Uploading chunk size - :return: instance of :obj:`BufferedInputFile` - """ - if filename is None: - filename = os.path.basename(path) - with open(path, "rb") as f: - data = f.read() - return cls(data, filename=filename, chunk_size=chunk_size) - - async def read(self, bot: "Bot") -> AsyncGenerator[bytes, None]: - buffer = io.BytesIO(self.data) - while chunk := buffer.read(self.chunk_size): - yield chunk - - -class FSInputFile(InputFile): - def __init__( - self, - path: Union[str, Path], - filename: Optional[str] = None, - chunk_size: int = DEFAULT_CHUNK_SIZE, - ): - """ - Represents object for uploading files from filesystem - - :param path: Path to file - :param filename: Filename to be propagated to telegram. - By default, will be parsed from path - :param chunk_size: Uploading chunk size - """ - if filename is None: - filename = os.path.basename(path) - super().__init__(filename=filename, chunk_size=chunk_size) - - self.path = path - - async def read(self, bot: "Bot") -> AsyncGenerator[bytes, None]: - async with aiofiles.open(self.path, "rb") as f: - while chunk := await f.read(self.chunk_size): - yield chunk - - -class URLInputFile(InputFile): - def __init__( - self, - url: str, - headers: Optional[Dict[str, Any]] = None, - filename: Optional[str] = None, - chunk_size: int = DEFAULT_CHUNK_SIZE, - timeout: int = 30, - bot: Optional["Bot"] = None, - ): - """ - Represents object for streaming files from internet - - :param url: URL in internet - :param headers: HTTP Headers - :param filename: Filename to be propagated to telegram. - :param chunk_size: Uploading chunk size - :param timeout: Timeout for downloading - :param bot: Bot instance to use HTTP session from. - If not specified, will be used current bot - """ - super().__init__(filename=filename, chunk_size=chunk_size) - if headers is None: - headers = {} - - self.url = url - self.headers = headers - self.timeout = timeout - self.bot = bot - - async def read(self, bot: "Bot") -> AsyncGenerator[bytes, None]: - bot = self.bot or bot - stream = bot.session.stream_content( - url=self.url, - headers=self.headers, - timeout=self.timeout, - chunk_size=self.chunk_size, - raise_for_status=True, - ) - - async for chunk in stream: - yield chunk diff --git a/env/Lib/site-packages/aiogram/types/input_invoice_message_content.py b/env/Lib/site-packages/aiogram/types/input_invoice_message_content.py deleted file mode 100644 index 0dbb6d2..0000000 --- a/env/Lib/site-packages/aiogram/types/input_invoice_message_content.py +++ /dev/null @@ -1,114 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, List, Optional - -from .input_message_content import InputMessageContent - -if TYPE_CHECKING: - from .labeled_price import LabeledPrice - - -class InputInvoiceMessageContent(InputMessageContent): - """ - Represents the `content `_ of an invoice message to be sent as the result of an inline query. - - Source: https://core.telegram.org/bots/api#inputinvoicemessagecontent - """ - - title: str - """Product name, 1-32 characters""" - description: str - """Product description, 1-255 characters""" - payload: str - """Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes.""" - currency: str - """Three-letter ISO 4217 currency code, see `more on currencies `_. Pass 'XTR' for payments in `Telegram Stars `_.""" - prices: List[LabeledPrice] - """Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.). Must contain exactly one item for payments in `Telegram Stars `_.""" - provider_token: Optional[str] = None - """*Optional*. Payment provider token, obtained via `@BotFather `_. Pass an empty string for payments in `Telegram Stars `_.""" - max_tip_amount: Optional[int] = None - """*Optional*. The maximum accepted amount for tips in the *smallest units* of the currency (integer, **not** float/double). For example, for a maximum tip of :code:`US$ 1.45` pass :code:`max_tip_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). Defaults to 0. Not supported for payments in `Telegram Stars `_.""" - suggested_tip_amounts: Optional[List[int]] = None - """*Optional*. A JSON-serialized array of suggested amounts of tip 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*.""" - provider_data: Optional[str] = None - """*Optional*. 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_url: Optional[str] = None - """*Optional*. URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service.""" - photo_size: Optional[int] = None - """*Optional*. Photo size in bytes""" - photo_width: Optional[int] = None - """*Optional*. Photo width""" - photo_height: Optional[int] = None - """*Optional*. Photo height""" - need_name: Optional[bool] = None - """*Optional*. Pass :code:`True` if you require the user's full name to complete the order. Ignored for payments in `Telegram Stars `_.""" - need_phone_number: Optional[bool] = None - """*Optional*. Pass :code:`True` if you require the user's phone number to complete the order. Ignored for payments in `Telegram Stars `_.""" - need_email: Optional[bool] = None - """*Optional*. Pass :code:`True` if you require the user's email address to complete the order. Ignored for payments in `Telegram Stars `_.""" - need_shipping_address: Optional[bool] = None - """*Optional*. Pass :code:`True` if you require the user's shipping address to complete the order. Ignored for payments in `Telegram Stars `_.""" - send_phone_number_to_provider: Optional[bool] = None - """*Optional*. Pass :code:`True` if the user's phone number should be sent to the provider. Ignored for payments in `Telegram Stars `_.""" - send_email_to_provider: Optional[bool] = None - """*Optional*. Pass :code:`True` if the user's email address should be sent to the provider. Ignored for payments in `Telegram Stars `_.""" - is_flexible: Optional[bool] = None - """*Optional*. Pass :code:`True` if the final price depends on the shipping method. Ignored for payments in `Telegram Stars `_.""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - title: str, - description: str, - payload: str, - currency: str, - prices: List[LabeledPrice], - provider_token: Optional[str] = None, - max_tip_amount: Optional[int] = None, - suggested_tip_amounts: Optional[List[int]] = None, - provider_data: Optional[str] = None, - photo_url: Optional[str] = None, - photo_size: Optional[int] = None, - photo_width: Optional[int] = None, - photo_height: Optional[int] = None, - need_name: Optional[bool] = None, - need_phone_number: Optional[bool] = None, - need_email: Optional[bool] = None, - need_shipping_address: Optional[bool] = None, - send_phone_number_to_provider: Optional[bool] = None, - send_email_to_provider: Optional[bool] = None, - is_flexible: Optional[bool] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - title=title, - description=description, - payload=payload, - currency=currency, - prices=prices, - provider_token=provider_token, - max_tip_amount=max_tip_amount, - suggested_tip_amounts=suggested_tip_amounts, - provider_data=provider_data, - photo_url=photo_url, - photo_size=photo_size, - photo_width=photo_width, - photo_height=photo_height, - need_name=need_name, - need_phone_number=need_phone_number, - need_email=need_email, - need_shipping_address=need_shipping_address, - send_phone_number_to_provider=send_phone_number_to_provider, - send_email_to_provider=send_email_to_provider, - is_flexible=is_flexible, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/input_location_message_content.py b/env/Lib/site-packages/aiogram/types/input_location_message_content.py deleted file mode 100644 index 83400c1..0000000 --- a/env/Lib/site-packages/aiogram/types/input_location_message_content.py +++ /dev/null @@ -1,55 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Optional - -from .input_message_content import InputMessageContent - - -class InputLocationMessageContent(InputMessageContent): - """ - Represents the `content `_ of a location message to be sent as the result of an inline query. - - Source: https://core.telegram.org/bots/api#inputlocationmessagecontent - """ - - latitude: float - """Latitude of the location in degrees""" - longitude: float - """Longitude of the location in degrees""" - horizontal_accuracy: Optional[float] = None - """*Optional*. The radius of uncertainty for the location, measured in meters; 0-1500""" - live_period: Optional[int] = None - """*Optional*. Period in seconds during which the location can be updated, should be between 60 and 86400, or 0x7FFFFFFF for live locations that can be edited indefinitely.""" - heading: Optional[int] = None - """*Optional*. For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.""" - proximity_alert_radius: Optional[int] = None - """*Optional*. For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - latitude: float, - longitude: float, - horizontal_accuracy: Optional[float] = None, - live_period: Optional[int] = None, - heading: Optional[int] = None, - proximity_alert_radius: Optional[int] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - latitude=latitude, - longitude=longitude, - horizontal_accuracy=horizontal_accuracy, - live_period=live_period, - heading=heading, - proximity_alert_radius=proximity_alert_radius, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/input_media.py b/env/Lib/site-packages/aiogram/types/input_media.py deleted file mode 100644 index f7523c9..0000000 --- a/env/Lib/site-packages/aiogram/types/input_media.py +++ /dev/null @@ -1,17 +0,0 @@ -from __future__ import annotations - -from .base import MutableTelegramObject - - -class InputMedia(MutableTelegramObject): - """ - This object represents the content of a media message to be sent. It should be one of - - - :class:`aiogram.types.input_media_animation.InputMediaAnimation` - - :class:`aiogram.types.input_media_document.InputMediaDocument` - - :class:`aiogram.types.input_media_audio.InputMediaAudio` - - :class:`aiogram.types.input_media_photo.InputMediaPhoto` - - :class:`aiogram.types.input_media_video.InputMediaVideo` - - Source: https://core.telegram.org/bots/api#inputmedia - """ diff --git a/env/Lib/site-packages/aiogram/types/input_media_animation.py b/env/Lib/site-packages/aiogram/types/input_media_animation.py deleted file mode 100644 index a0251f2..0000000 --- a/env/Lib/site-packages/aiogram/types/input_media_animation.py +++ /dev/null @@ -1,83 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, List, Literal, Optional, Union - -from ..client.default import Default -from ..enums import InputMediaType -from .input_media import InputMedia - -if TYPE_CHECKING: - from .input_file import InputFile - from .message_entity import MessageEntity - - -class InputMediaAnimation(InputMedia): - """ - Represents an animation file (GIF or H.264/MPEG-4 AVC video without sound) to be sent. - - Source: https://core.telegram.org/bots/api#inputmediaanimation - """ - - type: Literal[InputMediaType.ANIMATION] = InputMediaType.ANIMATION - """Type of the result, must be *animation*""" - media: Union[str, InputFile] - """File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass 'attach://' to upload a new one using multipart/form-data under name. :ref:`More information on Sending Files » `""" - thumbnail: Optional[InputFile] = None - """*Optional*. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More information on Sending Files » `""" - caption: Optional[str] = None - """*Optional*. Caption of the animation to be sent, 0-1024 characters after entities parsing""" - parse_mode: Optional[Union[str, Default]] = Default("parse_mode") - """*Optional*. Mode for parsing entities in the animation caption. See `formatting options `_ for more details.""" - caption_entities: Optional[List[MessageEntity]] = None - """*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*""" - show_caption_above_media: Optional[Union[bool, Default]] = Default("show_caption_above_media") - """*Optional*. Pass :code:`True`, if the caption must be shown above the message media""" - width: Optional[int] = None - """*Optional*. Animation width""" - height: Optional[int] = None - """*Optional*. Animation height""" - duration: Optional[int] = None - """*Optional*. Animation duration in seconds""" - has_spoiler: Optional[bool] = None - """*Optional*. Pass :code:`True` if the animation needs to be covered with a spoiler animation""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - type: Literal[InputMediaType.ANIMATION] = InputMediaType.ANIMATION, - media: Union[str, InputFile], - thumbnail: Optional[InputFile] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - show_caption_above_media: Optional[Union[bool, Default]] = Default( - "show_caption_above_media" - ), - width: Optional[int] = None, - height: Optional[int] = None, - duration: Optional[int] = None, - has_spoiler: Optional[bool] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - type=type, - media=media, - thumbnail=thumbnail, - caption=caption, - parse_mode=parse_mode, - caption_entities=caption_entities, - show_caption_above_media=show_caption_above_media, - width=width, - height=height, - duration=duration, - has_spoiler=has_spoiler, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/input_media_audio.py b/env/Lib/site-packages/aiogram/types/input_media_audio.py deleted file mode 100644 index c372201..0000000 --- a/env/Lib/site-packages/aiogram/types/input_media_audio.py +++ /dev/null @@ -1,73 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, List, Literal, Optional, Union - -from ..client.default import Default -from ..enums import InputMediaType -from .input_media import InputMedia - -if TYPE_CHECKING: - from .input_file import InputFile - from .message_entity import MessageEntity - - -class InputMediaAudio(InputMedia): - """ - Represents an audio file to be treated as music to be sent. - - Source: https://core.telegram.org/bots/api#inputmediaaudio - """ - - type: Literal[InputMediaType.AUDIO] = InputMediaType.AUDIO - """Type of the result, must be *audio*""" - media: Union[str, InputFile] - """File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass 'attach://' to upload a new one using multipart/form-data under name. :ref:`More information on Sending Files » `""" - thumbnail: Optional[InputFile] = None - """*Optional*. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More information on Sending Files » `""" - caption: Optional[str] = None - """*Optional*. Caption of the audio to be sent, 0-1024 characters after entities parsing""" - parse_mode: Optional[Union[str, Default]] = Default("parse_mode") - """*Optional*. Mode for parsing entities in the audio caption. See `formatting options `_ for more details.""" - caption_entities: Optional[List[MessageEntity]] = None - """*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*""" - duration: Optional[int] = None - """*Optional*. Duration of the audio in seconds""" - performer: Optional[str] = None - """*Optional*. Performer of the audio""" - title: Optional[str] = None - """*Optional*. Title of the audio""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - type: Literal[InputMediaType.AUDIO] = InputMediaType.AUDIO, - media: Union[str, InputFile], - thumbnail: Optional[InputFile] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - duration: Optional[int] = None, - performer: Optional[str] = None, - title: Optional[str] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - type=type, - media=media, - thumbnail=thumbnail, - caption=caption, - parse_mode=parse_mode, - caption_entities=caption_entities, - duration=duration, - performer=performer, - title=title, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/input_media_document.py b/env/Lib/site-packages/aiogram/types/input_media_document.py deleted file mode 100644 index 7c24b92..0000000 --- a/env/Lib/site-packages/aiogram/types/input_media_document.py +++ /dev/null @@ -1,65 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, List, Literal, Optional, Union - -from ..client.default import Default -from ..enums import InputMediaType -from .input_media import InputMedia - -if TYPE_CHECKING: - from .input_file import InputFile - from .message_entity import MessageEntity - - -class InputMediaDocument(InputMedia): - """ - Represents a general file to be sent. - - Source: https://core.telegram.org/bots/api#inputmediadocument - """ - - type: Literal[InputMediaType.DOCUMENT] = InputMediaType.DOCUMENT - """Type of the result, must be *document*""" - media: Union[str, InputFile] - """File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass 'attach://' to upload a new one using multipart/form-data under name. :ref:`More information on Sending Files » `""" - thumbnail: Optional[InputFile] = None - """*Optional*. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More information on Sending Files » `""" - caption: Optional[str] = None - """*Optional*. Caption of the document to be sent, 0-1024 characters after entities parsing""" - parse_mode: Optional[Union[str, Default]] = Default("parse_mode") - """*Optional*. Mode for parsing entities in the document caption. See `formatting options `_ for more details.""" - caption_entities: Optional[List[MessageEntity]] = None - """*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*""" - disable_content_type_detection: Optional[bool] = None - """*Optional*. Disables automatic server-side content type detection for files uploaded using multipart/form-data. Always :code:`True`, if the document is sent as part of an album.""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - type: Literal[InputMediaType.DOCUMENT] = InputMediaType.DOCUMENT, - media: Union[str, InputFile], - thumbnail: Optional[InputFile] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - disable_content_type_detection: Optional[bool] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - type=type, - media=media, - thumbnail=thumbnail, - caption=caption, - parse_mode=parse_mode, - caption_entities=caption_entities, - disable_content_type_detection=disable_content_type_detection, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/input_media_photo.py b/env/Lib/site-packages/aiogram/types/input_media_photo.py deleted file mode 100644 index 19daa26..0000000 --- a/env/Lib/site-packages/aiogram/types/input_media_photo.py +++ /dev/null @@ -1,67 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, List, Literal, Optional, Union - -from ..client.default import Default -from ..enums import InputMediaType -from .input_media import InputMedia - -if TYPE_CHECKING: - from .input_file import InputFile - from .message_entity import MessageEntity - - -class InputMediaPhoto(InputMedia): - """ - Represents a photo to be sent. - - Source: https://core.telegram.org/bots/api#inputmediaphoto - """ - - type: Literal[InputMediaType.PHOTO] = InputMediaType.PHOTO - """Type of the result, must be *photo*""" - media: Union[str, InputFile] - """File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass 'attach://' to upload a new one using multipart/form-data under name. :ref:`More information on Sending Files » `""" - caption: Optional[str] = None - """*Optional*. Caption of the photo to be sent, 0-1024 characters after entities parsing""" - parse_mode: Optional[Union[str, Default]] = Default("parse_mode") - """*Optional*. Mode for parsing entities in the photo caption. See `formatting options `_ for more details.""" - caption_entities: Optional[List[MessageEntity]] = None - """*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*""" - show_caption_above_media: Optional[Union[bool, Default]] = Default("show_caption_above_media") - """*Optional*. Pass :code:`True`, if the caption must be shown above the message media""" - has_spoiler: Optional[bool] = None - """*Optional*. Pass :code:`True` if the photo needs to be covered with a spoiler animation""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - type: Literal[InputMediaType.PHOTO] = InputMediaType.PHOTO, - media: Union[str, InputFile], - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - show_caption_above_media: Optional[Union[bool, Default]] = Default( - "show_caption_above_media" - ), - has_spoiler: Optional[bool] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - type=type, - media=media, - caption=caption, - parse_mode=parse_mode, - caption_entities=caption_entities, - show_caption_above_media=show_caption_above_media, - has_spoiler=has_spoiler, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/input_media_video.py b/env/Lib/site-packages/aiogram/types/input_media_video.py deleted file mode 100644 index 6f1e326..0000000 --- a/env/Lib/site-packages/aiogram/types/input_media_video.py +++ /dev/null @@ -1,87 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, List, Literal, Optional, Union - -from ..client.default import Default -from ..enums import InputMediaType -from .input_media import InputMedia - -if TYPE_CHECKING: - from .input_file import InputFile - from .message_entity import MessageEntity - - -class InputMediaVideo(InputMedia): - """ - Represents a video to be sent. - - Source: https://core.telegram.org/bots/api#inputmediavideo - """ - - type: Literal[InputMediaType.VIDEO] = InputMediaType.VIDEO - """Type of the result, must be *video*""" - media: Union[str, InputFile] - """File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass 'attach://' to upload a new one using multipart/form-data under name. :ref:`More information on Sending Files » `""" - thumbnail: Optional[InputFile] = None - """*Optional*. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More information on Sending Files » `""" - caption: Optional[str] = None - """*Optional*. Caption of the video to be sent, 0-1024 characters after entities parsing""" - parse_mode: Optional[Union[str, Default]] = Default("parse_mode") - """*Optional*. Mode for parsing entities in the video caption. See `formatting options `_ for more details.""" - caption_entities: Optional[List[MessageEntity]] = None - """*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*""" - show_caption_above_media: Optional[Union[bool, Default]] = Default("show_caption_above_media") - """*Optional*. Pass :code:`True`, if the caption must be shown above the message media""" - width: Optional[int] = None - """*Optional*. Video width""" - height: Optional[int] = None - """*Optional*. Video height""" - duration: Optional[int] = None - """*Optional*. Video duration in seconds""" - supports_streaming: Optional[bool] = None - """*Optional*. Pass :code:`True` if the uploaded video is suitable for streaming""" - has_spoiler: Optional[bool] = None - """*Optional*. Pass :code:`True` if the video needs to be covered with a spoiler animation""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - type: Literal[InputMediaType.VIDEO] = InputMediaType.VIDEO, - media: Union[str, InputFile], - thumbnail: Optional[InputFile] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - show_caption_above_media: Optional[Union[bool, Default]] = Default( - "show_caption_above_media" - ), - width: Optional[int] = None, - height: Optional[int] = None, - duration: Optional[int] = None, - supports_streaming: Optional[bool] = None, - has_spoiler: Optional[bool] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - type=type, - media=media, - thumbnail=thumbnail, - caption=caption, - parse_mode=parse_mode, - caption_entities=caption_entities, - show_caption_above_media=show_caption_above_media, - width=width, - height=height, - duration=duration, - supports_streaming=supports_streaming, - has_spoiler=has_spoiler, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/input_message_content.py b/env/Lib/site-packages/aiogram/types/input_message_content.py deleted file mode 100644 index 858524a..0000000 --- a/env/Lib/site-packages/aiogram/types/input_message_content.py +++ /dev/null @@ -1,17 +0,0 @@ -from __future__ import annotations - -from .base import MutableTelegramObject - - -class InputMessageContent(MutableTelegramObject): - """ - This object represents the content of a message to be sent as a result of an inline query. Telegram clients currently support the following 5 types: - - - :class:`aiogram.types.input_text_message_content.InputTextMessageContent` - - :class:`aiogram.types.input_location_message_content.InputLocationMessageContent` - - :class:`aiogram.types.input_venue_message_content.InputVenueMessageContent` - - :class:`aiogram.types.input_contact_message_content.InputContactMessageContent` - - :class:`aiogram.types.input_invoice_message_content.InputInvoiceMessageContent` - - Source: https://core.telegram.org/bots/api#inputmessagecontent - """ diff --git a/env/Lib/site-packages/aiogram/types/input_paid_media.py b/env/Lib/site-packages/aiogram/types/input_paid_media.py deleted file mode 100644 index 9d3193d..0000000 --- a/env/Lib/site-packages/aiogram/types/input_paid_media.py +++ /dev/null @@ -1,12 +0,0 @@ -from .base import TelegramObject - - -class InputPaidMedia(TelegramObject): - """ - This object describes the paid media to be sent. Currently, it can be one of - - - :class:`aiogram.types.input_paid_media_photo.InputPaidMediaPhoto` - - :class:`aiogram.types.input_paid_media_video.InputPaidMediaVideo` - - Source: https://core.telegram.org/bots/api#inputpaidmedia - """ diff --git a/env/Lib/site-packages/aiogram/types/input_paid_media_photo.py b/env/Lib/site-packages/aiogram/types/input_paid_media_photo.py deleted file mode 100644 index 1756db5..0000000 --- a/env/Lib/site-packages/aiogram/types/input_paid_media_photo.py +++ /dev/null @@ -1,37 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Literal, Union - -from ..enums import InputPaidMediaType -from .input_file import InputFile -from .input_paid_media import InputPaidMedia - - -class InputPaidMediaPhoto(InputPaidMedia): - """ - The paid media to send is a photo. - - Source: https://core.telegram.org/bots/api#inputpaidmediaphoto - """ - - type: Literal[InputPaidMediaType.PHOTO] = InputPaidMediaType.PHOTO - """Type of the media, must be *photo*""" - media: Union[str, InputFile] - """File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass 'attach://' to upload a new one using multipart/form-data under name. :ref:`More information on Sending Files » `""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - type: Literal[InputPaidMediaType.PHOTO] = InputPaidMediaType.PHOTO, - media: Union[str, InputFile], - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(type=type, media=media, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/types/input_paid_media_video.py b/env/Lib/site-packages/aiogram/types/input_paid_media_video.py deleted file mode 100644 index 4511afb..0000000 --- a/env/Lib/site-packages/aiogram/types/input_paid_media_video.py +++ /dev/null @@ -1,61 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Literal, Optional, Union - -from ..enums import InputPaidMediaType -from .input_file import InputFile -from .input_paid_media import InputPaidMedia - - -class InputPaidMediaVideo(InputPaidMedia): - """ - The paid media to send is a video. - - Source: https://core.telegram.org/bots/api#inputpaidmediavideo - """ - - type: Literal[InputPaidMediaType.VIDEO] = InputPaidMediaType.VIDEO - """Type of the media, must be *video*""" - media: Union[str, InputFile] - """File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass 'attach://' to upload a new one using multipart/form-data under name. :ref:`More information on Sending Files » `""" - thumbnail: Optional[Union[InputFile, str]] = None - """*Optional*. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More information on Sending Files » `""" - width: Optional[int] = None - """*Optional*. Video width""" - height: Optional[int] = None - """*Optional*. Video height""" - duration: Optional[int] = None - """*Optional*. Video duration in seconds""" - supports_streaming: Optional[bool] = None - """*Optional*. Pass :code:`True` if the uploaded video is suitable for streaming""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - type: Literal[InputPaidMediaType.VIDEO] = InputPaidMediaType.VIDEO, - media: Union[str, InputFile], - thumbnail: Optional[Union[InputFile, str]] = None, - width: Optional[int] = None, - height: Optional[int] = None, - duration: Optional[int] = None, - supports_streaming: Optional[bool] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - type=type, - media=media, - thumbnail=thumbnail, - width=width, - height=height, - duration=duration, - supports_streaming=supports_streaming, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/input_poll_option.py b/env/Lib/site-packages/aiogram/types/input_poll_option.py deleted file mode 100644 index 7bca9f6..0000000 --- a/env/Lib/site-packages/aiogram/types/input_poll_option.py +++ /dev/null @@ -1,47 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, List, Optional, Union - -from ..client.default import Default -from .base import TelegramObject - -if TYPE_CHECKING: - from .message_entity import MessageEntity - - -class InputPollOption(TelegramObject): - """ - This object contains information about one answer option in a poll to be sent. - - Source: https://core.telegram.org/bots/api#inputpolloption - """ - - text: str - """Option text, 1-100 characters""" - text_parse_mode: Optional[Union[str, Default]] = Default("parse_mode") - """*Optional*. Mode for parsing entities in the text. See `formatting options `_ for more details. Currently, only custom emoji entities are allowed""" - text_entities: Optional[List[MessageEntity]] = None - """*Optional*. A JSON-serialized list of special entities that appear in the poll option text. It can be specified instead of *text_parse_mode*""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - text: str, - text_parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - text_entities: Optional[List[MessageEntity]] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - text=text, - text_parse_mode=text_parse_mode, - text_entities=text_entities, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/input_sticker.py b/env/Lib/site-packages/aiogram/types/input_sticker.py deleted file mode 100644 index 85f6686..0000000 --- a/env/Lib/site-packages/aiogram/types/input_sticker.py +++ /dev/null @@ -1,55 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, List, Optional, Union - -from .base import TelegramObject - -if TYPE_CHECKING: - from .input_file import InputFile - from .mask_position import MaskPosition - - -class InputSticker(TelegramObject): - """ - This object describes a sticker to be added to a sticker set. - - Source: https://core.telegram.org/bots/api#inputsticker - """ - - sticker: Union[InputFile, str] - """The added sticker. Pass a *file_id* as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, upload a new one using multipart/form-data, or pass 'attach://' to upload a new one using multipart/form-data under name. Animated and video stickers can't be uploaded via HTTP URL. :ref:`More information on Sending Files » `""" - format: str - """Format of the added sticker, must be one of 'static' for a **.WEBP** or **.PNG** image, 'animated' for a **.TGS** animation, 'video' for a **WEBM** video""" - emoji_list: List[str] - """List of 1-20 emoji associated with the sticker""" - mask_position: Optional[MaskPosition] = None - """*Optional*. Position where the mask should be placed on faces. For 'mask' stickers only.""" - keywords: Optional[List[str]] = None - """*Optional*. List of 0-20 search keywords for the sticker with total length of up to 64 characters. For 'regular' and 'custom_emoji' stickers only.""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - sticker: Union[InputFile, str], - format: str, - emoji_list: List[str], - mask_position: Optional[MaskPosition] = None, - keywords: Optional[List[str]] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - sticker=sticker, - format=format, - emoji_list=emoji_list, - mask_position=mask_position, - keywords=keywords, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/input_text_message_content.py b/env/Lib/site-packages/aiogram/types/input_text_message_content.py deleted file mode 100644 index 5048757..0000000 --- a/env/Lib/site-packages/aiogram/types/input_text_message_content.py +++ /dev/null @@ -1,65 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, List, Optional, Union - -from pydantic import Field - -from ..client.default import Default -from .input_message_content import InputMessageContent - -if TYPE_CHECKING: - from .link_preview_options import LinkPreviewOptions - from .message_entity import MessageEntity - - -class InputTextMessageContent(InputMessageContent): - """ - Represents the `content `_ of a text message to be sent as the result of an inline query. - - Source: https://core.telegram.org/bots/api#inputtextmessagecontent - """ - - message_text: str - """Text of the message to be sent, 1-4096 characters""" - parse_mode: Optional[Union[str, Default]] = Default("parse_mode") - """*Optional*. Mode for parsing entities in the message text. See `formatting options `_ for more details.""" - entities: Optional[List[MessageEntity]] = None - """*Optional*. List of special entities that appear in message text, which can be specified instead of *parse_mode*""" - link_preview_options: Optional[LinkPreviewOptions] = None - """*Optional*. Link preview generation options for the message""" - disable_web_page_preview: Optional[Union[bool, Default]] = Field( - Default("disable_web_page_preview"), json_schema_extra={"deprecated": True} - ) - """*Optional*. Disables link previews for links in the sent message - -.. deprecated:: API:7.0 - https://core.telegram.org/bots/api-changelog#december-29-2023""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - message_text: str, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - entities: Optional[List[MessageEntity]] = None, - link_preview_options: Optional[LinkPreviewOptions] = None, - disable_web_page_preview: Optional[Union[bool, Default]] = Default( - "disable_web_page_preview" - ), - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - message_text=message_text, - parse_mode=parse_mode, - entities=entities, - link_preview_options=link_preview_options, - disable_web_page_preview=disable_web_page_preview, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/input_venue_message_content.py b/env/Lib/site-packages/aiogram/types/input_venue_message_content.py deleted file mode 100644 index 48dd5c4..0000000 --- a/env/Lib/site-packages/aiogram/types/input_venue_message_content.py +++ /dev/null @@ -1,63 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Optional - -from .input_message_content import InputMessageContent - - -class InputVenueMessageContent(InputMessageContent): - """ - Represents the `content `_ of a venue message to be sent as the result of an inline query. - - Source: https://core.telegram.org/bots/api#inputvenuemessagecontent - """ - - latitude: float - """Latitude of the venue in degrees""" - longitude: float - """Longitude of the venue in degrees""" - title: str - """Name of the venue""" - address: str - """Address of the venue""" - foursquare_id: Optional[str] = None - """*Optional*. Foursquare identifier of the venue, if known""" - foursquare_type: Optional[str] = None - """*Optional*. Foursquare type of the venue, if known. (For example, 'arts_entertainment/default', 'arts_entertainment/aquarium' or 'food/icecream'.)""" - google_place_id: Optional[str] = None - """*Optional*. Google Places identifier of the venue""" - google_place_type: Optional[str] = None - """*Optional*. Google Places type of the venue. (See `supported types `_.)""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - latitude: float, - longitude: float, - title: str, - address: str, - foursquare_id: Optional[str] = None, - foursquare_type: Optional[str] = None, - google_place_id: Optional[str] = None, - google_place_type: Optional[str] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - latitude=latitude, - longitude=longitude, - title=title, - address=address, - foursquare_id=foursquare_id, - foursquare_type=foursquare_type, - google_place_id=google_place_id, - google_place_type=google_place_type, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/invoice.py b/env/Lib/site-packages/aiogram/types/invoice.py deleted file mode 100644 index 7c70f0b..0000000 --- a/env/Lib/site-packages/aiogram/types/invoice.py +++ /dev/null @@ -1,51 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any - -from .base import TelegramObject - - -class Invoice(TelegramObject): - """ - This object contains basic information about an invoice. - - Source: https://core.telegram.org/bots/api#invoice - """ - - title: str - """Product name""" - description: str - """Product description""" - start_parameter: str - """Unique bot deep-linking parameter that can be used to generate this invoice""" - currency: str - """Three-letter ISO 4217 `currency `_ code, or 'XTR' for payments in `Telegram Stars `_""" - total_amount: int - """Total price in the *smallest units* of the currency (integer, **not** float/double). For example, for a price of :code:`US$ 1.45` pass :code:`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).""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - title: str, - description: str, - start_parameter: str, - currency: str, - total_amount: int, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - title=title, - description=description, - start_parameter=start_parameter, - currency=currency, - total_amount=total_amount, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/keyboard_button.py b/env/Lib/site-packages/aiogram/types/keyboard_button.py deleted file mode 100644 index 0cf7d58..0000000 --- a/env/Lib/site-packages/aiogram/types/keyboard_button.py +++ /dev/null @@ -1,78 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Optional - -from pydantic import Field - -from .base import MutableTelegramObject - -if TYPE_CHECKING: - from .keyboard_button_poll_type import KeyboardButtonPollType - from .keyboard_button_request_chat import KeyboardButtonRequestChat - from .keyboard_button_request_user import KeyboardButtonRequestUser - from .keyboard_button_request_users import KeyboardButtonRequestUsers - from .web_app_info import WebAppInfo - - -class KeyboardButton(MutableTelegramObject): - """ - This object represents one button of the reply keyboard. At most one of the optional fields must be used to specify type of the button. For simple text buttons, *String* can be used instead of this object to specify the button text. - **Note:** *request_users* and *request_chat* options will only work in Telegram versions released after 3 February, 2023. Older clients will display *unsupported message*. - - Source: https://core.telegram.org/bots/api#keyboardbutton - """ - - text: str - """Text of the button. If none of the optional fields are used, it will be sent as a message when the button is pressed""" - request_users: Optional[KeyboardButtonRequestUsers] = None - """*Optional.* If specified, pressing the button will open a list of suitable users. Identifiers of selected users will be sent to the bot in a 'users_shared' service message. Available in private chats only.""" - request_chat: Optional[KeyboardButtonRequestChat] = None - """*Optional.* If specified, pressing the button will open a list of suitable chats. Tapping on a chat will send its identifier to the bot in a 'chat_shared' service message. Available in private chats only.""" - request_contact: Optional[bool] = None - """*Optional*. If :code:`True`, the user's phone number will be sent as a contact when the button is pressed. Available in private chats only.""" - request_location: Optional[bool] = None - """*Optional*. If :code:`True`, the user's current location will be sent when the button is pressed. Available in private chats only.""" - request_poll: Optional[KeyboardButtonPollType] = None - """*Optional*. If specified, the user will be asked to create a poll and send it to the bot when the button is pressed. Available in private chats only.""" - web_app: Optional[WebAppInfo] = None - """*Optional*. If specified, the described `Web App `_ will be launched when the button is pressed. The Web App will be able to send a 'web_app_data' service message. Available in private chats only.""" - request_user: Optional[KeyboardButtonRequestUser] = Field( - None, json_schema_extra={"deprecated": True} - ) - """*Optional.* If specified, pressing the button will open a list of suitable users. Tapping on any user will send their identifier to the bot in a 'user_shared' service message. Available in private chats only. - -.. deprecated:: API:7.0 - https://core.telegram.org/bots/api-changelog#december-29-2023""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - text: str, - request_users: Optional[KeyboardButtonRequestUsers] = None, - request_chat: Optional[KeyboardButtonRequestChat] = None, - request_contact: Optional[bool] = None, - request_location: Optional[bool] = None, - request_poll: Optional[KeyboardButtonPollType] = None, - web_app: Optional[WebAppInfo] = None, - request_user: Optional[KeyboardButtonRequestUser] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - text=text, - request_users=request_users, - request_chat=request_chat, - request_contact=request_contact, - request_location=request_location, - request_poll=request_poll, - web_app=web_app, - request_user=request_user, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/keyboard_button_poll_type.py b/env/Lib/site-packages/aiogram/types/keyboard_button_poll_type.py deleted file mode 100644 index 07eadb7..0000000 --- a/env/Lib/site-packages/aiogram/types/keyboard_button_poll_type.py +++ /dev/null @@ -1,29 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Optional - -from .base import MutableTelegramObject - - -class KeyboardButtonPollType(MutableTelegramObject): - """ - This object represents type of a poll, which is allowed to be created and sent when the corresponding button is pressed. - - Source: https://core.telegram.org/bots/api#keyboardbuttonpolltype - """ - - type: Optional[str] = None - """*Optional*. If *quiz* is passed, the user will be allowed to create only polls in the quiz mode. If *regular* is passed, only regular polls will be allowed. Otherwise, the user will be allowed to create a poll of any type.""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, *, type: Optional[str] = None, **__pydantic_kwargs: Any - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(type=type, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/types/keyboard_button_request_chat.py b/env/Lib/site-packages/aiogram/types/keyboard_button_request_chat.py deleted file mode 100644 index 018edcf..0000000 --- a/env/Lib/site-packages/aiogram/types/keyboard_button_request_chat.py +++ /dev/null @@ -1,78 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Optional - -from aiogram.types import TelegramObject - -if TYPE_CHECKING: - from .chat_administrator_rights import ChatAdministratorRights - - -class KeyboardButtonRequestChat(TelegramObject): - """ - This object defines the criteria used to request a suitable chat. Information about the selected chat will be shared with the bot when the corresponding button is pressed. The bot will be granted requested rights in the chat if appropriate. `More about requesting chats » `_. - - Source: https://core.telegram.org/bots/api#keyboardbuttonrequestchat - """ - - request_id: int - """Signed 32-bit identifier of the request, which will be received back in the :class:`aiogram.types.chat_shared.ChatShared` object. Must be unique within the message""" - chat_is_channel: bool - """Pass :code:`True` to request a channel chat, pass :code:`False` to request a group or a supergroup chat.""" - chat_is_forum: Optional[bool] = None - """*Optional*. Pass :code:`True` to request a forum supergroup, pass :code:`False` to request a non-forum chat. If not specified, no additional restrictions are applied.""" - chat_has_username: Optional[bool] = None - """*Optional*. Pass :code:`True` to request a supergroup or a channel with a username, pass :code:`False` to request a chat without a username. If not specified, no additional restrictions are applied.""" - chat_is_created: Optional[bool] = None - """*Optional*. Pass :code:`True` to request a chat owned by the user. Otherwise, no additional restrictions are applied.""" - user_administrator_rights: Optional[ChatAdministratorRights] = None - """*Optional*. A JSON-serialized object listing the required administrator rights of the user in the chat. The rights must be a superset of *bot_administrator_rights*. If not specified, no additional restrictions are applied.""" - bot_administrator_rights: Optional[ChatAdministratorRights] = None - """*Optional*. A JSON-serialized object listing the required administrator rights of the bot in the chat. The rights must be a subset of *user_administrator_rights*. If not specified, no additional restrictions are applied.""" - bot_is_member: Optional[bool] = None - """*Optional*. Pass :code:`True` to request a chat with the bot as a member. Otherwise, no additional restrictions are applied.""" - request_title: Optional[bool] = None - """*Optional*. Pass :code:`True` to request the chat's title""" - request_username: Optional[bool] = None - """*Optional*. Pass :code:`True` to request the chat's username""" - request_photo: Optional[bool] = None - """*Optional*. Pass :code:`True` to request the chat's photo""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - request_id: int, - chat_is_channel: bool, - chat_is_forum: Optional[bool] = None, - chat_has_username: Optional[bool] = None, - chat_is_created: Optional[bool] = None, - user_administrator_rights: Optional[ChatAdministratorRights] = None, - bot_administrator_rights: Optional[ChatAdministratorRights] = None, - bot_is_member: Optional[bool] = None, - request_title: Optional[bool] = None, - request_username: Optional[bool] = None, - request_photo: Optional[bool] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - request_id=request_id, - chat_is_channel=chat_is_channel, - chat_is_forum=chat_is_forum, - chat_has_username=chat_has_username, - chat_is_created=chat_is_created, - user_administrator_rights=user_administrator_rights, - bot_administrator_rights=bot_administrator_rights, - bot_is_member=bot_is_member, - request_title=request_title, - request_username=request_username, - request_photo=request_photo, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/keyboard_button_request_user.py b/env/Lib/site-packages/aiogram/types/keyboard_button_request_user.py deleted file mode 100644 index ab44ab2..0000000 --- a/env/Lib/site-packages/aiogram/types/keyboard_button_request_user.py +++ /dev/null @@ -1,44 +0,0 @@ -from typing import TYPE_CHECKING, Any, Optional - -from aiogram.types import TelegramObject - - -class KeyboardButtonRequestUser(TelegramObject): - """ - This object defines the criteria used to request a suitable user. The identifier of the selected user will be shared with the bot when the corresponding button is pressed. `More about requesting users » `_ - - .. deprecated:: API:7.0 - https://core.telegram.org/bots/api-changelog#december-29-2023 - - Source: https://core.telegram.org/bots/api#keyboardbuttonrequestuser - """ - - request_id: int - """Signed 32-bit identifier of the request, which will be received back in the :class:`aiogram.types.user_shared.UserShared` object. Must be unique within the message""" - user_is_bot: Optional[bool] = None - """*Optional*. Pass :code:`True` to request a bot, pass :code:`False` to request a regular user. If not specified, no additional restrictions are applied.""" - user_is_premium: Optional[bool] = None - """*Optional*. Pass :code:`True` to request a premium user, pass :code:`False` to request a non-premium user. If not specified, no additional restrictions are applied.""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - request_id: int, - user_is_bot: Optional[bool] = None, - user_is_premium: Optional[bool] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - request_id=request_id, - user_is_bot=user_is_bot, - user_is_premium=user_is_premium, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/keyboard_button_request_users.py b/env/Lib/site-packages/aiogram/types/keyboard_button_request_users.py deleted file mode 100644 index 631f04b..0000000 --- a/env/Lib/site-packages/aiogram/types/keyboard_button_request_users.py +++ /dev/null @@ -1,57 +0,0 @@ -from typing import TYPE_CHECKING, Any, Optional - -from aiogram.types import TelegramObject - - -class KeyboardButtonRequestUsers(TelegramObject): - """ - This object defines the criteria used to request suitable users. Information about the selected users will be shared with the bot when the corresponding button is pressed. `More about requesting users » `_ - - Source: https://core.telegram.org/bots/api#keyboardbuttonrequestusers - """ - - request_id: int - """Signed 32-bit identifier of the request that will be received back in the :class:`aiogram.types.users_shared.UsersShared` object. Must be unique within the message""" - user_is_bot: Optional[bool] = None - """*Optional*. Pass :code:`True` to request bots, pass :code:`False` to request regular users. If not specified, no additional restrictions are applied.""" - user_is_premium: Optional[bool] = None - """*Optional*. Pass :code:`True` to request premium users, pass :code:`False` to request non-premium users. If not specified, no additional restrictions are applied.""" - max_quantity: Optional[int] = None - """*Optional*. The maximum number of users to be selected; 1-10. Defaults to 1.""" - request_name: Optional[bool] = None - """*Optional*. Pass :code:`True` to request the users' first and last names""" - request_username: Optional[bool] = None - """*Optional*. Pass :code:`True` to request the users' usernames""" - request_photo: Optional[bool] = None - """*Optional*. Pass :code:`True` to request the users' photos""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - request_id: int, - user_is_bot: Optional[bool] = None, - user_is_premium: Optional[bool] = None, - max_quantity: Optional[int] = None, - request_name: Optional[bool] = None, - request_username: Optional[bool] = None, - request_photo: Optional[bool] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - request_id=request_id, - user_is_bot=user_is_bot, - user_is_premium=user_is_premium, - max_quantity=max_quantity, - request_name=request_name, - request_username=request_username, - request_photo=request_photo, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/labeled_price.py b/env/Lib/site-packages/aiogram/types/labeled_price.py deleted file mode 100644 index 42d97af..0000000 --- a/env/Lib/site-packages/aiogram/types/labeled_price.py +++ /dev/null @@ -1,31 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any - -from .base import MutableTelegramObject - - -class LabeledPrice(MutableTelegramObject): - """ - This object represents a portion of the price for goods or services. - - Source: https://core.telegram.org/bots/api#labeledprice - """ - - label: str - """Portion label""" - amount: int - """Price of the product in the *smallest units* of the `currency `_ (integer, **not** float/double). For example, for a price of :code:`US$ 1.45` pass :code:`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).""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, *, label: str, amount: int, **__pydantic_kwargs: Any - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(label=label, amount=amount, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/types/link_preview_options.py b/env/Lib/site-packages/aiogram/types/link_preview_options.py deleted file mode 100644 index 8964c5e..0000000 --- a/env/Lib/site-packages/aiogram/types/link_preview_options.py +++ /dev/null @@ -1,56 +0,0 @@ -from typing import TYPE_CHECKING, Any, Optional, Union - -from ..client.default import Default -from .base import TelegramObject - - -class LinkPreviewOptions(TelegramObject): - """ - Describes the options used for link preview generation. - - Source: https://core.telegram.org/bots/api#linkpreviewoptions - """ - - is_disabled: Optional[Union[bool, Default]] = Default("link_preview_is_disabled") - """*Optional*. :code:`True`, if the link preview is disabled""" - url: Optional[str] = None - """*Optional*. URL to use for the link preview. If empty, then the first URL found in the message text will be used""" - prefer_small_media: Optional[Union[bool, Default]] = Default("link_preview_prefer_small_media") - """*Optional*. :code:`True`, if the media in the link preview is supposed to be shrunk; ignored if the URL isn't explicitly specified or media size change isn't supported for the preview""" - prefer_large_media: Optional[Union[bool, Default]] = Default("link_preview_prefer_large_media") - """*Optional*. :code:`True`, if the media in the link preview is supposed to be enlarged; ignored if the URL isn't explicitly specified or media size change isn't supported for the preview""" - show_above_text: Optional[Union[bool, Default]] = Default("link_preview_show_above_text") - """*Optional*. :code:`True`, if the link preview must be shown above the message text; otherwise, the link preview will be shown below the message text""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - is_disabled: Optional[Union[bool, Default]] = Default("link_preview_is_disabled"), - url: Optional[str] = None, - prefer_small_media: Optional[Union[bool, Default]] = Default( - "link_preview_prefer_small_media" - ), - prefer_large_media: Optional[Union[bool, Default]] = Default( - "link_preview_prefer_large_media" - ), - show_above_text: Optional[Union[bool, Default]] = Default( - "link_preview_show_above_text" - ), - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - is_disabled=is_disabled, - url=url, - prefer_small_media=prefer_small_media, - prefer_large_media=prefer_large_media, - show_above_text=show_above_text, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/location.py b/env/Lib/site-packages/aiogram/types/location.py deleted file mode 100644 index 32673da..0000000 --- a/env/Lib/site-packages/aiogram/types/location.py +++ /dev/null @@ -1,55 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Optional - -from .base import TelegramObject - - -class Location(TelegramObject): - """ - This object represents a point on the map. - - Source: https://core.telegram.org/bots/api#location - """ - - latitude: float - """Latitude as defined by the sender""" - longitude: float - """Longitude as defined by the sender""" - horizontal_accuracy: Optional[float] = None - """*Optional*. The radius of uncertainty for the location, measured in meters; 0-1500""" - live_period: Optional[int] = None - """*Optional*. Time relative to the message sending date, during which the location can be updated; in seconds. For active live locations only.""" - heading: Optional[int] = None - """*Optional*. The direction in which user is moving, in degrees; 1-360. For active live locations only.""" - proximity_alert_radius: Optional[int] = None - """*Optional*. The maximum distance for proximity alerts about approaching another chat member, in meters. For sent live locations only.""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - latitude: float, - longitude: float, - horizontal_accuracy: Optional[float] = None, - live_period: Optional[int] = None, - heading: Optional[int] = None, - proximity_alert_radius: Optional[int] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - latitude=latitude, - longitude=longitude, - horizontal_accuracy=horizontal_accuracy, - live_period=live_period, - heading=heading, - proximity_alert_radius=proximity_alert_radius, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/login_url.py b/env/Lib/site-packages/aiogram/types/login_url.py deleted file mode 100644 index 6f6c94a..0000000 --- a/env/Lib/site-packages/aiogram/types/login_url.py +++ /dev/null @@ -1,50 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Optional - -from .base import TelegramObject - - -class LoginUrl(TelegramObject): - """ - This object represents a parameter of the inline keyboard button used to automatically authorize a user. Serves as a great replacement for the `Telegram Login Widget `_ when the user is coming from Telegram. All the user needs to do is tap/click a button and confirm that they want to log in: - Telegram apps support these buttons as of `version 5.7 `_. - - Sample bot: `@discussbot `_ - - Source: https://core.telegram.org/bots/api#loginurl - """ - - url: str - """An HTTPS 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 `_.""" - forward_text: Optional[str] = None - """*Optional*. New text of the button in forwarded messages.""" - bot_username: Optional[str] = None - """*Optional*. 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.""" - request_write_access: Optional[bool] = None - """*Optional*. Pass :code:`True` to request the permission for your bot to send messages to the user.""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - url: str, - forward_text: Optional[str] = None, - bot_username: Optional[str] = None, - request_write_access: Optional[bool] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - url=url, - forward_text=forward_text, - bot_username=bot_username, - request_write_access=request_write_access, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/mask_position.py b/env/Lib/site-packages/aiogram/types/mask_position.py deleted file mode 100644 index d02852a..0000000 --- a/env/Lib/site-packages/aiogram/types/mask_position.py +++ /dev/null @@ -1,43 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any - -from .base import TelegramObject - - -class MaskPosition(TelegramObject): - """ - This object describes the position on faces where a mask should be placed by default. - - Source: https://core.telegram.org/bots/api#maskposition - """ - - point: str - """The part of the face relative to which the mask should be placed. One of 'forehead', 'eyes', 'mouth', or 'chin'.""" - x_shift: float - """Shift by X-axis measured in widths of the mask scaled to the face size, from left to right. For example, choosing -1.0 will place mask just to the left of the default mask position.""" - y_shift: float - """Shift by Y-axis measured in heights of the mask scaled to the face size, from top to bottom. For example, 1.0 will place the mask just below the default mask position.""" - scale: float - """Mask scaling coefficient. For example, 2.0 means double size.""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - point: str, - x_shift: float, - y_shift: float, - scale: float, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - point=point, x_shift=x_shift, y_shift=y_shift, scale=scale, **__pydantic_kwargs - ) diff --git a/env/Lib/site-packages/aiogram/types/maybe_inaccessible_message.py b/env/Lib/site-packages/aiogram/types/maybe_inaccessible_message.py deleted file mode 100644 index fe95ced..0000000 --- a/env/Lib/site-packages/aiogram/types/maybe_inaccessible_message.py +++ /dev/null @@ -1,12 +0,0 @@ -from aiogram.types import TelegramObject - - -class MaybeInaccessibleMessage(TelegramObject): - """ - This object describes a message that can be inaccessible to the bot. It can be one of - - - :class:`aiogram.types.message.Message` - - :class:`aiogram.types.inaccessible_message.InaccessibleMessage` - - Source: https://core.telegram.org/bots/api#maybeinaccessiblemessage - """ diff --git a/env/Lib/site-packages/aiogram/types/menu_button.py b/env/Lib/site-packages/aiogram/types/menu_button.py deleted file mode 100644 index 4c4fbf3..0000000 --- a/env/Lib/site-packages/aiogram/types/menu_button.py +++ /dev/null @@ -1,47 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Optional - -from .base import MutableTelegramObject - -if TYPE_CHECKING: - from .web_app_info import WebAppInfo - - -class MenuButton(MutableTelegramObject): - """ - This object describes the bot's menu button in a private chat. It should be one of - - - :class:`aiogram.types.menu_button_commands.MenuButtonCommands` - - :class:`aiogram.types.menu_button_web_app.MenuButtonWebApp` - - :class:`aiogram.types.menu_button_default.MenuButtonDefault` - - If a menu button other than :class:`aiogram.types.menu_button_default.MenuButtonDefault` is set for a private chat, then it is applied in the chat. Otherwise the default menu button is applied. By default, the menu button opens the list of bot commands. - - Source: https://core.telegram.org/bots/api#menubutton - """ - - type: str - """Type of the button""" - text: Optional[str] = None - """*Optional*. Text on the button""" - web_app: Optional[WebAppInfo] = None - """*Optional*. Description of the Web App that will be launched when the user presses the button. The Web App will be able to send an arbitrary message on behalf of the user using the method :class:`aiogram.methods.answer_web_app_query.AnswerWebAppQuery`. Alternatively, a :code:`t.me` link to a Web App of the bot can be specified in the object instead of the Web App's URL, in which case the Web App will be opened as if the user pressed the link.""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - type: str, - text: Optional[str] = None, - web_app: Optional[WebAppInfo] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(type=type, text=text, web_app=web_app, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/types/menu_button_commands.py b/env/Lib/site-packages/aiogram/types/menu_button_commands.py deleted file mode 100644 index 54ed20b..0000000 --- a/env/Lib/site-packages/aiogram/types/menu_button_commands.py +++ /dev/null @@ -1,33 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Literal - -from ..enums import MenuButtonType -from .menu_button import MenuButton - - -class MenuButtonCommands(MenuButton): - """ - Represents a menu button, which opens the bot's list of commands. - - Source: https://core.telegram.org/bots/api#menubuttoncommands - """ - - type: Literal[MenuButtonType.COMMANDS] = MenuButtonType.COMMANDS - """Type of the button, must be *commands*""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - type: Literal[MenuButtonType.COMMANDS] = MenuButtonType.COMMANDS, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(type=type, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/types/menu_button_default.py b/env/Lib/site-packages/aiogram/types/menu_button_default.py deleted file mode 100644 index 12ce30e..0000000 --- a/env/Lib/site-packages/aiogram/types/menu_button_default.py +++ /dev/null @@ -1,33 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Literal - -from ..enums import MenuButtonType -from .menu_button import MenuButton - - -class MenuButtonDefault(MenuButton): - """ - Describes that no specific value for the menu button was set. - - Source: https://core.telegram.org/bots/api#menubuttondefault - """ - - type: Literal[MenuButtonType.DEFAULT] = MenuButtonType.DEFAULT - """Type of the button, must be *default*""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - type: Literal[MenuButtonType.DEFAULT] = MenuButtonType.DEFAULT, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(type=type, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/types/menu_button_web_app.py b/env/Lib/site-packages/aiogram/types/menu_button_web_app.py deleted file mode 100644 index 0fc9e41..0000000 --- a/env/Lib/site-packages/aiogram/types/menu_button_web_app.py +++ /dev/null @@ -1,42 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Literal - -from ..enums import MenuButtonType -from .menu_button import MenuButton - -if TYPE_CHECKING: - from .web_app_info import WebAppInfo - - -class MenuButtonWebApp(MenuButton): - """ - Represents a menu button, which launches a `Web App `_. - - Source: https://core.telegram.org/bots/api#menubuttonwebapp - """ - - type: Literal[MenuButtonType.WEB_APP] = MenuButtonType.WEB_APP - """Type of the button, must be *web_app*""" - text: str - """Text on the button""" - web_app: WebAppInfo - """Description of the Web App that will be launched when the user presses the button. The Web App will be able to send an arbitrary message on behalf of the user using the method :class:`aiogram.methods.answer_web_app_query.AnswerWebAppQuery`. Alternatively, a :code:`t.me` link to a Web App of the bot can be specified in the object instead of the Web App's URL, in which case the Web App will be opened as if the user pressed the link.""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - type: Literal[MenuButtonType.WEB_APP] = MenuButtonType.WEB_APP, - text: str, - web_app: WebAppInfo, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(type=type, text=text, web_app=web_app, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/types/message.py b/env/Lib/site-packages/aiogram/types/message.py deleted file mode 100644 index 57defef..0000000 --- a/env/Lib/site-packages/aiogram/types/message.py +++ /dev/null @@ -1,4229 +0,0 @@ -from __future__ import annotations - -import datetime -from typing import TYPE_CHECKING, Any, Dict, List, Optional, Union - -from pydantic import Field - -from aiogram.utils.text_decorations import ( - TextDecoration, - html_decoration, - markdown_decoration, -) - -from ..client.default import Default -from ..enums import ContentType -from .custom import DateTime -from .maybe_inaccessible_message import MaybeInaccessibleMessage -from .reply_parameters import ReplyParameters - -if TYPE_CHECKING: - from ..methods import ( - CopyMessage, - DeleteMessage, - EditMessageCaption, - EditMessageLiveLocation, - EditMessageMedia, - EditMessageReplyMarkup, - EditMessageText, - ForwardMessage, - PinChatMessage, - SendAnimation, - SendAudio, - SendContact, - SendDice, - SendDocument, - SendGame, - SendInvoice, - SendLocation, - SendMediaGroup, - SendMessage, - SendPaidMedia, - SendPhoto, - SendPoll, - SendSticker, - SendVenue, - SendVideo, - SendVideoNote, - SendVoice, - SetMessageReaction, - StopMessageLiveLocation, - UnpinChatMessage, - ) - from .animation import Animation - from .audio import Audio - from .chat import Chat - from .chat_background import ChatBackground - from .chat_boost_added import ChatBoostAdded - from .chat_shared import ChatShared - from .contact import Contact - from .dice import Dice - from .document import Document - from .external_reply_info import ExternalReplyInfo - from .force_reply import ForceReply - from .forum_topic_closed import ForumTopicClosed - from .forum_topic_created import ForumTopicCreated - from .forum_topic_edited import ForumTopicEdited - from .forum_topic_reopened import ForumTopicReopened - from .game import Game - from .general_forum_topic_hidden import GeneralForumTopicHidden - from .general_forum_topic_unhidden import GeneralForumTopicUnhidden - from .giveaway import Giveaway - from .giveaway_completed import GiveawayCompleted - from .giveaway_created import GiveawayCreated - from .giveaway_winners import GiveawayWinners - from .inaccessible_message import InaccessibleMessage - from .inline_keyboard_markup import InlineKeyboardMarkup - from .input_file import InputFile - from .input_media_animation import InputMediaAnimation - from .input_media_audio import InputMediaAudio - from .input_media_document import InputMediaDocument - from .input_media_photo import InputMediaPhoto - from .input_media_video import InputMediaVideo - from .input_paid_media_photo import InputPaidMediaPhoto - from .input_paid_media_video import InputPaidMediaVideo - from .input_poll_option import InputPollOption - from .invoice import Invoice - from .labeled_price import LabeledPrice - from .link_preview_options import LinkPreviewOptions - from .location import Location - from .message_auto_delete_timer_changed import MessageAutoDeleteTimerChanged - from .message_entity import MessageEntity - from .message_origin_channel import MessageOriginChannel - from .message_origin_chat import MessageOriginChat - from .message_origin_hidden_user import MessageOriginHiddenUser - from .message_origin_user import MessageOriginUser - from .paid_media_info import PaidMediaInfo - from .passport_data import PassportData - from .photo_size import PhotoSize - from .poll import Poll - from .proximity_alert_triggered import ProximityAlertTriggered - from .reaction_type_custom_emoji import ReactionTypeCustomEmoji - from .reaction_type_emoji import ReactionTypeEmoji - from .reaction_type_paid import ReactionTypePaid - from .refunded_payment import RefundedPayment - from .reply_keyboard_markup import ReplyKeyboardMarkup - from .reply_keyboard_remove import ReplyKeyboardRemove - from .sticker import Sticker - from .story import Story - from .successful_payment import SuccessfulPayment - from .text_quote import TextQuote - from .user import User - from .user_shared import UserShared - from .users_shared import UsersShared - from .venue import Venue - from .video import Video - from .video_chat_ended import VideoChatEnded - from .video_chat_participants_invited import VideoChatParticipantsInvited - from .video_chat_scheduled import VideoChatScheduled - from .video_chat_started import VideoChatStarted - from .video_note import VideoNote - from .voice import Voice - from .web_app_data import WebAppData - from .write_access_allowed import WriteAccessAllowed - - -class Message(MaybeInaccessibleMessage): - """ - This object represents a message. - - Source: https://core.telegram.org/bots/api#message - """ - - message_id: int - """Unique message identifier inside this chat""" - date: DateTime - """Date the message was sent in Unix time. It is always a positive number, representing a valid date.""" - chat: Chat - """Chat the message belongs to""" - message_thread_id: Optional[int] = None - """*Optional*. Unique identifier of a message thread to which the message belongs; for supergroups only""" - from_user: Optional[User] = Field(None, alias="from") - """*Optional*. Sender of the message; may be empty for messages sent to channels. For backward compatibility, if the message was sent on behalf of a chat, the field contains a fake sender user in non-channel chats""" - sender_chat: Optional[Chat] = None - """*Optional*. Sender of the message when sent on behalf of a chat. For example, the supergroup itself for messages sent by its anonymous administrators or a linked channel for messages automatically forwarded to the channel's discussion group. For backward compatibility, if the message was sent on behalf of a chat, the field *from* contains a fake sender user in non-channel chats.""" - sender_boost_count: Optional[int] = None - """*Optional*. If the sender of the message boosted the chat, the number of boosts added by the user""" - sender_business_bot: Optional[User] = None - """*Optional*. The bot that actually sent the message on behalf of the business account. Available only for outgoing messages sent on behalf of the connected business account.""" - business_connection_id: Optional[str] = None - """*Optional*. Unique identifier of the business connection from which the message was received. If non-empty, the message belongs to a chat of the corresponding business account that is independent from any potential bot chat which might share the same identifier.""" - forward_origin: Optional[ - Union[MessageOriginUser, MessageOriginHiddenUser, MessageOriginChat, MessageOriginChannel] - ] = None - """*Optional*. Information about the original message for forwarded messages""" - is_topic_message: Optional[bool] = None - """*Optional*. :code:`True`, if the message is sent to a forum topic""" - is_automatic_forward: Optional[bool] = None - """*Optional*. :code:`True`, if the message is a channel post that was automatically forwarded to the connected discussion group""" - reply_to_message: Optional[Message] = None - """*Optional*. For replies in the same chat and message thread, the original message. Note that the Message object in this field will not contain further *reply_to_message* fields even if it itself is a reply.""" - external_reply: Optional[ExternalReplyInfo] = None - """*Optional*. Information about the message that is being replied to, which may come from another chat or forum topic""" - quote: Optional[TextQuote] = None - """*Optional*. For replies that quote part of the original message, the quoted part of the message""" - reply_to_story: Optional[Story] = None - """*Optional*. For replies to a story, the original story""" - via_bot: Optional[User] = None - """*Optional*. Bot through which the message was sent""" - edit_date: Optional[int] = None - """*Optional*. Date the message was last edited in Unix time""" - has_protected_content: Optional[bool] = None - """*Optional*. :code:`True`, if the message can't be forwarded""" - is_from_offline: Optional[bool] = None - """*Optional*. True, if the message was sent by an implicit action, for example, as an away or a greeting business message, or as a scheduled message""" - media_group_id: Optional[str] = None - """*Optional*. The unique identifier of a media message group this message belongs to""" - author_signature: Optional[str] = None - """*Optional*. Signature of the post author for messages in channels, or the custom title of an anonymous group administrator""" - text: Optional[str] = None - """*Optional*. For text messages, the actual UTF-8 text of the message""" - entities: Optional[List[MessageEntity]] = None - """*Optional*. For text messages, special entities like usernames, URLs, bot commands, etc. that appear in the text""" - link_preview_options: Optional[LinkPreviewOptions] = None - """*Optional*. Options used for link preview generation for the message, if it is a text message and link preview options were changed""" - effect_id: Optional[str] = None - """*Optional*. Unique identifier of the message effect added to the message""" - animation: Optional[Animation] = None - """*Optional*. Message is an animation, information about the animation. For backward compatibility, when this field is set, the *document* field will also be set""" - audio: Optional[Audio] = None - """*Optional*. Message is an audio file, information about the file""" - document: Optional[Document] = None - """*Optional*. Message is a general file, information about the file""" - paid_media: Optional[PaidMediaInfo] = None - """*Optional*. Message contains paid media; information about the paid media""" - photo: Optional[List[PhotoSize]] = None - """*Optional*. Message is a photo, available sizes of the photo""" - sticker: Optional[Sticker] = None - """*Optional*. Message is a sticker, information about the sticker""" - story: Optional[Story] = None - """*Optional*. Message is a forwarded story""" - video: Optional[Video] = None - """*Optional*. Message is a video, information about the video""" - video_note: Optional[VideoNote] = None - """*Optional*. Message is a `video note `_, information about the video message""" - voice: Optional[Voice] = None - """*Optional*. Message is a voice message, information about the file""" - caption: Optional[str] = None - """*Optional*. Caption for the animation, audio, document, paid media, photo, video or voice""" - caption_entities: Optional[List[MessageEntity]] = None - """*Optional*. For messages with a caption, special entities like usernames, URLs, bot commands, etc. that appear in the caption""" - show_caption_above_media: Optional[bool] = None - """*Optional*. True, if the caption must be shown above the message media""" - has_media_spoiler: Optional[bool] = None - """*Optional*. :code:`True`, if the message media is covered by a spoiler animation""" - contact: Optional[Contact] = None - """*Optional*. Message is a shared contact, information about the contact""" - dice: Optional[Dice] = None - """*Optional*. Message is a dice with random value""" - game: Optional[Game] = None - """*Optional*. Message is a game, information about the game. `More about games » `_""" - poll: Optional[Poll] = None - """*Optional*. Message is a native poll, information about the poll""" - venue: Optional[Venue] = None - """*Optional*. Message is a venue, information about the venue. For backward compatibility, when this field is set, the *location* field will also be set""" - location: Optional[Location] = None - """*Optional*. Message is a shared location, information about the location""" - new_chat_members: Optional[List[User]] = None - """*Optional*. New members that were added to the group or supergroup and information about them (the bot itself may be one of these members)""" - left_chat_member: Optional[User] = None - """*Optional*. A member was removed from the group, information about them (this member may be the bot itself)""" - new_chat_title: Optional[str] = None - """*Optional*. A chat title was changed to this value""" - new_chat_photo: Optional[List[PhotoSize]] = None - """*Optional*. A chat photo was change to this value""" - delete_chat_photo: Optional[bool] = None - """*Optional*. Service message: the chat photo was deleted""" - group_chat_created: Optional[bool] = None - """*Optional*. Service message: the group has been created""" - supergroup_chat_created: Optional[bool] = None - """*Optional*. Service message: the supergroup has been created. This field can't be received in a message coming through updates, because bot can't be a member of a supergroup when it is created. It can only be found in reply_to_message if someone replies to a very first message in a directly created supergroup.""" - channel_chat_created: Optional[bool] = None - """*Optional*. Service message: the channel has been created. This field can't be received in a message coming through updates, because bot can't be a member of a channel when it is created. It can only be found in reply_to_message if someone replies to a very first message in a channel.""" - message_auto_delete_timer_changed: Optional[MessageAutoDeleteTimerChanged] = None - """*Optional*. Service message: auto-delete timer settings changed in the chat""" - migrate_to_chat_id: Optional[int] = None - """*Optional*. The group has been migrated to a supergroup with the specified identifier. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier.""" - migrate_from_chat_id: Optional[int] = None - """*Optional*. The supergroup has been migrated from a group with the specified identifier. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier.""" - pinned_message: Optional[Union[Message, InaccessibleMessage]] = None - """*Optional*. Specified message was pinned. Note that the Message object in this field will not contain further *reply_to_message* fields even if it itself is a reply.""" - invoice: Optional[Invoice] = None - """*Optional*. Message is an invoice for a `payment `_, information about the invoice. `More about payments » `_""" - successful_payment: Optional[SuccessfulPayment] = None - """*Optional*. Message is a service message about a successful payment, information about the payment. `More about payments » `_""" - refunded_payment: Optional[RefundedPayment] = None - """*Optional*. Message is a service message about a refunded payment, information about the payment. `More about payments » `_""" - users_shared: Optional[UsersShared] = None - """*Optional*. Service message: users were shared with the bot""" - chat_shared: Optional[ChatShared] = None - """*Optional*. Service message: a chat was shared with the bot""" - connected_website: Optional[str] = None - """*Optional*. The domain name of the website on which the user has logged in. `More about Telegram Login » `_""" - write_access_allowed: Optional[WriteAccessAllowed] = None - """*Optional*. Service message: the user allowed the bot to write messages after adding it to the attachment or side menu, launching a Web App from a link, or accepting an explicit request from a Web App sent by the method `requestWriteAccess `_""" - passport_data: Optional[PassportData] = None - """*Optional*. Telegram Passport data""" - proximity_alert_triggered: Optional[ProximityAlertTriggered] = None - """*Optional*. Service message. A user in the chat triggered another user's proximity alert while sharing Live Location.""" - boost_added: Optional[ChatBoostAdded] = None - """*Optional*. Service message: user boosted the chat""" - chat_background_set: Optional[ChatBackground] = None - """*Optional*. Service message: chat background set""" - forum_topic_created: Optional[ForumTopicCreated] = None - """*Optional*. Service message: forum topic created""" - forum_topic_edited: Optional[ForumTopicEdited] = None - """*Optional*. Service message: forum topic edited""" - forum_topic_closed: Optional[ForumTopicClosed] = None - """*Optional*. Service message: forum topic closed""" - forum_topic_reopened: Optional[ForumTopicReopened] = None - """*Optional*. Service message: forum topic reopened""" - general_forum_topic_hidden: Optional[GeneralForumTopicHidden] = None - """*Optional*. Service message: the 'General' forum topic hidden""" - general_forum_topic_unhidden: Optional[GeneralForumTopicUnhidden] = None - """*Optional*. Service message: the 'General' forum topic unhidden""" - giveaway_created: Optional[GiveawayCreated] = None - """*Optional*. Service message: a scheduled giveaway was created""" - giveaway: Optional[Giveaway] = None - """*Optional*. The message is a scheduled giveaway message""" - giveaway_winners: Optional[GiveawayWinners] = None - """*Optional*. A giveaway with public winners was completed""" - giveaway_completed: Optional[GiveawayCompleted] = None - """*Optional*. Service message: a giveaway without public winners was completed""" - video_chat_scheduled: Optional[VideoChatScheduled] = None - """*Optional*. Service message: video chat scheduled""" - video_chat_started: Optional[VideoChatStarted] = None - """*Optional*. Service message: video chat started""" - video_chat_ended: Optional[VideoChatEnded] = None - """*Optional*. Service message: video chat ended""" - video_chat_participants_invited: Optional[VideoChatParticipantsInvited] = None - """*Optional*. Service message: new participants invited to a video chat""" - web_app_data: Optional[WebAppData] = None - """*Optional*. Service message: data sent by a Web App""" - reply_markup: Optional[InlineKeyboardMarkup] = None - """*Optional*. Inline keyboard attached to the message. :code:`login_url` buttons are represented as ordinary :code:`url` buttons.""" - forward_date: Optional[DateTime] = Field(None, json_schema_extra={"deprecated": True}) - """*Optional*. For forwarded messages, date the original message was sent in Unix time - -.. deprecated:: API:7.0 - https://core.telegram.org/bots/api-changelog#december-29-2023""" - forward_from: Optional[User] = Field(None, json_schema_extra={"deprecated": True}) - """*Optional*. For forwarded messages, sender of the original message - -.. deprecated:: API:7.0 - https://core.telegram.org/bots/api-changelog#december-29-2023""" - forward_from_chat: Optional[Chat] = Field(None, json_schema_extra={"deprecated": True}) - """*Optional*. For messages forwarded from channels or from anonymous administrators, information about the original sender chat - -.. deprecated:: API:7.0 - https://core.telegram.org/bots/api-changelog#december-29-2023""" - forward_from_message_id: Optional[int] = Field(None, json_schema_extra={"deprecated": True}) - """*Optional*. For messages forwarded from channels, identifier of the original message in the channel - -.. deprecated:: API:7.0 - https://core.telegram.org/bots/api-changelog#december-29-2023""" - forward_sender_name: Optional[str] = Field(None, json_schema_extra={"deprecated": True}) - """*Optional*. Sender's name for messages forwarded from users who disallow adding a link to their account in forwarded messages - -.. deprecated:: API:7.0 - https://core.telegram.org/bots/api-changelog#december-29-2023""" - forward_signature: Optional[str] = Field(None, json_schema_extra={"deprecated": True}) - """*Optional*. For forwarded messages that were originally sent in channels or by an anonymous chat administrator, signature of the message sender if present - -.. deprecated:: API:7.0 - https://core.telegram.org/bots/api-changelog#december-29-2023""" - user_shared: Optional[UserShared] = Field(None, json_schema_extra={"deprecated": True}) - """*Optional*. Service message: a user was shared with the bot - -.. deprecated:: API:7.0 - https://core.telegram.org/bots/api-changelog#december-29-2023""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - message_id: int, - date: DateTime, - chat: Chat, - message_thread_id: Optional[int] = None, - from_user: Optional[User] = None, - sender_chat: Optional[Chat] = None, - sender_boost_count: Optional[int] = None, - sender_business_bot: Optional[User] = None, - business_connection_id: Optional[str] = None, - forward_origin: Optional[ - Union[ - MessageOriginUser, - MessageOriginHiddenUser, - MessageOriginChat, - MessageOriginChannel, - ] - ] = None, - is_topic_message: Optional[bool] = None, - is_automatic_forward: Optional[bool] = None, - reply_to_message: Optional[Message] = None, - external_reply: Optional[ExternalReplyInfo] = None, - quote: Optional[TextQuote] = None, - reply_to_story: Optional[Story] = None, - via_bot: Optional[User] = None, - edit_date: Optional[int] = None, - has_protected_content: Optional[bool] = None, - is_from_offline: Optional[bool] = None, - media_group_id: Optional[str] = None, - author_signature: Optional[str] = None, - text: Optional[str] = None, - entities: Optional[List[MessageEntity]] = None, - link_preview_options: Optional[LinkPreviewOptions] = None, - effect_id: Optional[str] = None, - animation: Optional[Animation] = None, - audio: Optional[Audio] = None, - document: Optional[Document] = None, - paid_media: Optional[PaidMediaInfo] = None, - photo: Optional[List[PhotoSize]] = None, - sticker: Optional[Sticker] = None, - story: Optional[Story] = None, - video: Optional[Video] = None, - video_note: Optional[VideoNote] = None, - voice: Optional[Voice] = None, - caption: Optional[str] = None, - caption_entities: Optional[List[MessageEntity]] = None, - show_caption_above_media: Optional[bool] = None, - has_media_spoiler: Optional[bool] = None, - contact: Optional[Contact] = None, - dice: Optional[Dice] = None, - game: Optional[Game] = None, - poll: Optional[Poll] = None, - venue: Optional[Venue] = None, - location: Optional[Location] = None, - new_chat_members: Optional[List[User]] = None, - left_chat_member: Optional[User] = None, - new_chat_title: Optional[str] = None, - new_chat_photo: Optional[List[PhotoSize]] = None, - delete_chat_photo: Optional[bool] = None, - group_chat_created: Optional[bool] = None, - supergroup_chat_created: Optional[bool] = None, - channel_chat_created: Optional[bool] = None, - message_auto_delete_timer_changed: Optional[MessageAutoDeleteTimerChanged] = None, - migrate_to_chat_id: Optional[int] = None, - migrate_from_chat_id: Optional[int] = None, - pinned_message: Optional[Union[Message, InaccessibleMessage]] = None, - invoice: Optional[Invoice] = None, - successful_payment: Optional[SuccessfulPayment] = None, - refunded_payment: Optional[RefundedPayment] = None, - users_shared: Optional[UsersShared] = None, - chat_shared: Optional[ChatShared] = None, - connected_website: Optional[str] = None, - write_access_allowed: Optional[WriteAccessAllowed] = None, - passport_data: Optional[PassportData] = None, - proximity_alert_triggered: Optional[ProximityAlertTriggered] = None, - boost_added: Optional[ChatBoostAdded] = None, - chat_background_set: Optional[ChatBackground] = None, - forum_topic_created: Optional[ForumTopicCreated] = None, - forum_topic_edited: Optional[ForumTopicEdited] = None, - forum_topic_closed: Optional[ForumTopicClosed] = None, - forum_topic_reopened: Optional[ForumTopicReopened] = None, - general_forum_topic_hidden: Optional[GeneralForumTopicHidden] = None, - general_forum_topic_unhidden: Optional[GeneralForumTopicUnhidden] = None, - giveaway_created: Optional[GiveawayCreated] = None, - giveaway: Optional[Giveaway] = None, - giveaway_winners: Optional[GiveawayWinners] = None, - giveaway_completed: Optional[GiveawayCompleted] = None, - video_chat_scheduled: Optional[VideoChatScheduled] = None, - video_chat_started: Optional[VideoChatStarted] = None, - video_chat_ended: Optional[VideoChatEnded] = None, - video_chat_participants_invited: Optional[VideoChatParticipantsInvited] = None, - web_app_data: Optional[WebAppData] = None, - reply_markup: Optional[InlineKeyboardMarkup] = None, - forward_date: Optional[DateTime] = None, - forward_from: Optional[User] = None, - forward_from_chat: Optional[Chat] = None, - forward_from_message_id: Optional[int] = None, - forward_sender_name: Optional[str] = None, - forward_signature: Optional[str] = None, - user_shared: Optional[UserShared] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - message_id=message_id, - date=date, - chat=chat, - message_thread_id=message_thread_id, - from_user=from_user, - sender_chat=sender_chat, - sender_boost_count=sender_boost_count, - sender_business_bot=sender_business_bot, - business_connection_id=business_connection_id, - forward_origin=forward_origin, - is_topic_message=is_topic_message, - is_automatic_forward=is_automatic_forward, - reply_to_message=reply_to_message, - external_reply=external_reply, - quote=quote, - reply_to_story=reply_to_story, - via_bot=via_bot, - edit_date=edit_date, - has_protected_content=has_protected_content, - is_from_offline=is_from_offline, - media_group_id=media_group_id, - author_signature=author_signature, - text=text, - entities=entities, - link_preview_options=link_preview_options, - effect_id=effect_id, - animation=animation, - audio=audio, - document=document, - paid_media=paid_media, - photo=photo, - sticker=sticker, - story=story, - video=video, - video_note=video_note, - voice=voice, - caption=caption, - caption_entities=caption_entities, - show_caption_above_media=show_caption_above_media, - has_media_spoiler=has_media_spoiler, - contact=contact, - dice=dice, - game=game, - poll=poll, - venue=venue, - location=location, - new_chat_members=new_chat_members, - left_chat_member=left_chat_member, - new_chat_title=new_chat_title, - new_chat_photo=new_chat_photo, - delete_chat_photo=delete_chat_photo, - group_chat_created=group_chat_created, - supergroup_chat_created=supergroup_chat_created, - channel_chat_created=channel_chat_created, - message_auto_delete_timer_changed=message_auto_delete_timer_changed, - migrate_to_chat_id=migrate_to_chat_id, - migrate_from_chat_id=migrate_from_chat_id, - pinned_message=pinned_message, - invoice=invoice, - successful_payment=successful_payment, - refunded_payment=refunded_payment, - users_shared=users_shared, - chat_shared=chat_shared, - connected_website=connected_website, - write_access_allowed=write_access_allowed, - passport_data=passport_data, - proximity_alert_triggered=proximity_alert_triggered, - boost_added=boost_added, - chat_background_set=chat_background_set, - forum_topic_created=forum_topic_created, - forum_topic_edited=forum_topic_edited, - forum_topic_closed=forum_topic_closed, - forum_topic_reopened=forum_topic_reopened, - general_forum_topic_hidden=general_forum_topic_hidden, - general_forum_topic_unhidden=general_forum_topic_unhidden, - giveaway_created=giveaway_created, - giveaway=giveaway, - giveaway_winners=giveaway_winners, - giveaway_completed=giveaway_completed, - video_chat_scheduled=video_chat_scheduled, - video_chat_started=video_chat_started, - video_chat_ended=video_chat_ended, - video_chat_participants_invited=video_chat_participants_invited, - web_app_data=web_app_data, - reply_markup=reply_markup, - forward_date=forward_date, - forward_from=forward_from, - forward_from_chat=forward_from_chat, - forward_from_message_id=forward_from_message_id, - forward_sender_name=forward_sender_name, - forward_signature=forward_signature, - user_shared=user_shared, - **__pydantic_kwargs, - ) - - @property - def content_type(self) -> str: - if self.text: - return ContentType.TEXT - if self.audio: - return ContentType.AUDIO - if self.animation: - return ContentType.ANIMATION - if self.document: - return ContentType.DOCUMENT - if self.game: - return ContentType.GAME - if self.photo: - return ContentType.PHOTO - if self.sticker: - return ContentType.STICKER - if self.video: - return ContentType.VIDEO - if self.video_note: - return ContentType.VIDEO_NOTE - if self.voice: - return ContentType.VOICE - if self.contact: - return ContentType.CONTACT - if self.venue: - return ContentType.VENUE - if self.location: - return ContentType.LOCATION - if self.new_chat_members: - return ContentType.NEW_CHAT_MEMBERS - if self.left_chat_member: - return ContentType.LEFT_CHAT_MEMBER - if self.invoice: - return ContentType.INVOICE - if self.successful_payment: - return ContentType.SUCCESSFUL_PAYMENT - if self.users_shared: - return ContentType.USERS_SHARED - if self.connected_website: - return ContentType.CONNECTED_WEBSITE - if self.migrate_from_chat_id: - return ContentType.MIGRATE_FROM_CHAT_ID - if self.migrate_to_chat_id: - return ContentType.MIGRATE_TO_CHAT_ID - if self.pinned_message: - return ContentType.PINNED_MESSAGE - if self.new_chat_title: - return ContentType.NEW_CHAT_TITLE - if self.new_chat_photo: - return ContentType.NEW_CHAT_PHOTO - if self.delete_chat_photo: - return ContentType.DELETE_CHAT_PHOTO - if self.group_chat_created: - return ContentType.GROUP_CHAT_CREATED - if self.supergroup_chat_created: - return ContentType.SUPERGROUP_CHAT_CREATED - if self.channel_chat_created: - return ContentType.CHANNEL_CHAT_CREATED - if self.paid_media: - return ContentType.PAID_MEDIA - if self.passport_data: - return ContentType.PASSPORT_DATA - if self.proximity_alert_triggered: - return ContentType.PROXIMITY_ALERT_TRIGGERED - if self.poll: - return ContentType.POLL - if self.dice: - return ContentType.DICE - if self.message_auto_delete_timer_changed: - return ContentType.MESSAGE_AUTO_DELETE_TIMER_CHANGED - if self.forum_topic_created: - return ContentType.FORUM_TOPIC_CREATED - if self.forum_topic_edited: - return ContentType.FORUM_TOPIC_EDITED - if self.forum_topic_closed: - return ContentType.FORUM_TOPIC_CLOSED - if self.forum_topic_reopened: - return ContentType.FORUM_TOPIC_REOPENED - if self.general_forum_topic_hidden: - return ContentType.GENERAL_FORUM_TOPIC_HIDDEN - if self.general_forum_topic_unhidden: - return ContentType.GENERAL_FORUM_TOPIC_UNHIDDEN - if self.giveaway_created: - return ContentType.GIVEAWAY_CREATED - if self.giveaway: - return ContentType.GIVEAWAY - if self.giveaway_completed: - return ContentType.GIVEAWAY_COMPLETED - if self.giveaway_winners: - return ContentType.GIVEAWAY_WINNERS - if self.video_chat_scheduled: - return ContentType.VIDEO_CHAT_SCHEDULED - if self.video_chat_started: - return ContentType.VIDEO_CHAT_STARTED - if self.video_chat_ended: - return ContentType.VIDEO_CHAT_ENDED - if self.video_chat_participants_invited: - return ContentType.VIDEO_CHAT_PARTICIPANTS_INVITED - if self.web_app_data: - return ContentType.WEB_APP_DATA - if self.user_shared: - return ContentType.USER_SHARED - if self.chat_shared: - return ContentType.CHAT_SHARED - if self.story: - return ContentType.STORY - if self.write_access_allowed: - return ContentType.WRITE_ACCESS_ALLOWED - if self.chat_background_set: - return ContentType.CHAT_BACKGROUND_SET - if self.boost_added: - return ContentType.BOOST_ADDED - if self.refunded_payment: - return ContentType.REFUNDED_PAYMENT - - return ContentType.UNKNOWN - - def _unparse_entities(self, text_decoration: TextDecoration) -> str: - text = self.text or self.caption or "" - entities = self.entities or self.caption_entities or [] - return text_decoration.unparse(text=text, entities=entities) - - @property - def html_text(self) -> str: - return self._unparse_entities(html_decoration) - - @property - def md_text(self) -> str: - return self._unparse_entities(markdown_decoration) - - def as_reply_parameters( - self, - allow_sending_without_reply: Optional[Union[bool, Default]] = Default( - "allow_sending_without_reply" - ), - quote: Optional[str] = None, - quote_parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - quote_entities: Optional[List[MessageEntity]] = None, - quote_position: Optional[int] = None, - ) -> ReplyParameters: - return ReplyParameters( - message_id=self.message_id, - chat_id=self.chat.id, - allow_sending_without_reply=allow_sending_without_reply, - quote=quote, - quote_parse_mode=quote_parse_mode, - quote_entities=quote_entities, - quote_position=quote_position, - ) - - def reply_animation( - self, - animation: Union[InputFile, str], - duration: Optional[int] = None, - width: Optional[int] = None, - height: Optional[int] = None, - thumbnail: Optional[InputFile] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - show_caption_above_media: Optional[Union[bool, Default]] = Default( - "show_caption_above_media" - ), - has_spoiler: Optional[bool] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - **kwargs: Any, - ) -> SendAnimation: - """ - Shortcut for method :class:`aiogram.methods.send_animation.SendAnimation` - will automatically fill method attributes: - - - :code:`chat_id` - - :code:`message_thread_id` - - :code:`business_connection_id` - - :code:`reply_parameters` - - Use this method to send animation files (GIF or H.264/MPEG-4 AVC video without sound). On success, the sent :class:`aiogram.types.message.Message` is returned. Bots can currently send animation files of up to 50 MB in size, this limit may be changed in the future. - - Source: https://core.telegram.org/bots/api#sendanimation - - :param animation: Animation to send. Pass a file_id as String to send an animation that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an animation from the Internet, or upload a new animation using multipart/form-data. :ref:`More information on Sending Files » ` - :param duration: Duration of sent animation in seconds - :param width: Animation width - :param height: Animation height - :param thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More information on Sending Files » ` - :param caption: Animation caption (may also be used when resending animation by *file_id*), 0-1024 characters after entities parsing - :param parse_mode: Mode for parsing entities in the animation caption. See `formatting options `_ for more details. - :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode* - :param show_caption_above_media: Pass :code:`True`, if the caption must be shown above the message media - :param has_spoiler: Pass :code:`True` if the animation needs to be covered with a spoiler animation - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :return: instance of method :class:`aiogram.methods.send_animation.SendAnimation` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import SendAnimation - - assert ( - self.chat is not None - ), "This method can be used only if chat is present in the message." - - return SendAnimation( - chat_id=self.chat.id, - message_thread_id=self.message_thread_id if self.is_topic_message else None, - business_connection_id=self.business_connection_id, - reply_parameters=self.as_reply_parameters(), - animation=animation, - duration=duration, - width=width, - height=height, - thumbnail=thumbnail, - caption=caption, - parse_mode=parse_mode, - caption_entities=caption_entities, - show_caption_above_media=show_caption_above_media, - has_spoiler=has_spoiler, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - **kwargs, - ).as_(self._bot) - - def answer_animation( - self, - animation: Union[InputFile, str], - duration: Optional[int] = None, - width: Optional[int] = None, - height: Optional[int] = None, - thumbnail: Optional[InputFile] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - show_caption_above_media: Optional[Union[bool, Default]] = Default( - "show_caption_above_media" - ), - has_spoiler: Optional[bool] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - **kwargs: Any, - ) -> SendAnimation: - """ - Shortcut for method :class:`aiogram.methods.send_animation.SendAnimation` - will automatically fill method attributes: - - - :code:`chat_id` - - :code:`message_thread_id` - - :code:`business_connection_id` - - Use this method to send animation files (GIF or H.264/MPEG-4 AVC video without sound). On success, the sent :class:`aiogram.types.message.Message` is returned. Bots can currently send animation files of up to 50 MB in size, this limit may be changed in the future. - - Source: https://core.telegram.org/bots/api#sendanimation - - :param animation: Animation to send. Pass a file_id as String to send an animation that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an animation from the Internet, or upload a new animation using multipart/form-data. :ref:`More information on Sending Files » ` - :param duration: Duration of sent animation in seconds - :param width: Animation width - :param height: Animation height - :param thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More information on Sending Files » ` - :param caption: Animation caption (may also be used when resending animation by *file_id*), 0-1024 characters after entities parsing - :param parse_mode: Mode for parsing entities in the animation caption. See `formatting options `_ for more details. - :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode* - :param show_caption_above_media: Pass :code:`True`, if the caption must be shown above the message media - :param has_spoiler: Pass :code:`True` if the animation needs to be covered with a spoiler animation - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param reply_to_message_id: If the message is a reply, ID of the original message - :return: instance of method :class:`aiogram.methods.send_animation.SendAnimation` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import SendAnimation - - assert ( - self.chat is not None - ), "This method can be used only if chat is present in the message." - - return SendAnimation( - chat_id=self.chat.id, - message_thread_id=self.message_thread_id if self.is_topic_message else None, - business_connection_id=self.business_connection_id, - animation=animation, - duration=duration, - width=width, - height=height, - thumbnail=thumbnail, - caption=caption, - parse_mode=parse_mode, - caption_entities=caption_entities, - show_caption_above_media=show_caption_above_media, - has_spoiler=has_spoiler, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - reply_to_message_id=reply_to_message_id, - **kwargs, - ).as_(self._bot) - - def reply_audio( - self, - audio: Union[InputFile, str], - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - duration: Optional[int] = None, - performer: Optional[str] = None, - title: Optional[str] = None, - thumbnail: Optional[InputFile] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - **kwargs: Any, - ) -> SendAudio: - """ - Shortcut for method :class:`aiogram.methods.send_audio.SendAudio` - will automatically fill method attributes: - - - :code:`chat_id` - - :code:`message_thread_id` - - :code:`business_connection_id` - - :code:`reply_parameters` - - Use this method to send audio files, if you want Telegram clients to display them in the music player. Your audio must be in the .MP3 or .M4A format. On success, the sent :class:`aiogram.types.message.Message` is returned. Bots can currently send audio files of up to 50 MB in size, this limit may be changed in the future. - For sending voice messages, use the :class:`aiogram.methods.send_voice.SendVoice` method instead. - - Source: https://core.telegram.org/bots/api#sendaudio - - :param audio: Audio file to send. Pass a file_id as String to send an audio file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an audio file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » ` - :param caption: Audio caption, 0-1024 characters after entities parsing - :param parse_mode: Mode for parsing entities in the audio caption. See `formatting options `_ for more details. - :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode* - :param duration: Duration of the audio in seconds - :param performer: Performer - :param title: Track name - :param thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More information on Sending Files » ` - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :return: instance of method :class:`aiogram.methods.send_audio.SendAudio` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import SendAudio - - assert ( - self.chat is not None - ), "This method can be used only if chat is present in the message." - - return SendAudio( - chat_id=self.chat.id, - message_thread_id=self.message_thread_id if self.is_topic_message else None, - business_connection_id=self.business_connection_id, - reply_parameters=self.as_reply_parameters(), - audio=audio, - caption=caption, - parse_mode=parse_mode, - caption_entities=caption_entities, - duration=duration, - performer=performer, - title=title, - thumbnail=thumbnail, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - **kwargs, - ).as_(self._bot) - - def answer_audio( - self, - audio: Union[InputFile, str], - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - duration: Optional[int] = None, - performer: Optional[str] = None, - title: Optional[str] = None, - thumbnail: Optional[InputFile] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - **kwargs: Any, - ) -> SendAudio: - """ - Shortcut for method :class:`aiogram.methods.send_audio.SendAudio` - will automatically fill method attributes: - - - :code:`chat_id` - - :code:`message_thread_id` - - :code:`business_connection_id` - - Use this method to send audio files, if you want Telegram clients to display them in the music player. Your audio must be in the .MP3 or .M4A format. On success, the sent :class:`aiogram.types.message.Message` is returned. Bots can currently send audio files of up to 50 MB in size, this limit may be changed in the future. - For sending voice messages, use the :class:`aiogram.methods.send_voice.SendVoice` method instead. - - Source: https://core.telegram.org/bots/api#sendaudio - - :param audio: Audio file to send. Pass a file_id as String to send an audio file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an audio file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » ` - :param caption: Audio caption, 0-1024 characters after entities parsing - :param parse_mode: Mode for parsing entities in the audio caption. See `formatting options `_ for more details. - :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode* - :param duration: Duration of the audio in seconds - :param performer: Performer - :param title: Track name - :param thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More information on Sending Files » ` - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param reply_to_message_id: If the message is a reply, ID of the original message - :return: instance of method :class:`aiogram.methods.send_audio.SendAudio` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import SendAudio - - assert ( - self.chat is not None - ), "This method can be used only if chat is present in the message." - - return SendAudio( - chat_id=self.chat.id, - message_thread_id=self.message_thread_id if self.is_topic_message else None, - business_connection_id=self.business_connection_id, - audio=audio, - caption=caption, - parse_mode=parse_mode, - caption_entities=caption_entities, - duration=duration, - performer=performer, - title=title, - thumbnail=thumbnail, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - reply_to_message_id=reply_to_message_id, - **kwargs, - ).as_(self._bot) - - def reply_contact( - self, - phone_number: str, - first_name: str, - last_name: Optional[str] = None, - vcard: Optional[str] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - **kwargs: Any, - ) -> SendContact: - """ - Shortcut for method :class:`aiogram.methods.send_contact.SendContact` - will automatically fill method attributes: - - - :code:`chat_id` - - :code:`message_thread_id` - - :code:`business_connection_id` - - :code:`reply_parameters` - - Use this method to send phone contacts. On success, the sent :class:`aiogram.types.message.Message` is returned. - - Source: https://core.telegram.org/bots/api#sendcontact - - :param phone_number: Contact's phone number - :param first_name: Contact's first name - :param last_name: Contact's last name - :param vcard: Additional data about the contact in the form of a `vCard `_, 0-2048 bytes - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :return: instance of method :class:`aiogram.methods.send_contact.SendContact` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import SendContact - - assert ( - self.chat is not None - ), "This method can be used only if chat is present in the message." - - return SendContact( - chat_id=self.chat.id, - message_thread_id=self.message_thread_id if self.is_topic_message else None, - business_connection_id=self.business_connection_id, - reply_parameters=self.as_reply_parameters(), - phone_number=phone_number, - first_name=first_name, - last_name=last_name, - vcard=vcard, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - **kwargs, - ).as_(self._bot) - - def answer_contact( - self, - phone_number: str, - first_name: str, - last_name: Optional[str] = None, - vcard: Optional[str] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - **kwargs: Any, - ) -> SendContact: - """ - Shortcut for method :class:`aiogram.methods.send_contact.SendContact` - will automatically fill method attributes: - - - :code:`chat_id` - - :code:`message_thread_id` - - :code:`business_connection_id` - - Use this method to send phone contacts. On success, the sent :class:`aiogram.types.message.Message` is returned. - - Source: https://core.telegram.org/bots/api#sendcontact - - :param phone_number: Contact's phone number - :param first_name: Contact's first name - :param last_name: Contact's last name - :param vcard: Additional data about the contact in the form of a `vCard `_, 0-2048 bytes - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param reply_to_message_id: If the message is a reply, ID of the original message - :return: instance of method :class:`aiogram.methods.send_contact.SendContact` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import SendContact - - assert ( - self.chat is not None - ), "This method can be used only if chat is present in the message." - - return SendContact( - chat_id=self.chat.id, - message_thread_id=self.message_thread_id if self.is_topic_message else None, - business_connection_id=self.business_connection_id, - phone_number=phone_number, - first_name=first_name, - last_name=last_name, - vcard=vcard, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - reply_to_message_id=reply_to_message_id, - **kwargs, - ).as_(self._bot) - - def reply_document( - self, - document: Union[InputFile, str], - thumbnail: Optional[InputFile] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - disable_content_type_detection: Optional[bool] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - **kwargs: Any, - ) -> SendDocument: - """ - Shortcut for method :class:`aiogram.methods.send_document.SendDocument` - will automatically fill method attributes: - - - :code:`chat_id` - - :code:`message_thread_id` - - :code:`business_connection_id` - - :code:`reply_parameters` - - Use this method to send general files. On success, the sent :class:`aiogram.types.message.Message` is returned. Bots can currently send files of any type of up to 50 MB in size, this limit may be changed in the future. - - Source: https://core.telegram.org/bots/api#senddocument - - :param document: File to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » ` - :param thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More information on Sending Files » ` - :param caption: Document caption (may also be used when resending documents by *file_id*), 0-1024 characters after entities parsing - :param parse_mode: Mode for parsing entities in the document caption. See `formatting options `_ for more details. - :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode* - :param disable_content_type_detection: Disables automatic server-side content type detection for files uploaded using multipart/form-data - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :return: instance of method :class:`aiogram.methods.send_document.SendDocument` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import SendDocument - - assert ( - self.chat is not None - ), "This method can be used only if chat is present in the message." - - return SendDocument( - chat_id=self.chat.id, - message_thread_id=self.message_thread_id if self.is_topic_message else None, - business_connection_id=self.business_connection_id, - reply_parameters=self.as_reply_parameters(), - document=document, - thumbnail=thumbnail, - caption=caption, - parse_mode=parse_mode, - caption_entities=caption_entities, - disable_content_type_detection=disable_content_type_detection, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - **kwargs, - ).as_(self._bot) - - def answer_document( - self, - document: Union[InputFile, str], - thumbnail: Optional[InputFile] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - disable_content_type_detection: Optional[bool] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - **kwargs: Any, - ) -> SendDocument: - """ - Shortcut for method :class:`aiogram.methods.send_document.SendDocument` - will automatically fill method attributes: - - - :code:`chat_id` - - :code:`message_thread_id` - - :code:`business_connection_id` - - Use this method to send general files. On success, the sent :class:`aiogram.types.message.Message` is returned. Bots can currently send files of any type of up to 50 MB in size, this limit may be changed in the future. - - Source: https://core.telegram.org/bots/api#senddocument - - :param document: File to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » ` - :param thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More information on Sending Files » ` - :param caption: Document caption (may also be used when resending documents by *file_id*), 0-1024 characters after entities parsing - :param parse_mode: Mode for parsing entities in the document caption. See `formatting options `_ for more details. - :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode* - :param disable_content_type_detection: Disables automatic server-side content type detection for files uploaded using multipart/form-data - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param reply_to_message_id: If the message is a reply, ID of the original message - :return: instance of method :class:`aiogram.methods.send_document.SendDocument` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import SendDocument - - assert ( - self.chat is not None - ), "This method can be used only if chat is present in the message." - - return SendDocument( - chat_id=self.chat.id, - message_thread_id=self.message_thread_id if self.is_topic_message else None, - business_connection_id=self.business_connection_id, - document=document, - thumbnail=thumbnail, - caption=caption, - parse_mode=parse_mode, - caption_entities=caption_entities, - disable_content_type_detection=disable_content_type_detection, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - reply_to_message_id=reply_to_message_id, - **kwargs, - ).as_(self._bot) - - def reply_game( - self, - game_short_name: str, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_markup: Optional[InlineKeyboardMarkup] = None, - allow_sending_without_reply: Optional[bool] = None, - **kwargs: Any, - ) -> SendGame: - """ - Shortcut for method :class:`aiogram.methods.send_game.SendGame` - will automatically fill method attributes: - - - :code:`chat_id` - - :code:`message_thread_id` - - :code:`business_connection_id` - - :code:`reply_parameters` - - Use this method to send a game. On success, the sent :class:`aiogram.types.message.Message` is returned. - - Source: https://core.telegram.org/bots/api#sendgame - - :param game_short_name: Short name of the game, serves as the unique identifier for the game. Set up your games via `@BotFather `_. - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_markup: A JSON-serialized object for an `inline keyboard `_. If empty, one 'Play game_title' button will be shown. If not empty, the first button must launch the game. - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :return: instance of method :class:`aiogram.methods.send_game.SendGame` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import SendGame - - assert ( - self.chat is not None - ), "This method can be used only if chat is present in the message." - - return SendGame( - chat_id=self.chat.id, - message_thread_id=self.message_thread_id if self.is_topic_message else None, - business_connection_id=self.business_connection_id, - reply_parameters=self.as_reply_parameters(), - game_short_name=game_short_name, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - **kwargs, - ).as_(self._bot) - - def answer_game( - self, - game_short_name: str, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[InlineKeyboardMarkup] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - **kwargs: Any, - ) -> SendGame: - """ - Shortcut for method :class:`aiogram.methods.send_game.SendGame` - will automatically fill method attributes: - - - :code:`chat_id` - - :code:`message_thread_id` - - :code:`business_connection_id` - - Use this method to send a game. On success, the sent :class:`aiogram.types.message.Message` is returned. - - Source: https://core.telegram.org/bots/api#sendgame - - :param game_short_name: Short name of the game, serves as the unique identifier for the game. Set up your games via `@BotFather `_. - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_parameters: Description of the message to reply to - :param reply_markup: A JSON-serialized object for an `inline keyboard `_. If empty, one 'Play game_title' button will be shown. If not empty, the first button must launch the game. - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param reply_to_message_id: If the message is a reply, ID of the original message - :return: instance of method :class:`aiogram.methods.send_game.SendGame` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import SendGame - - assert ( - self.chat is not None - ), "This method can be used only if chat is present in the message." - - return SendGame( - chat_id=self.chat.id, - message_thread_id=self.message_thread_id if self.is_topic_message else None, - business_connection_id=self.business_connection_id, - game_short_name=game_short_name, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - reply_to_message_id=reply_to_message_id, - **kwargs, - ).as_(self._bot) - - def reply_invoice( - self, - title: str, - description: str, - payload: str, - currency: str, - prices: List[LabeledPrice], - provider_token: Optional[str] = None, - max_tip_amount: Optional[int] = None, - suggested_tip_amounts: Optional[List[int]] = None, - start_parameter: Optional[str] = None, - provider_data: Optional[str] = None, - photo_url: Optional[str] = None, - photo_size: Optional[int] = None, - photo_width: Optional[int] = None, - photo_height: Optional[int] = None, - need_name: Optional[bool] = None, - need_phone_number: Optional[bool] = None, - need_email: Optional[bool] = None, - need_shipping_address: Optional[bool] = None, - send_phone_number_to_provider: Optional[bool] = None, - send_email_to_provider: Optional[bool] = None, - is_flexible: Optional[bool] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_markup: Optional[InlineKeyboardMarkup] = None, - allow_sending_without_reply: Optional[bool] = None, - **kwargs: Any, - ) -> SendInvoice: - """ - Shortcut for method :class:`aiogram.methods.send_invoice.SendInvoice` - will automatically fill method attributes: - - - :code:`chat_id` - - :code:`message_thread_id` - - :code:`business_connection_id` - - :code:`reply_parameters` - - Use this method to send invoices. On success, the sent :class:`aiogram.types.message.Message` is returned. - - Source: https://core.telegram.org/bots/api#sendinvoice - - :param title: Product name, 1-32 characters - :param description: Product description, 1-255 characters - :param payload: Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes. - :param currency: Three-letter ISO 4217 currency code, see `more on currencies `_. Pass 'XTR' for payments in `Telegram Stars `_. - :param prices: Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.). Must contain exactly one item for payments in `Telegram Stars `_. - :param provider_token: Payment provider token, obtained via `@BotFather `_. Pass an empty string for payments in `Telegram Stars `_. - :param max_tip_amount: The maximum accepted amount for tips in the *smallest units* of the currency (integer, **not** float/double). For example, for a maximum tip of :code:`US$ 1.45` pass :code:`max_tip_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). Defaults to 0. Not supported for payments in `Telegram Stars `_. - :param suggested_tip_amounts: A JSON-serialized array 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*. - :param start_parameter: Unique deep-linking parameter. If left empty, **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. If non-empty, 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 - :param provider_data: JSON-serialized 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. - :param photo_url: 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. - :param photo_size: Photo size in bytes - :param photo_width: Photo width - :param photo_height: Photo height - :param need_name: Pass :code:`True` if you require the user's full name to complete the order. Ignored for payments in `Telegram Stars `_. - :param need_phone_number: Pass :code:`True` if you require the user's phone number to complete the order. Ignored for payments in `Telegram Stars `_. - :param need_email: Pass :code:`True` if you require the user's email address to complete the order. Ignored for payments in `Telegram Stars `_. - :param need_shipping_address: Pass :code:`True` if you require the user's shipping address to complete the order. Ignored for payments in `Telegram Stars `_. - :param send_phone_number_to_provider: Pass :code:`True` if the user's phone number should be sent to the provider. Ignored for payments in `Telegram Stars `_. - :param send_email_to_provider: Pass :code:`True` if the user's email address should be sent to the provider. Ignored for payments in `Telegram Stars `_. - :param is_flexible: Pass :code:`True` if the final price depends on the shipping method. Ignored for payments in `Telegram Stars `_. - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_markup: A JSON-serialized object for an `inline keyboard `_. If empty, one 'Pay :code:`total price`' button will be shown. If not empty, the first button must be a Pay button. - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :return: instance of method :class:`aiogram.methods.send_invoice.SendInvoice` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import SendInvoice - - assert ( - self.chat is not None - ), "This method can be used only if chat is present in the message." - - return SendInvoice( - chat_id=self.chat.id, - message_thread_id=self.message_thread_id if self.is_topic_message else None, - business_connection_id=self.business_connection_id, - reply_parameters=self.as_reply_parameters(), - title=title, - description=description, - payload=payload, - currency=currency, - prices=prices, - provider_token=provider_token, - max_tip_amount=max_tip_amount, - suggested_tip_amounts=suggested_tip_amounts, - start_parameter=start_parameter, - provider_data=provider_data, - photo_url=photo_url, - photo_size=photo_size, - photo_width=photo_width, - photo_height=photo_height, - need_name=need_name, - need_phone_number=need_phone_number, - need_email=need_email, - need_shipping_address=need_shipping_address, - send_phone_number_to_provider=send_phone_number_to_provider, - send_email_to_provider=send_email_to_provider, - is_flexible=is_flexible, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - **kwargs, - ).as_(self._bot) - - def answer_invoice( - self, - title: str, - description: str, - payload: str, - currency: str, - prices: List[LabeledPrice], - provider_token: Optional[str] = None, - max_tip_amount: Optional[int] = None, - suggested_tip_amounts: Optional[List[int]] = None, - start_parameter: Optional[str] = None, - provider_data: Optional[str] = None, - photo_url: Optional[str] = None, - photo_size: Optional[int] = None, - photo_width: Optional[int] = None, - photo_height: Optional[int] = None, - need_name: Optional[bool] = None, - need_phone_number: Optional[bool] = None, - need_email: Optional[bool] = None, - need_shipping_address: Optional[bool] = None, - send_phone_number_to_provider: Optional[bool] = None, - send_email_to_provider: Optional[bool] = None, - is_flexible: Optional[bool] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[InlineKeyboardMarkup] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - **kwargs: Any, - ) -> SendInvoice: - """ - Shortcut for method :class:`aiogram.methods.send_invoice.SendInvoice` - will automatically fill method attributes: - - - :code:`chat_id` - - :code:`message_thread_id` - - :code:`business_connection_id` - - Use this method to send invoices. On success, the sent :class:`aiogram.types.message.Message` is returned. - - Source: https://core.telegram.org/bots/api#sendinvoice - - :param title: Product name, 1-32 characters - :param description: Product description, 1-255 characters - :param payload: Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes. - :param currency: Three-letter ISO 4217 currency code, see `more on currencies `_. Pass 'XTR' for payments in `Telegram Stars `_. - :param prices: Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.). Must contain exactly one item for payments in `Telegram Stars `_. - :param provider_token: Payment provider token, obtained via `@BotFather `_. Pass an empty string for payments in `Telegram Stars `_. - :param max_tip_amount: The maximum accepted amount for tips in the *smallest units* of the currency (integer, **not** float/double). For example, for a maximum tip of :code:`US$ 1.45` pass :code:`max_tip_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). Defaults to 0. Not supported for payments in `Telegram Stars `_. - :param suggested_tip_amounts: A JSON-serialized array 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*. - :param start_parameter: Unique deep-linking parameter. If left empty, **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. If non-empty, 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 - :param provider_data: JSON-serialized 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. - :param photo_url: 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. - :param photo_size: Photo size in bytes - :param photo_width: Photo width - :param photo_height: Photo height - :param need_name: Pass :code:`True` if you require the user's full name to complete the order. Ignored for payments in `Telegram Stars `_. - :param need_phone_number: Pass :code:`True` if you require the user's phone number to complete the order. Ignored for payments in `Telegram Stars `_. - :param need_email: Pass :code:`True` if you require the user's email address to complete the order. Ignored for payments in `Telegram Stars `_. - :param need_shipping_address: Pass :code:`True` if you require the user's shipping address to complete the order. Ignored for payments in `Telegram Stars `_. - :param send_phone_number_to_provider: Pass :code:`True` if the user's phone number should be sent to the provider. Ignored for payments in `Telegram Stars `_. - :param send_email_to_provider: Pass :code:`True` if the user's email address should be sent to the provider. Ignored for payments in `Telegram Stars `_. - :param is_flexible: Pass :code:`True` if the final price depends on the shipping method. Ignored for payments in `Telegram Stars `_. - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_parameters: Description of the message to reply to - :param reply_markup: A JSON-serialized object for an `inline keyboard `_. If empty, one 'Pay :code:`total price`' button will be shown. If not empty, the first button must be a Pay button. - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param reply_to_message_id: If the message is a reply, ID of the original message - :return: instance of method :class:`aiogram.methods.send_invoice.SendInvoice` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import SendInvoice - - assert ( - self.chat is not None - ), "This method can be used only if chat is present in the message." - - return SendInvoice( - chat_id=self.chat.id, - message_thread_id=self.message_thread_id if self.is_topic_message else None, - business_connection_id=self.business_connection_id, - title=title, - description=description, - payload=payload, - currency=currency, - prices=prices, - provider_token=provider_token, - max_tip_amount=max_tip_amount, - suggested_tip_amounts=suggested_tip_amounts, - start_parameter=start_parameter, - provider_data=provider_data, - photo_url=photo_url, - photo_size=photo_size, - photo_width=photo_width, - photo_height=photo_height, - need_name=need_name, - need_phone_number=need_phone_number, - need_email=need_email, - need_shipping_address=need_shipping_address, - send_phone_number_to_provider=send_phone_number_to_provider, - send_email_to_provider=send_email_to_provider, - is_flexible=is_flexible, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - reply_to_message_id=reply_to_message_id, - **kwargs, - ).as_(self._bot) - - def reply_location( - self, - latitude: float, - longitude: float, - horizontal_accuracy: Optional[float] = None, - live_period: Optional[int] = None, - heading: Optional[int] = None, - proximity_alert_radius: Optional[int] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - **kwargs: Any, - ) -> SendLocation: - """ - Shortcut for method :class:`aiogram.methods.send_location.SendLocation` - will automatically fill method attributes: - - - :code:`chat_id` - - :code:`message_thread_id` - - :code:`business_connection_id` - - :code:`reply_parameters` - - Use this method to send point on the map. On success, the sent :class:`aiogram.types.message.Message` is returned. - - Source: https://core.telegram.org/bots/api#sendlocation - - :param latitude: Latitude of the location - :param longitude: Longitude of the location - :param horizontal_accuracy: The radius of uncertainty for the location, measured in meters; 0-1500 - :param live_period: Period in seconds during which the location will be updated (see `Live Locations `_, should be between 60 and 86400, or 0x7FFFFFFF for live locations that can be edited indefinitely. - :param heading: For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified. - :param proximity_alert_radius: For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified. - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :return: instance of method :class:`aiogram.methods.send_location.SendLocation` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import SendLocation - - assert ( - self.chat is not None - ), "This method can be used only if chat is present in the message." - - return SendLocation( - chat_id=self.chat.id, - message_thread_id=self.message_thread_id if self.is_topic_message else None, - business_connection_id=self.business_connection_id, - reply_parameters=self.as_reply_parameters(), - latitude=latitude, - longitude=longitude, - horizontal_accuracy=horizontal_accuracy, - live_period=live_period, - heading=heading, - proximity_alert_radius=proximity_alert_radius, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - **kwargs, - ).as_(self._bot) - - def answer_location( - self, - latitude: float, - longitude: float, - horizontal_accuracy: Optional[float] = None, - live_period: Optional[int] = None, - heading: Optional[int] = None, - proximity_alert_radius: Optional[int] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - **kwargs: Any, - ) -> SendLocation: - """ - Shortcut for method :class:`aiogram.methods.send_location.SendLocation` - will automatically fill method attributes: - - - :code:`chat_id` - - :code:`message_thread_id` - - :code:`business_connection_id` - - Use this method to send point on the map. On success, the sent :class:`aiogram.types.message.Message` is returned. - - Source: https://core.telegram.org/bots/api#sendlocation - - :param latitude: Latitude of the location - :param longitude: Longitude of the location - :param horizontal_accuracy: The radius of uncertainty for the location, measured in meters; 0-1500 - :param live_period: Period in seconds during which the location will be updated (see `Live Locations `_, should be between 60 and 86400, or 0x7FFFFFFF for live locations that can be edited indefinitely. - :param heading: For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified. - :param proximity_alert_radius: For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified. - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param reply_to_message_id: If the message is a reply, ID of the original message - :return: instance of method :class:`aiogram.methods.send_location.SendLocation` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import SendLocation - - assert ( - self.chat is not None - ), "This method can be used only if chat is present in the message." - - return SendLocation( - chat_id=self.chat.id, - message_thread_id=self.message_thread_id if self.is_topic_message else None, - business_connection_id=self.business_connection_id, - latitude=latitude, - longitude=longitude, - horizontal_accuracy=horizontal_accuracy, - live_period=live_period, - heading=heading, - proximity_alert_radius=proximity_alert_radius, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - reply_to_message_id=reply_to_message_id, - **kwargs, - ).as_(self._bot) - - def reply_media_group( - self, - media: List[Union[InputMediaAudio, InputMediaDocument, InputMediaPhoto, InputMediaVideo]], - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - allow_sending_without_reply: Optional[bool] = None, - **kwargs: Any, - ) -> SendMediaGroup: - """ - Shortcut for method :class:`aiogram.methods.send_media_group.SendMediaGroup` - will automatically fill method attributes: - - - :code:`chat_id` - - :code:`message_thread_id` - - :code:`business_connection_id` - - :code:`reply_parameters` - - Use this method to send a group of photos, videos, documents or audios as an album. Documents and audio files can be only grouped in an album with messages of the same type. On success, an array of `Messages `_ that were sent is returned. - - Source: https://core.telegram.org/bots/api#sendmediagroup - - :param media: A JSON-serialized array describing messages to be sent, must include 2-10 items - :param disable_notification: Sends messages `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent messages from forwarding and saving - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :return: instance of method :class:`aiogram.methods.send_media_group.SendMediaGroup` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import SendMediaGroup - - assert ( - self.chat is not None - ), "This method can be used only if chat is present in the message." - - return SendMediaGroup( - chat_id=self.chat.id, - message_thread_id=self.message_thread_id if self.is_topic_message else None, - business_connection_id=self.business_connection_id, - reply_parameters=self.as_reply_parameters(), - media=media, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - allow_sending_without_reply=allow_sending_without_reply, - **kwargs, - ).as_(self._bot) - - def answer_media_group( - self, - media: List[Union[InputMediaAudio, InputMediaDocument, InputMediaPhoto, InputMediaVideo]], - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - **kwargs: Any, - ) -> SendMediaGroup: - """ - Shortcut for method :class:`aiogram.methods.send_media_group.SendMediaGroup` - will automatically fill method attributes: - - - :code:`chat_id` - - :code:`message_thread_id` - - :code:`business_connection_id` - - Use this method to send a group of photos, videos, documents or audios as an album. Documents and audio files can be only grouped in an album with messages of the same type. On success, an array of `Messages `_ that were sent is returned. - - Source: https://core.telegram.org/bots/api#sendmediagroup - - :param media: A JSON-serialized array describing messages to be sent, must include 2-10 items - :param disable_notification: Sends messages `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent messages from forwarding and saving - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_parameters: Description of the message to reply to - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param reply_to_message_id: If the messages are a reply, ID of the original message - :return: instance of method :class:`aiogram.methods.send_media_group.SendMediaGroup` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import SendMediaGroup - - assert ( - self.chat is not None - ), "This method can be used only if chat is present in the message." - - return SendMediaGroup( - chat_id=self.chat.id, - message_thread_id=self.message_thread_id if self.is_topic_message else None, - business_connection_id=self.business_connection_id, - media=media, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - allow_sending_without_reply=allow_sending_without_reply, - reply_to_message_id=reply_to_message_id, - **kwargs, - ).as_(self._bot) - - def reply( - self, - text: str, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - entities: Optional[List[MessageEntity]] = None, - link_preview_options: Optional[Union[LinkPreviewOptions, Default]] = Default( - "link_preview" - ), - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - disable_web_page_preview: Optional[Union[bool, Default]] = Default( - "link_preview_is_disabled" - ), - **kwargs: Any, - ) -> SendMessage: - """ - Shortcut for method :class:`aiogram.methods.send_message.SendMessage` - will automatically fill method attributes: - - - :code:`chat_id` - - :code:`message_thread_id` - - :code:`business_connection_id` - - :code:`reply_parameters` - - Use this method to send text messages. On success, the sent :class:`aiogram.types.message.Message` is returned. - - Source: https://core.telegram.org/bots/api#sendmessage - - :param text: Text of the message to be sent, 1-4096 characters after entities parsing - :param parse_mode: Mode for parsing entities in the message text. See `formatting options `_ for more details. - :param entities: A JSON-serialized list of special entities that appear in message text, which can be specified instead of *parse_mode* - :param link_preview_options: Link preview generation options for the message - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param disable_web_page_preview: Disables link previews for links in this message - :return: instance of method :class:`aiogram.methods.send_message.SendMessage` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import SendMessage - - assert ( - self.chat is not None - ), "This method can be used only if chat is present in the message." - - return SendMessage( - chat_id=self.chat.id, - message_thread_id=self.message_thread_id if self.is_topic_message else None, - business_connection_id=self.business_connection_id, - reply_parameters=self.as_reply_parameters(), - text=text, - parse_mode=parse_mode, - entities=entities, - link_preview_options=link_preview_options, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - disable_web_page_preview=disable_web_page_preview, - **kwargs, - ).as_(self._bot) - - def answer( - self, - text: str, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - entities: Optional[List[MessageEntity]] = None, - link_preview_options: Optional[Union[LinkPreviewOptions, Default]] = Default( - "link_preview" - ), - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - disable_web_page_preview: Optional[Union[bool, Default]] = Default( - "link_preview_is_disabled" - ), - reply_to_message_id: Optional[int] = None, - **kwargs: Any, - ) -> SendMessage: - """ - Shortcut for method :class:`aiogram.methods.send_message.SendMessage` - will automatically fill method attributes: - - - :code:`chat_id` - - :code:`message_thread_id` - - :code:`business_connection_id` - - Use this method to send text messages. On success, the sent :class:`aiogram.types.message.Message` is returned. - - Source: https://core.telegram.org/bots/api#sendmessage - - :param text: Text of the message to be sent, 1-4096 characters after entities parsing - :param parse_mode: Mode for parsing entities in the message text. See `formatting options `_ for more details. - :param entities: A JSON-serialized list of special entities that appear in message text, which can be specified instead of *parse_mode* - :param link_preview_options: Link preview generation options for the message - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param disable_web_page_preview: Disables link previews for links in this message - :param reply_to_message_id: If the message is a reply, ID of the original message - :return: instance of method :class:`aiogram.methods.send_message.SendMessage` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import SendMessage - - assert ( - self.chat is not None - ), "This method can be used only if chat is present in the message." - - return SendMessage( - chat_id=self.chat.id, - message_thread_id=self.message_thread_id if self.is_topic_message else None, - business_connection_id=self.business_connection_id, - text=text, - parse_mode=parse_mode, - entities=entities, - link_preview_options=link_preview_options, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - disable_web_page_preview=disable_web_page_preview, - reply_to_message_id=reply_to_message_id, - **kwargs, - ).as_(self._bot) - - def reply_photo( - self, - photo: Union[InputFile, str], - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - show_caption_above_media: Optional[Union[bool, Default]] = Default( - "show_caption_above_media" - ), - has_spoiler: Optional[bool] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - **kwargs: Any, - ) -> SendPhoto: - """ - Shortcut for method :class:`aiogram.methods.send_photo.SendPhoto` - will automatically fill method attributes: - - - :code:`chat_id` - - :code:`message_thread_id` - - :code:`business_connection_id` - - :code:`reply_parameters` - - Use this method to send photos. On success, the sent :class:`aiogram.types.message.Message` is returned. - - Source: https://core.telegram.org/bots/api#sendphoto - - :param photo: Photo to send. Pass a file_id as String to send a photo that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a photo from the Internet, or upload a new photo using multipart/form-data. The photo must be at most 10 MB in size. The photo's width and height must not exceed 10000 in total. Width and height ratio must be at most 20. :ref:`More information on Sending Files » ` - :param caption: Photo caption (may also be used when resending photos by *file_id*), 0-1024 characters after entities parsing - :param parse_mode: Mode for parsing entities in the photo caption. See `formatting options `_ for more details. - :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode* - :param show_caption_above_media: Pass :code:`True`, if the caption must be shown above the message media - :param has_spoiler: Pass :code:`True` if the photo needs to be covered with a spoiler animation - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :return: instance of method :class:`aiogram.methods.send_photo.SendPhoto` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import SendPhoto - - assert ( - self.chat is not None - ), "This method can be used only if chat is present in the message." - - return SendPhoto( - chat_id=self.chat.id, - message_thread_id=self.message_thread_id if self.is_topic_message else None, - business_connection_id=self.business_connection_id, - reply_parameters=self.as_reply_parameters(), - photo=photo, - caption=caption, - parse_mode=parse_mode, - caption_entities=caption_entities, - show_caption_above_media=show_caption_above_media, - has_spoiler=has_spoiler, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - **kwargs, - ).as_(self._bot) - - def answer_photo( - self, - photo: Union[InputFile, str], - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - show_caption_above_media: Optional[Union[bool, Default]] = Default( - "show_caption_above_media" - ), - has_spoiler: Optional[bool] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - **kwargs: Any, - ) -> SendPhoto: - """ - Shortcut for method :class:`aiogram.methods.send_photo.SendPhoto` - will automatically fill method attributes: - - - :code:`chat_id` - - :code:`message_thread_id` - - :code:`business_connection_id` - - Use this method to send photos. On success, the sent :class:`aiogram.types.message.Message` is returned. - - Source: https://core.telegram.org/bots/api#sendphoto - - :param photo: Photo to send. Pass a file_id as String to send a photo that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a photo from the Internet, or upload a new photo using multipart/form-data. The photo must be at most 10 MB in size. The photo's width and height must not exceed 10000 in total. Width and height ratio must be at most 20. :ref:`More information on Sending Files » ` - :param caption: Photo caption (may also be used when resending photos by *file_id*), 0-1024 characters after entities parsing - :param parse_mode: Mode for parsing entities in the photo caption. See `formatting options `_ for more details. - :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode* - :param show_caption_above_media: Pass :code:`True`, if the caption must be shown above the message media - :param has_spoiler: Pass :code:`True` if the photo needs to be covered with a spoiler animation - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param reply_to_message_id: If the message is a reply, ID of the original message - :return: instance of method :class:`aiogram.methods.send_photo.SendPhoto` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import SendPhoto - - assert ( - self.chat is not None - ), "This method can be used only if chat is present in the message." - - return SendPhoto( - chat_id=self.chat.id, - message_thread_id=self.message_thread_id if self.is_topic_message else None, - business_connection_id=self.business_connection_id, - photo=photo, - caption=caption, - parse_mode=parse_mode, - caption_entities=caption_entities, - show_caption_above_media=show_caption_above_media, - has_spoiler=has_spoiler, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - reply_to_message_id=reply_to_message_id, - **kwargs, - ).as_(self._bot) - - def reply_poll( - self, - question: str, - options: List[Union[InputPollOption, str]], - question_parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - question_entities: Optional[List[MessageEntity]] = None, - is_anonymous: Optional[bool] = None, - type: Optional[str] = None, - allows_multiple_answers: Optional[bool] = None, - correct_option_id: Optional[int] = None, - explanation: Optional[str] = None, - explanation_parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - explanation_entities: Optional[List[MessageEntity]] = None, - open_period: Optional[int] = None, - close_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None, - is_closed: Optional[bool] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - **kwargs: Any, - ) -> SendPoll: - """ - Shortcut for method :class:`aiogram.methods.send_poll.SendPoll` - will automatically fill method attributes: - - - :code:`chat_id` - - :code:`message_thread_id` - - :code:`business_connection_id` - - :code:`reply_parameters` - - Use this method to send a native poll. On success, the sent :class:`aiogram.types.message.Message` is returned. - - Source: https://core.telegram.org/bots/api#sendpoll - - :param question: Poll question, 1-300 characters - :param options: A JSON-serialized list of 2-10 answer options - :param question_parse_mode: Mode for parsing entities in the question. See `formatting options `_ for more details. Currently, only custom emoji entities are allowed - :param question_entities: A JSON-serialized list of special entities that appear in the poll question. It can be specified instead of *question_parse_mode* - :param is_anonymous: :code:`True`, if the poll needs to be anonymous, defaults to :code:`True` - :param type: Poll type, 'quiz' or 'regular', defaults to 'regular' - :param allows_multiple_answers: :code:`True`, if the poll allows multiple answers, ignored for polls in quiz mode, defaults to :code:`False` - :param correct_option_id: 0-based identifier of the correct answer option, required for polls in quiz mode - :param explanation: Text that is shown when a user chooses an incorrect answer or taps on the lamp icon in a quiz-style poll, 0-200 characters with at most 2 line feeds after entities parsing - :param explanation_parse_mode: Mode for parsing entities in the explanation. See `formatting options `_ for more details. - :param explanation_entities: A JSON-serialized list of special entities that appear in the poll explanation. It can be specified instead of *explanation_parse_mode* - :param open_period: Amount of time in seconds the poll will be active after creation, 5-600. Can't be used together with *close_date*. - :param close_date: 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 *open_period*. - :param is_closed: Pass :code:`True` if the poll needs to be immediately closed. This can be useful for poll preview. - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :return: instance of method :class:`aiogram.methods.send_poll.SendPoll` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import SendPoll - - assert ( - self.chat is not None - ), "This method can be used only if chat is present in the message." - - return SendPoll( - chat_id=self.chat.id, - message_thread_id=self.message_thread_id if self.is_topic_message else None, - business_connection_id=self.business_connection_id, - reply_parameters=self.as_reply_parameters(), - question=question, - options=options, - question_parse_mode=question_parse_mode, - question_entities=question_entities, - is_anonymous=is_anonymous, - type=type, - allows_multiple_answers=allows_multiple_answers, - correct_option_id=correct_option_id, - explanation=explanation, - explanation_parse_mode=explanation_parse_mode, - explanation_entities=explanation_entities, - open_period=open_period, - close_date=close_date, - is_closed=is_closed, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - **kwargs, - ).as_(self._bot) - - def answer_poll( - self, - question: str, - options: List[Union[InputPollOption, str]], - question_parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - question_entities: Optional[List[MessageEntity]] = None, - is_anonymous: Optional[bool] = None, - type: Optional[str] = None, - allows_multiple_answers: Optional[bool] = None, - correct_option_id: Optional[int] = None, - explanation: Optional[str] = None, - explanation_parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - explanation_entities: Optional[List[MessageEntity]] = None, - open_period: Optional[int] = None, - close_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None, - is_closed: Optional[bool] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - **kwargs: Any, - ) -> SendPoll: - """ - Shortcut for method :class:`aiogram.methods.send_poll.SendPoll` - will automatically fill method attributes: - - - :code:`chat_id` - - :code:`message_thread_id` - - :code:`business_connection_id` - - Use this method to send a native poll. On success, the sent :class:`aiogram.types.message.Message` is returned. - - Source: https://core.telegram.org/bots/api#sendpoll - - :param question: Poll question, 1-300 characters - :param options: A JSON-serialized list of 2-10 answer options - :param question_parse_mode: Mode for parsing entities in the question. See `formatting options `_ for more details. Currently, only custom emoji entities are allowed - :param question_entities: A JSON-serialized list of special entities that appear in the poll question. It can be specified instead of *question_parse_mode* - :param is_anonymous: :code:`True`, if the poll needs to be anonymous, defaults to :code:`True` - :param type: Poll type, 'quiz' or 'regular', defaults to 'regular' - :param allows_multiple_answers: :code:`True`, if the poll allows multiple answers, ignored for polls in quiz mode, defaults to :code:`False` - :param correct_option_id: 0-based identifier of the correct answer option, required for polls in quiz mode - :param explanation: Text that is shown when a user chooses an incorrect answer or taps on the lamp icon in a quiz-style poll, 0-200 characters with at most 2 line feeds after entities parsing - :param explanation_parse_mode: Mode for parsing entities in the explanation. See `formatting options `_ for more details. - :param explanation_entities: A JSON-serialized list of special entities that appear in the poll explanation. It can be specified instead of *explanation_parse_mode* - :param open_period: Amount of time in seconds the poll will be active after creation, 5-600. Can't be used together with *close_date*. - :param close_date: 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 *open_period*. - :param is_closed: Pass :code:`True` if the poll needs to be immediately closed. This can be useful for poll preview. - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param reply_to_message_id: If the message is a reply, ID of the original message - :return: instance of method :class:`aiogram.methods.send_poll.SendPoll` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import SendPoll - - assert ( - self.chat is not None - ), "This method can be used only if chat is present in the message." - - return SendPoll( - chat_id=self.chat.id, - message_thread_id=self.message_thread_id if self.is_topic_message else None, - business_connection_id=self.business_connection_id, - question=question, - options=options, - question_parse_mode=question_parse_mode, - question_entities=question_entities, - is_anonymous=is_anonymous, - type=type, - allows_multiple_answers=allows_multiple_answers, - correct_option_id=correct_option_id, - explanation=explanation, - explanation_parse_mode=explanation_parse_mode, - explanation_entities=explanation_entities, - open_period=open_period, - close_date=close_date, - is_closed=is_closed, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - reply_to_message_id=reply_to_message_id, - **kwargs, - ).as_(self._bot) - - def reply_dice( - self, - emoji: Optional[str] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - **kwargs: Any, - ) -> SendDice: - """ - Shortcut for method :class:`aiogram.methods.send_dice.SendDice` - will automatically fill method attributes: - - - :code:`chat_id` - - :code:`message_thread_id` - - :code:`business_connection_id` - - :code:`reply_parameters` - - Use this method to send an animated emoji that will display a random value. On success, the sent :class:`aiogram.types.message.Message` is returned. - - Source: https://core.telegram.org/bots/api#senddice - - :param emoji: Emoji on which the dice throw animation is based. Currently, must be one of '🎲', '🎯', '🏀', '⚽', '🎳', or '🎰'. Dice can have values 1-6 for '🎲', '🎯' and '🎳', values 1-5 for '🏀' and '⚽', and values 1-64 for '🎰'. Defaults to '🎲' - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :return: instance of method :class:`aiogram.methods.send_dice.SendDice` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import SendDice - - assert ( - self.chat is not None - ), "This method can be used only if chat is present in the message." - - return SendDice( - chat_id=self.chat.id, - message_thread_id=self.message_thread_id if self.is_topic_message else None, - business_connection_id=self.business_connection_id, - reply_parameters=self.as_reply_parameters(), - emoji=emoji, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - **kwargs, - ).as_(self._bot) - - def answer_dice( - self, - emoji: Optional[str] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - **kwargs: Any, - ) -> SendDice: - """ - Shortcut for method :class:`aiogram.methods.send_dice.SendDice` - will automatically fill method attributes: - - - :code:`chat_id` - - :code:`message_thread_id` - - :code:`business_connection_id` - - Use this method to send an animated emoji that will display a random value. On success, the sent :class:`aiogram.types.message.Message` is returned. - - Source: https://core.telegram.org/bots/api#senddice - - :param emoji: Emoji on which the dice throw animation is based. Currently, must be one of '🎲', '🎯', '🏀', '⚽', '🎳', or '🎰'. Dice can have values 1-6 for '🎲', '🎯' and '🎳', values 1-5 for '🏀' and '⚽', and values 1-64 for '🎰'. Defaults to '🎲' - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param reply_to_message_id: If the message is a reply, ID of the original message - :return: instance of method :class:`aiogram.methods.send_dice.SendDice` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import SendDice - - assert ( - self.chat is not None - ), "This method can be used only if chat is present in the message." - - return SendDice( - chat_id=self.chat.id, - message_thread_id=self.message_thread_id if self.is_topic_message else None, - business_connection_id=self.business_connection_id, - emoji=emoji, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - reply_to_message_id=reply_to_message_id, - **kwargs, - ).as_(self._bot) - - def reply_sticker( - self, - sticker: Union[InputFile, str], - emoji: Optional[str] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - **kwargs: Any, - ) -> SendSticker: - """ - Shortcut for method :class:`aiogram.methods.send_sticker.SendSticker` - will automatically fill method attributes: - - - :code:`chat_id` - - :code:`message_thread_id` - - :code:`business_connection_id` - - :code:`reply_parameters` - - Use this method to send static .WEBP, `animated `_ .TGS, or `video `_ .WEBM stickers. On success, the sent :class:`aiogram.types.message.Message` is returned. - - Source: https://core.telegram.org/bots/api#sendsticker - - :param sticker: Sticker to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a .WEBP sticker from the Internet, or upload a new .WEBP, .TGS, or .WEBM sticker using multipart/form-data. :ref:`More information on Sending Files » `. Video and animated stickers can't be sent via an HTTP URL. - :param emoji: Emoji associated with the sticker; only for just uploaded stickers - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :return: instance of method :class:`aiogram.methods.send_sticker.SendSticker` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import SendSticker - - assert ( - self.chat is not None - ), "This method can be used only if chat is present in the message." - - return SendSticker( - chat_id=self.chat.id, - message_thread_id=self.message_thread_id if self.is_topic_message else None, - business_connection_id=self.business_connection_id, - reply_parameters=self.as_reply_parameters(), - sticker=sticker, - emoji=emoji, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - **kwargs, - ).as_(self._bot) - - def answer_sticker( - self, - sticker: Union[InputFile, str], - emoji: Optional[str] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - **kwargs: Any, - ) -> SendSticker: - """ - Shortcut for method :class:`aiogram.methods.send_sticker.SendSticker` - will automatically fill method attributes: - - - :code:`chat_id` - - :code:`message_thread_id` - - :code:`business_connection_id` - - Use this method to send static .WEBP, `animated `_ .TGS, or `video `_ .WEBM stickers. On success, the sent :class:`aiogram.types.message.Message` is returned. - - Source: https://core.telegram.org/bots/api#sendsticker - - :param sticker: Sticker to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a .WEBP sticker from the Internet, or upload a new .WEBP, .TGS, or .WEBM sticker using multipart/form-data. :ref:`More information on Sending Files » `. Video and animated stickers can't be sent via an HTTP URL. - :param emoji: Emoji associated with the sticker; only for just uploaded stickers - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param reply_to_message_id: If the message is a reply, ID of the original message - :return: instance of method :class:`aiogram.methods.send_sticker.SendSticker` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import SendSticker - - assert ( - self.chat is not None - ), "This method can be used only if chat is present in the message." - - return SendSticker( - chat_id=self.chat.id, - message_thread_id=self.message_thread_id if self.is_topic_message else None, - business_connection_id=self.business_connection_id, - sticker=sticker, - emoji=emoji, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - reply_to_message_id=reply_to_message_id, - **kwargs, - ).as_(self._bot) - - def reply_venue( - self, - latitude: float, - longitude: float, - title: str, - address: str, - foursquare_id: Optional[str] = None, - foursquare_type: Optional[str] = None, - google_place_id: Optional[str] = None, - google_place_type: Optional[str] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - **kwargs: Any, - ) -> SendVenue: - """ - Shortcut for method :class:`aiogram.methods.send_venue.SendVenue` - will automatically fill method attributes: - - - :code:`chat_id` - - :code:`message_thread_id` - - :code:`business_connection_id` - - :code:`reply_parameters` - - Use this method to send information about a venue. On success, the sent :class:`aiogram.types.message.Message` is returned. - - Source: https://core.telegram.org/bots/api#sendvenue - - :param latitude: Latitude of the venue - :param longitude: Longitude of the venue - :param title: Name of the venue - :param address: Address of the venue - :param foursquare_id: Foursquare identifier of the venue - :param foursquare_type: Foursquare type of the venue, if known. (For example, 'arts_entertainment/default', 'arts_entertainment/aquarium' or 'food/icecream'.) - :param google_place_id: Google Places identifier of the venue - :param google_place_type: Google Places type of the venue. (See `supported types `_.) - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :return: instance of method :class:`aiogram.methods.send_venue.SendVenue` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import SendVenue - - assert ( - self.chat is not None - ), "This method can be used only if chat is present in the message." - - return SendVenue( - chat_id=self.chat.id, - message_thread_id=self.message_thread_id if self.is_topic_message else None, - business_connection_id=self.business_connection_id, - reply_parameters=self.as_reply_parameters(), - latitude=latitude, - longitude=longitude, - title=title, - address=address, - foursquare_id=foursquare_id, - foursquare_type=foursquare_type, - google_place_id=google_place_id, - google_place_type=google_place_type, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - **kwargs, - ).as_(self._bot) - - def answer_venue( - self, - latitude: float, - longitude: float, - title: str, - address: str, - foursquare_id: Optional[str] = None, - foursquare_type: Optional[str] = None, - google_place_id: Optional[str] = None, - google_place_type: Optional[str] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - **kwargs: Any, - ) -> SendVenue: - """ - Shortcut for method :class:`aiogram.methods.send_venue.SendVenue` - will automatically fill method attributes: - - - :code:`chat_id` - - :code:`message_thread_id` - - :code:`business_connection_id` - - Use this method to send information about a venue. On success, the sent :class:`aiogram.types.message.Message` is returned. - - Source: https://core.telegram.org/bots/api#sendvenue - - :param latitude: Latitude of the venue - :param longitude: Longitude of the venue - :param title: Name of the venue - :param address: Address of the venue - :param foursquare_id: Foursquare identifier of the venue - :param foursquare_type: Foursquare type of the venue, if known. (For example, 'arts_entertainment/default', 'arts_entertainment/aquarium' or 'food/icecream'.) - :param google_place_id: Google Places identifier of the venue - :param google_place_type: Google Places type of the venue. (See `supported types `_.) - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param reply_to_message_id: If the message is a reply, ID of the original message - :return: instance of method :class:`aiogram.methods.send_venue.SendVenue` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import SendVenue - - assert ( - self.chat is not None - ), "This method can be used only if chat is present in the message." - - return SendVenue( - chat_id=self.chat.id, - message_thread_id=self.message_thread_id if self.is_topic_message else None, - business_connection_id=self.business_connection_id, - latitude=latitude, - longitude=longitude, - title=title, - address=address, - foursquare_id=foursquare_id, - foursquare_type=foursquare_type, - google_place_id=google_place_id, - google_place_type=google_place_type, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - reply_to_message_id=reply_to_message_id, - **kwargs, - ).as_(self._bot) - - def reply_video( - self, - video: Union[InputFile, str], - duration: Optional[int] = None, - width: Optional[int] = None, - height: Optional[int] = None, - thumbnail: Optional[InputFile] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - show_caption_above_media: Optional[Union[bool, Default]] = Default( - "show_caption_above_media" - ), - has_spoiler: Optional[bool] = None, - supports_streaming: Optional[bool] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - **kwargs: Any, - ) -> SendVideo: - """ - Shortcut for method :class:`aiogram.methods.send_video.SendVideo` - will automatically fill method attributes: - - - :code:`chat_id` - - :code:`message_thread_id` - - :code:`business_connection_id` - - :code:`reply_parameters` - - Use this method to send video files, Telegram clients support MPEG4 videos (other formats may be sent as :class:`aiogram.types.document.Document`). On success, the sent :class:`aiogram.types.message.Message` is returned. Bots can currently send video files of up to 50 MB in size, this limit may be changed in the future. - - Source: https://core.telegram.org/bots/api#sendvideo - - :param video: Video to send. Pass a file_id as String to send a video that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a video from the Internet, or upload a new video using multipart/form-data. :ref:`More information on Sending Files » ` - :param duration: Duration of sent video in seconds - :param width: Video width - :param height: Video height - :param thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More information on Sending Files » ` - :param caption: Video caption (may also be used when resending videos by *file_id*), 0-1024 characters after entities parsing - :param parse_mode: Mode for parsing entities in the video caption. See `formatting options `_ for more details. - :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode* - :param show_caption_above_media: Pass :code:`True`, if the caption must be shown above the message media - :param has_spoiler: Pass :code:`True` if the video needs to be covered with a spoiler animation - :param supports_streaming: Pass :code:`True` if the uploaded video is suitable for streaming - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :return: instance of method :class:`aiogram.methods.send_video.SendVideo` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import SendVideo - - assert ( - self.chat is not None - ), "This method can be used only if chat is present in the message." - - return SendVideo( - chat_id=self.chat.id, - message_thread_id=self.message_thread_id if self.is_topic_message else None, - business_connection_id=self.business_connection_id, - reply_parameters=self.as_reply_parameters(), - video=video, - duration=duration, - width=width, - height=height, - thumbnail=thumbnail, - caption=caption, - parse_mode=parse_mode, - caption_entities=caption_entities, - show_caption_above_media=show_caption_above_media, - has_spoiler=has_spoiler, - supports_streaming=supports_streaming, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - **kwargs, - ).as_(self._bot) - - def answer_video( - self, - video: Union[InputFile, str], - duration: Optional[int] = None, - width: Optional[int] = None, - height: Optional[int] = None, - thumbnail: Optional[InputFile] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - show_caption_above_media: Optional[Union[bool, Default]] = Default( - "show_caption_above_media" - ), - has_spoiler: Optional[bool] = None, - supports_streaming: Optional[bool] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - **kwargs: Any, - ) -> SendVideo: - """ - Shortcut for method :class:`aiogram.methods.send_video.SendVideo` - will automatically fill method attributes: - - - :code:`chat_id` - - :code:`message_thread_id` - - :code:`business_connection_id` - - Use this method to send video files, Telegram clients support MPEG4 videos (other formats may be sent as :class:`aiogram.types.document.Document`). On success, the sent :class:`aiogram.types.message.Message` is returned. Bots can currently send video files of up to 50 MB in size, this limit may be changed in the future. - - Source: https://core.telegram.org/bots/api#sendvideo - - :param video: Video to send. Pass a file_id as String to send a video that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a video from the Internet, or upload a new video using multipart/form-data. :ref:`More information on Sending Files » ` - :param duration: Duration of sent video in seconds - :param width: Video width - :param height: Video height - :param thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More information on Sending Files » ` - :param caption: Video caption (may also be used when resending videos by *file_id*), 0-1024 characters after entities parsing - :param parse_mode: Mode for parsing entities in the video caption. See `formatting options `_ for more details. - :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode* - :param show_caption_above_media: Pass :code:`True`, if the caption must be shown above the message media - :param has_spoiler: Pass :code:`True` if the video needs to be covered with a spoiler animation - :param supports_streaming: Pass :code:`True` if the uploaded video is suitable for streaming - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param reply_to_message_id: If the message is a reply, ID of the original message - :return: instance of method :class:`aiogram.methods.send_video.SendVideo` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import SendVideo - - assert ( - self.chat is not None - ), "This method can be used only if chat is present in the message." - - return SendVideo( - chat_id=self.chat.id, - message_thread_id=self.message_thread_id if self.is_topic_message else None, - business_connection_id=self.business_connection_id, - video=video, - duration=duration, - width=width, - height=height, - thumbnail=thumbnail, - caption=caption, - parse_mode=parse_mode, - caption_entities=caption_entities, - show_caption_above_media=show_caption_above_media, - has_spoiler=has_spoiler, - supports_streaming=supports_streaming, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - reply_to_message_id=reply_to_message_id, - **kwargs, - ).as_(self._bot) - - def reply_video_note( - self, - video_note: Union[InputFile, str], - duration: Optional[int] = None, - length: Optional[int] = None, - thumbnail: Optional[InputFile] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - **kwargs: Any, - ) -> SendVideoNote: - """ - Shortcut for method :class:`aiogram.methods.send_video_note.SendVideoNote` - will automatically fill method attributes: - - - :code:`chat_id` - - :code:`message_thread_id` - - :code:`business_connection_id` - - :code:`reply_parameters` - - As of `v.4.0 `_, Telegram clients support rounded square MPEG4 videos of up to 1 minute long. Use this method to send video messages. On success, the sent :class:`aiogram.types.message.Message` is returned. - - Source: https://core.telegram.org/bots/api#sendvideonote - - :param video_note: Video note to send. Pass a file_id as String to send a video note that exists on the Telegram servers (recommended) or upload a new video using multipart/form-data. :ref:`More information on Sending Files » `. Sending video notes by a URL is currently unsupported - :param duration: Duration of sent video in seconds - :param length: Video width and height, i.e. diameter of the video message - :param thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More information on Sending Files » ` - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :return: instance of method :class:`aiogram.methods.send_video_note.SendVideoNote` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import SendVideoNote - - assert ( - self.chat is not None - ), "This method can be used only if chat is present in the message." - - return SendVideoNote( - chat_id=self.chat.id, - message_thread_id=self.message_thread_id if self.is_topic_message else None, - business_connection_id=self.business_connection_id, - reply_parameters=self.as_reply_parameters(), - video_note=video_note, - duration=duration, - length=length, - thumbnail=thumbnail, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - **kwargs, - ).as_(self._bot) - - def answer_video_note( - self, - video_note: Union[InputFile, str], - duration: Optional[int] = None, - length: Optional[int] = None, - thumbnail: Optional[InputFile] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - **kwargs: Any, - ) -> SendVideoNote: - """ - Shortcut for method :class:`aiogram.methods.send_video_note.SendVideoNote` - will automatically fill method attributes: - - - :code:`chat_id` - - :code:`message_thread_id` - - :code:`business_connection_id` - - As of `v.4.0 `_, Telegram clients support rounded square MPEG4 videos of up to 1 minute long. Use this method to send video messages. On success, the sent :class:`aiogram.types.message.Message` is returned. - - Source: https://core.telegram.org/bots/api#sendvideonote - - :param video_note: Video note to send. Pass a file_id as String to send a video note that exists on the Telegram servers (recommended) or upload a new video using multipart/form-data. :ref:`More information on Sending Files » `. Sending video notes by a URL is currently unsupported - :param duration: Duration of sent video in seconds - :param length: Video width and height, i.e. diameter of the video message - :param thumbnail: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://' if the thumbnail was uploaded using multipart/form-data under . :ref:`More information on Sending Files » ` - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param reply_to_message_id: If the message is a reply, ID of the original message - :return: instance of method :class:`aiogram.methods.send_video_note.SendVideoNote` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import SendVideoNote - - assert ( - self.chat is not None - ), "This method can be used only if chat is present in the message." - - return SendVideoNote( - chat_id=self.chat.id, - message_thread_id=self.message_thread_id if self.is_topic_message else None, - business_connection_id=self.business_connection_id, - video_note=video_note, - duration=duration, - length=length, - thumbnail=thumbnail, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - reply_to_message_id=reply_to_message_id, - **kwargs, - ).as_(self._bot) - - def reply_voice( - self, - voice: Union[InputFile, str], - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - duration: Optional[int] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - **kwargs: Any, - ) -> SendVoice: - """ - Shortcut for method :class:`aiogram.methods.send_voice.SendVoice` - will automatically fill method attributes: - - - :code:`chat_id` - - :code:`message_thread_id` - - :code:`business_connection_id` - - :code:`reply_parameters` - - Use this method to send audio files, if you want Telegram clients to display the file as a playable voice message. For this to work, your audio must be in an .OGG file encoded with OPUS, or in .MP3 format, or in .M4A format (other formats may be sent as :class:`aiogram.types.audio.Audio` or :class:`aiogram.types.document.Document`). On success, the sent :class:`aiogram.types.message.Message` is returned. Bots can currently send voice messages of up to 50 MB in size, this limit may be changed in the future. - - Source: https://core.telegram.org/bots/api#sendvoice - - :param voice: Audio file to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » ` - :param caption: Voice message caption, 0-1024 characters after entities parsing - :param parse_mode: Mode for parsing entities in the voice message caption. See `formatting options `_ for more details. - :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode* - :param duration: Duration of the voice message in seconds - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :return: instance of method :class:`aiogram.methods.send_voice.SendVoice` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import SendVoice - - assert ( - self.chat is not None - ), "This method can be used only if chat is present in the message." - - return SendVoice( - chat_id=self.chat.id, - message_thread_id=self.message_thread_id if self.is_topic_message else None, - business_connection_id=self.business_connection_id, - reply_parameters=self.as_reply_parameters(), - voice=voice, - caption=caption, - parse_mode=parse_mode, - caption_entities=caption_entities, - duration=duration, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - **kwargs, - ).as_(self._bot) - - def answer_voice( - self, - voice: Union[InputFile, str], - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - duration: Optional[int] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - message_effect_id: Optional[str] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - **kwargs: Any, - ) -> SendVoice: - """ - Shortcut for method :class:`aiogram.methods.send_voice.SendVoice` - will automatically fill method attributes: - - - :code:`chat_id` - - :code:`message_thread_id` - - :code:`business_connection_id` - - Use this method to send audio files, if you want Telegram clients to display the file as a playable voice message. For this to work, your audio must be in an .OGG file encoded with OPUS, or in .MP3 format, or in .M4A format (other formats may be sent as :class:`aiogram.types.audio.Audio` or :class:`aiogram.types.document.Document`). On success, the sent :class:`aiogram.types.message.Message` is returned. Bots can currently send voice messages of up to 50 MB in size, this limit may be changed in the future. - - Source: https://core.telegram.org/bots/api#sendvoice - - :param voice: Audio file to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » ` - :param caption: Voice message caption, 0-1024 characters after entities parsing - :param parse_mode: Mode for parsing entities in the voice message caption. See `formatting options `_ for more details. - :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode* - :param duration: Duration of the voice message in seconds - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only - :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param reply_to_message_id: If the message is a reply, ID of the original message - :return: instance of method :class:`aiogram.methods.send_voice.SendVoice` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import SendVoice - - assert ( - self.chat is not None - ), "This method can be used only if chat is present in the message." - - return SendVoice( - chat_id=self.chat.id, - message_thread_id=self.message_thread_id if self.is_topic_message else None, - business_connection_id=self.business_connection_id, - voice=voice, - caption=caption, - parse_mode=parse_mode, - caption_entities=caption_entities, - duration=duration, - disable_notification=disable_notification, - protect_content=protect_content, - message_effect_id=message_effect_id, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - reply_to_message_id=reply_to_message_id, - **kwargs, - ).as_(self._bot) - - def send_copy( # noqa: C901 - self: Message, - chat_id: Union[str, int], - disable_notification: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, None] = None, - allow_sending_without_reply: Optional[bool] = None, - message_thread_id: Optional[int] = None, - business_connection_id: Optional[str] = None, - parse_mode: Optional[str] = None, - message_effect_id: Optional[str] = None, - ) -> Union[ - ForwardMessage, - SendAnimation, - SendAudio, - SendContact, - SendDocument, - SendLocation, - SendMessage, - SendPhoto, - SendPoll, - SendDice, - SendSticker, - SendVenue, - SendVideo, - SendVideoNote, - SendVoice, - ]: - """ - Send copy of a message. - - Is similar to :meth:`aiogram.client.bot.Bot.copy_message` - but returning the sent message instead of :class:`aiogram.types.message_id.MessageId` - - .. note:: - - This method doesn't use the API method named `copyMessage` and - historically implemented before the similar method is added to API - - :param chat_id: - :param disable_notification: - :param reply_to_message_id: - :param reply_parameters: - :param reply_markup: - :param allow_sending_without_reply: - :param message_thread_id: - :param business_connection_id: - :param parse_mode: - :param message_effect_id: - :return: - """ - from ..methods import ( - ForwardMessage, - SendAnimation, - SendAudio, - SendContact, - SendDice, - SendDocument, - SendLocation, - SendMessage, - SendPhoto, - SendPoll, - SendSticker, - SendVenue, - SendVideo, - SendVideoNote, - SendVoice, - ) - - kwargs: Dict[str, Any] = { - "chat_id": chat_id, - "reply_markup": reply_markup or self.reply_markup, - "disable_notification": disable_notification, - "reply_to_message_id": reply_to_message_id, - "reply_parameters": reply_parameters, - "message_thread_id": message_thread_id, - "business_connection_id": business_connection_id, - "allow_sending_without_reply": allow_sending_without_reply, - # when sending a copy, we don't need any parse mode - # because all entities are already prepared - "parse_mode": parse_mode, - "message_effect_id": message_effect_id or self.effect_id, - } - - if self.text: - return SendMessage( - text=self.text, - entities=self.entities, - **kwargs, - ).as_(self._bot) - if self.audio: - return SendAudio( - audio=self.audio.file_id, - caption=self.caption, - title=self.audio.title, - performer=self.audio.performer, - duration=self.audio.duration, - caption_entities=self.caption_entities, - **kwargs, - ).as_(self._bot) - if self.animation: - return SendAnimation( - animation=self.animation.file_id, - caption=self.caption, - caption_entities=self.caption_entities, - **kwargs, - ).as_(self._bot) - if self.document: - return SendDocument( - document=self.document.file_id, - caption=self.caption, - caption_entities=self.caption_entities, - **kwargs, - ).as_(self._bot) - if self.photo: - return SendPhoto( - photo=self.photo[-1].file_id, - caption=self.caption, - caption_entities=self.caption_entities, - **kwargs, - ).as_(self._bot) - if self.sticker: - return SendSticker( - sticker=self.sticker.file_id, - **kwargs, - ).as_(self._bot) - if self.video: - return SendVideo( - video=self.video.file_id, - caption=self.caption, - caption_entities=self.caption_entities, - **kwargs, - ).as_(self._bot) - if self.video_note: - return SendVideoNote( - video_note=self.video_note.file_id, - **kwargs, - ).as_(self._bot) - if self.voice: - return SendVoice( - voice=self.voice.file_id, - **kwargs, - ).as_(self._bot) - if self.contact: - return SendContact( - phone_number=self.contact.phone_number, - first_name=self.contact.first_name, - last_name=self.contact.last_name, - vcard=self.contact.vcard, - **kwargs, - ).as_(self._bot) - if self.venue: - return SendVenue( - latitude=self.venue.location.latitude, - longitude=self.venue.location.longitude, - title=self.venue.title, - address=self.venue.address, - foursquare_id=self.venue.foursquare_id, - foursquare_type=self.venue.foursquare_type, - **kwargs, - ).as_(self._bot) - if self.location: - return SendLocation( - latitude=self.location.latitude, - longitude=self.location.longitude, - **kwargs, - ).as_(self._bot) - if self.poll: - from .input_poll_option import InputPollOption - - return SendPoll( - question=self.poll.question, - options=[ - InputPollOption( - text=option.text, - voter_count=option.voter_count, - text_entities=option.text_entities, - text_parse_mode=None, - ) - for option in self.poll.options - ], - **kwargs, - ).as_(self._bot) - if self.dice: # Dice value can't be controlled - return SendDice( - **kwargs, - ).as_(self._bot) - if self.story: - return ForwardMessage( - from_chat_id=self.chat.id, - message_id=self.message_id, - **kwargs, - ).as_(self._bot) - - raise TypeError("This type of message can't be copied.") - - def copy_to( - self, - chat_id: Union[int, str], - message_thread_id: Optional[int] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - show_caption_above_media: Optional[Union[bool, Default]] = Default( - "show_caption_above_media" - ), - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - allow_sending_without_reply: Optional[bool] = None, - reply_to_message_id: Optional[int] = None, - **kwargs: Any, - ) -> CopyMessage: - """ - Shortcut for method :class:`aiogram.methods.copy_message.CopyMessage` - will automatically fill method attributes: - - - :code:`from_chat_id` - - :code:`message_id` - - Use this method to copy messages of any kind. Service messages, paid media messages, giveaway messages, giveaway winners messages, and invoice messages can't be copied. A quiz :class:`aiogram.methods.poll.Poll` can be copied only if the value of the field *correct_option_id* is known to the bot. The method is analogous to the method :class:`aiogram.methods.forward_message.ForwardMessage`, but the copied message doesn't have a link to the original message. Returns the :class:`aiogram.types.message_id.MessageId` of the sent message on success. - - Source: https://core.telegram.org/bots/api#copymessage - - :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only - :param caption: New caption for media, 0-1024 characters after entities parsing. If not specified, the original caption is kept - :param parse_mode: Mode for parsing entities in the new caption. See `formatting options `_ for more details. - :param caption_entities: A JSON-serialized list of special entities that appear in the new caption, which can be specified instead of *parse_mode* - :param show_caption_above_media: Pass :code:`True`, if the caption must be shown above the message media. Ignored if a new caption isn't specified. - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user - :param allow_sending_without_reply: Pass :code:`True` if the message should be sent even if the specified replied-to message is not found - :param reply_to_message_id: If the message is a reply, ID of the original message - :return: instance of method :class:`aiogram.methods.copy_message.CopyMessage` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import CopyMessage - - assert ( - self.chat is not None - ), "This method can be used only if chat is present in the message." - - return CopyMessage( - from_chat_id=self.chat.id, - message_id=self.message_id, - chat_id=chat_id, - message_thread_id=message_thread_id, - caption=caption, - parse_mode=parse_mode, - caption_entities=caption_entities, - show_caption_above_media=show_caption_above_media, - disable_notification=disable_notification, - protect_content=protect_content, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - allow_sending_without_reply=allow_sending_without_reply, - reply_to_message_id=reply_to_message_id, - **kwargs, - ).as_(self._bot) - - def edit_text( - self, - text: str, - business_connection_id: Optional[str] = None, - inline_message_id: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - entities: Optional[List[MessageEntity]] = None, - link_preview_options: Optional[LinkPreviewOptions] = None, - reply_markup: Optional[InlineKeyboardMarkup] = None, - disable_web_page_preview: Optional[Union[bool, Default]] = Default( - "link_preview_is_disabled" - ), - **kwargs: Any, - ) -> EditMessageText: - """ - Shortcut for method :class:`aiogram.methods.edit_message_text.EditMessageText` - will automatically fill method attributes: - - - :code:`chat_id` - - :code:`message_id` - - Use this method to edit text and `game `_ messages. On success, if the edited message is not an inline message, the edited :class:`aiogram.types.message.Message` is returned, otherwise :code:`True` is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within **48 hours** from the time they were sent. - - Source: https://core.telegram.org/bots/api#editmessagetext - - :param text: New text of the message, 1-4096 characters after entities parsing - :param business_connection_id: Unique identifier of the business connection on behalf of which the message to be edited was sent - :param inline_message_id: Required if *chat_id* and *message_id* are not specified. Identifier of the inline message - :param parse_mode: Mode for parsing entities in the message text. See `formatting options `_ for more details. - :param entities: A JSON-serialized list of special entities that appear in message text, which can be specified instead of *parse_mode* - :param link_preview_options: Link preview generation options for the message - :param reply_markup: A JSON-serialized object for an `inline keyboard `_. - :param disable_web_page_preview: Disables link previews for links in this message - :return: instance of method :class:`aiogram.methods.edit_message_text.EditMessageText` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import EditMessageText - - assert ( - self.chat is not None - ), "This method can be used only if chat is present in the message." - - return EditMessageText( - chat_id=self.chat.id, - message_id=self.message_id, - text=text, - business_connection_id=business_connection_id, - inline_message_id=inline_message_id, - parse_mode=parse_mode, - entities=entities, - link_preview_options=link_preview_options, - reply_markup=reply_markup, - disable_web_page_preview=disable_web_page_preview, - **kwargs, - ).as_(self._bot) - - def forward( - self, - chat_id: Union[int, str], - message_thread_id: Optional[int] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[Union[bool, Default]] = Default("protect_content"), - **kwargs: Any, - ) -> ForwardMessage: - """ - Shortcut for method :class:`aiogram.methods.forward_message.ForwardMessage` - will automatically fill method attributes: - - - :code:`from_chat_id` - - :code:`message_id` - - Use this method to forward messages of any kind. Service messages and messages with protected content can't be forwarded. On success, the sent :class:`aiogram.types.message.Message` is returned. - - Source: https://core.telegram.org/bots/api#forwardmessage - - :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param message_thread_id: Unique identifier for the target message thread (topic) of the forum; for forum supergroups only - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the forwarded message from forwarding and saving - :return: instance of method :class:`aiogram.methods.forward_message.ForwardMessage` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import ForwardMessage - - assert ( - self.chat is not None - ), "This method can be used only if chat is present in the message." - - return ForwardMessage( - from_chat_id=self.chat.id, - message_id=self.message_id, - chat_id=chat_id, - message_thread_id=message_thread_id, - disable_notification=disable_notification, - protect_content=protect_content, - **kwargs, - ).as_(self._bot) - - def edit_media( - self, - media: Union[ - InputMediaAnimation, - InputMediaDocument, - InputMediaAudio, - InputMediaPhoto, - InputMediaVideo, - ], - business_connection_id: Optional[str] = None, - inline_message_id: Optional[str] = None, - reply_markup: Optional[InlineKeyboardMarkup] = None, - **kwargs: Any, - ) -> EditMessageMedia: - """ - Shortcut for method :class:`aiogram.methods.edit_message_media.EditMessageMedia` - will automatically fill method attributes: - - - :code:`chat_id` - - :code:`message_id` - - Use this method to edit animation, audio, document, photo, or video messages. If a message is part of a message album, then it can be edited only to an audio for audio albums, only to a document for document albums and to a photo or a video otherwise. When an inline message is edited, a new file can't be uploaded; use a previously uploaded file via its file_id or specify a URL. On success, if the edited message is not an inline message, the edited :class:`aiogram.types.message.Message` is returned, otherwise :code:`True` is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within **48 hours** from the time they were sent. - - Source: https://core.telegram.org/bots/api#editmessagemedia - - :param media: A JSON-serialized object for a new media content of the message - :param business_connection_id: Unique identifier of the business connection on behalf of which the message to be edited was sent - :param inline_message_id: Required if *chat_id* and *message_id* are not specified. Identifier of the inline message - :param reply_markup: A JSON-serialized object for a new `inline keyboard `_. - :return: instance of method :class:`aiogram.methods.edit_message_media.EditMessageMedia` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import EditMessageMedia - - assert ( - self.chat is not None - ), "This method can be used only if chat is present in the message." - - return EditMessageMedia( - chat_id=self.chat.id, - message_id=self.message_id, - media=media, - business_connection_id=business_connection_id, - inline_message_id=inline_message_id, - reply_markup=reply_markup, - **kwargs, - ).as_(self._bot) - - def edit_reply_markup( - self, - business_connection_id: Optional[str] = None, - inline_message_id: Optional[str] = None, - reply_markup: Optional[InlineKeyboardMarkup] = None, - **kwargs: Any, - ) -> EditMessageReplyMarkup: - """ - Shortcut for method :class:`aiogram.methods.edit_message_reply_markup.EditMessageReplyMarkup` - will automatically fill method attributes: - - - :code:`chat_id` - - :code:`message_id` - - Use this method to edit only the reply markup of messages. On success, if the edited message is not an inline message, the edited :class:`aiogram.types.message.Message` is returned, otherwise :code:`True` is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within **48 hours** from the time they were sent. - - Source: https://core.telegram.org/bots/api#editmessagereplymarkup - - :param business_connection_id: Unique identifier of the business connection on behalf of which the message to be edited was sent - :param inline_message_id: Required if *chat_id* and *message_id* are not specified. Identifier of the inline message - :param reply_markup: A JSON-serialized object for an `inline keyboard `_. - :return: instance of method :class:`aiogram.methods.edit_message_reply_markup.EditMessageReplyMarkup` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import EditMessageReplyMarkup - - assert ( - self.chat is not None - ), "This method can be used only if chat is present in the message." - - return EditMessageReplyMarkup( - chat_id=self.chat.id, - message_id=self.message_id, - business_connection_id=business_connection_id, - inline_message_id=inline_message_id, - reply_markup=reply_markup, - **kwargs, - ).as_(self._bot) - - def delete_reply_markup( - self, - business_connection_id: Optional[str] = None, - inline_message_id: Optional[str] = None, - **kwargs: Any, - ) -> EditMessageReplyMarkup: - """ - Shortcut for method :class:`aiogram.methods.edit_message_reply_markup.EditMessageReplyMarkup` - will automatically fill method attributes: - - - :code:`chat_id` - - :code:`message_id` - - :code:`reply_markup` - - Use this method to edit only the reply markup of messages. On success, if the edited message is not an inline message, the edited :class:`aiogram.types.message.Message` is returned, otherwise :code:`True` is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within **48 hours** from the time they were sent. - - Source: https://core.telegram.org/bots/api#editmessagereplymarkup - - :param business_connection_id: Unique identifier of the business connection on behalf of which the message to be edited was sent - :param inline_message_id: Required if *chat_id* and *message_id* are not specified. Identifier of the inline message - :return: instance of method :class:`aiogram.methods.edit_message_reply_markup.EditMessageReplyMarkup` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import EditMessageReplyMarkup - - assert ( - self.chat is not None - ), "This method can be used only if chat is present in the message." - - return EditMessageReplyMarkup( - chat_id=self.chat.id, - message_id=self.message_id, - reply_markup=None, - business_connection_id=business_connection_id, - inline_message_id=inline_message_id, - **kwargs, - ).as_(self._bot) - - def edit_live_location( - self, - latitude: float, - longitude: float, - business_connection_id: Optional[str] = None, - inline_message_id: Optional[str] = None, - live_period: Optional[int] = None, - horizontal_accuracy: Optional[float] = None, - heading: Optional[int] = None, - proximity_alert_radius: Optional[int] = None, - reply_markup: Optional[InlineKeyboardMarkup] = None, - **kwargs: Any, - ) -> EditMessageLiveLocation: - """ - Shortcut for method :class:`aiogram.methods.edit_message_live_location.EditMessageLiveLocation` - will automatically fill method attributes: - - - :code:`chat_id` - - :code:`message_id` - - Use this method to edit live location messages. A location can be edited until its *live_period* expires or editing is explicitly disabled by a call to :class:`aiogram.methods.stop_message_live_location.StopMessageLiveLocation`. On success, if the edited message is not an inline message, the edited :class:`aiogram.types.message.Message` is returned, otherwise :code:`True` is returned. - - Source: https://core.telegram.org/bots/api#editmessagelivelocation - - :param latitude: Latitude of new location - :param longitude: Longitude of new location - :param business_connection_id: Unique identifier of the business connection on behalf of which the message to be edited was sent - :param inline_message_id: Required if *chat_id* and *message_id* are not specified. Identifier of the inline message - :param live_period: New period in seconds during which the location can be updated, starting from the message send date. If 0x7FFFFFFF is specified, then the location can be updated forever. Otherwise, the new value must not exceed the current *live_period* by more than a day, and the live location expiration date must remain within the next 90 days. If not specified, then *live_period* remains unchanged - :param horizontal_accuracy: The radius of uncertainty for the location, measured in meters; 0-1500 - :param heading: Direction in which the user is moving, in degrees. Must be between 1 and 360 if specified. - :param proximity_alert_radius: The maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified. - :param reply_markup: A JSON-serialized object for a new `inline keyboard `_. - :return: instance of method :class:`aiogram.methods.edit_message_live_location.EditMessageLiveLocation` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import EditMessageLiveLocation - - assert ( - self.chat is not None - ), "This method can be used only if chat is present in the message." - - return EditMessageLiveLocation( - chat_id=self.chat.id, - message_id=self.message_id, - latitude=latitude, - longitude=longitude, - business_connection_id=business_connection_id, - inline_message_id=inline_message_id, - live_period=live_period, - horizontal_accuracy=horizontal_accuracy, - heading=heading, - proximity_alert_radius=proximity_alert_radius, - reply_markup=reply_markup, - **kwargs, - ).as_(self._bot) - - def stop_live_location( - self, - business_connection_id: Optional[str] = None, - inline_message_id: Optional[str] = None, - reply_markup: Optional[InlineKeyboardMarkup] = None, - **kwargs: Any, - ) -> StopMessageLiveLocation: - """ - Shortcut for method :class:`aiogram.methods.stop_message_live_location.StopMessageLiveLocation` - will automatically fill method attributes: - - - :code:`chat_id` - - :code:`message_id` - - Use this method to stop updating a live location message before *live_period* expires. On success, if the message is not an inline message, the edited :class:`aiogram.types.message.Message` is returned, otherwise :code:`True` is returned. - - Source: https://core.telegram.org/bots/api#stopmessagelivelocation - - :param business_connection_id: Unique identifier of the business connection on behalf of which the message to be edited was sent - :param inline_message_id: Required if *chat_id* and *message_id* are not specified. Identifier of the inline message - :param reply_markup: A JSON-serialized object for a new `inline keyboard `_. - :return: instance of method :class:`aiogram.methods.stop_message_live_location.StopMessageLiveLocation` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import StopMessageLiveLocation - - assert ( - self.chat is not None - ), "This method can be used only if chat is present in the message." - - return StopMessageLiveLocation( - chat_id=self.chat.id, - message_id=self.message_id, - business_connection_id=business_connection_id, - inline_message_id=inline_message_id, - reply_markup=reply_markup, - **kwargs, - ).as_(self._bot) - - def edit_caption( - self, - business_connection_id: Optional[str] = None, - inline_message_id: Optional[str] = None, - caption: Optional[str] = None, - parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - caption_entities: Optional[List[MessageEntity]] = None, - show_caption_above_media: Optional[Union[bool, Default]] = Default( - "show_caption_above_media" - ), - reply_markup: Optional[InlineKeyboardMarkup] = None, - **kwargs: Any, - ) -> EditMessageCaption: - """ - Shortcut for method :class:`aiogram.methods.edit_message_caption.EditMessageCaption` - will automatically fill method attributes: - - - :code:`chat_id` - - :code:`message_id` - - Use this method to edit captions of messages. On success, if the edited message is not an inline message, the edited :class:`aiogram.types.message.Message` is returned, otherwise :code:`True` is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within **48 hours** from the time they were sent. - - Source: https://core.telegram.org/bots/api#editmessagecaption - - :param business_connection_id: Unique identifier of the business connection on behalf of which the message to be edited was sent - :param inline_message_id: Required if *chat_id* and *message_id* are not specified. Identifier of the inline message - :param caption: New caption of the message, 0-1024 characters after entities parsing - :param parse_mode: Mode for parsing entities in the message caption. See `formatting options `_ for more details. - :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode* - :param show_caption_above_media: Pass :code:`True`, if the caption must be shown above the message media. Supported only for animation, photo and video messages. - :param reply_markup: A JSON-serialized object for an `inline keyboard `_. - :return: instance of method :class:`aiogram.methods.edit_message_caption.EditMessageCaption` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import EditMessageCaption - - assert ( - self.chat is not None - ), "This method can be used only if chat is present in the message." - - return EditMessageCaption( - chat_id=self.chat.id, - message_id=self.message_id, - business_connection_id=business_connection_id, - inline_message_id=inline_message_id, - caption=caption, - parse_mode=parse_mode, - caption_entities=caption_entities, - show_caption_above_media=show_caption_above_media, - reply_markup=reply_markup, - **kwargs, - ).as_(self._bot) - - def delete( - self, - **kwargs: Any, - ) -> DeleteMessage: - """ - Shortcut for method :class:`aiogram.methods.delete_message.DeleteMessage` - will automatically fill method attributes: - - - :code:`chat_id` - - :code:`message_id` - - Use this method to delete a message, including service messages, with the following limitations: - - - A message can only be deleted if it was sent less than 48 hours ago. - - - Service messages about a supergroup, channel, or forum topic creation can't be deleted. - - - A dice message in a private chat can only be deleted if it was sent more than 24 hours ago. - - - Bots can delete outgoing messages in private chats, groups, and supergroups. - - - Bots can delete incoming messages in private chats. - - - Bots granted *can_post_messages* permissions can delete outgoing messages in channels. - - - If the bot is an administrator of a group, it can delete any message there. - - - If the bot has *can_delete_messages* permission in a supergroup or a channel, it can delete any message there. - - Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#deletemessage - - :return: instance of method :class:`aiogram.methods.delete_message.DeleteMessage` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import DeleteMessage - - assert ( - self.chat is not None - ), "This method can be used only if chat is present in the message." - - return DeleteMessage( - chat_id=self.chat.id, - message_id=self.message_id, - **kwargs, - ).as_(self._bot) - - def pin( - self, - business_connection_id: Optional[str] = None, - disable_notification: Optional[bool] = None, - **kwargs: Any, - ) -> PinChatMessage: - """ - Shortcut for method :class:`aiogram.methods.pin_chat_message.PinChatMessage` - will automatically fill method attributes: - - - :code:`chat_id` - - :code:`message_id` - - Use this method to add a message to the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#pinchatmessage - - :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be pinned - :param disable_notification: Pass :code:`True` if it is not necessary to send a notification to all chat members about the new pinned message. Notifications are always disabled in channels and private chats. - :return: instance of method :class:`aiogram.methods.pin_chat_message.PinChatMessage` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import PinChatMessage - - assert ( - self.chat is not None - ), "This method can be used only if chat is present in the message." - - return PinChatMessage( - chat_id=self.chat.id, - message_id=self.message_id, - business_connection_id=business_connection_id, - disable_notification=disable_notification, - **kwargs, - ).as_(self._bot) - - def unpin( - self, - business_connection_id: Optional[str] = None, - **kwargs: Any, - ) -> UnpinChatMessage: - """ - Shortcut for method :class:`aiogram.methods.unpin_chat_message.UnpinChatMessage` - will automatically fill method attributes: - - - :code:`chat_id` - - :code:`message_id` - - Use this method to remove a message from the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#unpinchatmessage - - :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be unpinned - :return: instance of method :class:`aiogram.methods.unpin_chat_message.UnpinChatMessage` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import UnpinChatMessage - - assert ( - self.chat is not None - ), "This method can be used only if chat is present in the message." - - return UnpinChatMessage( - chat_id=self.chat.id, - message_id=self.message_id, - business_connection_id=business_connection_id, - **kwargs, - ).as_(self._bot) - - def get_url( - self, force_private: bool = False, include_thread_id: bool = False - ) -> Optional[str]: - """ - Returns message URL. Cannot be used in private (one-to-one) chats. - If chat has a username, returns URL like https://t.me/username/message_id - Otherwise (or if {force_private} flag is set), returns https://t.me/c/shifted_chat_id/message_id - - :param force_private: if set, a private URL is returned even for a public chat - :param include_thread_id: if set, adds chat thread id to URL and returns like https://t.me/username/thread_id/message_id - :return: string with full message URL - """ - if self.chat.type in ("private", "group"): - return None - - chat_value = ( - f"c/{self.chat.shifted_id}" - if not self.chat.username or force_private - else self.chat.username - ) - - message_id_value = ( - f"{self.message_thread_id}/{self.message_id}" - if include_thread_id and self.message_thread_id and self.is_topic_message - else f"{self.message_id}" - ) - - return f"https://t.me/{chat_value}/{message_id_value}" - - def react( - self, - reaction: Optional[ - List[Union[ReactionTypeEmoji, ReactionTypeCustomEmoji, ReactionTypePaid]] - ] = None, - is_big: Optional[bool] = None, - **kwargs: Any, - ) -> SetMessageReaction: - """ - Shortcut for method :class:`aiogram.methods.set_message_reaction.SetMessageReaction` - will automatically fill method attributes: - - - :code:`chat_id` - - :code:`message_id` - - Use this method to change the chosen reactions on a message. Service messages can't be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. Bots can't use paid reactions. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#setmessagereaction - - :param reaction: A JSON-serialized list of reaction types to set on the message. Currently, as non-premium users, bots can set up to one reaction per message. A custom emoji reaction can be used if it is either already present on the message or explicitly allowed by chat administrators. Paid reactions can't be used by bots. - :param is_big: Pass :code:`True` to set the reaction with a big animation - :return: instance of method :class:`aiogram.methods.set_message_reaction.SetMessageReaction` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import SetMessageReaction - - assert ( - self.chat is not None - ), "This method can be used only if chat is present in the message." - - return SetMessageReaction( - chat_id=self.chat.id, - message_id=self.message_id, - reaction=reaction, - is_big=is_big, - **kwargs, - ).as_(self._bot) - - def answer_paid_media( - self, - star_count: int, - media: List[Union[InputPaidMediaPhoto, InputPaidMediaVideo]], - caption: Optional[str] = None, - parse_mode: Optional[str] = None, - caption_entities: Optional[List[MessageEntity]] = None, - show_caption_above_media: Optional[bool] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[bool] = None, - reply_parameters: Optional[ReplyParameters] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - **kwargs: Any, - ) -> SendPaidMedia: - """ - Shortcut for method :class:`aiogram.methods.send_paid_media.SendPaidMedia` - will automatically fill method attributes: - - - :code:`chat_id` - - :code:`message_thread_id` - - :code:`business_connection_id` - - Use this method to send paid media. On success, the sent :class:`aiogram.types.message.Message` is returned. - - Source: https://core.telegram.org/bots/api#sendpaidmedia - - :param star_count: The number of Telegram Stars that must be paid to buy access to the media - :param media: A JSON-serialized array describing the media to be sent; up to 10 items - :param caption: Media caption, 0-1024 characters after entities parsing - :param parse_mode: Mode for parsing entities in the media caption. See `formatting options `_ for more details. - :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode* - :param show_caption_above_media: Pass :code:`True`, if the caption must be shown above the message media - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param reply_parameters: Description of the message to reply to - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user - :return: instance of method :class:`aiogram.methods.send_paid_media.SendPaidMedia` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import SendPaidMedia - - assert ( - self.chat is not None - ), "This method can be used only if chat is present in the message." - - return SendPaidMedia( - chat_id=self.chat.id, - message_thread_id=self.message_thread_id if self.is_topic_message else None, - business_connection_id=self.business_connection_id, - star_count=star_count, - media=media, - caption=caption, - parse_mode=parse_mode, - caption_entities=caption_entities, - show_caption_above_media=show_caption_above_media, - disable_notification=disable_notification, - protect_content=protect_content, - reply_parameters=reply_parameters, - reply_markup=reply_markup, - **kwargs, - ).as_(self._bot) - - def reply_paid_media( - self, - star_count: int, - media: List[Union[InputPaidMediaPhoto, InputPaidMediaVideo]], - caption: Optional[str] = None, - parse_mode: Optional[str] = None, - caption_entities: Optional[List[MessageEntity]] = None, - show_caption_above_media: Optional[bool] = None, - disable_notification: Optional[bool] = None, - protect_content: Optional[bool] = None, - reply_markup: Optional[ - Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] - ] = None, - **kwargs: Any, - ) -> SendPaidMedia: - """ - Shortcut for method :class:`aiogram.methods.send_paid_media.SendPaidMedia` - will automatically fill method attributes: - - - :code:`chat_id` - - :code:`message_thread_id` - - :code:`business_connection_id` - - :code:`reply_parameters` - - Use this method to send paid media. On success, the sent :class:`aiogram.types.message.Message` is returned. - - Source: https://core.telegram.org/bots/api#sendpaidmedia - - :param star_count: The number of Telegram Stars that must be paid to buy access to the media - :param media: A JSON-serialized array describing the media to be sent; up to 10 items - :param caption: Media caption, 0-1024 characters after entities parsing - :param parse_mode: Mode for parsing entities in the media caption. See `formatting options `_ for more details. - :param caption_entities: A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode* - :param show_caption_above_media: Pass :code:`True`, if the caption must be shown above the message media - :param disable_notification: Sends the message `silently `_. Users will receive a notification with no sound. - :param protect_content: Protects the contents of the sent message from forwarding and saving - :param reply_markup: Additional interface options. A JSON-serialized object for an `inline keyboard `_, `custom reply keyboard `_, instructions to remove a reply keyboard or to force a reply from the user - :return: instance of method :class:`aiogram.methods.send_paid_media.SendPaidMedia` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import SendPaidMedia - - assert ( - self.chat is not None - ), "This method can be used only if chat is present in the message." - - return SendPaidMedia( - chat_id=self.chat.id, - message_thread_id=self.message_thread_id if self.is_topic_message else None, - business_connection_id=self.business_connection_id, - reply_parameters=self.as_reply_parameters(), - star_count=star_count, - media=media, - caption=caption, - parse_mode=parse_mode, - caption_entities=caption_entities, - show_caption_above_media=show_caption_above_media, - disable_notification=disable_notification, - protect_content=protect_content, - reply_markup=reply_markup, - **kwargs, - ).as_(self._bot) diff --git a/env/Lib/site-packages/aiogram/types/message_auto_delete_timer_changed.py b/env/Lib/site-packages/aiogram/types/message_auto_delete_timer_changed.py deleted file mode 100644 index 8414a24..0000000 --- a/env/Lib/site-packages/aiogram/types/message_auto_delete_timer_changed.py +++ /dev/null @@ -1,31 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any - -from .base import TelegramObject - - -class MessageAutoDeleteTimerChanged(TelegramObject): - """ - This object represents a service message about a change in auto-delete timer settings. - - Source: https://core.telegram.org/bots/api#messageautodeletetimerchanged - """ - - message_auto_delete_time: int - """New auto-delete time for messages in the chat; in seconds""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, *, message_auto_delete_time: int, **__pydantic_kwargs: Any - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - message_auto_delete_time=message_auto_delete_time, **__pydantic_kwargs - ) diff --git a/env/Lib/site-packages/aiogram/types/message_entity.py b/env/Lib/site-packages/aiogram/types/message_entity.py deleted file mode 100644 index ee774b0..0000000 --- a/env/Lib/site-packages/aiogram/types/message_entity.py +++ /dev/null @@ -1,68 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Optional - -from ..utils.text_decorations import add_surrogates, remove_surrogates -from .base import MutableTelegramObject - -if TYPE_CHECKING: - from .user import User - - -class MessageEntity(MutableTelegramObject): - """ - This object represents one special entity in a text message. For example, hashtags, usernames, URLs, etc. - - Source: https://core.telegram.org/bots/api#messageentity - """ - - type: str - """Type of the entity. Currently, can be 'mention' (:code:`@username`), 'hashtag' (:code:`#hashtag`), 'cashtag' (:code:`$USD`), 'bot_command' (:code:`/start@jobs_bot`), 'url' (:code:`https://telegram.org`), 'email' (:code:`do-not-reply@telegram.org`), 'phone_number' (:code:`+1-212-555-0123`), 'bold' (**bold text**), 'italic' (*italic text*), 'underline' (underlined text), 'strikethrough' (strikethrough text), 'spoiler' (spoiler message), 'blockquote' (block quotation), 'expandable_blockquote' (collapsed-by-default block quotation), 'code' (monowidth string), 'pre' (monowidth block), 'text_link' (for clickable text URLs), 'text_mention' (for users `without usernames `_), 'custom_emoji' (for inline custom emoji stickers)""" - offset: int - """Offset in `UTF-16 code units `_ to the start of the entity""" - length: int - """Length of the entity in `UTF-16 code units `_""" - url: Optional[str] = None - """*Optional*. For 'text_link' only, URL that will be opened after user taps on the text""" - user: Optional[User] = None - """*Optional*. For 'text_mention' only, the mentioned user""" - language: Optional[str] = None - """*Optional*. For 'pre' only, the programming language of the entity text""" - custom_emoji_id: Optional[str] = None - """*Optional*. For 'custom_emoji' only, unique identifier of the custom emoji. Use :class:`aiogram.methods.get_custom_emoji_stickers.GetCustomEmojiStickers` to get full information about the sticker""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - type: str, - offset: int, - length: int, - url: Optional[str] = None, - user: Optional[User] = None, - language: Optional[str] = None, - custom_emoji_id: Optional[str] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - type=type, - offset=offset, - length=length, - url=url, - user=user, - language=language, - custom_emoji_id=custom_emoji_id, - **__pydantic_kwargs, - ) - - def extract_from(self, text: str) -> str: - return remove_surrogates( - add_surrogates(text)[self.offset * 2 : (self.offset + self.length) * 2] - ) diff --git a/env/Lib/site-packages/aiogram/types/message_id.py b/env/Lib/site-packages/aiogram/types/message_id.py deleted file mode 100644 index d50888f..0000000 --- a/env/Lib/site-packages/aiogram/types/message_id.py +++ /dev/null @@ -1,27 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any - -from .base import TelegramObject - - -class MessageId(TelegramObject): - """ - This object represents a unique message identifier. - - Source: https://core.telegram.org/bots/api#messageid - """ - - message_id: int - """Unique message identifier""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__(__pydantic__self__, *, message_id: int, **__pydantic_kwargs: Any) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(message_id=message_id, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/types/message_origin.py b/env/Lib/site-packages/aiogram/types/message_origin.py deleted file mode 100644 index 01f9977..0000000 --- a/env/Lib/site-packages/aiogram/types/message_origin.py +++ /dev/null @@ -1,14 +0,0 @@ -from aiogram.types import TelegramObject - - -class MessageOrigin(TelegramObject): - """ - This object describes the origin of a message. It can be one of - - - :class:`aiogram.types.message_origin_user.MessageOriginUser` - - :class:`aiogram.types.message_origin_hidden_user.MessageOriginHiddenUser` - - :class:`aiogram.types.message_origin_chat.MessageOriginChat` - - :class:`aiogram.types.message_origin_channel.MessageOriginChannel` - - Source: https://core.telegram.org/bots/api#messageorigin - """ diff --git a/env/Lib/site-packages/aiogram/types/message_origin_channel.py b/env/Lib/site-packages/aiogram/types/message_origin_channel.py deleted file mode 100644 index 9decfaf..0000000 --- a/env/Lib/site-packages/aiogram/types/message_origin_channel.py +++ /dev/null @@ -1,56 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Literal, Optional - -from ..enums import MessageOriginType -from .custom import DateTime -from .message_origin import MessageOrigin - -if TYPE_CHECKING: - from .chat import Chat - - -class MessageOriginChannel(MessageOrigin): - """ - The message was originally sent to a channel chat. - - Source: https://core.telegram.org/bots/api#messageoriginchannel - """ - - type: Literal[MessageOriginType.CHANNEL] = MessageOriginType.CHANNEL - """Type of the message origin, always 'channel'""" - date: DateTime - """Date the message was sent originally in Unix time""" - chat: Chat - """Channel chat to which the message was originally sent""" - message_id: int - """Unique message identifier inside the chat""" - author_signature: Optional[str] = None - """*Optional*. Signature of the original post author""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - type: Literal[MessageOriginType.CHANNEL] = MessageOriginType.CHANNEL, - date: DateTime, - chat: Chat, - message_id: int, - author_signature: Optional[str] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - type=type, - date=date, - chat=chat, - message_id=message_id, - author_signature=author_signature, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/message_origin_chat.py b/env/Lib/site-packages/aiogram/types/message_origin_chat.py deleted file mode 100644 index b1e5fb9..0000000 --- a/env/Lib/site-packages/aiogram/types/message_origin_chat.py +++ /dev/null @@ -1,52 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Literal, Optional - -from ..enums import MessageOriginType -from .custom import DateTime -from .message_origin import MessageOrigin - -if TYPE_CHECKING: - from .chat import Chat - - -class MessageOriginChat(MessageOrigin): - """ - The message was originally sent on behalf of a chat to a group chat. - - Source: https://core.telegram.org/bots/api#messageoriginchat - """ - - type: Literal[MessageOriginType.CHAT] = MessageOriginType.CHAT - """Type of the message origin, always 'chat'""" - date: DateTime - """Date the message was sent originally in Unix time""" - sender_chat: Chat - """Chat that sent the message originally""" - author_signature: Optional[str] = None - """*Optional*. For messages originally sent by an anonymous chat administrator, original message author signature""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - type: Literal[MessageOriginType.CHAT] = MessageOriginType.CHAT, - date: DateTime, - sender_chat: Chat, - author_signature: Optional[str] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - type=type, - date=date, - sender_chat=sender_chat, - author_signature=author_signature, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/message_origin_hidden_user.py b/env/Lib/site-packages/aiogram/types/message_origin_hidden_user.py deleted file mode 100644 index cd702f1..0000000 --- a/env/Lib/site-packages/aiogram/types/message_origin_hidden_user.py +++ /dev/null @@ -1,40 +0,0 @@ -from typing import TYPE_CHECKING, Any, Literal - -from ..enums import MessageOriginType -from .custom import DateTime -from .message_origin import MessageOrigin - - -class MessageOriginHiddenUser(MessageOrigin): - """ - The message was originally sent by an unknown user. - - Source: https://core.telegram.org/bots/api#messageoriginhiddenuser - """ - - type: Literal[MessageOriginType.HIDDEN_USER] = MessageOriginType.HIDDEN_USER - """Type of the message origin, always 'hidden_user'""" - date: DateTime - """Date the message was sent originally in Unix time""" - sender_user_name: str - """Name of the user that sent the message originally""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - type: Literal[MessageOriginType.HIDDEN_USER] = MessageOriginType.HIDDEN_USER, - date: DateTime, - sender_user_name: str, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - type=type, date=date, sender_user_name=sender_user_name, **__pydantic_kwargs - ) diff --git a/env/Lib/site-packages/aiogram/types/message_origin_user.py b/env/Lib/site-packages/aiogram/types/message_origin_user.py deleted file mode 100644 index d77ac7a..0000000 --- a/env/Lib/site-packages/aiogram/types/message_origin_user.py +++ /dev/null @@ -1,43 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Literal - -from ..enums import MessageOriginType -from .custom import DateTime -from .message_origin import MessageOrigin - -if TYPE_CHECKING: - from .user import User - - -class MessageOriginUser(MessageOrigin): - """ - The message was originally sent by a known user. - - Source: https://core.telegram.org/bots/api#messageoriginuser - """ - - type: Literal[MessageOriginType.USER] = MessageOriginType.USER - """Type of the message origin, always 'user'""" - date: DateTime - """Date the message was sent originally in Unix time""" - sender_user: User - """User that sent the message originally""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - type: Literal[MessageOriginType.USER] = MessageOriginType.USER, - date: DateTime, - sender_user: User, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(type=type, date=date, sender_user=sender_user, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/types/message_reaction_count_updated.py b/env/Lib/site-packages/aiogram/types/message_reaction_count_updated.py deleted file mode 100644 index e9d0f8b..0000000 --- a/env/Lib/site-packages/aiogram/types/message_reaction_count_updated.py +++ /dev/null @@ -1,52 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, List - -from .base import TelegramObject - -if TYPE_CHECKING: - from .chat import Chat - from .custom import DateTime - from .reaction_count import ReactionCount - - -class MessageReactionCountUpdated(TelegramObject): - """ - This object represents reaction changes on a message with anonymous reactions. - - Source: https://core.telegram.org/bots/api#messagereactioncountupdated - """ - - chat: Chat - """The chat containing the message""" - message_id: int - """Unique message identifier inside the chat""" - date: DateTime - """Date of the change in Unix time""" - reactions: List[ReactionCount] - """List of reactions that are present on the message""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - chat: Chat, - message_id: int, - date: DateTime, - reactions: List[ReactionCount], - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - chat=chat, - message_id=message_id, - date=date, - reactions=reactions, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/message_reaction_updated.py b/env/Lib/site-packages/aiogram/types/message_reaction_updated.py deleted file mode 100644 index 7831c77..0000000 --- a/env/Lib/site-packages/aiogram/types/message_reaction_updated.py +++ /dev/null @@ -1,71 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, List, Optional, Union - -from .base import TelegramObject - -if TYPE_CHECKING: - from .chat import Chat - from .custom import DateTime - from .reaction_type_custom_emoji import ReactionTypeCustomEmoji - from .reaction_type_emoji import ReactionTypeEmoji - from .reaction_type_paid import ReactionTypePaid - from .user import User - - -class MessageReactionUpdated(TelegramObject): - """ - This object represents a change of a reaction on a message performed by a user. - - Source: https://core.telegram.org/bots/api#messagereactionupdated - """ - - chat: Chat - """The chat containing the message the user reacted to""" - message_id: int - """Unique identifier of the message inside the chat""" - date: DateTime - """Date of the change in Unix time""" - old_reaction: List[Union[ReactionTypeEmoji, ReactionTypeCustomEmoji, ReactionTypePaid]] - """Previous list of reaction types that were set by the user""" - new_reaction: List[Union[ReactionTypeEmoji, ReactionTypeCustomEmoji, ReactionTypePaid]] - """New list of reaction types that have been set by the user""" - user: Optional[User] = None - """*Optional*. The user that changed the reaction, if the user isn't anonymous""" - actor_chat: Optional[Chat] = None - """*Optional*. The chat on behalf of which the reaction was changed, if the user is anonymous""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - chat: Chat, - message_id: int, - date: DateTime, - old_reaction: List[ - Union[ReactionTypeEmoji, ReactionTypeCustomEmoji, ReactionTypePaid] - ], - new_reaction: List[ - Union[ReactionTypeEmoji, ReactionTypeCustomEmoji, ReactionTypePaid] - ], - user: Optional[User] = None, - actor_chat: Optional[Chat] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - chat=chat, - message_id=message_id, - date=date, - old_reaction=old_reaction, - new_reaction=new_reaction, - user=user, - actor_chat=actor_chat, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/order_info.py b/env/Lib/site-packages/aiogram/types/order_info.py deleted file mode 100644 index 5d71f65..0000000 --- a/env/Lib/site-packages/aiogram/types/order_info.py +++ /dev/null @@ -1,50 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Optional - -from .base import TelegramObject - -if TYPE_CHECKING: - from .shipping_address import ShippingAddress - - -class OrderInfo(TelegramObject): - """ - This object represents information about an order. - - Source: https://core.telegram.org/bots/api#orderinfo - """ - - name: Optional[str] = None - """*Optional*. User name""" - phone_number: Optional[str] = None - """*Optional*. User's phone number""" - email: Optional[str] = None - """*Optional*. User email""" - shipping_address: Optional[ShippingAddress] = None - """*Optional*. User shipping address""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - name: Optional[str] = None, - phone_number: Optional[str] = None, - email: Optional[str] = None, - shipping_address: Optional[ShippingAddress] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - name=name, - phone_number=phone_number, - email=email, - shipping_address=shipping_address, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/paid_media.py b/env/Lib/site-packages/aiogram/types/paid_media.py deleted file mode 100644 index d17c44d..0000000 --- a/env/Lib/site-packages/aiogram/types/paid_media.py +++ /dev/null @@ -1,13 +0,0 @@ -from .base import TelegramObject - - -class PaidMedia(TelegramObject): - """ - This object describes paid media. Currently, it can be one of - - - :class:`aiogram.types.paid_media_preview.PaidMediaPreview` - - :class:`aiogram.types.paid_media_photo.PaidMediaPhoto` - - :class:`aiogram.types.paid_media_video.PaidMediaVideo` - - Source: https://core.telegram.org/bots/api#paidmedia - """ diff --git a/env/Lib/site-packages/aiogram/types/paid_media_info.py b/env/Lib/site-packages/aiogram/types/paid_media_info.py deleted file mode 100644 index db5bbf0..0000000 --- a/env/Lib/site-packages/aiogram/types/paid_media_info.py +++ /dev/null @@ -1,40 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, List, Union - -from .base import TelegramObject - -if TYPE_CHECKING: - from .paid_media_photo import PaidMediaPhoto - from .paid_media_preview import PaidMediaPreview - from .paid_media_video import PaidMediaVideo - - -class PaidMediaInfo(TelegramObject): - """ - Describes the paid media added to a message. - - Source: https://core.telegram.org/bots/api#paidmediainfo - """ - - star_count: int - """The number of Telegram Stars that must be paid to buy access to the media""" - paid_media: List[Union[PaidMediaPreview, PaidMediaPhoto, PaidMediaVideo]] - """Information about the paid media""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - star_count: int, - paid_media: List[Union[PaidMediaPreview, PaidMediaPhoto, PaidMediaVideo]], - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(star_count=star_count, paid_media=paid_media, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/types/paid_media_photo.py b/env/Lib/site-packages/aiogram/types/paid_media_photo.py deleted file mode 100644 index 71c2e10..0000000 --- a/env/Lib/site-packages/aiogram/types/paid_media_photo.py +++ /dev/null @@ -1,39 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, List, Literal - -from ..enums import PaidMediaType -from .paid_media import PaidMedia - -if TYPE_CHECKING: - from .photo_size import PhotoSize - - -class PaidMediaPhoto(PaidMedia): - """ - The paid media is a photo. - - Source: https://core.telegram.org/bots/api#paidmediaphoto - """ - - type: Literal[PaidMediaType.PHOTO] = PaidMediaType.PHOTO - """Type of the paid media, always 'photo'""" - photo: List[PhotoSize] - """The photo""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - type: Literal[PaidMediaType.PHOTO] = PaidMediaType.PHOTO, - photo: List[PhotoSize], - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(type=type, photo=photo, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/types/paid_media_preview.py b/env/Lib/site-packages/aiogram/types/paid_media_preview.py deleted file mode 100644 index 5054de2..0000000 --- a/env/Lib/site-packages/aiogram/types/paid_media_preview.py +++ /dev/null @@ -1,44 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Literal, Optional - -from ..enums import PaidMediaType -from .paid_media import PaidMedia - - -class PaidMediaPreview(PaidMedia): - """ - The paid media isn't available before the payment. - - Source: https://core.telegram.org/bots/api#paidmediapreview - """ - - type: Literal[PaidMediaType.PREVIEW] = PaidMediaType.PREVIEW - """Type of the paid media, always 'preview'""" - width: Optional[int] = None - """*Optional*. Media width as defined by the sender""" - height: Optional[int] = None - """*Optional*. Media height as defined by the sender""" - duration: Optional[int] = None - """*Optional*. Duration of the media in seconds as defined by the sender""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - type: Literal[PaidMediaType.PREVIEW] = PaidMediaType.PREVIEW, - width: Optional[int] = None, - height: Optional[int] = None, - duration: Optional[int] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - type=type, width=width, height=height, duration=duration, **__pydantic_kwargs - ) diff --git a/env/Lib/site-packages/aiogram/types/paid_media_video.py b/env/Lib/site-packages/aiogram/types/paid_media_video.py deleted file mode 100644 index 28affbb..0000000 --- a/env/Lib/site-packages/aiogram/types/paid_media_video.py +++ /dev/null @@ -1,39 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Literal - -from ..enums import PaidMediaType -from .paid_media import PaidMedia - -if TYPE_CHECKING: - from .video import Video - - -class PaidMediaVideo(PaidMedia): - """ - The paid media is a video. - - Source: https://core.telegram.org/bots/api#paidmediavideo - """ - - type: Literal[PaidMediaType.VIDEO] = PaidMediaType.VIDEO - """Type of the paid media, always 'video'""" - video: Video - """The video""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - type: Literal[PaidMediaType.VIDEO] = PaidMediaType.VIDEO, - video: Video, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(type=type, video=video, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/types/passport_data.py b/env/Lib/site-packages/aiogram/types/passport_data.py deleted file mode 100644 index d93af1f..0000000 --- a/env/Lib/site-packages/aiogram/types/passport_data.py +++ /dev/null @@ -1,39 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, List - -from .base import TelegramObject - -if TYPE_CHECKING: - from .encrypted_credentials import EncryptedCredentials - from .encrypted_passport_element import EncryptedPassportElement - - -class PassportData(TelegramObject): - """ - Describes Telegram Passport data shared with the bot by the user. - - Source: https://core.telegram.org/bots/api#passportdata - """ - - data: List[EncryptedPassportElement] - """Array with information about documents and other Telegram Passport elements that was shared with the bot""" - credentials: EncryptedCredentials - """Encrypted credentials required to decrypt the data""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - data: List[EncryptedPassportElement], - credentials: EncryptedCredentials, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(data=data, credentials=credentials, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/types/passport_element_error.py b/env/Lib/site-packages/aiogram/types/passport_element_error.py deleted file mode 100644 index 36a1db8..0000000 --- a/env/Lib/site-packages/aiogram/types/passport_element_error.py +++ /dev/null @@ -1,21 +0,0 @@ -from __future__ import annotations - -from .base import MutableTelegramObject - - -class PassportElementError(MutableTelegramObject): - """ - This object represents an error in the Telegram Passport element which was submitted that should be resolved by the user. It should be one of: - - - :class:`aiogram.types.passport_element_error_data_field.PassportElementErrorDataField` - - :class:`aiogram.types.passport_element_error_front_side.PassportElementErrorFrontSide` - - :class:`aiogram.types.passport_element_error_reverse_side.PassportElementErrorReverseSide` - - :class:`aiogram.types.passport_element_error_selfie.PassportElementErrorSelfie` - - :class:`aiogram.types.passport_element_error_file.PassportElementErrorFile` - - :class:`aiogram.types.passport_element_error_files.PassportElementErrorFiles` - - :class:`aiogram.types.passport_element_error_translation_file.PassportElementErrorTranslationFile` - - :class:`aiogram.types.passport_element_error_translation_files.PassportElementErrorTranslationFiles` - - :class:`aiogram.types.passport_element_error_unspecified.PassportElementErrorUnspecified` - - Source: https://core.telegram.org/bots/api#passportelementerror - """ diff --git a/env/Lib/site-packages/aiogram/types/passport_element_error_data_field.py b/env/Lib/site-packages/aiogram/types/passport_element_error_data_field.py deleted file mode 100644 index 3bf2bb2..0000000 --- a/env/Lib/site-packages/aiogram/types/passport_element_error_data_field.py +++ /dev/null @@ -1,52 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Literal - -from ..enums import PassportElementErrorType -from .passport_element_error import PassportElementError - - -class PassportElementErrorDataField(PassportElementError): - """ - 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. - - Source: https://core.telegram.org/bots/api#passportelementerrordatafield - """ - - source: Literal[PassportElementErrorType.DATA] = PassportElementErrorType.DATA - """Error source, must be *data*""" - type: str - """The section of the user's Telegram Passport which has the error, one of 'personal_details', 'passport', 'driver_license', 'identity_card', 'internal_passport', 'address'""" - field_name: str - """Name of the data field which has the error""" - data_hash: str - """Base64-encoded data hash""" - message: str - """Error message""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - source: Literal[PassportElementErrorType.DATA] = PassportElementErrorType.DATA, - type: str, - field_name: str, - data_hash: str, - message: str, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - source=source, - type=type, - field_name=field_name, - data_hash=data_hash, - message=message, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/passport_element_error_file.py b/env/Lib/site-packages/aiogram/types/passport_element_error_file.py deleted file mode 100644 index 8bc40b3..0000000 --- a/env/Lib/site-packages/aiogram/types/passport_element_error_file.py +++ /dev/null @@ -1,44 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Literal - -from ..enums import PassportElementErrorType -from .passport_element_error import PassportElementError - - -class PassportElementErrorFile(PassportElementError): - """ - Represents an issue with a document scan. The error is considered resolved when the file with the document scan changes. - - Source: https://core.telegram.org/bots/api#passportelementerrorfile - """ - - source: Literal[PassportElementErrorType.FILE] = PassportElementErrorType.FILE - """Error source, must be *file*""" - type: str - """The section of the user's Telegram Passport which has the issue, one of 'utility_bill', 'bank_statement', 'rental_agreement', 'passport_registration', 'temporary_registration'""" - file_hash: str - """Base64-encoded file hash""" - message: str - """Error message""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - source: Literal[PassportElementErrorType.FILE] = PassportElementErrorType.FILE, - type: str, - file_hash: str, - message: str, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - source=source, type=type, file_hash=file_hash, message=message, **__pydantic_kwargs - ) diff --git a/env/Lib/site-packages/aiogram/types/passport_element_error_files.py b/env/Lib/site-packages/aiogram/types/passport_element_error_files.py deleted file mode 100644 index 3639da2..0000000 --- a/env/Lib/site-packages/aiogram/types/passport_element_error_files.py +++ /dev/null @@ -1,48 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, List, Literal - -from ..enums import PassportElementErrorType -from .passport_element_error import PassportElementError - - -class PassportElementErrorFiles(PassportElementError): - """ - Represents an issue with a list of scans. The error is considered resolved when the list of files containing the scans changes. - - Source: https://core.telegram.org/bots/api#passportelementerrorfiles - """ - - source: Literal[PassportElementErrorType.FILES] = PassportElementErrorType.FILES - """Error source, must be *files*""" - type: str - """The section of the user's Telegram Passport which has the issue, one of 'utility_bill', 'bank_statement', 'rental_agreement', 'passport_registration', 'temporary_registration'""" - file_hashes: List[str] - """List of base64-encoded file hashes""" - message: str - """Error message""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - source: Literal[PassportElementErrorType.FILES] = PassportElementErrorType.FILES, - type: str, - file_hashes: List[str], - message: str, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - source=source, - type=type, - file_hashes=file_hashes, - message=message, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/passport_element_error_front_side.py b/env/Lib/site-packages/aiogram/types/passport_element_error_front_side.py deleted file mode 100644 index 86315f2..0000000 --- a/env/Lib/site-packages/aiogram/types/passport_element_error_front_side.py +++ /dev/null @@ -1,46 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Literal - -from ..enums import PassportElementErrorType -from .passport_element_error import PassportElementError - - -class PassportElementErrorFrontSide(PassportElementError): - """ - 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. - - Source: https://core.telegram.org/bots/api#passportelementerrorfrontside - """ - - source: Literal[PassportElementErrorType.FRONT_SIDE] = PassportElementErrorType.FRONT_SIDE - """Error source, must be *front_side*""" - type: str - """The section of the user's Telegram Passport which has the issue, one of 'passport', 'driver_license', 'identity_card', 'internal_passport'""" - file_hash: str - """Base64-encoded hash of the file with the front side of the document""" - message: str - """Error message""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - source: Literal[ - PassportElementErrorType.FRONT_SIDE - ] = PassportElementErrorType.FRONT_SIDE, - type: str, - file_hash: str, - message: str, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - source=source, type=type, file_hash=file_hash, message=message, **__pydantic_kwargs - ) diff --git a/env/Lib/site-packages/aiogram/types/passport_element_error_reverse_side.py b/env/Lib/site-packages/aiogram/types/passport_element_error_reverse_side.py deleted file mode 100644 index ecb400f..0000000 --- a/env/Lib/site-packages/aiogram/types/passport_element_error_reverse_side.py +++ /dev/null @@ -1,46 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Literal - -from ..enums import PassportElementErrorType -from .passport_element_error import PassportElementError - - -class PassportElementErrorReverseSide(PassportElementError): - """ - 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. - - Source: https://core.telegram.org/bots/api#passportelementerrorreverseside - """ - - source: Literal[PassportElementErrorType.REVERSE_SIDE] = PassportElementErrorType.REVERSE_SIDE - """Error source, must be *reverse_side*""" - type: str - """The section of the user's Telegram Passport which has the issue, one of 'driver_license', 'identity_card'""" - file_hash: str - """Base64-encoded hash of the file with the reverse side of the document""" - message: str - """Error message""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - source: Literal[ - PassportElementErrorType.REVERSE_SIDE - ] = PassportElementErrorType.REVERSE_SIDE, - type: str, - file_hash: str, - message: str, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - source=source, type=type, file_hash=file_hash, message=message, **__pydantic_kwargs - ) diff --git a/env/Lib/site-packages/aiogram/types/passport_element_error_selfie.py b/env/Lib/site-packages/aiogram/types/passport_element_error_selfie.py deleted file mode 100644 index bff6dd6..0000000 --- a/env/Lib/site-packages/aiogram/types/passport_element_error_selfie.py +++ /dev/null @@ -1,44 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Literal - -from ..enums import PassportElementErrorType -from .passport_element_error import PassportElementError - - -class PassportElementErrorSelfie(PassportElementError): - """ - Represents an issue with the selfie with a document. The error is considered resolved when the file with the selfie changes. - - Source: https://core.telegram.org/bots/api#passportelementerrorselfie - """ - - source: Literal[PassportElementErrorType.SELFIE] = PassportElementErrorType.SELFIE - """Error source, must be *selfie*""" - type: str - """The section of the user's Telegram Passport which has the issue, one of 'passport', 'driver_license', 'identity_card', 'internal_passport'""" - file_hash: str - """Base64-encoded hash of the file with the selfie""" - message: str - """Error message""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - source: Literal[PassportElementErrorType.SELFIE] = PassportElementErrorType.SELFIE, - type: str, - file_hash: str, - message: str, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - source=source, type=type, file_hash=file_hash, message=message, **__pydantic_kwargs - ) diff --git a/env/Lib/site-packages/aiogram/types/passport_element_error_translation_file.py b/env/Lib/site-packages/aiogram/types/passport_element_error_translation_file.py deleted file mode 100644 index 29689ca..0000000 --- a/env/Lib/site-packages/aiogram/types/passport_element_error_translation_file.py +++ /dev/null @@ -1,48 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Literal - -from ..enums import PassportElementErrorType -from .passport_element_error import PassportElementError - - -class PassportElementErrorTranslationFile(PassportElementError): - """ - Represents an issue with one of the files that constitute the translation of a document. The error is considered resolved when the file changes. - - Source: https://core.telegram.org/bots/api#passportelementerrortranslationfile - """ - - source: Literal[PassportElementErrorType.TRANSLATION_FILE] = ( - PassportElementErrorType.TRANSLATION_FILE - ) - """Error source, must be *translation_file*""" - type: str - """Type of element of the user's Telegram Passport which has the issue, one of 'passport', 'driver_license', 'identity_card', 'internal_passport', 'utility_bill', 'bank_statement', 'rental_agreement', 'passport_registration', 'temporary_registration'""" - file_hash: str - """Base64-encoded file hash""" - message: str - """Error message""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - source: Literal[ - PassportElementErrorType.TRANSLATION_FILE - ] = PassportElementErrorType.TRANSLATION_FILE, - type: str, - file_hash: str, - message: str, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - source=source, type=type, file_hash=file_hash, message=message, **__pydantic_kwargs - ) diff --git a/env/Lib/site-packages/aiogram/types/passport_element_error_translation_files.py b/env/Lib/site-packages/aiogram/types/passport_element_error_translation_files.py deleted file mode 100644 index 65e9940..0000000 --- a/env/Lib/site-packages/aiogram/types/passport_element_error_translation_files.py +++ /dev/null @@ -1,52 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, List, Literal - -from ..enums import PassportElementErrorType -from .passport_element_error import PassportElementError - - -class PassportElementErrorTranslationFiles(PassportElementError): - """ - Represents an issue with the translated version of a document. The error is considered resolved when a file with the document translation change. - - Source: https://core.telegram.org/bots/api#passportelementerrortranslationfiles - """ - - source: Literal[PassportElementErrorType.TRANSLATION_FILES] = ( - PassportElementErrorType.TRANSLATION_FILES - ) - """Error source, must be *translation_files*""" - type: str - """Type of element of the user's Telegram Passport which has the issue, one of 'passport', 'driver_license', 'identity_card', 'internal_passport', 'utility_bill', 'bank_statement', 'rental_agreement', 'passport_registration', 'temporary_registration'""" - file_hashes: List[str] - """List of base64-encoded file hashes""" - message: str - """Error message""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - source: Literal[ - PassportElementErrorType.TRANSLATION_FILES - ] = PassportElementErrorType.TRANSLATION_FILES, - type: str, - file_hashes: List[str], - message: str, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - source=source, - type=type, - file_hashes=file_hashes, - message=message, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/passport_element_error_unspecified.py b/env/Lib/site-packages/aiogram/types/passport_element_error_unspecified.py deleted file mode 100644 index 3575d35..0000000 --- a/env/Lib/site-packages/aiogram/types/passport_element_error_unspecified.py +++ /dev/null @@ -1,50 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Literal - -from ..enums import PassportElementErrorType -from .passport_element_error import PassportElementError - - -class PassportElementErrorUnspecified(PassportElementError): - """ - Represents an issue in an unspecified place. The error is considered resolved when new data is added. - - Source: https://core.telegram.org/bots/api#passportelementerrorunspecified - """ - - source: Literal[PassportElementErrorType.UNSPECIFIED] = PassportElementErrorType.UNSPECIFIED - """Error source, must be *unspecified*""" - type: str - """Type of element of the user's Telegram Passport which has the issue""" - element_hash: str - """Base64-encoded element hash""" - message: str - """Error message""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - source: Literal[ - PassportElementErrorType.UNSPECIFIED - ] = PassportElementErrorType.UNSPECIFIED, - type: str, - element_hash: str, - message: str, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - source=source, - type=type, - element_hash=element_hash, - message=message, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/passport_file.py b/env/Lib/site-packages/aiogram/types/passport_file.py deleted file mode 100644 index d95da61..0000000 --- a/env/Lib/site-packages/aiogram/types/passport_file.py +++ /dev/null @@ -1,48 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any - -from .base import TelegramObject -from .custom import DateTime - - -class PassportFile(TelegramObject): - """ - This object represents a file uploaded to Telegram Passport. Currently all Telegram Passport files are in JPEG format when decrypted and don't exceed 10MB. - - Source: https://core.telegram.org/bots/api#passportfile - """ - - file_id: str - """Identifier for this file, which can be used to download or reuse the file""" - file_unique_id: str - """Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.""" - file_size: int - """File size in bytes""" - file_date: DateTime - """Unix time when the file was uploaded""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - file_id: str, - file_unique_id: str, - file_size: int, - file_date: DateTime, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - file_id=file_id, - file_unique_id=file_unique_id, - file_size=file_size, - file_date=file_date, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/photo_size.py b/env/Lib/site-packages/aiogram/types/photo_size.py deleted file mode 100644 index 9a2ccbe..0000000 --- a/env/Lib/site-packages/aiogram/types/photo_size.py +++ /dev/null @@ -1,51 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Optional - -from .base import TelegramObject - - -class PhotoSize(TelegramObject): - """ - This object represents one size of a photo or a `file `_ / :class:`aiogram.methods.sticker.Sticker` thumbnail. - - Source: https://core.telegram.org/bots/api#photosize - """ - - file_id: str - """Identifier for this file, which can be used to download or reuse the file""" - file_unique_id: str - """Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.""" - width: int - """Photo width""" - height: int - """Photo height""" - file_size: Optional[int] = None - """*Optional*. File size in bytes""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - file_id: str, - file_unique_id: str, - width: int, - height: int, - file_size: Optional[int] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - file_id=file_id, - file_unique_id=file_unique_id, - width=width, - height=height, - file_size=file_size, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/poll.py b/env/Lib/site-packages/aiogram/types/poll.py deleted file mode 100644 index 5805224..0000000 --- a/env/Lib/site-packages/aiogram/types/poll.py +++ /dev/null @@ -1,92 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, List, Optional - -from .base import TelegramObject -from .custom import DateTime - -if TYPE_CHECKING: - from .message_entity import MessageEntity - from .poll_option import PollOption - - -class Poll(TelegramObject): - """ - This object contains information about a poll. - - Source: https://core.telegram.org/bots/api#poll - """ - - id: str - """Unique poll identifier""" - question: str - """Poll question, 1-300 characters""" - options: List[PollOption] - """List of poll options""" - total_voter_count: int - """Total number of users that voted in the poll""" - is_closed: bool - """:code:`True`, if the poll is closed""" - is_anonymous: bool - """:code:`True`, if the poll is anonymous""" - type: str - """Poll type, currently can be 'regular' or 'quiz'""" - allows_multiple_answers: bool - """:code:`True`, if the poll allows multiple answers""" - question_entities: Optional[List[MessageEntity]] = None - """*Optional*. Special entities that appear in the *question*. Currently, only custom emoji entities are allowed in poll questions""" - correct_option_id: Optional[int] = None - """*Optional*. 0-based identifier of the correct answer option. Available only for polls in the quiz mode, which are closed, or was sent (not forwarded) by the bot or to the private chat with the bot.""" - explanation: Optional[str] = None - """*Optional*. Text that is shown when a user chooses an incorrect answer or taps on the lamp icon in a quiz-style poll, 0-200 characters""" - explanation_entities: Optional[List[MessageEntity]] = None - """*Optional*. Special entities like usernames, URLs, bot commands, etc. that appear in the *explanation*""" - open_period: Optional[int] = None - """*Optional*. Amount of time in seconds the poll will be active after creation""" - close_date: Optional[DateTime] = None - """*Optional*. Point in time (Unix timestamp) when the poll will be automatically closed""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - id: str, - question: str, - options: List[PollOption], - total_voter_count: int, - is_closed: bool, - is_anonymous: bool, - type: str, - allows_multiple_answers: bool, - question_entities: Optional[List[MessageEntity]] = None, - correct_option_id: Optional[int] = None, - explanation: Optional[str] = None, - explanation_entities: Optional[List[MessageEntity]] = None, - open_period: Optional[int] = None, - close_date: Optional[DateTime] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - id=id, - question=question, - options=options, - total_voter_count=total_voter_count, - is_closed=is_closed, - is_anonymous=is_anonymous, - type=type, - allows_multiple_answers=allows_multiple_answers, - question_entities=question_entities, - correct_option_id=correct_option_id, - explanation=explanation, - explanation_entities=explanation_entities, - open_period=open_period, - close_date=close_date, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/poll_answer.py b/env/Lib/site-packages/aiogram/types/poll_answer.py deleted file mode 100644 index c12be34..0000000 --- a/env/Lib/site-packages/aiogram/types/poll_answer.py +++ /dev/null @@ -1,51 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, List, Optional - -from .base import TelegramObject - -if TYPE_CHECKING: - from .chat import Chat - from .user import User - - -class PollAnswer(TelegramObject): - """ - This object represents an answer of a user in a non-anonymous poll. - - Source: https://core.telegram.org/bots/api#pollanswer - """ - - poll_id: str - """Unique poll identifier""" - option_ids: List[int] - """0-based identifiers of chosen answer options. May be empty if the vote was retracted.""" - voter_chat: Optional[Chat] = None - """*Optional*. The chat that changed the answer to the poll, if the voter is anonymous""" - user: Optional[User] = None - """*Optional*. The user that changed the answer to the poll, if the voter isn't anonymous""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - poll_id: str, - option_ids: List[int], - voter_chat: Optional[Chat] = None, - user: Optional[User] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - poll_id=poll_id, - option_ids=option_ids, - voter_chat=voter_chat, - user=user, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/poll_option.py b/env/Lib/site-packages/aiogram/types/poll_option.py deleted file mode 100644 index f380934..0000000 --- a/env/Lib/site-packages/aiogram/types/poll_option.py +++ /dev/null @@ -1,46 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, List, Optional - -from .base import TelegramObject - -if TYPE_CHECKING: - from .message_entity import MessageEntity - - -class PollOption(TelegramObject): - """ - This object contains information about one answer option in a poll. - - Source: https://core.telegram.org/bots/api#polloption - """ - - text: str - """Option text, 1-100 characters""" - voter_count: int - """Number of users that voted for this option""" - text_entities: Optional[List[MessageEntity]] = None - """*Optional*. Special entities that appear in the option *text*. Currently, only custom emoji entities are allowed in poll option texts""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - text: str, - voter_count: int, - text_entities: Optional[List[MessageEntity]] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - text=text, - voter_count=voter_count, - text_entities=text_entities, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/pre_checkout_query.py b/env/Lib/site-packages/aiogram/types/pre_checkout_query.py deleted file mode 100644 index 41bda8c..0000000 --- a/env/Lib/site-packages/aiogram/types/pre_checkout_query.py +++ /dev/null @@ -1,98 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Optional - -from pydantic import Field - -from .base import TelegramObject - -if TYPE_CHECKING: - from ..methods import AnswerPreCheckoutQuery - from .order_info import OrderInfo - from .user import User - - -class PreCheckoutQuery(TelegramObject): - """ - This object contains information about an incoming pre-checkout query. - - Source: https://core.telegram.org/bots/api#precheckoutquery - """ - - id: str - """Unique query identifier""" - from_user: User = Field(..., alias="from") - """User who sent the query""" - currency: str - """Three-letter ISO 4217 `currency `_ code, or 'XTR' for payments in `Telegram Stars `_""" - total_amount: int - """Total price in the *smallest units* of the currency (integer, **not** float/double). For example, for a price of :code:`US$ 1.45` pass :code:`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).""" - invoice_payload: str - """Bot-specified invoice payload""" - shipping_option_id: Optional[str] = None - """*Optional*. Identifier of the shipping option chosen by the user""" - order_info: Optional[OrderInfo] = None - """*Optional*. Order information provided by the user""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - id: str, - from_user: User, - currency: str, - total_amount: int, - invoice_payload: str, - shipping_option_id: Optional[str] = None, - order_info: Optional[OrderInfo] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - id=id, - from_user=from_user, - currency=currency, - total_amount=total_amount, - invoice_payload=invoice_payload, - shipping_option_id=shipping_option_id, - order_info=order_info, - **__pydantic_kwargs, - ) - - def answer( - self, - ok: bool, - error_message: Optional[str] = None, - **kwargs: Any, - ) -> AnswerPreCheckoutQuery: - """ - Shortcut for method :class:`aiogram.methods.answer_pre_checkout_query.AnswerPreCheckoutQuery` - will automatically fill method attributes: - - - :code:`pre_checkout_query_id` - - Once the user has confirmed their payment and shipping details, the Bot API sends the final confirmation in the form of an :class:`aiogram.types.update.Update` with the field *pre_checkout_query*. Use this method to respond to such pre-checkout queries. On success, :code:`True` is returned. **Note:** The Bot API must receive an answer within 10 seconds after the pre-checkout query was sent. - - Source: https://core.telegram.org/bots/api#answerprecheckoutquery - - :param ok: Specify :code:`True` if everything is alright (goods are available, etc.) and the bot is ready to proceed with the order. Use :code:`False` if there are any problems. - :param error_message: Required if *ok* is :code:`False`. 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. - :return: instance of method :class:`aiogram.methods.answer_pre_checkout_query.AnswerPreCheckoutQuery` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import AnswerPreCheckoutQuery - - return AnswerPreCheckoutQuery( - pre_checkout_query_id=self.id, - ok=ok, - error_message=error_message, - **kwargs, - ).as_(self._bot) diff --git a/env/Lib/site-packages/aiogram/types/proximity_alert_triggered.py b/env/Lib/site-packages/aiogram/types/proximity_alert_triggered.py deleted file mode 100644 index f5a30c6..0000000 --- a/env/Lib/site-packages/aiogram/types/proximity_alert_triggered.py +++ /dev/null @@ -1,43 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any - -from .base import TelegramObject - -if TYPE_CHECKING: - from .user import User - - -class ProximityAlertTriggered(TelegramObject): - """ - This object represents the content of a service message, sent whenever a user in the chat triggers a proximity alert set by another user. - - Source: https://core.telegram.org/bots/api#proximityalerttriggered - """ - - traveler: User - """User that triggered the alert""" - watcher: User - """User that set the alert""" - distance: int - """The distance between the users""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - traveler: User, - watcher: User, - distance: int, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - traveler=traveler, watcher=watcher, distance=distance, **__pydantic_kwargs - ) diff --git a/env/Lib/site-packages/aiogram/types/reaction_count.py b/env/Lib/site-packages/aiogram/types/reaction_count.py deleted file mode 100644 index e4ee167..0000000 --- a/env/Lib/site-packages/aiogram/types/reaction_count.py +++ /dev/null @@ -1,40 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Union - -from .base import TelegramObject - -if TYPE_CHECKING: - from .reaction_type_custom_emoji import ReactionTypeCustomEmoji - from .reaction_type_emoji import ReactionTypeEmoji - from .reaction_type_paid import ReactionTypePaid - - -class ReactionCount(TelegramObject): - """ - Represents a reaction added to a message along with the number of times it was added. - - Source: https://core.telegram.org/bots/api#reactioncount - """ - - type: Union[ReactionTypeEmoji, ReactionTypeCustomEmoji, ReactionTypePaid] - """Type of the reaction""" - total_count: int - """Number of times the reaction was added""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - type: Union[ReactionTypeEmoji, ReactionTypeCustomEmoji, ReactionTypePaid], - total_count: int, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(type=type, total_count=total_count, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/types/reaction_type.py b/env/Lib/site-packages/aiogram/types/reaction_type.py deleted file mode 100644 index 335d35d..0000000 --- a/env/Lib/site-packages/aiogram/types/reaction_type.py +++ /dev/null @@ -1,13 +0,0 @@ -from .base import TelegramObject - - -class ReactionType(TelegramObject): - """ - This object describes the type of a reaction. Currently, it can be one of - - - :class:`aiogram.types.reaction_type_emoji.ReactionTypeEmoji` - - :class:`aiogram.types.reaction_type_custom_emoji.ReactionTypeCustomEmoji` - - :class:`aiogram.types.reaction_type_paid.ReactionTypePaid` - - Source: https://core.telegram.org/bots/api#reactiontype - """ diff --git a/env/Lib/site-packages/aiogram/types/reaction_type_custom_emoji.py b/env/Lib/site-packages/aiogram/types/reaction_type_custom_emoji.py deleted file mode 100644 index c86ec5e..0000000 --- a/env/Lib/site-packages/aiogram/types/reaction_type_custom_emoji.py +++ /dev/null @@ -1,34 +0,0 @@ -from typing import TYPE_CHECKING, Any, Literal - -from ..enums import ReactionTypeType -from .reaction_type import ReactionType - - -class ReactionTypeCustomEmoji(ReactionType): - """ - The reaction is based on a custom emoji. - - Source: https://core.telegram.org/bots/api#reactiontypecustomemoji - """ - - type: Literal[ReactionTypeType.CUSTOM_EMOJI] = ReactionTypeType.CUSTOM_EMOJI - """Type of the reaction, always 'custom_emoji'""" - custom_emoji_id: str - """Custom emoji identifier""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - type: Literal[ReactionTypeType.CUSTOM_EMOJI] = ReactionTypeType.CUSTOM_EMOJI, - custom_emoji_id: str, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(type=type, custom_emoji_id=custom_emoji_id, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/types/reaction_type_emoji.py b/env/Lib/site-packages/aiogram/types/reaction_type_emoji.py deleted file mode 100644 index a209fe2..0000000 --- a/env/Lib/site-packages/aiogram/types/reaction_type_emoji.py +++ /dev/null @@ -1,34 +0,0 @@ -from typing import TYPE_CHECKING, Any, Literal - -from ..enums import ReactionTypeType -from .reaction_type import ReactionType - - -class ReactionTypeEmoji(ReactionType): - """ - The reaction is based on an emoji. - - Source: https://core.telegram.org/bots/api#reactiontypeemoji - """ - - type: Literal[ReactionTypeType.EMOJI] = ReactionTypeType.EMOJI - """Type of the reaction, always 'emoji'""" - emoji: str - """Reaction emoji. Currently, it can be one of "👍", "👎", "❤", "🔥", "🥰", "👏", "😁", "🤔", "🤯", "😱", "🤬", "😢", "🎉", "🤩", "🤮", "💩", "🙏", "👌", "🕊", "🤡", "🥱", "🥴", "😍", "🐳", "❤‍🔥", "🌚", "🌭", "💯", "🤣", "⚡", "🍌", "🏆", "💔", "🤨", "😐", "🍓", "🍾", "💋", "🖕", "😈", "😴", "😭", "🤓", "👻", "👨‍💻", "👀", "🎃", "🙈", "😇", "😨", "🤝", "✍", "🤗", "🫡", "🎅", "🎄", "☃", "💅", "🤪", "🗿", "🆒", "💘", "🙉", "🦄", "😘", "💊", "🙊", "😎", "👾", "🤷‍♂", "🤷", "🤷‍♀", "😡" """ - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - type: Literal[ReactionTypeType.EMOJI] = ReactionTypeType.EMOJI, - emoji: str, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(type=type, emoji=emoji, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/types/reaction_type_paid.py b/env/Lib/site-packages/aiogram/types/reaction_type_paid.py deleted file mode 100644 index 8e95a83..0000000 --- a/env/Lib/site-packages/aiogram/types/reaction_type_paid.py +++ /dev/null @@ -1,28 +0,0 @@ -from typing import TYPE_CHECKING, Any, Literal - -from ..enums import ReactionTypeType -from .reaction_type import ReactionType - - -class ReactionTypePaid(ReactionType): - """ - The reaction is paid. - - Source: https://core.telegram.org/bots/api#reactiontypepaid - """ - - type: Literal["paid"] = "paid" - """Type of the reaction, always 'paid'""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, *, type: Literal["paid"] = "paid", **__pydantic_kwargs: Any - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(type=type, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/types/refunded_payment.py b/env/Lib/site-packages/aiogram/types/refunded_payment.py deleted file mode 100644 index 8b889dc..0000000 --- a/env/Lib/site-packages/aiogram/types/refunded_payment.py +++ /dev/null @@ -1,49 +0,0 @@ -from typing import TYPE_CHECKING, Any, Literal, Optional - -from .base import TelegramObject - - -class RefundedPayment(TelegramObject): - """ - This object contains basic information about a refunded payment. - - Source: https://core.telegram.org/bots/api#refundedpayment - """ - - currency: Literal["XTR"] = "XTR" - """Three-letter ISO 4217 `currency `_ code, or 'XTR' for payments in `Telegram Stars `_. Currently, always 'XTR'""" - total_amount: int - """Total refunded price in the *smallest units* of the currency (integer, **not** float/double). For example, for a price of :code:`US$ 1.45`, :code:`total_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).""" - invoice_payload: str - """Bot-specified invoice payload""" - telegram_payment_charge_id: str - """Telegram payment identifier""" - provider_payment_charge_id: Optional[str] = None - """*Optional*. Provider payment identifier""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - currency: Literal["XTR"] = "XTR", - total_amount: int, - invoice_payload: str, - telegram_payment_charge_id: str, - provider_payment_charge_id: Optional[str] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - currency=currency, - total_amount=total_amount, - invoice_payload=invoice_payload, - telegram_payment_charge_id=telegram_payment_charge_id, - provider_payment_charge_id=provider_payment_charge_id, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/reply_keyboard_markup.py b/env/Lib/site-packages/aiogram/types/reply_keyboard_markup.py deleted file mode 100644 index f3d6dab..0000000 --- a/env/Lib/site-packages/aiogram/types/reply_keyboard_markup.py +++ /dev/null @@ -1,58 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, List, Optional - -from .base import MutableTelegramObject - -if TYPE_CHECKING: - from .keyboard_button import KeyboardButton - - -class ReplyKeyboardMarkup(MutableTelegramObject): - """ - This object represents a `custom keyboard `_ with reply options (see `Introduction to bots `_ for details and examples). Not supported in channels and for messages sent on behalf of a Telegram Business account. - - Source: https://core.telegram.org/bots/api#replykeyboardmarkup - """ - - keyboard: List[List[KeyboardButton]] - """Array of button rows, each represented by an Array of :class:`aiogram.types.keyboard_button.KeyboardButton` objects""" - is_persistent: Optional[bool] = None - """*Optional*. Requests clients to always show the keyboard when the regular keyboard is hidden. Defaults to *false*, in which case the custom keyboard can be hidden and opened with a keyboard icon.""" - resize_keyboard: Optional[bool] = None - """*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). Defaults to *false*, in which case the custom keyboard is always of the same height as the app's standard keyboard.""" - one_time_keyboard: Optional[bool] = None - """*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. Defaults to *false*.""" - input_field_placeholder: Optional[str] = None - """*Optional*. The placeholder to be shown in the input field when the keyboard is active; 1-64 characters""" - selective: Optional[bool] = None - """*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 :class:`aiogram.types.message.Message` object; 2) if the bot's message is a reply to a message in the same chat and forum topic, sender of the original message.""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - keyboard: List[List[KeyboardButton]], - is_persistent: Optional[bool] = None, - resize_keyboard: Optional[bool] = None, - one_time_keyboard: Optional[bool] = None, - input_field_placeholder: Optional[str] = None, - selective: Optional[bool] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - keyboard=keyboard, - is_persistent=is_persistent, - resize_keyboard=resize_keyboard, - one_time_keyboard=one_time_keyboard, - input_field_placeholder=input_field_placeholder, - selective=selective, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/reply_keyboard_remove.py b/env/Lib/site-packages/aiogram/types/reply_keyboard_remove.py deleted file mode 100644 index 9c135a1..0000000 --- a/env/Lib/site-packages/aiogram/types/reply_keyboard_remove.py +++ /dev/null @@ -1,37 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Literal, Optional - -from .base import MutableTelegramObject - - -class ReplyKeyboardRemove(MutableTelegramObject): - """ - Upon receiving a message with this object, Telegram clients will remove the current custom keyboard and display the default letter-keyboard. By default, custom keyboards are displayed until a new keyboard is sent by a bot. An exception is made for one-time keyboards that are hidden immediately after the user presses a button (see :class:`aiogram.types.reply_keyboard_markup.ReplyKeyboardMarkup`). Not supported in channels and for messages sent on behalf of a Telegram Business account. - - Source: https://core.telegram.org/bots/api#replykeyboardremove - """ - - remove_keyboard: Literal[True] = True - """Requests clients to remove the custom keyboard (user will not be able to summon this keyboard; if you want to hide the keyboard from sight but keep it accessible, use *one_time_keyboard* in :class:`aiogram.types.reply_keyboard_markup.ReplyKeyboardMarkup`)""" - selective: Optional[bool] = None - """*Optional*. Use this parameter if you want to remove the keyboard for specific users only. Targets: 1) users that are @mentioned in the *text* of the :class:`aiogram.types.message.Message` object; 2) if the bot's message is a reply to a message in the same chat and forum topic, sender of the original message.""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - remove_keyboard: Literal[True] = True, - selective: Optional[bool] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - remove_keyboard=remove_keyboard, selective=selective, **__pydantic_kwargs - ) diff --git a/env/Lib/site-packages/aiogram/types/reply_parameters.py b/env/Lib/site-packages/aiogram/types/reply_parameters.py deleted file mode 100644 index 5b03fda..0000000 --- a/env/Lib/site-packages/aiogram/types/reply_parameters.py +++ /dev/null @@ -1,67 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, List, Optional, Union - -from ..client.default import Default -from .base import TelegramObject - -if TYPE_CHECKING: - from .message_entity import MessageEntity - - -class ReplyParameters(TelegramObject): - """ - Describes reply parameters for the message that is being sent. - - Source: https://core.telegram.org/bots/api#replyparameters - """ - - message_id: int - """Identifier of the message that will be replied to in the current chat, or in the chat *chat_id* if it is specified""" - chat_id: Optional[Union[int, str]] = None - """*Optional*. If the message to be replied to is from a different chat, unique identifier for the chat or username of the channel (in the format :code:`@channelusername`). Not supported for messages sent on behalf of a business account.""" - allow_sending_without_reply: Optional[Union[bool, Default]] = Default( - "allow_sending_without_reply" - ) - """*Optional*. Pass :code:`True` if the message should be sent even if the specified message to be replied to is not found. Always :code:`False` for replies in another chat or forum topic. Always :code:`True` for messages sent on behalf of a business account.""" - quote: Optional[str] = None - """*Optional*. Quoted part of the message to be replied to; 0-1024 characters after entities parsing. The quote must be an exact substring of the message to be replied to, including *bold*, *italic*, *underline*, *strikethrough*, *spoiler*, and *custom_emoji* entities. The message will fail to send if the quote isn't found in the original message.""" - quote_parse_mode: Optional[Union[str, Default]] = Default("parse_mode") - """*Optional*. Mode for parsing entities in the quote. See `formatting options `_ for more details.""" - quote_entities: Optional[List[MessageEntity]] = None - """*Optional*. A JSON-serialized list of special entities that appear in the quote. It can be specified instead of *quote_parse_mode*.""" - quote_position: Optional[int] = None - """*Optional*. Position of the quote in the original message in UTF-16 code units""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - message_id: int, - chat_id: Optional[Union[int, str]] = None, - allow_sending_without_reply: Optional[Union[bool, Default]] = Default( - "allow_sending_without_reply" - ), - quote: Optional[str] = None, - quote_parse_mode: Optional[Union[str, Default]] = Default("parse_mode"), - quote_entities: Optional[List[MessageEntity]] = None, - quote_position: Optional[int] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - message_id=message_id, - chat_id=chat_id, - allow_sending_without_reply=allow_sending_without_reply, - quote=quote, - quote_parse_mode=quote_parse_mode, - quote_entities=quote_entities, - quote_position=quote_position, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/response_parameters.py b/env/Lib/site-packages/aiogram/types/response_parameters.py deleted file mode 100644 index 19fc54f..0000000 --- a/env/Lib/site-packages/aiogram/types/response_parameters.py +++ /dev/null @@ -1,37 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Optional - -from .base import TelegramObject - - -class ResponseParameters(TelegramObject): - """ - Describes why a request was unsuccessful. - - Source: https://core.telegram.org/bots/api#responseparameters - """ - - migrate_to_chat_id: Optional[int] = None - """*Optional*. The group has been migrated to a supergroup with the specified identifier. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier.""" - retry_after: Optional[int] = None - """*Optional*. In case of exceeding flood control, the number of seconds left to wait before the request can be repeated""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - migrate_to_chat_id: Optional[int] = None, - retry_after: Optional[int] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - migrate_to_chat_id=migrate_to_chat_id, retry_after=retry_after, **__pydantic_kwargs - ) diff --git a/env/Lib/site-packages/aiogram/types/revenue_withdrawal_state.py b/env/Lib/site-packages/aiogram/types/revenue_withdrawal_state.py deleted file mode 100644 index 740323e..0000000 --- a/env/Lib/site-packages/aiogram/types/revenue_withdrawal_state.py +++ /dev/null @@ -1,15 +0,0 @@ -from __future__ import annotations - -from .base import TelegramObject - - -class RevenueWithdrawalState(TelegramObject): - """ - This object describes the state of a revenue withdrawal operation. Currently, it can be one of - - - :class:`aiogram.types.revenue_withdrawal_state_pending.RevenueWithdrawalStatePending` - - :class:`aiogram.types.revenue_withdrawal_state_succeeded.RevenueWithdrawalStateSucceeded` - - :class:`aiogram.types.revenue_withdrawal_state_failed.RevenueWithdrawalStateFailed` - - Source: https://core.telegram.org/bots/api#revenuewithdrawalstate - """ diff --git a/env/Lib/site-packages/aiogram/types/revenue_withdrawal_state_failed.py b/env/Lib/site-packages/aiogram/types/revenue_withdrawal_state_failed.py deleted file mode 100644 index 501a9ff..0000000 --- a/env/Lib/site-packages/aiogram/types/revenue_withdrawal_state_failed.py +++ /dev/null @@ -1,33 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Literal - -from ..enums import RevenueWithdrawalStateType -from .revenue_withdrawal_state import RevenueWithdrawalState - - -class RevenueWithdrawalStateFailed(RevenueWithdrawalState): - """ - The withdrawal failed and the transaction was refunded. - - Source: https://core.telegram.org/bots/api#revenuewithdrawalstatefailed - """ - - type: Literal[RevenueWithdrawalStateType.FAILED] = RevenueWithdrawalStateType.FAILED - """Type of the state, always 'failed'""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - type: Literal[RevenueWithdrawalStateType.FAILED] = RevenueWithdrawalStateType.FAILED, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(type=type, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/types/revenue_withdrawal_state_pending.py b/env/Lib/site-packages/aiogram/types/revenue_withdrawal_state_pending.py deleted file mode 100644 index c4e481f..0000000 --- a/env/Lib/site-packages/aiogram/types/revenue_withdrawal_state_pending.py +++ /dev/null @@ -1,33 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Literal - -from ..enums import RevenueWithdrawalStateType -from .revenue_withdrawal_state import RevenueWithdrawalState - - -class RevenueWithdrawalStatePending(RevenueWithdrawalState): - """ - The withdrawal is in progress. - - Source: https://core.telegram.org/bots/api#revenuewithdrawalstatepending - """ - - type: Literal[RevenueWithdrawalStateType.PENDING] = RevenueWithdrawalStateType.PENDING - """Type of the state, always 'pending'""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - type: Literal[RevenueWithdrawalStateType.PENDING] = RevenueWithdrawalStateType.PENDING, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(type=type, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/types/revenue_withdrawal_state_succeeded.py b/env/Lib/site-packages/aiogram/types/revenue_withdrawal_state_succeeded.py deleted file mode 100644 index 48d45f1..0000000 --- a/env/Lib/site-packages/aiogram/types/revenue_withdrawal_state_succeeded.py +++ /dev/null @@ -1,42 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Literal - -from ..enums import RevenueWithdrawalStateType -from .custom import DateTime -from .revenue_withdrawal_state import RevenueWithdrawalState - - -class RevenueWithdrawalStateSucceeded(RevenueWithdrawalState): - """ - The withdrawal succeeded. - - Source: https://core.telegram.org/bots/api#revenuewithdrawalstatesucceeded - """ - - type: Literal[RevenueWithdrawalStateType.SUCCEEDED] = RevenueWithdrawalStateType.SUCCEEDED - """Type of the state, always 'succeeded'""" - date: DateTime - """Date the withdrawal was completed in Unix time""" - url: str - """An HTTPS URL that can be used to see transaction details""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - type: Literal[ - RevenueWithdrawalStateType.SUCCEEDED - ] = RevenueWithdrawalStateType.SUCCEEDED, - date: DateTime, - url: str, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(type=type, date=date, url=url, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/types/sent_web_app_message.py b/env/Lib/site-packages/aiogram/types/sent_web_app_message.py deleted file mode 100644 index e8241a5..0000000 --- a/env/Lib/site-packages/aiogram/types/sent_web_app_message.py +++ /dev/null @@ -1,32 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Optional - -from .base import TelegramObject - - -class SentWebAppMessage(TelegramObject): - """ - Describes an inline message sent by a `Web App `_ on behalf of a user. - - Source: https://core.telegram.org/bots/api#sentwebappmessage - """ - - inline_message_id: Optional[str] = None - """*Optional*. Identifier of the sent inline message. Available only if there is an `inline keyboard `_ attached to the message.""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - inline_message_id: Optional[str] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(inline_message_id=inline_message_id, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/types/shared_user.py b/env/Lib/site-packages/aiogram/types/shared_user.py deleted file mode 100644 index e160b89..0000000 --- a/env/Lib/site-packages/aiogram/types/shared_user.py +++ /dev/null @@ -1,54 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, List, Optional - -from .base import TelegramObject - -if TYPE_CHECKING: - from .photo_size import PhotoSize - - -class SharedUser(TelegramObject): - """ - This object contains information about a user that was shared with the bot using a :class:`aiogram.types.keyboard_button_request_users.KeyboardButtonRequestUsers` button. - - Source: https://core.telegram.org/bots/api#shareduser - """ - - user_id: int - """Identifier of the shared user. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so 64-bit integers or double-precision float types are safe for storing these identifiers. The bot may not have access to the user and could be unable to use this identifier, unless the user is already known to the bot by some other means.""" - first_name: Optional[str] = None - """*Optional*. First name of the user, if the name was requested by the bot""" - last_name: Optional[str] = None - """*Optional*. Last name of the user, if the name was requested by the bot""" - username: Optional[str] = None - """*Optional*. Username of the user, if the username was requested by the bot""" - photo: Optional[List[PhotoSize]] = None - """*Optional*. Available sizes of the chat photo, if the photo was requested by the bot""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - user_id: int, - first_name: Optional[str] = None, - last_name: Optional[str] = None, - username: Optional[str] = None, - photo: Optional[List[PhotoSize]] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - user_id=user_id, - first_name=first_name, - last_name=last_name, - username=username, - photo=photo, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/shipping_address.py b/env/Lib/site-packages/aiogram/types/shipping_address.py deleted file mode 100644 index a8293cd..0000000 --- a/env/Lib/site-packages/aiogram/types/shipping_address.py +++ /dev/null @@ -1,55 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any - -from .base import TelegramObject - - -class ShippingAddress(TelegramObject): - """ - This object represents a shipping address. - - Source: https://core.telegram.org/bots/api#shippingaddress - """ - - country_code: str - """Two-letter `ISO 3166-1 alpha-2 `_ country code""" - state: str - """State, if applicable""" - city: str - """City""" - street_line1: str - """First line for the address""" - street_line2: str - """Second line for the address""" - post_code: str - """Address post code""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - country_code: str, - state: str, - city: str, - street_line1: str, - street_line2: str, - post_code: str, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - country_code=country_code, - state=state, - city=city, - street_line1=street_line1, - street_line2=street_line2, - post_code=post_code, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/shipping_option.py b/env/Lib/site-packages/aiogram/types/shipping_option.py deleted file mode 100644 index b027451..0000000 --- a/env/Lib/site-packages/aiogram/types/shipping_option.py +++ /dev/null @@ -1,41 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, List - -from .base import TelegramObject - -if TYPE_CHECKING: - from .labeled_price import LabeledPrice - - -class ShippingOption(TelegramObject): - """ - This object represents one shipping option. - - Source: https://core.telegram.org/bots/api#shippingoption - """ - - id: str - """Shipping option identifier""" - title: str - """Option title""" - prices: List[LabeledPrice] - """List of price portions""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - id: str, - title: str, - prices: List[LabeledPrice], - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(id=id, title=title, prices=prices, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/types/shipping_query.py b/env/Lib/site-packages/aiogram/types/shipping_query.py deleted file mode 100644 index 61b4ae4..0000000 --- a/env/Lib/site-packages/aiogram/types/shipping_query.py +++ /dev/null @@ -1,90 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, List, Optional - -from pydantic import Field - -from .base import TelegramObject - -if TYPE_CHECKING: - from ..methods import AnswerShippingQuery - from ..types import ShippingOption - from .shipping_address import ShippingAddress - from .user import User - - -class ShippingQuery(TelegramObject): - """ - This object contains information about an incoming shipping query. - - Source: https://core.telegram.org/bots/api#shippingquery - """ - - id: str - """Unique query identifier""" - from_user: User = Field(..., alias="from") - """User who sent the query""" - invoice_payload: str - """Bot-specified invoice payload""" - shipping_address: ShippingAddress - """User specified shipping address""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - id: str, - from_user: User, - invoice_payload: str, - shipping_address: ShippingAddress, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - id=id, - from_user=from_user, - invoice_payload=invoice_payload, - shipping_address=shipping_address, - **__pydantic_kwargs, - ) - - def answer( - self, - ok: bool, - shipping_options: Optional[List[ShippingOption]] = None, - error_message: Optional[str] = None, - **kwargs: Any, - ) -> AnswerShippingQuery: - """ - Shortcut for method :class:`aiogram.methods.answer_shipping_query.AnswerShippingQuery` - will automatically fill method attributes: - - - :code:`shipping_query_id` - - If you sent an invoice requesting a shipping address and the parameter *is_flexible* was specified, the Bot API will send an :class:`aiogram.types.update.Update` with a *shipping_query* field to the bot. Use this method to reply to shipping queries. On success, :code:`True` is returned. - - Source: https://core.telegram.org/bots/api#answershippingquery - - :param ok: Pass :code:`True` if delivery to the specified address is possible and :code:`False` if there are any problems (for example, if delivery to the specified address is not possible) - :param shipping_options: Required if *ok* is :code:`True`. A JSON-serialized array of available shipping options. - :param error_message: Required if *ok* is :code:`False`. 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. - :return: instance of method :class:`aiogram.methods.answer_shipping_query.AnswerShippingQuery` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import AnswerShippingQuery - - return AnswerShippingQuery( - shipping_query_id=self.id, - ok=ok, - shipping_options=shipping_options, - error_message=error_message, - **kwargs, - ).as_(self._bot) diff --git a/env/Lib/site-packages/aiogram/types/star_transaction.py b/env/Lib/site-packages/aiogram/types/star_transaction.py deleted file mode 100644 index 5d680af..0000000 --- a/env/Lib/site-packages/aiogram/types/star_transaction.py +++ /dev/null @@ -1,86 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Optional, Union - -from .base import TelegramObject -from .custom import DateTime - -if TYPE_CHECKING: - from .transaction_partner_fragment import TransactionPartnerFragment - from .transaction_partner_other import TransactionPartnerOther - from .transaction_partner_telegram_ads import TransactionPartnerTelegramAds - from .transaction_partner_user import TransactionPartnerUser - - -class StarTransaction(TelegramObject): - """ - Describes a Telegram Star transaction. - - Source: https://core.telegram.org/bots/api#startransaction - """ - - id: str - """Unique identifier of the transaction. Coincides with the identifer of the original transaction for refund transactions. Coincides with *SuccessfulPayment.telegram_payment_charge_id* for successful incoming payments from users.""" - amount: int - """Number of Telegram Stars transferred by the transaction""" - date: DateTime - """Date the transaction was created in Unix time""" - source: Optional[ - Union[ - TransactionPartnerUser, - TransactionPartnerFragment, - TransactionPartnerTelegramAds, - TransactionPartnerOther, - ] - ] = None - """*Optional*. Source of an incoming transaction (e.g., a user purchasing goods or services, Fragment refunding a failed withdrawal). Only for incoming transactions""" - receiver: Optional[ - Union[ - TransactionPartnerUser, - TransactionPartnerFragment, - TransactionPartnerTelegramAds, - TransactionPartnerOther, - ] - ] = None - """*Optional*. Receiver of an outgoing transaction (e.g., a user for a purchase refund, Fragment for a withdrawal). Only for outgoing transactions""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - id: str, - amount: int, - date: DateTime, - source: Optional[ - Union[ - TransactionPartnerUser, - TransactionPartnerFragment, - TransactionPartnerTelegramAds, - TransactionPartnerOther, - ] - ] = None, - receiver: Optional[ - Union[ - TransactionPartnerUser, - TransactionPartnerFragment, - TransactionPartnerTelegramAds, - TransactionPartnerOther, - ] - ] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - id=id, - amount=amount, - date=date, - source=source, - receiver=receiver, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/star_transactions.py b/env/Lib/site-packages/aiogram/types/star_transactions.py deleted file mode 100644 index d2ee5b0..0000000 --- a/env/Lib/site-packages/aiogram/types/star_transactions.py +++ /dev/null @@ -1,32 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, List - -from .base import TelegramObject - -if TYPE_CHECKING: - from .star_transaction import StarTransaction - - -class StarTransactions(TelegramObject): - """ - Contains a list of Telegram Star transactions. - - Source: https://core.telegram.org/bots/api#startransactions - """ - - transactions: List[StarTransaction] - """The list of transactions""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, *, transactions: List[StarTransaction], **__pydantic_kwargs: Any - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(transactions=transactions, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/types/sticker.py b/env/Lib/site-packages/aiogram/types/sticker.py deleted file mode 100644 index 4c1b864..0000000 --- a/env/Lib/site-packages/aiogram/types/sticker.py +++ /dev/null @@ -1,152 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Optional - -from .base import TelegramObject - -if TYPE_CHECKING: - from ..methods import DeleteStickerFromSet, SetStickerPositionInSet - from .file import File - from .mask_position import MaskPosition - from .photo_size import PhotoSize - - -class Sticker(TelegramObject): - """ - This object represents a sticker. - - Source: https://core.telegram.org/bots/api#sticker - """ - - file_id: str - """Identifier for this file, which can be used to download or reuse the file""" - file_unique_id: str - """Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.""" - type: str - """Type of the sticker, currently one of 'regular', 'mask', 'custom_emoji'. The type of the sticker is independent from its format, which is determined by the fields *is_animated* and *is_video*.""" - width: int - """Sticker width""" - height: int - """Sticker height""" - is_animated: bool - """:code:`True`, if the sticker is `animated `_""" - is_video: bool - """:code:`True`, if the sticker is a `video sticker `_""" - thumbnail: Optional[PhotoSize] = None - """*Optional*. Sticker thumbnail in the .WEBP or .JPG format""" - emoji: Optional[str] = None - """*Optional*. Emoji associated with the sticker""" - set_name: Optional[str] = None - """*Optional*. Name of the sticker set to which the sticker belongs""" - premium_animation: Optional[File] = None - """*Optional*. For premium regular stickers, premium animation for the sticker""" - mask_position: Optional[MaskPosition] = None - """*Optional*. For mask stickers, the position where the mask should be placed""" - custom_emoji_id: Optional[str] = None - """*Optional*. For custom emoji stickers, unique identifier of the custom emoji""" - needs_repainting: Optional[bool] = None - """*Optional*. :code:`True`, if the sticker must be repainted to a text color in messages, the color of the Telegram Premium badge in emoji status, white color on chat photos, or another appropriate color in other places""" - file_size: Optional[int] = None - """*Optional*. File size in bytes""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - file_id: str, - file_unique_id: str, - type: str, - width: int, - height: int, - is_animated: bool, - is_video: bool, - thumbnail: Optional[PhotoSize] = None, - emoji: Optional[str] = None, - set_name: Optional[str] = None, - premium_animation: Optional[File] = None, - mask_position: Optional[MaskPosition] = None, - custom_emoji_id: Optional[str] = None, - needs_repainting: Optional[bool] = None, - file_size: Optional[int] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - file_id=file_id, - file_unique_id=file_unique_id, - type=type, - width=width, - height=height, - is_animated=is_animated, - is_video=is_video, - thumbnail=thumbnail, - emoji=emoji, - set_name=set_name, - premium_animation=premium_animation, - mask_position=mask_position, - custom_emoji_id=custom_emoji_id, - needs_repainting=needs_repainting, - file_size=file_size, - **__pydantic_kwargs, - ) - - def set_position_in_set( - self, - position: int, - **kwargs: Any, - ) -> SetStickerPositionInSet: - """ - Shortcut for method :class:`aiogram.methods.set_sticker_position_in_set.SetStickerPositionInSet` - will automatically fill method attributes: - - - :code:`sticker` - - Use this method to move a sticker in a set created by the bot to a specific position. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#setstickerpositioninset - - :param position: New sticker position in the set, zero-based - :return: instance of method :class:`aiogram.methods.set_sticker_position_in_set.SetStickerPositionInSet` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import SetStickerPositionInSet - - return SetStickerPositionInSet( - sticker=self.file_id, - position=position, - **kwargs, - ).as_(self._bot) - - def delete_from_set( - self, - **kwargs: Any, - ) -> DeleteStickerFromSet: - """ - Shortcut for method :class:`aiogram.methods.delete_sticker_from_set.DeleteStickerFromSet` - will automatically fill method attributes: - - - :code:`sticker` - - Use this method to delete a sticker from a set created by the bot. Returns :code:`True` on success. - - Source: https://core.telegram.org/bots/api#deletestickerfromset - - :return: instance of method :class:`aiogram.methods.delete_sticker_from_set.DeleteStickerFromSet` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import DeleteStickerFromSet - - return DeleteStickerFromSet( - sticker=self.file_id, - **kwargs, - ).as_(self._bot) diff --git a/env/Lib/site-packages/aiogram/types/sticker_set.py b/env/Lib/site-packages/aiogram/types/sticker_set.py deleted file mode 100644 index 29f9962..0000000 --- a/env/Lib/site-packages/aiogram/types/sticker_set.py +++ /dev/null @@ -1,71 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, List, Optional - -from pydantic import Field - -from .base import TelegramObject - -if TYPE_CHECKING: - from .photo_size import PhotoSize - from .sticker import Sticker - - -class StickerSet(TelegramObject): - """ - This object represents a sticker set. - - Source: https://core.telegram.org/bots/api#stickerset - """ - - name: str - """Sticker set name""" - title: str - """Sticker set title""" - sticker_type: str - """Type of stickers in the set, currently one of 'regular', 'mask', 'custom_emoji'""" - stickers: List[Sticker] - """List of all set stickers""" - thumbnail: Optional[PhotoSize] = None - """*Optional*. Sticker set thumbnail in the .WEBP, .TGS, or .WEBM format""" - is_animated: Optional[bool] = Field(None, json_schema_extra={"deprecated": True}) - """:code:`True`, if the sticker set contains `animated stickers `_ - -.. deprecated:: API:7.2 - https://core.telegram.org/bots/api-changelog#march-31-2024""" - is_video: Optional[bool] = Field(None, json_schema_extra={"deprecated": True}) - """:code:`True`, if the sticker set contains `video stickers `_ - -.. deprecated:: API:7.2 - https://core.telegram.org/bots/api-changelog#march-31-2024""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - name: str, - title: str, - sticker_type: str, - stickers: List[Sticker], - thumbnail: Optional[PhotoSize] = None, - is_animated: Optional[bool] = None, - is_video: Optional[bool] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - name=name, - title=title, - sticker_type=sticker_type, - stickers=stickers, - thumbnail=thumbnail, - is_animated=is_animated, - is_video=is_video, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/story.py b/env/Lib/site-packages/aiogram/types/story.py deleted file mode 100644 index 69aaaec..0000000 --- a/env/Lib/site-packages/aiogram/types/story.py +++ /dev/null @@ -1,32 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any - -from .base import TelegramObject - -if TYPE_CHECKING: - from .chat import Chat - - -class Story(TelegramObject): - """ - This object represents a story. - - Source: https://core.telegram.org/bots/api#story - """ - - chat: Chat - """Chat that posted the story""" - id: int - """Unique identifier for the story in the chat""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__(__pydantic__self__, *, chat: Chat, id: int, **__pydantic_kwargs: Any) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(chat=chat, id=id, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/types/successful_payment.py b/env/Lib/site-packages/aiogram/types/successful_payment.py deleted file mode 100644 index 30d4356..0000000 --- a/env/Lib/site-packages/aiogram/types/successful_payment.py +++ /dev/null @@ -1,62 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Optional - -from .base import TelegramObject - -if TYPE_CHECKING: - from .order_info import OrderInfo - - -class SuccessfulPayment(TelegramObject): - """ - This object contains basic information about a successful payment. - - Source: https://core.telegram.org/bots/api#successfulpayment - """ - - currency: str - """Three-letter ISO 4217 `currency `_ code, or 'XTR' for payments in `Telegram Stars `_""" - total_amount: int - """Total price in the *smallest units* of the currency (integer, **not** float/double). For example, for a price of :code:`US$ 1.45` pass :code:`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).""" - invoice_payload: str - """Bot-specified invoice payload""" - telegram_payment_charge_id: str - """Telegram payment identifier""" - provider_payment_charge_id: str - """Provider payment identifier""" - shipping_option_id: Optional[str] = None - """*Optional*. Identifier of the shipping option chosen by the user""" - order_info: Optional[OrderInfo] = None - """*Optional*. Order information provided by the user""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - currency: str, - total_amount: int, - invoice_payload: str, - telegram_payment_charge_id: str, - provider_payment_charge_id: str, - shipping_option_id: Optional[str] = None, - order_info: Optional[OrderInfo] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - currency=currency, - total_amount=total_amount, - invoice_payload=invoice_payload, - telegram_payment_charge_id=telegram_payment_charge_id, - provider_payment_charge_id=provider_payment_charge_id, - shipping_option_id=shipping_option_id, - order_info=order_info, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/switch_inline_query_chosen_chat.py b/env/Lib/site-packages/aiogram/types/switch_inline_query_chosen_chat.py deleted file mode 100644 index 9a25dca..0000000 --- a/env/Lib/site-packages/aiogram/types/switch_inline_query_chosen_chat.py +++ /dev/null @@ -1,49 +0,0 @@ -from typing import TYPE_CHECKING, Any, Optional - -from .base import TelegramObject - - -class SwitchInlineQueryChosenChat(TelegramObject): - """ - This object represents an inline button that switches the current user to inline mode in a chosen chat, with an optional default inline query. - - Source: https://core.telegram.org/bots/api#switchinlinequerychosenchat - """ - - query: Optional[str] = None - """*Optional*. The default inline query to be inserted in the input field. If left empty, only the bot's username will be inserted""" - allow_user_chats: Optional[bool] = None - """*Optional*. True, if private chats with users can be chosen""" - allow_bot_chats: Optional[bool] = None - """*Optional*. True, if private chats with bots can be chosen""" - allow_group_chats: Optional[bool] = None - """*Optional*. True, if group and supergroup chats can be chosen""" - allow_channel_chats: Optional[bool] = None - """*Optional*. True, if channel chats can be chosen""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - query: Optional[str] = None, - allow_user_chats: Optional[bool] = None, - allow_bot_chats: Optional[bool] = None, - allow_group_chats: Optional[bool] = None, - allow_channel_chats: Optional[bool] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - query=query, - allow_user_chats=allow_user_chats, - allow_bot_chats=allow_bot_chats, - allow_group_chats=allow_group_chats, - allow_channel_chats=allow_channel_chats, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/text_quote.py b/env/Lib/site-packages/aiogram/types/text_quote.py deleted file mode 100644 index a882ccf..0000000 --- a/env/Lib/site-packages/aiogram/types/text_quote.py +++ /dev/null @@ -1,50 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, List, Optional - -from .base import TelegramObject - -if TYPE_CHECKING: - from .message_entity import MessageEntity - - -class TextQuote(TelegramObject): - """ - This object contains information about the quoted part of a message that is replied to by the given message. - - Source: https://core.telegram.org/bots/api#textquote - """ - - text: str - """Text of the quoted part of a message that is replied to by the given message""" - position: int - """Approximate quote position in the original message in UTF-16 code units as specified by the sender""" - entities: Optional[List[MessageEntity]] = None - """*Optional*. Special entities that appear in the quote. Currently, only *bold*, *italic*, *underline*, *strikethrough*, *spoiler*, and *custom_emoji* entities are kept in quotes.""" - is_manual: Optional[bool] = None - """*Optional*. True, if the quote was chosen manually by the message sender. Otherwise, the quote was added automatically by the server.""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - text: str, - position: int, - entities: Optional[List[MessageEntity]] = None, - is_manual: Optional[bool] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - text=text, - position=position, - entities=entities, - is_manual=is_manual, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/transaction_partner.py b/env/Lib/site-packages/aiogram/types/transaction_partner.py deleted file mode 100644 index a26b0fc..0000000 --- a/env/Lib/site-packages/aiogram/types/transaction_partner.py +++ /dev/null @@ -1,14 +0,0 @@ -from .base import TelegramObject - - -class TransactionPartner(TelegramObject): - """ - This object describes the source of a transaction, or its recipient for outgoing transactions. Currently, it can be one of - - - :class:`aiogram.types.transaction_partner_user.TransactionPartnerUser` - - :class:`aiogram.types.transaction_partner_fragment.TransactionPartnerFragment` - - :class:`aiogram.types.transaction_partner_telegram_ads.TransactionPartnerTelegramAds` - - :class:`aiogram.types.transaction_partner_other.TransactionPartnerOther` - - Source: https://core.telegram.org/bots/api#transactionpartner - """ diff --git a/env/Lib/site-packages/aiogram/types/transaction_partner_fragment.py b/env/Lib/site-packages/aiogram/types/transaction_partner_fragment.py deleted file mode 100644 index 350109e..0000000 --- a/env/Lib/site-packages/aiogram/types/transaction_partner_fragment.py +++ /dev/null @@ -1,53 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Literal, Optional, Union - -from ..enums import TransactionPartnerType -from .transaction_partner import TransactionPartner - -if TYPE_CHECKING: - from .revenue_withdrawal_state_failed import RevenueWithdrawalStateFailed - from .revenue_withdrawal_state_pending import RevenueWithdrawalStatePending - from .revenue_withdrawal_state_succeeded import RevenueWithdrawalStateSucceeded - - -class TransactionPartnerFragment(TransactionPartner): - """ - Describes a withdrawal transaction with Fragment. - - Source: https://core.telegram.org/bots/api#transactionpartnerfragment - """ - - type: Literal[TransactionPartnerType.FRAGMENT] = TransactionPartnerType.FRAGMENT - """Type of the transaction partner, always 'fragment'""" - withdrawal_state: Optional[ - Union[ - RevenueWithdrawalStatePending, - RevenueWithdrawalStateSucceeded, - RevenueWithdrawalStateFailed, - ] - ] = None - """*Optional*. State of the transaction if the transaction is outgoing""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - type: Literal[TransactionPartnerType.FRAGMENT] = TransactionPartnerType.FRAGMENT, - withdrawal_state: Optional[ - Union[ - RevenueWithdrawalStatePending, - RevenueWithdrawalStateSucceeded, - RevenueWithdrawalStateFailed, - ] - ] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(type=type, withdrawal_state=withdrawal_state, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/types/transaction_partner_other.py b/env/Lib/site-packages/aiogram/types/transaction_partner_other.py deleted file mode 100644 index 699297e..0000000 --- a/env/Lib/site-packages/aiogram/types/transaction_partner_other.py +++ /dev/null @@ -1,33 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Literal - -from ..enums import TransactionPartnerType -from .transaction_partner import TransactionPartner - - -class TransactionPartnerOther(TransactionPartner): - """ - Describes a transaction with an unknown source or recipient. - - Source: https://core.telegram.org/bots/api#transactionpartnerother - """ - - type: Literal[TransactionPartnerType.OTHER] = TransactionPartnerType.OTHER - """Type of the transaction partner, always 'other'""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - type: Literal[TransactionPartnerType.OTHER] = TransactionPartnerType.OTHER, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(type=type, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/types/transaction_partner_telegram_ads.py b/env/Lib/site-packages/aiogram/types/transaction_partner_telegram_ads.py deleted file mode 100644 index 5df8eb6..0000000 --- a/env/Lib/site-packages/aiogram/types/transaction_partner_telegram_ads.py +++ /dev/null @@ -1,35 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Literal - -from ..enums import TransactionPartnerType -from .transaction_partner import TransactionPartner - - -class TransactionPartnerTelegramAds(TransactionPartner): - """ - Describes a withdrawal transaction to the Telegram Ads platform. - - Source: https://core.telegram.org/bots/api#transactionpartnertelegramads - """ - - type: Literal[TransactionPartnerType.TELEGRAM_ADS] = TransactionPartnerType.TELEGRAM_ADS - """Type of the transaction partner, always 'telegram_ads'""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - type: Literal[ - TransactionPartnerType.TELEGRAM_ADS - ] = TransactionPartnerType.TELEGRAM_ADS, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(type=type, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/types/transaction_partner_user.py b/env/Lib/site-packages/aiogram/types/transaction_partner_user.py deleted file mode 100644 index 260c9a1..0000000 --- a/env/Lib/site-packages/aiogram/types/transaction_partner_user.py +++ /dev/null @@ -1,56 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, List, Literal, Optional, Union - -from ..enums import TransactionPartnerType -from .transaction_partner import TransactionPartner - -if TYPE_CHECKING: - from .paid_media_photo import PaidMediaPhoto - from .paid_media_preview import PaidMediaPreview - from .paid_media_video import PaidMediaVideo - from .user import User - - -class TransactionPartnerUser(TransactionPartner): - """ - Describes a transaction with a user. - - Source: https://core.telegram.org/bots/api#transactionpartneruser - """ - - type: Literal[TransactionPartnerType.USER] = TransactionPartnerType.USER - """Type of the transaction partner, always 'user'""" - user: User - """Information about the user""" - invoice_payload: Optional[str] = None - """*Optional*. Bot-specified invoice payload""" - paid_media: Optional[List[Union[PaidMediaPreview, PaidMediaPhoto, PaidMediaVideo]]] = None - """*Optional*. Information about the paid media bought by the user""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - type: Literal[TransactionPartnerType.USER] = TransactionPartnerType.USER, - user: User, - invoice_payload: Optional[str] = None, - paid_media: Optional[ - List[Union[PaidMediaPreview, PaidMediaPhoto, PaidMediaVideo]] - ] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - type=type, - user=user, - invoice_payload=invoice_payload, - paid_media=paid_media, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/update.py b/env/Lib/site-packages/aiogram/types/update.py deleted file mode 100644 index 0533996..0000000 --- a/env/Lib/site-packages/aiogram/types/update.py +++ /dev/null @@ -1,211 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Optional, cast - -from ..utils.mypy_hacks import lru_cache -from .base import TelegramObject - -if TYPE_CHECKING: - from .business_connection import BusinessConnection - from .business_messages_deleted import BusinessMessagesDeleted - from .callback_query import CallbackQuery - from .chat_boost_removed import ChatBoostRemoved - from .chat_boost_updated import ChatBoostUpdated - from .chat_join_request import ChatJoinRequest - from .chat_member_updated import ChatMemberUpdated - from .chosen_inline_result import ChosenInlineResult - from .inline_query import InlineQuery - from .message import Message - from .message_reaction_count_updated import MessageReactionCountUpdated - from .message_reaction_updated import MessageReactionUpdated - from .poll import Poll - from .poll_answer import PollAnswer - from .pre_checkout_query import PreCheckoutQuery - from .shipping_query import ShippingQuery - - -class Update(TelegramObject): - """ - This `object `_ represents an incoming update. - - At most **one** of the optional parameters can be present in any given update. - - Source: https://core.telegram.org/bots/api#update - """ - - update_id: int - """The update's unique identifier. Update identifiers start from a certain positive number and increase sequentially. This identifier becomes especially handy if you're using `webhooks `_, since it allows you to ignore repeated updates or to restore the correct update sequence, should they get out of order. If there are no new updates for at least a week, then identifier of the next update will be chosen randomly instead of sequentially.""" - message: Optional[Message] = None - """*Optional*. New incoming message of any kind - text, photo, sticker, etc.""" - edited_message: Optional[Message] = None - """*Optional*. New version of a message that is known to the bot and was edited. This update may at times be triggered by changes to message fields that are either unavailable or not actively used by your bot.""" - channel_post: Optional[Message] = None - """*Optional*. New incoming channel post of any kind - text, photo, sticker, etc.""" - edited_channel_post: Optional[Message] = None - """*Optional*. New version of a channel post that is known to the bot and was edited. This update may at times be triggered by changes to message fields that are either unavailable or not actively used by your bot.""" - business_connection: Optional[BusinessConnection] = None - """*Optional*. The bot was connected to or disconnected from a business account, or a user edited an existing connection with the bot""" - business_message: Optional[Message] = None - """*Optional*. New message from a connected business account""" - edited_business_message: Optional[Message] = None - """*Optional*. New version of a message from a connected business account""" - deleted_business_messages: Optional[BusinessMessagesDeleted] = None - """*Optional*. Messages were deleted from a connected business account""" - message_reaction: Optional[MessageReactionUpdated] = None - """*Optional*. A reaction to a message was changed by a user. The bot must be an administrator in the chat and must explicitly specify :code:`"message_reaction"` in the list of *allowed_updates* to receive these updates. The update isn't received for reactions set by bots.""" - message_reaction_count: Optional[MessageReactionCountUpdated] = None - """*Optional*. Reactions to a message with anonymous reactions were changed. The bot must be an administrator in the chat and must explicitly specify :code:`"message_reaction_count"` in the list of *allowed_updates* to receive these updates. The updates are grouped and can be sent with delay up to a few minutes.""" - inline_query: Optional[InlineQuery] = None - """*Optional*. New incoming `inline `_ query""" - chosen_inline_result: Optional[ChosenInlineResult] = None - """*Optional*. 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.""" - callback_query: Optional[CallbackQuery] = None - """*Optional*. New incoming callback query""" - shipping_query: Optional[ShippingQuery] = None - """*Optional*. New incoming shipping query. Only for invoices with flexible price""" - pre_checkout_query: Optional[PreCheckoutQuery] = None - """*Optional*. New incoming pre-checkout query. Contains full information about checkout""" - poll: Optional[Poll] = None - """*Optional*. New poll state. Bots receive only updates about manually stopped polls and polls, which are sent by the bot""" - poll_answer: Optional[PollAnswer] = None - """*Optional*. A user changed their answer in a non-anonymous poll. Bots receive new votes only in polls that were sent by the bot itself.""" - my_chat_member: Optional[ChatMemberUpdated] = None - """*Optional*. The bot's chat member status was updated in a chat. For private chats, this update is received only when the bot is blocked or unblocked by the user.""" - chat_member: Optional[ChatMemberUpdated] = None - """*Optional*. A chat member's status was updated in a chat. The bot must be an administrator in the chat and must explicitly specify :code:`"chat_member"` in the list of *allowed_updates* to receive these updates.""" - chat_join_request: Optional[ChatJoinRequest] = None - """*Optional*. A request to join the chat has been sent. The bot must have the *can_invite_users* administrator right in the chat to receive these updates.""" - chat_boost: Optional[ChatBoostUpdated] = None - """*Optional*. A chat boost was added or changed. The bot must be an administrator in the chat to receive these updates.""" - removed_chat_boost: Optional[ChatBoostRemoved] = None - """*Optional*. A boost was removed from a chat. The bot must be an administrator in the chat to receive these updates.""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - update_id: int, - message: Optional[Message] = None, - edited_message: Optional[Message] = None, - channel_post: Optional[Message] = None, - edited_channel_post: Optional[Message] = None, - business_connection: Optional[BusinessConnection] = None, - business_message: Optional[Message] = None, - edited_business_message: Optional[Message] = None, - deleted_business_messages: Optional[BusinessMessagesDeleted] = None, - message_reaction: Optional[MessageReactionUpdated] = None, - message_reaction_count: Optional[MessageReactionCountUpdated] = None, - inline_query: Optional[InlineQuery] = None, - chosen_inline_result: Optional[ChosenInlineResult] = None, - callback_query: Optional[CallbackQuery] = None, - shipping_query: Optional[ShippingQuery] = None, - pre_checkout_query: Optional[PreCheckoutQuery] = None, - poll: Optional[Poll] = None, - poll_answer: Optional[PollAnswer] = None, - my_chat_member: Optional[ChatMemberUpdated] = None, - chat_member: Optional[ChatMemberUpdated] = None, - chat_join_request: Optional[ChatJoinRequest] = None, - chat_boost: Optional[ChatBoostUpdated] = None, - removed_chat_boost: Optional[ChatBoostRemoved] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - update_id=update_id, - message=message, - edited_message=edited_message, - channel_post=channel_post, - edited_channel_post=edited_channel_post, - business_connection=business_connection, - business_message=business_message, - edited_business_message=edited_business_message, - deleted_business_messages=deleted_business_messages, - message_reaction=message_reaction, - message_reaction_count=message_reaction_count, - inline_query=inline_query, - chosen_inline_result=chosen_inline_result, - callback_query=callback_query, - shipping_query=shipping_query, - pre_checkout_query=pre_checkout_query, - poll=poll, - poll_answer=poll_answer, - my_chat_member=my_chat_member, - chat_member=chat_member, - chat_join_request=chat_join_request, - chat_boost=chat_boost, - removed_chat_boost=removed_chat_boost, - **__pydantic_kwargs, - ) - - def __hash__(self) -> int: - return hash((type(self), self.update_id)) - - @property - @lru_cache() - def event_type(self) -> str: - """ - Detect update type - If update type is unknown, raise UpdateTypeLookupError - - :return: - """ - if self.message: - return "message" - if self.edited_message: - return "edited_message" - if self.channel_post: - return "channel_post" - if self.edited_channel_post: - return "edited_channel_post" - if self.inline_query: - return "inline_query" - if self.chosen_inline_result: - return "chosen_inline_result" - if self.callback_query: - return "callback_query" - if self.shipping_query: - return "shipping_query" - if self.pre_checkout_query: - return "pre_checkout_query" - if self.poll: - return "poll" - if self.poll_answer: - return "poll_answer" - if self.my_chat_member: - return "my_chat_member" - if self.chat_member: - return "chat_member" - if self.chat_join_request: - return "chat_join_request" - if self.message_reaction: - return "message_reaction" - if self.message_reaction_count: - return "message_reaction_count" - if self.chat_boost: - return "chat_boost" - if self.removed_chat_boost: - return "removed_chat_boost" - if self.deleted_business_messages: - return "deleted_business_messages" - if self.business_connection: - return "business_connection" - if self.edited_business_message: - return "edited_business_message" - if self.business_message: - return "business_message" - - raise UpdateTypeLookupError("Update does not contain any known event type.") - - @property - def event(self) -> TelegramObject: - return cast(TelegramObject, getattr(self, self.event_type)) - - -class UpdateTypeLookupError(LookupError): - """Update does not contain any known event type.""" diff --git a/env/Lib/site-packages/aiogram/types/user.py b/env/Lib/site-packages/aiogram/types/user.py deleted file mode 100644 index 56782f2..0000000 --- a/env/Lib/site-packages/aiogram/types/user.py +++ /dev/null @@ -1,140 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Optional - -from ..utils import markdown -from ..utils.link import create_tg_link -from .base import TelegramObject - -if TYPE_CHECKING: - from ..methods import GetUserProfilePhotos - - -class User(TelegramObject): - """ - This object represents a Telegram user or bot. - - Source: https://core.telegram.org/bots/api#user - """ - - id: int - """Unique identifier for this user or bot. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier.""" - is_bot: bool - """:code:`True`, if this user is a bot""" - first_name: str - """User's or bot's first name""" - last_name: Optional[str] = None - """*Optional*. User's or bot's last name""" - username: Optional[str] = None - """*Optional*. User's or bot's username""" - language_code: Optional[str] = None - """*Optional*. `IETF language tag `_ of the user's language""" - is_premium: Optional[bool] = None - """*Optional*. :code:`True`, if this user is a Telegram Premium user""" - added_to_attachment_menu: Optional[bool] = None - """*Optional*. :code:`True`, if this user added the bot to the attachment menu""" - can_join_groups: Optional[bool] = None - """*Optional*. :code:`True`, if the bot can be invited to groups. Returned only in :class:`aiogram.methods.get_me.GetMe`.""" - can_read_all_group_messages: Optional[bool] = None - """*Optional*. :code:`True`, if `privacy mode `_ is disabled for the bot. Returned only in :class:`aiogram.methods.get_me.GetMe`.""" - supports_inline_queries: Optional[bool] = None - """*Optional*. :code:`True`, if the bot supports inline queries. Returned only in :class:`aiogram.methods.get_me.GetMe`.""" - can_connect_to_business: Optional[bool] = None - """*Optional*. :code:`True`, if the bot can be connected to a Telegram Business account to receive its messages. Returned only in :class:`aiogram.methods.get_me.GetMe`.""" - has_main_web_app: Optional[bool] = None - """*Optional*. :code:`True`, if the bot has a main Web App. Returned only in :class:`aiogram.methods.get_me.GetMe`.""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - id: int, - is_bot: bool, - first_name: str, - last_name: Optional[str] = None, - username: Optional[str] = None, - language_code: Optional[str] = None, - is_premium: Optional[bool] = None, - added_to_attachment_menu: Optional[bool] = None, - can_join_groups: Optional[bool] = None, - can_read_all_group_messages: Optional[bool] = None, - supports_inline_queries: Optional[bool] = None, - can_connect_to_business: Optional[bool] = None, - has_main_web_app: Optional[bool] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - id=id, - is_bot=is_bot, - first_name=first_name, - last_name=last_name, - username=username, - language_code=language_code, - is_premium=is_premium, - added_to_attachment_menu=added_to_attachment_menu, - can_join_groups=can_join_groups, - can_read_all_group_messages=can_read_all_group_messages, - supports_inline_queries=supports_inline_queries, - can_connect_to_business=can_connect_to_business, - has_main_web_app=has_main_web_app, - **__pydantic_kwargs, - ) - - @property - def full_name(self) -> str: - if self.last_name: - return f"{self.first_name} {self.last_name}" - return self.first_name - - @property - def url(self) -> str: - return create_tg_link("user", id=self.id) - - def mention_markdown(self, name: Optional[str] = None) -> str: - if name is None: - name = self.full_name - return markdown.link(name, self.url) - - def mention_html(self, name: Optional[str] = None) -> str: - if name is None: - name = self.full_name - return markdown.hlink(name, self.url) - - def get_profile_photos( - self, - offset: Optional[int] = None, - limit: Optional[int] = None, - **kwargs: Any, - ) -> GetUserProfilePhotos: - """ - Shortcut for method :class:`aiogram.methods.get_user_profile_photos.GetUserProfilePhotos` - will automatically fill method attributes: - - - :code:`user_id` - - Use this method to get a list of profile pictures for a user. Returns a :class:`aiogram.types.user_profile_photos.UserProfilePhotos` object. - - Source: https://core.telegram.org/bots/api#getuserprofilephotos - - :param offset: Sequential number of the first photo to be returned. By default, all photos are returned. - :param limit: Limits the number of photos to be retrieved. Values between 1-100 are accepted. Defaults to 100. - :return: instance of method :class:`aiogram.methods.get_user_profile_photos.GetUserProfilePhotos` - """ - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - - from aiogram.methods import GetUserProfilePhotos - - return GetUserProfilePhotos( - user_id=self.id, - offset=offset, - limit=limit, - **kwargs, - ).as_(self._bot) diff --git a/env/Lib/site-packages/aiogram/types/user_chat_boosts.py b/env/Lib/site-packages/aiogram/types/user_chat_boosts.py deleted file mode 100644 index 3da8d37..0000000 --- a/env/Lib/site-packages/aiogram/types/user_chat_boosts.py +++ /dev/null @@ -1,32 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, List - -from .base import TelegramObject - -if TYPE_CHECKING: - from .chat_boost import ChatBoost - - -class UserChatBoosts(TelegramObject): - """ - This object represents a list of boosts added to a chat by a user. - - Source: https://core.telegram.org/bots/api#userchatboosts - """ - - boosts: List[ChatBoost] - """The list of boosts added to the chat by the user""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, *, boosts: List[ChatBoost], **__pydantic_kwargs: Any - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(boosts=boosts, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/types/user_profile_photos.py b/env/Lib/site-packages/aiogram/types/user_profile_photos.py deleted file mode 100644 index c1c5d28..0000000 --- a/env/Lib/site-packages/aiogram/types/user_profile_photos.py +++ /dev/null @@ -1,38 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, List - -from .base import TelegramObject - -if TYPE_CHECKING: - from .photo_size import PhotoSize - - -class UserProfilePhotos(TelegramObject): - """ - This object represent a user's profile pictures. - - Source: https://core.telegram.org/bots/api#userprofilephotos - """ - - total_count: int - """Total number of profile pictures the target user has""" - photos: List[List[PhotoSize]] - """Requested profile pictures (in up to 4 sizes each)""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - total_count: int, - photos: List[List[PhotoSize]], - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(total_count=total_count, photos=photos, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/types/user_shared.py b/env/Lib/site-packages/aiogram/types/user_shared.py deleted file mode 100644 index 59d1ede..0000000 --- a/env/Lib/site-packages/aiogram/types/user_shared.py +++ /dev/null @@ -1,32 +0,0 @@ -from typing import TYPE_CHECKING, Any - -from aiogram.types import TelegramObject - - -class UserShared(TelegramObject): - """ - This object contains information about the user whose identifier was shared with the bot using a :class:`aiogram.types.keyboard_button_request_user.KeyboardButtonRequestUser` button. - - .. deprecated:: API:7.0 - https://core.telegram.org/bots/api-changelog#december-29-2023 - - Source: https://core.telegram.org/bots/api#usershared - """ - - request_id: int - """Identifier of the request""" - user_id: int - """Identifier of the shared user. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier. The bot may not have access to the user and could be unable to use this identifier, unless the user is already known to the bot by some other means.""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, *, request_id: int, user_id: int, **__pydantic_kwargs: Any - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(request_id=request_id, user_id=user_id, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/types/users_shared.py b/env/Lib/site-packages/aiogram/types/users_shared.py deleted file mode 100644 index 351fc0e..0000000 --- a/env/Lib/site-packages/aiogram/types/users_shared.py +++ /dev/null @@ -1,48 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, List, Optional - -from pydantic import Field - -from .base import TelegramObject - -if TYPE_CHECKING: - from .shared_user import SharedUser - - -class UsersShared(TelegramObject): - """ - This object contains information about the users whose identifiers were shared with the bot using a :class:`aiogram.types.keyboard_button_request_users.KeyboardButtonRequestUsers` button. - - Source: https://core.telegram.org/bots/api#usersshared - """ - - request_id: int - """Identifier of the request""" - users: List[SharedUser] - """Information about users shared with the bot.""" - user_ids: Optional[List[int]] = Field(None, json_schema_extra={"deprecated": True}) - """Identifiers of the shared users. These numbers may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting them. But they have at most 52 significant bits, so 64-bit integers or double-precision float types are safe for storing these identifiers. The bot may not have access to the users and could be unable to use these identifiers, unless the users are already known to the bot by some other means. - -.. deprecated:: API:7.2 - https://core.telegram.org/bots/api-changelog#march-31-2024""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - request_id: int, - users: List[SharedUser], - user_ids: Optional[List[int]] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - request_id=request_id, users=users, user_ids=user_ids, **__pydantic_kwargs - ) diff --git a/env/Lib/site-packages/aiogram/types/venue.py b/env/Lib/site-packages/aiogram/types/venue.py deleted file mode 100644 index e0a3f84..0000000 --- a/env/Lib/site-packages/aiogram/types/venue.py +++ /dev/null @@ -1,62 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Optional - -from .base import TelegramObject - -if TYPE_CHECKING: - from .location import Location - - -class Venue(TelegramObject): - """ - This object represents a venue. - - Source: https://core.telegram.org/bots/api#venue - """ - - location: Location - """Venue location. Can't be a live location""" - title: str - """Name of the venue""" - address: str - """Address of the venue""" - foursquare_id: Optional[str] = None - """*Optional*. Foursquare identifier of the venue""" - foursquare_type: Optional[str] = None - """*Optional*. Foursquare type of the venue. (For example, 'arts_entertainment/default', 'arts_entertainment/aquarium' or 'food/icecream'.)""" - google_place_id: Optional[str] = None - """*Optional*. Google Places identifier of the venue""" - google_place_type: Optional[str] = None - """*Optional*. Google Places type of the venue. (See `supported types `_.)""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - location: Location, - title: str, - address: str, - foursquare_id: Optional[str] = None, - foursquare_type: Optional[str] = None, - google_place_id: Optional[str] = None, - google_place_type: Optional[str] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - location=location, - title=title, - address=address, - foursquare_id=foursquare_id, - foursquare_type=foursquare_type, - google_place_id=google_place_id, - google_place_type=google_place_type, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/video.py b/env/Lib/site-packages/aiogram/types/video.py deleted file mode 100644 index e8ecf1f..0000000 --- a/env/Lib/site-packages/aiogram/types/video.py +++ /dev/null @@ -1,70 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Optional - -from .base import TelegramObject - -if TYPE_CHECKING: - from .photo_size import PhotoSize - - -class Video(TelegramObject): - """ - This object represents a video file. - - Source: https://core.telegram.org/bots/api#video - """ - - file_id: str - """Identifier for this file, which can be used to download or reuse the file""" - file_unique_id: str - """Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.""" - width: int - """Video width as defined by the sender""" - height: int - """Video height as defined by the sender""" - duration: int - """Duration of the video in seconds as defined by the sender""" - thumbnail: Optional[PhotoSize] = None - """*Optional*. Video thumbnail""" - file_name: Optional[str] = None - """*Optional*. Original filename as defined by the sender""" - mime_type: Optional[str] = None - """*Optional*. MIME type of the file as defined by the sender""" - file_size: Optional[int] = None - """*Optional*. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value.""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - file_id: str, - file_unique_id: str, - width: int, - height: int, - duration: int, - thumbnail: Optional[PhotoSize] = None, - file_name: Optional[str] = None, - mime_type: Optional[str] = None, - file_size: Optional[int] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - file_id=file_id, - file_unique_id=file_unique_id, - width=width, - height=height, - duration=duration, - thumbnail=thumbnail, - file_name=file_name, - mime_type=mime_type, - file_size=file_size, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/video_chat_ended.py b/env/Lib/site-packages/aiogram/types/video_chat_ended.py deleted file mode 100644 index 289eb72..0000000 --- a/env/Lib/site-packages/aiogram/types/video_chat_ended.py +++ /dev/null @@ -1,27 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any - -from .base import TelegramObject - - -class VideoChatEnded(TelegramObject): - """ - This object represents a service message about a video chat ended in the chat. - - Source: https://core.telegram.org/bots/api#videochatended - """ - - duration: int - """Video chat duration in seconds""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__(__pydantic__self__, *, duration: int, **__pydantic_kwargs: Any) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(duration=duration, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/types/video_chat_participants_invited.py b/env/Lib/site-packages/aiogram/types/video_chat_participants_invited.py deleted file mode 100644 index 74e1a35..0000000 --- a/env/Lib/site-packages/aiogram/types/video_chat_participants_invited.py +++ /dev/null @@ -1,30 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, List - -from .base import TelegramObject - -if TYPE_CHECKING: - from .user import User - - -class VideoChatParticipantsInvited(TelegramObject): - """ - This object represents a service message about new members invited to a video chat. - - Source: https://core.telegram.org/bots/api#videochatparticipantsinvited - """ - - users: List[User] - """New members that were invited to the video chat""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__(__pydantic__self__, *, users: List[User], **__pydantic_kwargs: Any) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(users=users, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/types/video_chat_scheduled.py b/env/Lib/site-packages/aiogram/types/video_chat_scheduled.py deleted file mode 100644 index c82e495..0000000 --- a/env/Lib/site-packages/aiogram/types/video_chat_scheduled.py +++ /dev/null @@ -1,30 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any - -from .base import TelegramObject -from .custom import DateTime - - -class VideoChatScheduled(TelegramObject): - """ - This object represents a service message about a video chat scheduled in the chat. - - Source: https://core.telegram.org/bots/api#videochatscheduled - """ - - start_date: DateTime - """Point in time (Unix timestamp) when the video chat is supposed to be started by a chat administrator""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, *, start_date: DateTime, **__pydantic_kwargs: Any - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(start_date=start_date, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/types/video_chat_started.py b/env/Lib/site-packages/aiogram/types/video_chat_started.py deleted file mode 100644 index a6f9aed..0000000 --- a/env/Lib/site-packages/aiogram/types/video_chat_started.py +++ /dev/null @@ -1,11 +0,0 @@ -from __future__ import annotations - -from .base import TelegramObject - - -class VideoChatStarted(TelegramObject): - """ - This object represents a service message about a video chat started in the chat. Currently holds no information. - - Source: https://core.telegram.org/bots/api#videochatstarted - """ diff --git a/env/Lib/site-packages/aiogram/types/video_note.py b/env/Lib/site-packages/aiogram/types/video_note.py deleted file mode 100644 index 5be8502..0000000 --- a/env/Lib/site-packages/aiogram/types/video_note.py +++ /dev/null @@ -1,58 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Optional - -from .base import TelegramObject - -if TYPE_CHECKING: - from .photo_size import PhotoSize - - -class VideoNote(TelegramObject): - """ - This object represents a `video message `_ (available in Telegram apps as of `v.4.0 `_). - - Source: https://core.telegram.org/bots/api#videonote - """ - - file_id: str - """Identifier for this file, which can be used to download or reuse the file""" - file_unique_id: str - """Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.""" - length: int - """Video width and height (diameter of the video message) as defined by the sender""" - duration: int - """Duration of the video in seconds as defined by the sender""" - thumbnail: Optional[PhotoSize] = None - """*Optional*. Video thumbnail""" - file_size: Optional[int] = None - """*Optional*. File size in bytes""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - file_id: str, - file_unique_id: str, - length: int, - duration: int, - thumbnail: Optional[PhotoSize] = None, - file_size: Optional[int] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - file_id=file_id, - file_unique_id=file_unique_id, - length=length, - duration=duration, - thumbnail=thumbnail, - file_size=file_size, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/voice.py b/env/Lib/site-packages/aiogram/types/voice.py deleted file mode 100644 index d5e0abc..0000000 --- a/env/Lib/site-packages/aiogram/types/voice.py +++ /dev/null @@ -1,51 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, Optional - -from .base import TelegramObject - - -class Voice(TelegramObject): - """ - This object represents a voice note. - - Source: https://core.telegram.org/bots/api#voice - """ - - file_id: str - """Identifier for this file, which can be used to download or reuse the file""" - file_unique_id: str - """Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.""" - duration: int - """Duration of the audio in seconds as defined by the sender""" - mime_type: Optional[str] = None - """*Optional*. MIME type of the file as defined by the sender""" - file_size: Optional[int] = None - """*Optional*. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value.""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - file_id: str, - file_unique_id: str, - duration: int, - mime_type: Optional[str] = None, - file_size: Optional[int] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - file_id=file_id, - file_unique_id=file_unique_id, - duration=duration, - mime_type=mime_type, - file_size=file_size, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/web_app_data.py b/env/Lib/site-packages/aiogram/types/web_app_data.py deleted file mode 100644 index 8fac379..0000000 --- a/env/Lib/site-packages/aiogram/types/web_app_data.py +++ /dev/null @@ -1,31 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any - -from .base import TelegramObject - - -class WebAppData(TelegramObject): - """ - Describes data sent from a `Web App `_ to the bot. - - Source: https://core.telegram.org/bots/api#webappdata - """ - - data: str - """The data. Be aware that a bad client can send arbitrary data in this field.""" - button_text: str - """Text of the *web_app* keyboard button from which the Web App was opened. Be aware that a bad client can send arbitrary data in this field.""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, *, data: str, button_text: str, **__pydantic_kwargs: Any - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(data=data, button_text=button_text, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/types/web_app_info.py b/env/Lib/site-packages/aiogram/types/web_app_info.py deleted file mode 100644 index fbf9846..0000000 --- a/env/Lib/site-packages/aiogram/types/web_app_info.py +++ /dev/null @@ -1,27 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any - -from .base import TelegramObject - - -class WebAppInfo(TelegramObject): - """ - Describes a `Web App `_. - - Source: https://core.telegram.org/bots/api#webappinfo - """ - - url: str - """An HTTPS URL of a Web App to be opened with additional data as specified in `Initializing Web Apps `_""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__(__pydantic__self__, *, url: str, **__pydantic_kwargs: Any) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__(url=url, **__pydantic_kwargs) diff --git a/env/Lib/site-packages/aiogram/types/webhook_info.py b/env/Lib/site-packages/aiogram/types/webhook_info.py deleted file mode 100644 index 1753df4..0000000 --- a/env/Lib/site-packages/aiogram/types/webhook_info.py +++ /dev/null @@ -1,68 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, List, Optional - -from .base import TelegramObject -from .custom import DateTime - - -class WebhookInfo(TelegramObject): - """ - Describes the current status of a webhook. - - Source: https://core.telegram.org/bots/api#webhookinfo - """ - - url: str - """Webhook URL, may be empty if webhook is not set up""" - has_custom_certificate: bool - """:code:`True`, if a custom certificate was provided for webhook certificate checks""" - pending_update_count: int - """Number of updates awaiting delivery""" - ip_address: Optional[str] = None - """*Optional*. Currently used webhook IP address""" - last_error_date: Optional[DateTime] = None - """*Optional*. Unix time for the most recent error that happened when trying to deliver an update via webhook""" - last_error_message: Optional[str] = None - """*Optional*. Error message in human-readable format for the most recent error that happened when trying to deliver an update via webhook""" - last_synchronization_error_date: Optional[DateTime] = None - """*Optional*. Unix time of the most recent error that happened when trying to synchronize available updates with Telegram datacenters""" - max_connections: Optional[int] = None - """*Optional*. The maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery""" - allowed_updates: Optional[List[str]] = None - """*Optional*. A list of update types the bot is subscribed to. Defaults to all update types except *chat_member*""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - url: str, - has_custom_certificate: bool, - pending_update_count: int, - ip_address: Optional[str] = None, - last_error_date: Optional[DateTime] = None, - last_error_message: Optional[str] = None, - last_synchronization_error_date: Optional[DateTime] = None, - max_connections: Optional[int] = None, - allowed_updates: Optional[List[str]] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - url=url, - has_custom_certificate=has_custom_certificate, - pending_update_count=pending_update_count, - ip_address=ip_address, - last_error_date=last_error_date, - last_error_message=last_error_message, - last_synchronization_error_date=last_synchronization_error_date, - max_connections=max_connections, - allowed_updates=allowed_updates, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/types/write_access_allowed.py b/env/Lib/site-packages/aiogram/types/write_access_allowed.py deleted file mode 100644 index 6b8e50a..0000000 --- a/env/Lib/site-packages/aiogram/types/write_access_allowed.py +++ /dev/null @@ -1,41 +0,0 @@ -from typing import TYPE_CHECKING, Any, Optional - -from aiogram.types import TelegramObject - - -class WriteAccessAllowed(TelegramObject): - """ - This object represents a service message about a user allowing a bot to write messages after adding it to the attachment menu, launching a Web App from a link, or accepting an explicit request from a Web App sent by the method `requestWriteAccess `_. - - Source: https://core.telegram.org/bots/api#writeaccessallowed - """ - - from_request: Optional[bool] = None - """*Optional*. True, if the access was granted after the user accepted an explicit request from a Web App sent by the method `requestWriteAccess `_""" - web_app_name: Optional[str] = None - """*Optional*. Name of the Web App, if the access was granted when the Web App was launched from a link""" - from_attachment_menu: Optional[bool] = None - """*Optional*. True, if the access was granted when the bot was added to the attachment or side menu""" - - if TYPE_CHECKING: - # DO NOT EDIT MANUALLY!!! - # This section was auto-generated via `butcher` - - def __init__( - __pydantic__self__, - *, - from_request: Optional[bool] = None, - web_app_name: Optional[str] = None, - from_attachment_menu: Optional[bool] = None, - **__pydantic_kwargs: Any, - ) -> None: - # DO NOT EDIT MANUALLY!!! - # This method was auto-generated via `butcher` - # Is needed only for type checking and IDE support without any additional plugins - - super().__init__( - from_request=from_request, - web_app_name=web_app_name, - from_attachment_menu=from_attachment_menu, - **__pydantic_kwargs, - ) diff --git a/env/Lib/site-packages/aiogram/utils/__init__.py b/env/Lib/site-packages/aiogram/utils/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/env/Lib/site-packages/aiogram/utils/__pycache__/__init__.cpython-311.pyc b/env/Lib/site-packages/aiogram/utils/__pycache__/__init__.cpython-311.pyc deleted file mode 100644 index e5a6621..0000000 Binary files a/env/Lib/site-packages/aiogram/utils/__pycache__/__init__.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/utils/__pycache__/auth_widget.cpython-311.pyc b/env/Lib/site-packages/aiogram/utils/__pycache__/auth_widget.cpython-311.pyc deleted file mode 100644 index 0c5645b..0000000 Binary files a/env/Lib/site-packages/aiogram/utils/__pycache__/auth_widget.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/utils/__pycache__/backoff.cpython-311.pyc b/env/Lib/site-packages/aiogram/utils/__pycache__/backoff.cpython-311.pyc deleted file mode 100644 index 3810b09..0000000 Binary files a/env/Lib/site-packages/aiogram/utils/__pycache__/backoff.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/utils/__pycache__/callback_answer.cpython-311.pyc b/env/Lib/site-packages/aiogram/utils/__pycache__/callback_answer.cpython-311.pyc deleted file mode 100644 index 91aa564..0000000 Binary files a/env/Lib/site-packages/aiogram/utils/__pycache__/callback_answer.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/utils/__pycache__/chat_action.cpython-311.pyc b/env/Lib/site-packages/aiogram/utils/__pycache__/chat_action.cpython-311.pyc deleted file mode 100644 index 3cf48fd..0000000 Binary files a/env/Lib/site-packages/aiogram/utils/__pycache__/chat_action.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/utils/__pycache__/chat_member.cpython-311.pyc b/env/Lib/site-packages/aiogram/utils/__pycache__/chat_member.cpython-311.pyc deleted file mode 100644 index 5af477a..0000000 Binary files a/env/Lib/site-packages/aiogram/utils/__pycache__/chat_member.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/utils/__pycache__/deep_linking.cpython-311.pyc b/env/Lib/site-packages/aiogram/utils/__pycache__/deep_linking.cpython-311.pyc deleted file mode 100644 index 83aecdb..0000000 Binary files a/env/Lib/site-packages/aiogram/utils/__pycache__/deep_linking.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/utils/__pycache__/formatting.cpython-311.pyc b/env/Lib/site-packages/aiogram/utils/__pycache__/formatting.cpython-311.pyc deleted file mode 100644 index 7809393..0000000 Binary files a/env/Lib/site-packages/aiogram/utils/__pycache__/formatting.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/utils/__pycache__/keyboard.cpython-311.pyc b/env/Lib/site-packages/aiogram/utils/__pycache__/keyboard.cpython-311.pyc deleted file mode 100644 index 4c85129..0000000 Binary files a/env/Lib/site-packages/aiogram/utils/__pycache__/keyboard.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/utils/__pycache__/link.cpython-311.pyc b/env/Lib/site-packages/aiogram/utils/__pycache__/link.cpython-311.pyc deleted file mode 100644 index 5f949af..0000000 Binary files a/env/Lib/site-packages/aiogram/utils/__pycache__/link.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/utils/__pycache__/magic_filter.cpython-311.pyc b/env/Lib/site-packages/aiogram/utils/__pycache__/magic_filter.cpython-311.pyc deleted file mode 100644 index d98f05b..0000000 Binary files a/env/Lib/site-packages/aiogram/utils/__pycache__/magic_filter.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/utils/__pycache__/markdown.cpython-311.pyc b/env/Lib/site-packages/aiogram/utils/__pycache__/markdown.cpython-311.pyc deleted file mode 100644 index e1e0c0a..0000000 Binary files a/env/Lib/site-packages/aiogram/utils/__pycache__/markdown.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/utils/__pycache__/media_group.cpython-311.pyc b/env/Lib/site-packages/aiogram/utils/__pycache__/media_group.cpython-311.pyc deleted file mode 100644 index dae3bf1..0000000 Binary files a/env/Lib/site-packages/aiogram/utils/__pycache__/media_group.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/utils/__pycache__/mixins.cpython-311.pyc b/env/Lib/site-packages/aiogram/utils/__pycache__/mixins.cpython-311.pyc deleted file mode 100644 index d60c826..0000000 Binary files a/env/Lib/site-packages/aiogram/utils/__pycache__/mixins.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/utils/__pycache__/mypy_hacks.cpython-311.pyc b/env/Lib/site-packages/aiogram/utils/__pycache__/mypy_hacks.cpython-311.pyc deleted file mode 100644 index fc544c0..0000000 Binary files a/env/Lib/site-packages/aiogram/utils/__pycache__/mypy_hacks.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/utils/__pycache__/payload.cpython-311.pyc b/env/Lib/site-packages/aiogram/utils/__pycache__/payload.cpython-311.pyc deleted file mode 100644 index ef6de3c..0000000 Binary files a/env/Lib/site-packages/aiogram/utils/__pycache__/payload.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/utils/__pycache__/serialization.cpython-311.pyc b/env/Lib/site-packages/aiogram/utils/__pycache__/serialization.cpython-311.pyc deleted file mode 100644 index 7c35e9a..0000000 Binary files a/env/Lib/site-packages/aiogram/utils/__pycache__/serialization.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/utils/__pycache__/text_decorations.cpython-311.pyc b/env/Lib/site-packages/aiogram/utils/__pycache__/text_decorations.cpython-311.pyc deleted file mode 100644 index a59933e..0000000 Binary files a/env/Lib/site-packages/aiogram/utils/__pycache__/text_decorations.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/utils/__pycache__/token.cpython-311.pyc b/env/Lib/site-packages/aiogram/utils/__pycache__/token.cpython-311.pyc deleted file mode 100644 index 3de6fdd..0000000 Binary files a/env/Lib/site-packages/aiogram/utils/__pycache__/token.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/utils/__pycache__/warnings.cpython-311.pyc b/env/Lib/site-packages/aiogram/utils/__pycache__/warnings.cpython-311.pyc deleted file mode 100644 index db95559..0000000 Binary files a/env/Lib/site-packages/aiogram/utils/__pycache__/warnings.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/utils/__pycache__/web_app.cpython-311.pyc b/env/Lib/site-packages/aiogram/utils/__pycache__/web_app.cpython-311.pyc deleted file mode 100644 index 5595a6d..0000000 Binary files a/env/Lib/site-packages/aiogram/utils/__pycache__/web_app.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/utils/auth_widget.py b/env/Lib/site-packages/aiogram/utils/auth_widget.py deleted file mode 100644 index 080183e..0000000 --- a/env/Lib/site-packages/aiogram/utils/auth_widget.py +++ /dev/null @@ -1,34 +0,0 @@ -import hashlib -import hmac -from typing import Any, Dict - - -def check_signature(token: str, hash: str, **kwargs: Any) -> bool: - """ - Generate hexadecimal representation - of the HMAC-SHA-256 signature of the data-check-string - with the SHA256 hash of the bot's token used as a secret key - - :param token: - :param hash: - :param kwargs: all params received on auth - :return: - """ - secret = hashlib.sha256(token.encode("utf-8")) - check_string = "\n".join(f"{k}={kwargs[k]}" for k in sorted(kwargs)) - hmac_string = hmac.new( - secret.digest(), check_string.encode("utf-8"), digestmod=hashlib.sha256 - ).hexdigest() - return hmac_string == hash - - -def check_integrity(token: str, data: Dict[str, Any]) -> bool: - """ - Verify the authentication and the integrity - of the data received on user's auth - - :param token: Bot's token - :param data: all data that came on auth - :return: - """ - return check_signature(token, **data) diff --git a/env/Lib/site-packages/aiogram/utils/backoff.py b/env/Lib/site-packages/aiogram/utils/backoff.py deleted file mode 100644 index ebe08e9..0000000 --- a/env/Lib/site-packages/aiogram/utils/backoff.py +++ /dev/null @@ -1,83 +0,0 @@ -import asyncio -import time -from dataclasses import dataclass -from random import normalvariate - - -@dataclass(frozen=True) -class BackoffConfig: - min_delay: float - max_delay: float - factor: float - jitter: float - - def __post_init__(self) -> None: - if self.max_delay <= self.min_delay: - raise ValueError("`max_delay` should be greater than `min_delay`") - if self.factor <= 1: - raise ValueError("`factor` should be greater than 1") - - -class Backoff: - def __init__(self, config: BackoffConfig) -> None: - self.config = config - self._next_delay = config.min_delay - self._current_delay = 0.0 - self._counter = 0 - - def __iter__(self) -> "Backoff": - return self - - @property - def min_delay(self) -> float: - return self.config.min_delay - - @property - def max_delay(self) -> float: - return self.config.max_delay - - @property - def factor(self) -> float: - return self.config.factor - - @property - def jitter(self) -> float: - return self.config.jitter - - @property - def next_delay(self) -> float: - return self._next_delay - - @property - def current_delay(self) -> float: - return self._current_delay - - @property - def counter(self) -> int: - return self._counter - - def sleep(self) -> None: - time.sleep(next(self)) - - async def asleep(self) -> None: - await asyncio.sleep(next(self)) - - def _calculate_next(self, value: float) -> float: - return normalvariate(min(value * self.factor, self.max_delay), self.jitter) - - def __next__(self) -> float: - self._current_delay = self._next_delay - self._next_delay = self._calculate_next(self._next_delay) - self._counter += 1 - return self._current_delay - - def reset(self) -> None: - self._current_delay = 0.0 - self._counter = 0 - self._next_delay = self.min_delay - - def __str__(self) -> str: - return ( - f"Backoff(tryings={self._counter}, current_delay={self._current_delay}, " - f"next_delay={self._next_delay})" - ) diff --git a/env/Lib/site-packages/aiogram/utils/callback_answer.py b/env/Lib/site-packages/aiogram/utils/callback_answer.py deleted file mode 100644 index 1515a7e..0000000 --- a/env/Lib/site-packages/aiogram/utils/callback_answer.py +++ /dev/null @@ -1,211 +0,0 @@ -from typing import Any, Awaitable, Callable, Dict, Optional, Union - -from aiogram import BaseMiddleware, loggers -from aiogram.dispatcher.flags import get_flag -from aiogram.exceptions import CallbackAnswerException -from aiogram.methods import AnswerCallbackQuery -from aiogram.types import CallbackQuery, TelegramObject - - -class CallbackAnswer: - def __init__( - self, - answered: bool, - disabled: bool = False, - text: Optional[str] = None, - show_alert: Optional[bool] = None, - url: Optional[str] = None, - cache_time: Optional[int] = None, - ) -> None: - """ - Callback answer configuration - - :param answered: this request is already answered by middleware - :param disabled: answer will not be performed - :param text: answer with text - :param show_alert: show alert - :param url: game url - :param cache_time: cache answer for some time - """ - self._answered = answered - self._disabled = disabled - self._text = text - self._show_alert = show_alert - self._url = url - self._cache_time = cache_time - - def disable(self) -> None: - """ - Deactivate answering for this handler - """ - self.disabled = True - - @property - def disabled(self) -> bool: - """Indicates that automatic answer is disabled in this handler""" - return self._disabled - - @disabled.setter - def disabled(self, value: bool) -> None: - if self._answered: - raise CallbackAnswerException("Can't change disabled state after answer") - self._disabled = value - - @property - def answered(self) -> bool: - """ - Indicates that request is already answered by middleware - """ - return self._answered - - @property - def text(self) -> Optional[str]: - """ - Response text - :return: - """ - return self._text - - @text.setter - def text(self, value: Optional[str]) -> None: - if self._answered: - raise CallbackAnswerException("Can't change text after answer") - self._text = value - - @property - def show_alert(self) -> Optional[bool]: - """ - Whether to display an alert - """ - return self._show_alert - - @show_alert.setter - def show_alert(self, value: Optional[bool]) -> None: - if self._answered: - raise CallbackAnswerException("Can't change show_alert after answer") - self._show_alert = value - - @property - def url(self) -> Optional[str]: - """ - Game url - """ - return self._url - - @url.setter - def url(self, value: Optional[str]) -> None: - if self._answered: - raise CallbackAnswerException("Can't change url after answer") - self._url = value - - @property - def cache_time(self) -> Optional[int]: - """ - Response cache time - """ - return self._cache_time - - @cache_time.setter - def cache_time(self, value: Optional[int]) -> None: - if self._answered: - raise CallbackAnswerException("Can't change cache_time after answer") - self._cache_time = value - - def __str__(self) -> str: - args = ", ".join( - f"{k}={v!r}" - for k, v in { - "answered": self.answered, - "disabled": self.disabled, - "text": self.text, - "show_alert": self.show_alert, - "url": self.url, - "cache_time": self.cache_time, - }.items() - if v is not None - ) - return f"{type(self).__name__}({args})" - - -class CallbackAnswerMiddleware(BaseMiddleware): - def __init__( - self, - pre: bool = False, - text: Optional[str] = None, - show_alert: Optional[bool] = None, - url: Optional[str] = None, - cache_time: Optional[int] = None, - ) -> None: - """ - Inner middleware for callback query handlers, can be useful in bots with a lot of callback - handlers to automatically take answer to all requests - - :param pre: send answer before execute handler - :param text: answer with text - :param show_alert: show alert - :param url: game url - :param cache_time: cache answer for some time - """ - self.pre = pre - self.text = text - self.show_alert = show_alert - self.url = url - self.cache_time = cache_time - - async def __call__( - self, - handler: Callable[[TelegramObject, Dict[str, Any]], Awaitable[Any]], - event: TelegramObject, - data: Dict[str, Any], - ) -> Any: - if not isinstance(event, CallbackQuery): - return await handler(event, data) - - callback_answer = data["callback_answer"] = self.construct_callback_answer( - properties=get_flag(data, "callback_answer") - ) - - if not callback_answer.disabled and callback_answer.answered: - await self.answer(event, callback_answer) - try: - return await handler(event, data) - finally: - if not callback_answer.disabled and not callback_answer.answered: - await self.answer(event, callback_answer) - - def construct_callback_answer( - self, properties: Optional[Union[Dict[str, Any], bool]] - ) -> CallbackAnswer: - pre, disabled, text, show_alert, url, cache_time = ( - self.pre, - False, - self.text, - self.show_alert, - self.url, - self.cache_time, - ) - if isinstance(properties, dict): - pre = properties.get("pre", pre) - disabled = properties.get("disabled", disabled) - text = properties.get("text", text) - show_alert = properties.get("show_alert", show_alert) - url = properties.get("url", url) - cache_time = properties.get("cache_time", cache_time) - - return CallbackAnswer( - answered=pre, - disabled=disabled, - text=text, - show_alert=show_alert, - url=url, - cache_time=cache_time, - ) - - def answer(self, event: CallbackQuery, callback_answer: CallbackAnswer) -> AnswerCallbackQuery: - loggers.middlewares.info("Answer to callback query id=%s", event.id) - return event.answer( - text=callback_answer.text, - show_alert=callback_answer.show_alert, - url=callback_answer.url, - cache_time=callback_answer.cache_time, - ) diff --git a/env/Lib/site-packages/aiogram/utils/chat_action.py b/env/Lib/site-packages/aiogram/utils/chat_action.py deleted file mode 100644 index a2f3b46..0000000 --- a/env/Lib/site-packages/aiogram/utils/chat_action.py +++ /dev/null @@ -1,379 +0,0 @@ -import asyncio -import logging -import time -from asyncio import Event, Lock -from contextlib import suppress -from types import TracebackType -from typing import Any, Awaitable, Callable, Dict, Optional, Type, Union - -from aiogram import BaseMiddleware, Bot -from aiogram.dispatcher.flags import get_flag -from aiogram.types import Message, TelegramObject - -logger = logging.getLogger(__name__) -DEFAULT_INTERVAL = 5.0 -DEFAULT_INITIAL_SLEEP = 0.0 - - -class ChatActionSender: - """ - This utility helps to automatically send chat action until long actions is done - to take acknowledge bot users the bot is doing something and not crashed. - - Provides simply to use context manager. - - Technically sender start background task with infinity loop which works - until action will be finished and sends the - `chat action `_ - every 5 seconds. - """ - - def __init__( - self, - *, - bot: Bot, - chat_id: Union[str, int], - message_thread_id: Optional[int] = None, - action: str = "typing", - interval: float = DEFAULT_INTERVAL, - initial_sleep: float = DEFAULT_INITIAL_SLEEP, - ) -> None: - """ - :param bot: instance of the bot - :param chat_id: target chat id - :param message_thread_id: unique identifier for the target message thread; supergroups only - :param action: chat action type - :param interval: interval between iterations - :param initial_sleep: sleep before first sending of the action - """ - self.chat_id = chat_id - self.message_thread_id = message_thread_id - self.action = action - self.interval = interval - self.initial_sleep = initial_sleep - self.bot = bot - - self._lock = Lock() - self._close_event = Event() - self._closed_event = Event() - self._task: Optional[asyncio.Task[Any]] = None - - @property - def running(self) -> bool: - return bool(self._task) - - async def _wait(self, interval: float) -> None: - with suppress(asyncio.TimeoutError): - await asyncio.wait_for(self._close_event.wait(), interval) - - async def _worker(self) -> None: - logger.debug( - "Started chat action %r sender in chat_id=%s via bot id=%d", - self.action, - self.chat_id, - self.bot.id, - ) - try: - counter = 0 - await self._wait(self.initial_sleep) - while not self._close_event.is_set(): - start = time.monotonic() - logger.debug( - "Sent chat action %r to chat_id=%s via bot %d (already sent actions %d)", - self.action, - self.chat_id, - self.bot.id, - counter, - ) - await self.bot.send_chat_action( - chat_id=self.chat_id, - action=self.action, - message_thread_id=self.message_thread_id, - ) - counter += 1 - - interval = self.interval - (time.monotonic() - start) - await self._wait(interval) - finally: - logger.debug( - "Finished chat action %r sender in chat_id=%s via bot id=%d", - self.action, - self.chat_id, - self.bot.id, - ) - self._closed_event.set() - - async def _run(self) -> None: - async with self._lock: - self._close_event.clear() - self._closed_event.clear() - if self.running: - raise RuntimeError("Already running") - self._task = asyncio.create_task(self._worker()) - - async def _stop(self) -> None: - async with self._lock: - if not self.running: - return - if not self._close_event.is_set(): # pragma: no branches - self._close_event.set() - await self._closed_event.wait() - self._task = None - - async def __aenter__(self) -> "ChatActionSender": - await self._run() - return self - - async def __aexit__( - self, - exc_type: Optional[Type[BaseException]], - exc_value: Optional[BaseException], - traceback: Optional[TracebackType], - ) -> Any: - await self._stop() - - @classmethod - def typing( - cls, - chat_id: Union[int, str], - bot: Bot, - message_thread_id: Optional[int] = None, - interval: float = DEFAULT_INTERVAL, - initial_sleep: float = DEFAULT_INITIAL_SLEEP, - ) -> "ChatActionSender": - """Create instance of the sender with `typing` action""" - return cls( - bot=bot, - chat_id=chat_id, - message_thread_id=message_thread_id, - action="typing", - interval=interval, - initial_sleep=initial_sleep, - ) - - @classmethod - def upload_photo( - cls, - chat_id: Union[int, str], - bot: Bot, - message_thread_id: Optional[int] = None, - interval: float = DEFAULT_INTERVAL, - initial_sleep: float = DEFAULT_INITIAL_SLEEP, - ) -> "ChatActionSender": - """Create instance of the sender with `upload_photo` action""" - return cls( - bot=bot, - chat_id=chat_id, - message_thread_id=message_thread_id, - action="upload_photo", - interval=interval, - initial_sleep=initial_sleep, - ) - - @classmethod - def record_video( - cls, - chat_id: Union[int, str], - bot: Bot, - message_thread_id: Optional[int] = None, - interval: float = DEFAULT_INTERVAL, - initial_sleep: float = DEFAULT_INITIAL_SLEEP, - ) -> "ChatActionSender": - """Create instance of the sender with `record_video` action""" - return cls( - bot=bot, - chat_id=chat_id, - message_thread_id=message_thread_id, - action="record_video", - interval=interval, - initial_sleep=initial_sleep, - ) - - @classmethod - def upload_video( - cls, - chat_id: Union[int, str], - bot: Bot, - message_thread_id: Optional[int] = None, - interval: float = DEFAULT_INTERVAL, - initial_sleep: float = DEFAULT_INITIAL_SLEEP, - ) -> "ChatActionSender": - """Create instance of the sender with `upload_video` action""" - return cls( - bot=bot, - chat_id=chat_id, - message_thread_id=message_thread_id, - action="upload_video", - interval=interval, - initial_sleep=initial_sleep, - ) - - @classmethod - def record_voice( - cls, - chat_id: Union[int, str], - bot: Bot, - message_thread_id: Optional[int] = None, - interval: float = DEFAULT_INTERVAL, - initial_sleep: float = DEFAULT_INITIAL_SLEEP, - ) -> "ChatActionSender": - """Create instance of the sender with `record_voice` action""" - return cls( - bot=bot, - chat_id=chat_id, - message_thread_id=message_thread_id, - action="record_voice", - interval=interval, - initial_sleep=initial_sleep, - ) - - @classmethod - def upload_voice( - cls, - chat_id: Union[int, str], - bot: Bot, - message_thread_id: Optional[int] = None, - interval: float = DEFAULT_INTERVAL, - initial_sleep: float = DEFAULT_INITIAL_SLEEP, - ) -> "ChatActionSender": - """Create instance of the sender with `upload_voice` action""" - return cls( - bot=bot, - chat_id=chat_id, - message_thread_id=message_thread_id, - action="upload_voice", - interval=interval, - initial_sleep=initial_sleep, - ) - - @classmethod - def upload_document( - cls, - chat_id: Union[int, str], - bot: Bot, - message_thread_id: Optional[int] = None, - interval: float = DEFAULT_INTERVAL, - initial_sleep: float = DEFAULT_INITIAL_SLEEP, - ) -> "ChatActionSender": - """Create instance of the sender with `upload_document` action""" - return cls( - bot=bot, - chat_id=chat_id, - message_thread_id=message_thread_id, - action="upload_document", - interval=interval, - initial_sleep=initial_sleep, - ) - - @classmethod - def choose_sticker( - cls, - chat_id: Union[int, str], - bot: Bot, - message_thread_id: Optional[int] = None, - interval: float = DEFAULT_INTERVAL, - initial_sleep: float = DEFAULT_INITIAL_SLEEP, - ) -> "ChatActionSender": - """Create instance of the sender with `choose_sticker` action""" - return cls( - bot=bot, - chat_id=chat_id, - message_thread_id=message_thread_id, - action="choose_sticker", - interval=interval, - initial_sleep=initial_sleep, - ) - - @classmethod - def find_location( - cls, - chat_id: Union[int, str], - bot: Bot, - message_thread_id: Optional[int] = None, - interval: float = DEFAULT_INTERVAL, - initial_sleep: float = DEFAULT_INITIAL_SLEEP, - ) -> "ChatActionSender": - """Create instance of the sender with `find_location` action""" - return cls( - bot=bot, - chat_id=chat_id, - message_thread_id=message_thread_id, - action="find_location", - interval=interval, - initial_sleep=initial_sleep, - ) - - @classmethod - def record_video_note( - cls, - chat_id: Union[int, str], - bot: Bot, - message_thread_id: Optional[int] = None, - interval: float = DEFAULT_INTERVAL, - initial_sleep: float = DEFAULT_INITIAL_SLEEP, - ) -> "ChatActionSender": - """Create instance of the sender with `record_video_note` action""" - return cls( - bot=bot, - chat_id=chat_id, - message_thread_id=message_thread_id, - action="record_video_note", - interval=interval, - initial_sleep=initial_sleep, - ) - - @classmethod - def upload_video_note( - cls, - chat_id: Union[int, str], - bot: Bot, - message_thread_id: Optional[int] = None, - interval: float = DEFAULT_INTERVAL, - initial_sleep: float = DEFAULT_INITIAL_SLEEP, - ) -> "ChatActionSender": - """Create instance of the sender with `upload_video_note` action""" - return cls( - bot=bot, - chat_id=chat_id, - message_thread_id=message_thread_id, - action="upload_video_note", - interval=interval, - initial_sleep=initial_sleep, - ) - - -class ChatActionMiddleware(BaseMiddleware): - """ - Helps to automatically use chat action sender for all message handlers - """ - - async def __call__( - self, - handler: Callable[[TelegramObject, Dict[str, Any]], Awaitable[Any]], - event: TelegramObject, - data: Dict[str, Any], - ) -> Any: - if not isinstance(event, Message): - return await handler(event, data) - bot = data["bot"] - - chat_action = get_flag(data, "chat_action") or "typing" - kwargs = {} - if isinstance(chat_action, dict): - if initial_sleep := chat_action.get("initial_sleep"): - kwargs["initial_sleep"] = initial_sleep - if interval := chat_action.get("interval"): - kwargs["interval"] = interval - if action := chat_action.get("action"): - kwargs["action"] = action - elif isinstance(chat_action, bool): - kwargs["action"] = "typing" - else: - kwargs["action"] = chat_action - kwargs["message_thread_id"] = ( - event.message_thread_id - if isinstance(event, Message) and event.is_topic_message - else None - ) - async with ChatActionSender(bot=bot, chat_id=event.chat.id, **kwargs): - return await handler(event, data) diff --git a/env/Lib/site-packages/aiogram/utils/chat_member.py b/env/Lib/site-packages/aiogram/utils/chat_member.py deleted file mode 100644 index 7ac666c..0000000 --- a/env/Lib/site-packages/aiogram/utils/chat_member.py +++ /dev/null @@ -1,37 +0,0 @@ -from typing import Tuple, Type, Union - -from pydantic import Field, TypeAdapter -from typing_extensions import Annotated - -from aiogram.types import ( - ChatMember, - ChatMemberAdministrator, - ChatMemberBanned, - ChatMemberLeft, - ChatMemberMember, - ChatMemberOwner, - ChatMemberRestricted, -) - -ChatMemberUnion = Union[ - ChatMemberOwner, - ChatMemberAdministrator, - ChatMemberMember, - ChatMemberRestricted, - ChatMemberLeft, - ChatMemberBanned, -] - -ChatMemberCollection = Tuple[Type[ChatMember], ...] - -ChatMemberAdapter: TypeAdapter[ChatMemberUnion] = TypeAdapter( - Annotated[ - ChatMemberUnion, - Field(discriminator="status"), - ] -) - -ADMINS: ChatMemberCollection = (ChatMemberOwner, ChatMemberAdministrator) -USERS: ChatMemberCollection = (ChatMemberMember, ChatMemberRestricted) -MEMBERS: ChatMemberCollection = ADMINS + USERS -NOT_MEMBERS: ChatMemberCollection = (ChatMemberLeft, ChatMemberBanned) diff --git a/env/Lib/site-packages/aiogram/utils/deep_linking.py b/env/Lib/site-packages/aiogram/utils/deep_linking.py deleted file mode 100644 index 19cc64c..0000000 --- a/env/Lib/site-packages/aiogram/utils/deep_linking.py +++ /dev/null @@ -1,112 +0,0 @@ -from __future__ import annotations - -__all__ = [ - "create_start_link", - "create_startgroup_link", - "create_deep_link", - "create_telegram_link", - "encode_payload", - "decode_payload", -] - -import re -from typing import TYPE_CHECKING, Callable, Literal, Optional, cast - -from aiogram.utils.link import create_telegram_link -from aiogram.utils.payload import decode_payload, encode_payload - -if TYPE_CHECKING: - from aiogram import Bot - -BAD_PATTERN = re.compile(r"[^A-z0-9-]") - - -async def create_start_link( - bot: Bot, - payload: str, - encode: bool = False, - encoder: Optional[Callable[[bytes], bytes]] = None, -) -> str: - """ - Create 'start' deep link with your payload. - - If you need to encode payload or pass special characters - - set encode as True - - :param bot: bot instance - :param payload: args passed with /start - :param encode: encode payload with base64url or custom encoder - :param encoder: custom encoder callable - :return: link - """ - username = (await bot.me()).username - return create_deep_link( - username=cast(str, username), - link_type="start", - payload=payload, - encode=encode, - encoder=encoder, - ) - - -async def create_startgroup_link( - bot: Bot, - payload: str, - encode: bool = False, - encoder: Optional[Callable[[bytes], bytes]] = None, -) -> str: - """ - Create 'startgroup' deep link with your payload. - - If you need to encode payload or pass special characters - - set encode as True - - :param bot: bot instance - :param payload: args passed with /start - :param encode: encode payload with base64url or custom encoder - :param encoder: custom encoder callable - :return: link - """ - username = (await bot.me()).username - return create_deep_link( - username=cast(str, username), - link_type="startgroup", - payload=payload, - encode=encode, - encoder=encoder, - ) - - -def create_deep_link( - username: str, - link_type: Literal["start", "startgroup"], - payload: str, - encode: bool = False, - encoder: Optional[Callable[[bytes], bytes]] = None, -) -> str: - """ - Create deep link. - - :param username: - :param link_type: `start` or `startgroup` - :param payload: any string-convertible data - :param encode: encode payload with base64url or custom encoder - :param encoder: custom encoder callable - :return: deeplink - """ - if not isinstance(payload, str): - payload = str(payload) - - if encode or encoder: - payload = encode_payload(payload, encoder=encoder) - - if re.search(BAD_PATTERN, payload): - raise ValueError( - "Wrong payload! Only A-Z, a-z, 0-9, _ and - are allowed. " - "Pass `encode=True` or encode payload manually." - ) - - if len(payload) > 64: - raise ValueError("Payload must be up to 64 characters long.") - - return create_telegram_link(username, **{cast(str, link_type): payload}) diff --git a/env/Lib/site-packages/aiogram/utils/formatting.py b/env/Lib/site-packages/aiogram/utils/formatting.py deleted file mode 100644 index 929afc0..0000000 --- a/env/Lib/site-packages/aiogram/utils/formatting.py +++ /dev/null @@ -1,632 +0,0 @@ -import textwrap -from typing import ( - Any, - ClassVar, - Dict, - Generator, - Iterable, - Iterator, - List, - Optional, - Tuple, - Type, -) - -from typing_extensions import Self - -from aiogram.enums import MessageEntityType -from aiogram.types import MessageEntity, User -from aiogram.utils.text_decorations import ( - add_surrogates, - html_decoration, - markdown_decoration, - remove_surrogates, -) - -NodeType = Any - - -def sizeof(value: str) -> int: - return len(value.encode("utf-16-le")) // 2 - - -class Text(Iterable[NodeType]): - """ - Simple text element - """ - - type: ClassVar[Optional[str]] = None - - __slots__ = ("_body", "_params") - - def __init__( - self, - *body: NodeType, - **params: Any, - ) -> None: - self._body: Tuple[NodeType, ...] = body - self._params: Dict[str, Any] = params - - @classmethod - def from_entities(cls, text: str, entities: List[MessageEntity]) -> "Text": - return cls( - *_unparse_entities( - text=add_surrogates(text), - entities=sorted(entities, key=lambda item: item.offset) if entities else [], - ) - ) - - def render( - self, - *, - _offset: int = 0, - _sort: bool = True, - _collect_entities: bool = True, - ) -> Tuple[str, List[MessageEntity]]: - """ - Render elements tree as text with entities list - - :return: - """ - - text = "" - entities = [] - offset = _offset - - for node in self._body: - if not isinstance(node, Text): - node = str(node) - text += node - offset += sizeof(node) - else: - node_text, node_entities = node.render( - _offset=offset, - _sort=False, - _collect_entities=_collect_entities, - ) - text += node_text - offset += sizeof(node_text) - if _collect_entities: - entities.extend(node_entities) - - if _collect_entities and self.type: - entities.append(self._render_entity(offset=_offset, length=offset - _offset)) - - if _collect_entities and _sort: - entities.sort(key=lambda entity: entity.offset) - - return text, entities - - def _render_entity(self, *, offset: int, length: int) -> MessageEntity: - assert self.type is not None, "Node without type can't be rendered as entity" - return MessageEntity(type=self.type, offset=offset, length=length, **self._params) - - def as_kwargs( - self, - *, - text_key: str = "text", - entities_key: str = "entities", - replace_parse_mode: bool = True, - parse_mode_key: str = "parse_mode", - ) -> Dict[str, Any]: - """ - Render elements tree as keyword arguments for usage in the API call, for example: - - .. code-block:: python - - entities = Text(...) - await message.answer(**entities.as_kwargs()) - - :param text_key: - :param entities_key: - :param replace_parse_mode: - :param parse_mode_key: - :return: - """ - text_value, entities_value = self.render() - result: Dict[str, Any] = { - text_key: text_value, - entities_key: entities_value, - } - if replace_parse_mode: - result[parse_mode_key] = None - return result - - def as_html(self) -> str: - """ - Render elements tree as HTML markup - """ - text, entities = self.render() - return html_decoration.unparse(text, entities) - - def as_markdown(self) -> str: - """ - Render elements tree as MarkdownV2 markup - """ - text, entities = self.render() - return markdown_decoration.unparse(text, entities) - - def replace(self: Self, *args: Any, **kwargs: Any) -> Self: - return type(self)(*args, **{**self._params, **kwargs}) - - def as_pretty_string(self, indent: bool = False) -> str: - sep = ",\n" if indent else ", " - body = sep.join( - item.as_pretty_string(indent=indent) if isinstance(item, Text) else repr(item) - for item in self._body - ) - params = sep.join(f"{k}={v!r}" for k, v in self._params.items() if v is not None) - - args = [] - if body: - args.append(body) - if params: - args.append(params) - - args_str = sep.join(args) - if indent: - args_str = textwrap.indent("\n" + args_str + "\n", " ") - return f"{type(self).__name__}({args_str})" - - def __add__(self, other: NodeType) -> "Text": - if isinstance(other, Text) and other.type == self.type and self._params == other._params: - return type(self)(*self, *other, **self._params) - if type(self) is Text and isinstance(other, str): - return type(self)(*self, other, **self._params) - return Text(self, other) - - def __iter__(self) -> Iterator[NodeType]: - yield from self._body - - def __len__(self) -> int: - text, _ = self.render(_collect_entities=False) - return sizeof(text) - - def __getitem__(self, item: slice) -> "Text": - if not isinstance(item, slice): - raise TypeError("Can only be sliced") - if (item.start is None or item.start == 0) and item.stop is None: - return self.replace(*self._body) - start = 0 if item.start is None else item.start - stop = len(self) if item.stop is None else item.stop - if start == stop: - return self.replace() - - nodes = [] - position = 0 - - for node in self._body: - node_size = len(node) - current_position = position - position += node_size - if position < start: - continue - if current_position > stop: - break - a = max((0, start - current_position)) - b = min((node_size, stop - current_position)) - new_node = node[a:b] - if not new_node: - continue - nodes.append(new_node) - - return self.replace(*nodes) - - -class HashTag(Text): - """ - Hashtag element. - - .. warning:: - - The value should always start with '#' symbol - - Will be wrapped into :obj:`aiogram.types.message_entity.MessageEntity` - with type :obj:`aiogram.enums.message_entity_type.MessageEntityType.HASHTAG` - """ - - type = MessageEntityType.HASHTAG - - def __init__(self, *body: NodeType, **params: Any) -> None: - if len(body) != 1: - raise ValueError("Hashtag can contain only one element") - if not isinstance(body[0], str): - raise ValueError("Hashtag can contain only string") - if not body[0].startswith("#"): - body = ("#" + body[0],) - super().__init__(*body, **params) - - -class CashTag(Text): - """ - Cashtag element. - - .. warning:: - - The value should always start with '$' symbol - - Will be wrapped into :obj:`aiogram.types.message_entity.MessageEntity` - with type :obj:`aiogram.enums.message_entity_type.MessageEntityType.CASHTAG` - """ - - type = MessageEntityType.CASHTAG - - def __init__(self, *body: NodeType, **params: Any) -> None: - if len(body) != 1: - raise ValueError("Cashtag can contain only one element") - if not isinstance(body[0], str): - raise ValueError("Cashtag can contain only string") - if not body[0].startswith("$"): - body = ("$" + body[0],) - super().__init__(*body, **params) - - -class BotCommand(Text): - """ - Bot command element. - - .. warning:: - - The value should always start with '/' symbol - - Will be wrapped into :obj:`aiogram.types.message_entity.MessageEntity` - with type :obj:`aiogram.enums.message_entity_type.MessageEntityType.BOT_COMMAND` - """ - - type = MessageEntityType.BOT_COMMAND - - -class Url(Text): - """ - Url element. - - Will be wrapped into :obj:`aiogram.types.message_entity.MessageEntity` - with type :obj:`aiogram.enums.message_entity_type.MessageEntityType.URL` - """ - - type = MessageEntityType.URL - - -class Email(Text): - """ - Email element. - - Will be wrapped into :obj:`aiogram.types.message_entity.MessageEntity` - with type :obj:`aiogram.enums.message_entity_type.MessageEntityType.EMAIL` - """ - - type = MessageEntityType.EMAIL - - -class PhoneNumber(Text): - """ - Phone number element. - - Will be wrapped into :obj:`aiogram.types.message_entity.MessageEntity` - with type :obj:`aiogram.enums.message_entity_type.MessageEntityType.PHONE_NUMBER` - """ - - type = MessageEntityType.PHONE_NUMBER - - -class Bold(Text): - """ - Bold element. - - Will be wrapped into :obj:`aiogram.types.message_entity.MessageEntity` - with type :obj:`aiogram.enums.message_entity_type.MessageEntityType.BOLD` - """ - - type = MessageEntityType.BOLD - - -class Italic(Text): - """ - Italic element. - - Will be wrapped into :obj:`aiogram.types.message_entity.MessageEntity` - with type :obj:`aiogram.enums.message_entity_type.MessageEntityType.ITALIC` - """ - - type = MessageEntityType.ITALIC - - -class Underline(Text): - """ - Underline element. - - Will be wrapped into :obj:`aiogram.types.message_entity.MessageEntity` - with type :obj:`aiogram.enums.message_entity_type.MessageEntityType.UNDERLINE` - """ - - type = MessageEntityType.UNDERLINE - - -class Strikethrough(Text): - """ - Strikethrough element. - - Will be wrapped into :obj:`aiogram.types.message_entity.MessageEntity` - with type :obj:`aiogram.enums.message_entity_type.MessageEntityType.STRIKETHROUGH` - """ - - type = MessageEntityType.STRIKETHROUGH - - -class Spoiler(Text): - """ - Spoiler element. - - Will be wrapped into :obj:`aiogram.types.message_entity.MessageEntity` - with type :obj:`aiogram.enums.message_entity_type.MessageEntityType.SPOILER` - """ - - type = MessageEntityType.SPOILER - - -class Code(Text): - """ - Code element. - - Will be wrapped into :obj:`aiogram.types.message_entity.MessageEntity` - with type :obj:`aiogram.enums.message_entity_type.MessageEntityType.CODE` - """ - - type = MessageEntityType.CODE - - -class Pre(Text): - """ - Pre element. - - Will be wrapped into :obj:`aiogram.types.message_entity.MessageEntity` - with type :obj:`aiogram.enums.message_entity_type.MessageEntityType.PRE` - """ - - type = MessageEntityType.PRE - - def __init__(self, *body: NodeType, language: Optional[str] = None, **params: Any) -> None: - super().__init__(*body, language=language, **params) - - -class TextLink(Text): - """ - Text link element. - - Will be wrapped into :obj:`aiogram.types.message_entity.MessageEntity` - with type :obj:`aiogram.enums.message_entity_type.MessageEntityType.TEXT_LINK` - """ - - type = MessageEntityType.TEXT_LINK - - def __init__(self, *body: NodeType, url: str, **params: Any) -> None: - super().__init__(*body, url=url, **params) - - -class TextMention(Text): - """ - Text mention element. - - Will be wrapped into :obj:`aiogram.types.message_entity.MessageEntity` - with type :obj:`aiogram.enums.message_entity_type.MessageEntityType.TEXT_MENTION` - """ - - type = MessageEntityType.TEXT_MENTION - - def __init__(self, *body: NodeType, user: User, **params: Any) -> None: - super().__init__(*body, user=user, **params) - - -class CustomEmoji(Text): - """ - Custom emoji element. - - Will be wrapped into :obj:`aiogram.types.message_entity.MessageEntity` - with type :obj:`aiogram.enums.message_entity_type.MessageEntityType.CUSTOM_EMOJI` - """ - - type = MessageEntityType.CUSTOM_EMOJI - - def __init__(self, *body: NodeType, custom_emoji_id: str, **params: Any) -> None: - super().__init__(*body, custom_emoji_id=custom_emoji_id, **params) - - -class BlockQuote(Text): - """ - Block quote element. - - Will be wrapped into :obj:`aiogram.types.message_entity.MessageEntity` - with type :obj:`aiogram.enums.message_entity_type.MessageEntityType.BLOCKQUOTE` - """ - - type = MessageEntityType.BLOCKQUOTE - - -class ExpandableBlockQuote(Text): - """ - Expandable block quote element. - - Will be wrapped into :obj:`aiogram.types.message_entity.MessageEntity` - with type :obj:`aiogram.enums.message_entity_type.MessageEntityType.EXPANDABLE_BLOCKQUOTE` - """ - - type = MessageEntityType.EXPANDABLE_BLOCKQUOTE - - -NODE_TYPES: Dict[Optional[str], Type[Text]] = { - Text.type: Text, - HashTag.type: HashTag, - CashTag.type: CashTag, - BotCommand.type: BotCommand, - Url.type: Url, - Email.type: Email, - PhoneNumber.type: PhoneNumber, - Bold.type: Bold, - Italic.type: Italic, - Underline.type: Underline, - Strikethrough.type: Strikethrough, - Spoiler.type: Spoiler, - Code.type: Code, - Pre.type: Pre, - TextLink.type: TextLink, - TextMention.type: TextMention, - CustomEmoji.type: CustomEmoji, - BlockQuote.type: BlockQuote, - ExpandableBlockQuote.type: ExpandableBlockQuote, -} - - -def _apply_entity(entity: MessageEntity, *nodes: NodeType) -> NodeType: - """ - Apply single entity to text - - :param entity: - :param text: - :return: - """ - node_type = NODE_TYPES.get(entity.type, Text) - return node_type( - *nodes, **entity.model_dump(exclude={"type", "offset", "length"}, warnings=False) - ) - - -def _unparse_entities( - text: bytes, - entities: List[MessageEntity], - offset: Optional[int] = None, - length: Optional[int] = None, -) -> Generator[NodeType, None, None]: - if offset is None: - offset = 0 - length = length or len(text) - - for index, entity in enumerate(entities): - if entity.offset * 2 < offset: - continue - if entity.offset * 2 > offset: - yield remove_surrogates(text[offset : entity.offset * 2]) - start = entity.offset * 2 - offset = entity.offset * 2 + entity.length * 2 - - sub_entities = list(filter(lambda e: e.offset * 2 < (offset or 0), entities[index + 1 :])) - yield _apply_entity( - entity, - *_unparse_entities(text, sub_entities, offset=start, length=offset), - ) - - if offset < length: - yield remove_surrogates(text[offset:length]) - - -def as_line(*items: NodeType, end: str = "\n", sep: str = "") -> Text: - """ - Wrap multiple nodes into line with :code:`\\\\n` at the end of line. - - :param items: Text or Any - :param end: ending of the line, by default is :code:`\\\\n` - :param sep: separator between items, by default is empty string - :return: Text - """ - if sep: - nodes = [] - for item in items[:-1]: - nodes.extend([item, sep]) - nodes.append(items[-1]) - nodes.append(end) - else: - nodes = [*items, end] - return Text(*nodes) - - -def as_list(*items: NodeType, sep: str = "\n") -> Text: - """ - Wrap each element to separated lines - - :param items: - :param sep: - :return: - """ - nodes = [] - for item in items[:-1]: - nodes.extend([item, sep]) - nodes.append(items[-1]) - return Text(*nodes) - - -def as_marked_list(*items: NodeType, marker: str = "- ") -> Text: - """ - Wrap elements as marked list - - :param items: - :param marker: line marker, by default is '- ' - :return: Text - """ - return as_list(*(Text(marker, item) for item in items)) - - -def as_numbered_list(*items: NodeType, start: int = 1, fmt: str = "{}. ") -> Text: - """ - Wrap elements as numbered list - - :param items: - :param start: initial number, by default 1 - :param fmt: number format, by default '{}. ' - :return: Text - """ - return as_list(*(Text(fmt.format(index), item) for index, item in enumerate(items, start))) - - -def as_section(title: NodeType, *body: NodeType) -> Text: - """ - Wrap elements as simple section, section has title and body - - :param title: - :param body: - :return: Text - """ - return Text(title, "\n", *body) - - -def as_marked_section( - title: NodeType, - *body: NodeType, - marker: str = "- ", -) -> Text: - """ - Wrap elements as section with marked list - - :param title: - :param body: - :param marker: - :return: - """ - return as_section(title, as_marked_list(*body, marker=marker)) - - -def as_numbered_section( - title: NodeType, - *body: NodeType, - start: int = 1, - fmt: str = "{}. ", -) -> Text: - """ - Wrap elements as section with numbered list - - :param title: - :param body: - :param start: - :param fmt: - :return: - """ - return as_section(title, as_numbered_list(*body, start=start, fmt=fmt)) - - -def as_key_value(key: NodeType, value: NodeType) -> Text: - """ - Wrap elements pair as key-value line. (:code:`{key}: {value}`) - - :param key: - :param value: - :return: Text - """ - return Text(Bold(key, ":"), " ", value) diff --git a/env/Lib/site-packages/aiogram/utils/i18n/__init__.py b/env/Lib/site-packages/aiogram/utils/i18n/__init__.py deleted file mode 100644 index e48a4c7..0000000 --- a/env/Lib/site-packages/aiogram/utils/i18n/__init__.py +++ /dev/null @@ -1,21 +0,0 @@ -from .context import get_i18n, gettext, lazy_gettext, lazy_ngettext, ngettext -from .core import I18n -from .middleware import ( - ConstI18nMiddleware, - FSMI18nMiddleware, - I18nMiddleware, - SimpleI18nMiddleware, -) - -__all__ = ( - "I18n", - "I18nMiddleware", - "SimpleI18nMiddleware", - "ConstI18nMiddleware", - "FSMI18nMiddleware", - "gettext", - "lazy_gettext", - "ngettext", - "lazy_ngettext", - "get_i18n", -) diff --git a/env/Lib/site-packages/aiogram/utils/i18n/__pycache__/__init__.cpython-311.pyc b/env/Lib/site-packages/aiogram/utils/i18n/__pycache__/__init__.cpython-311.pyc deleted file mode 100644 index 2c2b941..0000000 Binary files a/env/Lib/site-packages/aiogram/utils/i18n/__pycache__/__init__.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/utils/i18n/__pycache__/context.cpython-311.pyc b/env/Lib/site-packages/aiogram/utils/i18n/__pycache__/context.cpython-311.pyc deleted file mode 100644 index a5d7d57..0000000 Binary files a/env/Lib/site-packages/aiogram/utils/i18n/__pycache__/context.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/utils/i18n/__pycache__/core.cpython-311.pyc b/env/Lib/site-packages/aiogram/utils/i18n/__pycache__/core.cpython-311.pyc deleted file mode 100644 index 63f7bad..0000000 Binary files a/env/Lib/site-packages/aiogram/utils/i18n/__pycache__/core.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/utils/i18n/__pycache__/lazy_proxy.cpython-311.pyc b/env/Lib/site-packages/aiogram/utils/i18n/__pycache__/lazy_proxy.cpython-311.pyc deleted file mode 100644 index 249c914..0000000 Binary files a/env/Lib/site-packages/aiogram/utils/i18n/__pycache__/lazy_proxy.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/utils/i18n/__pycache__/middleware.cpython-311.pyc b/env/Lib/site-packages/aiogram/utils/i18n/__pycache__/middleware.cpython-311.pyc deleted file mode 100644 index d502885..0000000 Binary files a/env/Lib/site-packages/aiogram/utils/i18n/__pycache__/middleware.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/utils/i18n/context.py b/env/Lib/site-packages/aiogram/utils/i18n/context.py deleted file mode 100644 index 245fee3..0000000 --- a/env/Lib/site-packages/aiogram/utils/i18n/context.py +++ /dev/null @@ -1,23 +0,0 @@ -from typing import Any - -from aiogram.utils.i18n.core import I18n -from aiogram.utils.i18n.lazy_proxy import LazyProxy - - -def get_i18n() -> I18n: - i18n = I18n.get_current(no_error=True) - if i18n is None: - raise LookupError("I18n context is not set") - return i18n - - -def gettext(*args: Any, **kwargs: Any) -> str: - return get_i18n().gettext(*args, **kwargs) - - -def lazy_gettext(*args: Any, **kwargs: Any) -> LazyProxy: - return LazyProxy(gettext, *args, **kwargs, enable_cache=False) - - -ngettext = gettext -lazy_ngettext = lazy_gettext diff --git a/env/Lib/site-packages/aiogram/utils/i18n/core.py b/env/Lib/site-packages/aiogram/utils/i18n/core.py deleted file mode 100644 index db7c797..0000000 --- a/env/Lib/site-packages/aiogram/utils/i18n/core.py +++ /dev/null @@ -1,123 +0,0 @@ -import gettext -import os -from contextlib import contextmanager -from contextvars import ContextVar -from pathlib import Path -from typing import Dict, Generator, Optional, Tuple, Union - -from aiogram.utils.i18n.lazy_proxy import LazyProxy -from aiogram.utils.mixins import ContextInstanceMixin - - -class I18n(ContextInstanceMixin["I18n"]): - def __init__( - self, - *, - path: Union[str, Path], - default_locale: str = "en", - domain: str = "messages", - ) -> None: - self.path = path - self.default_locale = default_locale - self.domain = domain - self.ctx_locale = ContextVar("aiogram_ctx_locale", default=default_locale) - self.locales = self.find_locales() - - @property - def current_locale(self) -> str: - return self.ctx_locale.get() - - @current_locale.setter - def current_locale(self, value: str) -> None: - self.ctx_locale.set(value) - - @contextmanager - def use_locale(self, locale: str) -> Generator[None, None, None]: - """ - Create context with specified locale - """ - ctx_token = self.ctx_locale.set(locale) - try: - yield - finally: - self.ctx_locale.reset(ctx_token) - - @contextmanager - def context(self) -> Generator["I18n", None, None]: - """ - Use I18n context - """ - token = self.set_current(self) - try: - yield self - finally: - self.reset_current(token) - - def find_locales(self) -> Dict[str, gettext.GNUTranslations]: - """ - Load all compiled locales from path - - :return: dict with locales - """ - translations: Dict[str, gettext.GNUTranslations] = {} - - for name in os.listdir(self.path): - if not os.path.isdir(os.path.join(self.path, name)): - continue - mo_path = os.path.join(self.path, name, "LC_MESSAGES", self.domain + ".mo") - - if os.path.exists(mo_path): - with open(mo_path, "rb") as fp: - translations[name] = gettext.GNUTranslations(fp) - elif os.path.exists(mo_path[:-2] + "po"): # pragma: no cover - raise RuntimeError(f"Found locale '{name}' but this language is not compiled!") - - return translations - - def reload(self) -> None: - """ - Hot reload locales - """ - self.locales = self.find_locales() - - @property - def available_locales(self) -> Tuple[str, ...]: - """ - list of loaded locales - - :return: - """ - return tuple(self.locales.keys()) - - def gettext( - self, singular: str, plural: Optional[str] = None, n: int = 1, locale: Optional[str] = None - ) -> str: - """ - Get text - - :param singular: - :param plural: - :param n: - :param locale: - :return: - """ - if locale is None: - locale = self.current_locale - - if locale not in self.locales: - if n == 1: - return singular - return plural if plural else singular - - translator = self.locales[locale] - - if plural is None: - return translator.gettext(singular) - return translator.ngettext(singular, plural, n) - - def lazy_gettext( - self, singular: str, plural: Optional[str] = None, n: int = 1, locale: Optional[str] = None - ) -> LazyProxy: - return LazyProxy( - self.gettext, singular=singular, plural=plural, n=n, locale=locale, enable_cache=False - ) diff --git a/env/Lib/site-packages/aiogram/utils/i18n/lazy_proxy.py b/env/Lib/site-packages/aiogram/utils/i18n/lazy_proxy.py deleted file mode 100644 index 6852540..0000000 --- a/env/Lib/site-packages/aiogram/utils/i18n/lazy_proxy.py +++ /dev/null @@ -1,13 +0,0 @@ -from typing import Any - -try: - from babel.support import LazyProxy -except ImportError: # pragma: no cover - - class LazyProxy: # type: ignore - def __init__(self, func: Any, *args: Any, **kwargs: Any) -> None: - raise RuntimeError( - "LazyProxy can be used only when Babel installed\n" - "Just install Babel (`pip install Babel`) " - "or aiogram with i18n support (`pip install aiogram[i18n]`)" - ) diff --git a/env/Lib/site-packages/aiogram/utils/i18n/middleware.py b/env/Lib/site-packages/aiogram/utils/i18n/middleware.py deleted file mode 100644 index 68be22b..0000000 --- a/env/Lib/site-packages/aiogram/utils/i18n/middleware.py +++ /dev/null @@ -1,187 +0,0 @@ -from abc import ABC, abstractmethod -from typing import Any, Awaitable, Callable, Dict, Optional, Set - -try: - from babel import Locale, UnknownLocaleError -except ImportError: # pragma: no cover - Locale = None # type: ignore - - class UnknownLocaleError(Exception): # type: ignore - pass - - -from aiogram import BaseMiddleware, Router -from aiogram.fsm.context import FSMContext -from aiogram.types import TelegramObject, User -from aiogram.utils.i18n.core import I18n - - -class I18nMiddleware(BaseMiddleware, ABC): - """ - Abstract I18n middleware. - """ - - def __init__( - self, - i18n: I18n, - i18n_key: Optional[str] = "i18n", - middleware_key: str = "i18n_middleware", - ) -> None: - """ - Create an instance of middleware - - :param i18n: instance of I18n - :param i18n_key: context key for I18n instance - :param middleware_key: context key for this middleware - """ - self.i18n = i18n - self.i18n_key = i18n_key - self.middleware_key = middleware_key - - def setup( - self: BaseMiddleware, router: Router, exclude: Optional[Set[str]] = None - ) -> BaseMiddleware: - """ - Register middleware for all events in the Router - - :param router: - :param exclude: - :return: - """ - if exclude is None: - exclude = set() - exclude_events = {"update", *exclude} - for event_name, observer in router.observers.items(): - if event_name in exclude_events: - continue - observer.outer_middleware(self) - return self - - async def __call__( - self, - handler: Callable[[TelegramObject, Dict[str, Any]], Awaitable[Any]], - event: TelegramObject, - data: Dict[str, Any], - ) -> Any: - current_locale = await self.get_locale(event=event, data=data) or self.i18n.default_locale - - if self.i18n_key: - data[self.i18n_key] = self.i18n - if self.middleware_key: - data[self.middleware_key] = self - - with self.i18n.context(), self.i18n.use_locale(current_locale): - return await handler(event, data) - - @abstractmethod - async def get_locale(self, event: TelegramObject, data: Dict[str, Any]) -> str: - """ - Detect current user locale based on event and context. - - **This method must be defined in child classes** - - :param event: - :param data: - :return: - """ - pass - - -class SimpleI18nMiddleware(I18nMiddleware): - """ - Simple I18n middleware. - - Chooses language code from the User object received in event - """ - - def __init__( - self, - i18n: I18n, - i18n_key: Optional[str] = "i18n", - middleware_key: str = "i18n_middleware", - ) -> None: - super().__init__(i18n=i18n, i18n_key=i18n_key, middleware_key=middleware_key) - - if Locale is None: # pragma: no cover - raise RuntimeError( - f"{type(self).__name__} can be used only when Babel installed\n" - "Just install Babel (`pip install Babel`) " - "or aiogram with i18n support (`pip install aiogram[i18n]`)" - ) - - async def get_locale(self, event: TelegramObject, data: Dict[str, Any]) -> str: - if Locale is None: # pragma: no cover - raise RuntimeError( - f"{type(self).__name__} can be used only when Babel installed\n" - "Just install Babel (`pip install Babel`) " - "or aiogram with i18n support (`pip install aiogram[i18n]`)" - ) - - event_from_user: Optional[User] = data.get("event_from_user", None) - if event_from_user is None or event_from_user.language_code is None: - return self.i18n.default_locale - try: - locale = Locale.parse(event_from_user.language_code, sep="-") - except UnknownLocaleError: - return self.i18n.default_locale - - if locale.language not in self.i18n.available_locales: - return self.i18n.default_locale - return locale.language - - -class ConstI18nMiddleware(I18nMiddleware): - """ - Const middleware chooses statically defined locale - """ - - def __init__( - self, - locale: str, - i18n: I18n, - i18n_key: Optional[str] = "i18n", - middleware_key: str = "i18n_middleware", - ) -> None: - super().__init__(i18n=i18n, i18n_key=i18n_key, middleware_key=middleware_key) - self.locale = locale - - async def get_locale(self, event: TelegramObject, data: Dict[str, Any]) -> str: - return self.locale - - -class FSMI18nMiddleware(SimpleI18nMiddleware): - """ - This middleware stores locale in the FSM storage - """ - - def __init__( - self, - i18n: I18n, - key: str = "locale", - i18n_key: Optional[str] = "i18n", - middleware_key: str = "i18n_middleware", - ) -> None: - super().__init__(i18n=i18n, i18n_key=i18n_key, middleware_key=middleware_key) - self.key = key - - async def get_locale(self, event: TelegramObject, data: Dict[str, Any]) -> str: - fsm_context: Optional[FSMContext] = data.get("state") - locale = None - if fsm_context: - fsm_data = await fsm_context.get_data() - locale = fsm_data.get(self.key, None) - if not locale: - locale = await super().get_locale(event=event, data=data) - if fsm_context: - await fsm_context.update_data(data={self.key: locale}) - return locale - - async def set_locale(self, state: FSMContext, locale: str) -> None: - """ - Write new locale to the storage - - :param state: instance of FSMContext - :param locale: new locale - """ - await state.update_data(data={self.key: locale}) - self.i18n.current_locale = locale diff --git a/env/Lib/site-packages/aiogram/utils/keyboard.py b/env/Lib/site-packages/aiogram/utils/keyboard.py deleted file mode 100644 index 921c28c..0000000 --- a/env/Lib/site-packages/aiogram/utils/keyboard.py +++ /dev/null @@ -1,421 +0,0 @@ -from __future__ import annotations - -from abc import ABC -from copy import deepcopy -from itertools import chain -from itertools import cycle as repeat_all -from typing import ( - TYPE_CHECKING, - Any, - Generator, - Generic, - Iterable, - List, - Optional, - Type, - TypeVar, - Union, - cast, -) - -from aiogram.filters.callback_data import CallbackData -from aiogram.types import ( - CallbackGame, - InlineKeyboardButton, - InlineKeyboardMarkup, - KeyboardButton, - KeyboardButtonPollType, - KeyboardButtonRequestChat, - KeyboardButtonRequestUsers, - LoginUrl, - ReplyKeyboardMarkup, - SwitchInlineQueryChosenChat, - WebAppInfo, -) - -ButtonType = TypeVar("ButtonType", InlineKeyboardButton, KeyboardButton) -T = TypeVar("T") - - -class KeyboardBuilder(Generic[ButtonType], ABC): - """ - Generic keyboard builder that helps to adjust your markup with defined shape of lines. - - Works both of InlineKeyboardMarkup and ReplyKeyboardMarkup. - """ - - max_width: int = 0 - min_width: int = 0 - max_buttons: int = 0 - - def __init__( - self, button_type: Type[ButtonType], markup: Optional[List[List[ButtonType]]] = None - ) -> None: - if not issubclass(button_type, (InlineKeyboardButton, KeyboardButton)): - raise ValueError(f"Button type {button_type} are not allowed here") - self._button_type: Type[ButtonType] = button_type - if markup: - self._validate_markup(markup) - else: - markup = [] - self._markup: List[List[ButtonType]] = markup - - @property - def buttons(self) -> Generator[ButtonType, None, None]: - """ - Get flatten set of all buttons - - :return: - """ - yield from chain.from_iterable(self.export()) - - def _validate_button(self, button: ButtonType) -> bool: - """ - Check that button item has correct type - - :param button: - :return: - """ - allowed = self._button_type - if not isinstance(button, allowed): - raise ValueError( - f"{button!r} should be type {allowed.__name__!r} not {type(button).__name__!r}" - ) - return True - - def _validate_buttons(self, *buttons: ButtonType) -> bool: - """ - Check that all passed button has correct type - - :param buttons: - :return: - """ - return all(map(self._validate_button, buttons)) - - def _validate_row(self, row: List[ButtonType]) -> bool: - """ - Check that row of buttons are correct - Row can be only list of allowed button types and has length 0 <= n <= 8 - - :param row: - :return: - """ - if not isinstance(row, list): - raise ValueError( - f"Row {row!r} should be type 'List[{self._button_type.__name__}]' " - f"not type {type(row).__name__}" - ) - if len(row) > self.max_width: - raise ValueError(f"Row {row!r} is too long (max width: {self.max_width})") - self._validate_buttons(*row) - return True - - def _validate_markup(self, markup: List[List[ButtonType]]) -> bool: - """ - Check that passed markup has correct data structure - Markup is list of lists of buttons - - :param markup: - :return: - """ - count = 0 - if not isinstance(markup, list): - raise ValueError( - f"Markup should be type 'List[List[{self._button_type.__name__}]]' " - f"not type {type(markup).__name__!r}" - ) - for row in markup: - self._validate_row(row) - count += len(row) - if count > self.max_buttons: - raise ValueError(f"Too much buttons detected Max allowed count - {self.max_buttons}") - return True - - def _validate_size(self, size: Any) -> int: - """ - Validate that passed size is legit - - :param size: - :return: - """ - if not isinstance(size, int): - raise ValueError("Only int sizes are allowed") - if size not in range(self.min_width, self.max_width + 1): - raise ValueError( - f"Row size {size} is not allowed, range: [{self.min_width}, {self.max_width}]" - ) - return size - - def export(self) -> List[List[ButtonType]]: - """ - Export configured markup as list of lists of buttons - - .. code-block:: python - - >>> builder = KeyboardBuilder(button_type=InlineKeyboardButton) - >>> ... # Add buttons to builder - >>> markup = InlineKeyboardMarkup(inline_keyboard=builder.export()) - - :return: - """ - return deepcopy(self._markup) - - def add(self, *buttons: ButtonType) -> "KeyboardBuilder[ButtonType]": - """ - Add one or many buttons to markup. - - :param buttons: - :return: - """ - self._validate_buttons(*buttons) - markup = self.export() - - # Try to add new buttons to the end of last row if it possible - if markup and len(markup[-1]) < self.max_width: - last_row = markup[-1] - pos = self.max_width - len(last_row) - head, buttons = buttons[:pos], buttons[pos:] - last_row.extend(head) - - # Separate buttons to exclusive rows with max possible row width - while buttons: - row, buttons = buttons[: self.max_width], buttons[self.max_width :] - markup.append(list(row)) - - self._markup = markup - return self - - def row( - self, *buttons: ButtonType, width: Optional[int] = None - ) -> "KeyboardBuilder[ButtonType]": - """ - Add row to markup - - When too much buttons is passed it will be separated to many rows - - :param buttons: - :param width: - :return: - """ - if width is None: - width = self.max_width - - self._validate_size(width) - self._validate_buttons(*buttons) - self._markup.extend( - list(buttons[pos : pos + width]) for pos in range(0, len(buttons), width) - ) - return self - - def adjust(self, *sizes: int, repeat: bool = False) -> "KeyboardBuilder[ButtonType]": - """ - Adjust previously added buttons to specific row sizes. - - By default, when the sum of passed sizes is lower than buttons count the last - one size will be used for tail of the markup. - If repeat=True is passed - all sizes will be cycled when available more buttons - count than all sizes - - :param sizes: - :param repeat: - :return: - """ - if not sizes: - sizes = (self.max_width,) - - validated_sizes = map(self._validate_size, sizes) - sizes_iter = repeat_all(validated_sizes) if repeat else repeat_last(validated_sizes) - size = next(sizes_iter) - - markup = [] - row: List[ButtonType] = [] - for button in self.buttons: - if len(row) >= size: - markup.append(row) - size = next(sizes_iter) - row = [] - row.append(button) - if row: - markup.append(row) - self._markup = markup - return self - - def _button(self, **kwargs: Any) -> "KeyboardBuilder[ButtonType]": - """ - Add button to markup - - :param kwargs: - :return: - """ - if isinstance(callback_data := kwargs.get("callback_data", None), CallbackData): - kwargs["callback_data"] = callback_data.pack() - button = self._button_type(**kwargs) - return self.add(button) - - def as_markup(self, **kwargs: Any) -> Union[InlineKeyboardMarkup, ReplyKeyboardMarkup]: - if self._button_type is KeyboardButton: - keyboard = cast(List[List[KeyboardButton]], self.export()) # type: ignore - return ReplyKeyboardMarkup(keyboard=keyboard, **kwargs) - inline_keyboard = cast(List[List[InlineKeyboardButton]], self.export()) # type: ignore - return InlineKeyboardMarkup(inline_keyboard=inline_keyboard) - - def attach(self, builder: "KeyboardBuilder[ButtonType]") -> "KeyboardBuilder[ButtonType]": - if not isinstance(builder, KeyboardBuilder): - raise ValueError(f"Only KeyboardBuilder can be attached, not {type(builder).__name__}") - if builder._button_type is not self._button_type: - raise ValueError( - f"Only builders with same button type can be attached, " - f"not {self._button_type.__name__} and {builder._button_type.__name__}" - ) - self._markup.extend(builder.export()) - return self - - -def repeat_last(items: Iterable[T]) -> Generator[T, None, None]: - items_iter = iter(items) - try: - value = next(items_iter) - except StopIteration: # pragma: no cover - # Possible case but not in place where this function is used - return - yield value - finished = False - while True: - if not finished: - try: - value = next(items_iter) - except StopIteration: - finished = True - yield value - - -class InlineKeyboardBuilder(KeyboardBuilder[InlineKeyboardButton]): - """ - Inline keyboard builder inherits all methods from generic builder - """ - - max_width: int = 8 - min_width: int = 1 - max_buttons: int = 100 - - def button( - self, - *, - text: str, - url: Optional[str] = None, - callback_data: Optional[Union[str, CallbackData]] = None, - web_app: Optional[WebAppInfo] = None, - login_url: Optional[LoginUrl] = None, - switch_inline_query: Optional[str] = None, - switch_inline_query_current_chat: Optional[str] = None, - switch_inline_query_chosen_chat: Optional[SwitchInlineQueryChosenChat] = None, - callback_game: Optional[CallbackGame] = None, - pay: Optional[bool] = None, - **kwargs: Any, - ) -> "InlineKeyboardBuilder": - return cast( - InlineKeyboardBuilder, - self._button( - text=text, - url=url, - callback_data=callback_data, - web_app=web_app, - login_url=login_url, - switch_inline_query=switch_inline_query, - switch_inline_query_current_chat=switch_inline_query_current_chat, - switch_inline_query_chosen_chat=switch_inline_query_chosen_chat, - callback_game=callback_game, - pay=pay, - **kwargs, - ), - ) - - if TYPE_CHECKING: - - def as_markup(self, **kwargs: Any) -> InlineKeyboardMarkup: - """Construct an InlineKeyboardMarkup""" - ... - - def __init__(self, markup: Optional[List[List[InlineKeyboardButton]]] = None) -> None: - super().__init__(button_type=InlineKeyboardButton, markup=markup) - - def copy(self: "InlineKeyboardBuilder") -> "InlineKeyboardBuilder": - """ - Make full copy of current builder with markup - - :return: - """ - return InlineKeyboardBuilder(markup=self.export()) - - @classmethod - def from_markup( - cls: Type["InlineKeyboardBuilder"], markup: InlineKeyboardMarkup - ) -> "InlineKeyboardBuilder": - """ - Create builder from existing markup - - :param markup: - :return: - """ - return cls(markup=markup.inline_keyboard) - - -class ReplyKeyboardBuilder(KeyboardBuilder[KeyboardButton]): - """ - Reply keyboard builder inherits all methods from generic builder - """ - - max_width: int = 10 - min_width: int = 1 - max_buttons: int = 300 - - def button( - self, - *, - text: str, - request_users: Optional[KeyboardButtonRequestUsers] = None, - request_chat: Optional[KeyboardButtonRequestChat] = None, - request_contact: Optional[bool] = None, - request_location: Optional[bool] = None, - request_poll: Optional[KeyboardButtonPollType] = None, - web_app: Optional[WebAppInfo] = None, - **kwargs: Any, - ) -> "ReplyKeyboardBuilder": - return cast( - ReplyKeyboardBuilder, - self._button( - text=text, - request_users=request_users, - request_chat=request_chat, - request_contact=request_contact, - request_location=request_location, - request_poll=request_poll, - web_app=web_app, - **kwargs, - ), - ) - - if TYPE_CHECKING: - - def as_markup(self, **kwargs: Any) -> ReplyKeyboardMarkup: ... - - def __init__(self, markup: Optional[List[List[KeyboardButton]]] = None) -> None: - super().__init__(button_type=KeyboardButton, markup=markup) - - def copy(self: "ReplyKeyboardBuilder") -> "ReplyKeyboardBuilder": - """ - Make full copy of current builder with markup - - :return: - """ - return ReplyKeyboardBuilder(markup=self.export()) - - @classmethod - def from_markup(cls, markup: ReplyKeyboardMarkup) -> "ReplyKeyboardBuilder": - """ - Create builder from existing markup - - :param markup: - :return: - """ - return cls(markup=markup.keyboard) diff --git a/env/Lib/site-packages/aiogram/utils/link.py b/env/Lib/site-packages/aiogram/utils/link.py deleted file mode 100644 index 051247f..0000000 --- a/env/Lib/site-packages/aiogram/utils/link.py +++ /dev/null @@ -1,74 +0,0 @@ -from typing import Any, Optional -from urllib.parse import urlencode, urljoin - -BASE_DOCS_URL = "https://docs.aiogram.dev/" -BRANCH = "dev-3.x" - -BASE_PAGE_URL = f"{BASE_DOCS_URL}/en/{BRANCH}/" - - -def _format_url(url: str, *path: str, fragment_: Optional[str] = None, **query: Any) -> str: - url = urljoin(url, "/".join(path), allow_fragments=True) - if query: - url += "?" + urlencode(query) - if fragment_: - url += "#" + fragment_ - return url - - -def docs_url(*path: str, fragment_: Optional[str] = None, **query: Any) -> str: - return _format_url(BASE_PAGE_URL, *path, fragment_=fragment_, **query) - - -def create_tg_link(link: str, **kwargs: Any) -> str: - return _format_url(f"tg://{link}", **kwargs) - - -def create_telegram_link(*path: str, **kwargs: Any) -> str: - return _format_url("https://t.me", *path, **kwargs) - - -def create_channel_bot_link( - username: str, - parameter: Optional[str] = None, - change_info: bool = False, - post_messages: bool = False, - edit_messages: bool = False, - delete_messages: bool = False, - restrict_members: bool = False, - invite_users: bool = False, - pin_messages: bool = False, - promote_members: bool = False, - manage_video_chats: bool = False, - anonymous: bool = False, - manage_chat: bool = False, -) -> str: - params = {} - if parameter is not None: - params["startgroup"] = parameter - permissions = [] - if change_info: - permissions.append("change_info") - if post_messages: - permissions.append("post_messages") - if edit_messages: - permissions.append("edit_messages") - if delete_messages: - permissions.append("delete_messages") - if restrict_members: - permissions.append("restrict_members") - if invite_users: - permissions.append("invite_users") - if pin_messages: - permissions.append("pin_messages") - if promote_members: - permissions.append("promote_members") - if manage_video_chats: - permissions.append("manage_video_chats") - if anonymous: - permissions.append("anonymous") - if manage_chat: - permissions.append("manage_chat") - if permissions: - params["admin"] = "+".join(permissions) - return create_telegram_link(username, **params) diff --git a/env/Lib/site-packages/aiogram/utils/magic_filter.py b/env/Lib/site-packages/aiogram/utils/magic_filter.py deleted file mode 100644 index 94c9207..0000000 --- a/env/Lib/site-packages/aiogram/utils/magic_filter.py +++ /dev/null @@ -1,22 +0,0 @@ -from typing import Any, Iterable - -from magic_filter import MagicFilter as _MagicFilter -from magic_filter import MagicT as _MagicT -from magic_filter.operations import BaseOperation - - -class AsFilterResultOperation(BaseOperation): - __slots__ = ("name",) - - def __init__(self, name: str) -> None: - self.name = name - - def resolve(self, value: Any, initial_value: Any) -> Any: - if value is None or (isinstance(value, Iterable) and not value): - return None - return {self.name: value} - - -class MagicFilter(_MagicFilter): - def as_(self: _MagicT, name: str) -> _MagicT: - return self._extend(AsFilterResultOperation(name=name)) diff --git a/env/Lib/site-packages/aiogram/utils/markdown.py b/env/Lib/site-packages/aiogram/utils/markdown.py deleted file mode 100644 index 52c6e1d..0000000 --- a/env/Lib/site-packages/aiogram/utils/markdown.py +++ /dev/null @@ -1,209 +0,0 @@ -from typing import Any - -from .text_decorations import html_decoration, markdown_decoration - - -def _join(*content: Any, sep: str = " ") -> str: - return sep.join(map(str, content)) - - -def text(*content: Any, sep: str = " ") -> str: - """ - Join all elements with a separator - - :param content: - :param sep: - :return: - """ - return _join(*content, sep=sep) - - -def bold(*content: Any, sep: str = " ") -> str: - """ - Make bold text (Markdown) - - :param content: - :param sep: - :return: - """ - return markdown_decoration.bold(value=markdown_decoration.quote(_join(*content, sep=sep))) - - -def hbold(*content: Any, sep: str = " ") -> str: - """ - Make bold text (HTML) - - :param content: - :param sep: - :return: - """ - return html_decoration.bold(value=html_decoration.quote(_join(*content, sep=sep))) - - -def italic(*content: Any, sep: str = " ") -> str: - """ - Make italic text (Markdown) - - :param content: - :param sep: - :return: - """ - return markdown_decoration.italic(value=markdown_decoration.quote(_join(*content, sep=sep))) - - -def hitalic(*content: Any, sep: str = " ") -> str: - """ - Make italic text (HTML) - - :param content: - :param sep: - :return: - """ - return html_decoration.italic(value=html_decoration.quote(_join(*content, sep=sep))) - - -def code(*content: Any, sep: str = " ") -> str: - """ - Make mono-width text (Markdown) - - :param content: - :param sep: - :return: - """ - return markdown_decoration.code(value=markdown_decoration.quote(_join(*content, sep=sep))) - - -def hcode(*content: Any, sep: str = " ") -> str: - """ - Make mono-width text (HTML) - - :param content: - :param sep: - :return: - """ - return html_decoration.code(value=html_decoration.quote(_join(*content, sep=sep))) - - -def pre(*content: Any, sep: str = "\n") -> str: - """ - Make mono-width text block (Markdown) - - :param content: - :param sep: - :return: - """ - return markdown_decoration.pre(value=markdown_decoration.quote(_join(*content, sep=sep))) - - -def hpre(*content: Any, sep: str = "\n") -> str: - """ - Make mono-width text block (HTML) - - :param content: - :param sep: - :return: - """ - return html_decoration.pre(value=html_decoration.quote(_join(*content, sep=sep))) - - -def underline(*content: Any, sep: str = " ") -> str: - """ - Make underlined text (Markdown) - - :param content: - :param sep: - :return: - """ - return markdown_decoration.underline(value=markdown_decoration.quote(_join(*content, sep=sep))) - - -def hunderline(*content: Any, sep: str = " ") -> str: - """ - Make underlined text (HTML) - - :param content: - :param sep: - :return: - """ - return html_decoration.underline(value=html_decoration.quote(_join(*content, sep=sep))) - - -def strikethrough(*content: Any, sep: str = " ") -> str: - """ - Make strikethrough text (Markdown) - - :param content: - :param sep: - :return: - """ - return markdown_decoration.strikethrough( - value=markdown_decoration.quote(_join(*content, sep=sep)) - ) - - -def hstrikethrough(*content: Any, sep: str = " ") -> str: - """ - Make strikethrough text (HTML) - - :param content: - :param sep: - :return: - """ - return html_decoration.strikethrough(value=html_decoration.quote(_join(*content, sep=sep))) - - -def link(title: str, url: str) -> str: - """ - Format URL (Markdown) - - :param title: - :param url: - :return: - """ - return markdown_decoration.link(value=markdown_decoration.quote(title), link=url) - - -def hlink(title: str, url: str) -> str: - """ - Format URL (HTML) - - :param title: - :param url: - :return: - """ - return html_decoration.link(value=html_decoration.quote(title), link=url) - - -def blockquote(*content: Any, sep: str = "\n") -> str: - """ - Make blockquote (Markdown) - - :param content: - :param sep: - :return: - """ - return markdown_decoration.blockquote( - value=markdown_decoration.quote(_join(*content, sep=sep)) - ) - - -def hblockquote(*content: Any, sep: str = "\n") -> str: - """ - Make blockquote (HTML) - - :param content: - :param sep: - :return: - """ - return html_decoration.blockquote(value=html_decoration.quote(_join(*content, sep=sep))) - - -def hide_link(url: str) -> str: - """ - Hide URL (HTML only) - Can be used for adding an image to a text message - - :param url: - :return: - """ - return f'' diff --git a/env/Lib/site-packages/aiogram/utils/media_group.py b/env/Lib/site-packages/aiogram/utils/media_group.py deleted file mode 100644 index ff98525..0000000 --- a/env/Lib/site-packages/aiogram/utils/media_group.py +++ /dev/null @@ -1,368 +0,0 @@ -from typing import Any, Dict, List, Literal, Optional, Union, overload - -from aiogram.enums import InputMediaType -from aiogram.types import ( - UNSET_PARSE_MODE, - InputFile, - InputMedia, - InputMediaAudio, - InputMediaDocument, - InputMediaPhoto, - InputMediaVideo, - MessageEntity, -) - -MediaType = Union[ - InputMediaAudio, - InputMediaPhoto, - InputMediaVideo, - InputMediaDocument, -] - -MAX_MEDIA_GROUP_SIZE = 10 - - -class MediaGroupBuilder: - # Animated media is not supported yet in Bot API to send as a media group - - def __init__( - self, - media: Optional[List[MediaType]] = None, - caption: Optional[str] = None, - caption_entities: Optional[List[MessageEntity]] = None, - ) -> None: - """ - Helper class for building media groups. - - :param media: A list of media elements to add to the media group. (optional) - :param caption: Caption for the media group. (optional) - :param caption_entities: List of special entities in the caption, - like usernames, URLs, etc. (optional) - """ - self._media: List[MediaType] = [] - self.caption = caption - self.caption_entities = caption_entities - - self._extend(media or []) - - def _add(self, media: MediaType) -> None: - if not isinstance(media, InputMedia): - raise ValueError("Media must be instance of InputMedia") - - if len(self._media) >= MAX_MEDIA_GROUP_SIZE: - raise ValueError("Media group can't contain more than 10 elements") - - self._media.append(media) - - def _extend(self, media: List[MediaType]) -> None: - for m in media: - self._add(m) - - @overload - def add( - self, - *, - type: Literal[InputMediaType.AUDIO], - media: Union[str, InputFile], - caption: Optional[str] = None, - parse_mode: Optional[str] = UNSET_PARSE_MODE, - caption_entities: Optional[List[MessageEntity]] = None, - duration: Optional[int] = None, - performer: Optional[str] = None, - title: Optional[str] = None, - **kwargs: Any, - ) -> None: - pass - - @overload - def add( - self, - *, - type: Literal[InputMediaType.PHOTO], - media: Union[str, InputFile], - caption: Optional[str] = None, - parse_mode: Optional[str] = UNSET_PARSE_MODE, - caption_entities: Optional[List[MessageEntity]] = None, - has_spoiler: Optional[bool] = None, - **kwargs: Any, - ) -> None: - pass - - @overload - def add( - self, - *, - type: Literal[InputMediaType.VIDEO], - media: Union[str, InputFile], - thumbnail: Optional[Union[InputFile, str]] = None, - caption: Optional[str] = None, - parse_mode: Optional[str] = UNSET_PARSE_MODE, - caption_entities: Optional[List[MessageEntity]] = None, - width: Optional[int] = None, - height: Optional[int] = None, - duration: Optional[int] = None, - supports_streaming: Optional[bool] = None, - has_spoiler: Optional[bool] = None, - **kwargs: Any, - ) -> None: - pass - - @overload - def add( - self, - *, - type: Literal[InputMediaType.DOCUMENT], - media: Union[str, InputFile], - thumbnail: Optional[Union[InputFile, str]] = None, - caption: Optional[str] = None, - parse_mode: Optional[str] = UNSET_PARSE_MODE, - caption_entities: Optional[List[MessageEntity]] = None, - disable_content_type_detection: Optional[bool] = None, - **kwargs: Any, - ) -> None: - pass - - def add(self, **kwargs: Any) -> None: - """ - Add a media object to the media group. - - :param kwargs: Keyword arguments for the media object. - The available keyword arguments depend on the media type. - :return: None - """ - type_ = kwargs.pop("type", None) - if type_ == InputMediaType.AUDIO: - self.add_audio(**kwargs) - elif type_ == InputMediaType.PHOTO: - self.add_photo(**kwargs) - elif type_ == InputMediaType.VIDEO: - self.add_video(**kwargs) - elif type_ == InputMediaType.DOCUMENT: - self.add_document(**kwargs) - else: - raise ValueError(f"Unknown media type: {type_!r}") - - def add_audio( - self, - media: Union[str, InputFile], - thumbnail: Optional[InputFile] = None, - caption: Optional[str] = None, - parse_mode: Optional[str] = UNSET_PARSE_MODE, - caption_entities: Optional[List[MessageEntity]] = None, - duration: Optional[int] = None, - performer: Optional[str] = None, - title: Optional[str] = None, - **kwargs: Any, - ) -> None: - """ - Add an audio file to the media group. - - :param media: File to send. Pass a file_id to send a file that exists on the - Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from - the Internet, or pass 'attach://' to upload a new one using - multipart/form-data under name. - :ref:`More information on Sending Files » ` - :param thumbnail: *Optional*. Thumbnail of the file sent; can be ignored if - thumbnail generation for the file is supported server-side. The thumbnail should - be in JPEG format and less than 200 kB in size. A thumbnail's width and height - should not exceed 320. - :param caption: *Optional*. Caption of the audio to be sent, 0-1024 characters - after entities parsing - :param parse_mode: *Optional*. Mode for parsing entities in the audio caption. - See `formatting options `_ - for more details. - :param caption_entities: *Optional*. List of special entities that appear in the caption, - which can be specified instead of *parse_mode* - :param duration: *Optional*. Duration of the audio in seconds - :param performer: *Optional*. Performer of the audio - :param title: *Optional*. Title of the audio - :return: None - """ - self._add( - InputMediaAudio( - media=media, - thumbnail=thumbnail, - caption=caption, - parse_mode=parse_mode, - caption_entities=caption_entities, - duration=duration, - performer=performer, - title=title, - **kwargs, - ) - ) - - def add_photo( - self, - media: Union[str, InputFile], - caption: Optional[str] = None, - parse_mode: Optional[str] = UNSET_PARSE_MODE, - caption_entities: Optional[List[MessageEntity]] = None, - has_spoiler: Optional[bool] = None, - **kwargs: Any, - ) -> None: - """ - Add a photo to the media group. - - :param media: File to send. Pass a file_id to send a file that exists on the - Telegram servers (recommended), pass an HTTP URL for Telegram to get a file - from the Internet, or pass 'attach://' to upload a new - one using multipart/form-data under name. - :ref:`More information on Sending Files » ` - :param caption: *Optional*. Caption of the photo to be sent, 0-1024 characters - after entities parsing - :param parse_mode: *Optional*. Mode for parsing entities in the photo caption. - See `formatting options `_ - for more details. - :param caption_entities: *Optional*. List of special entities that appear in the caption, - which can be specified instead of *parse_mode* - :param has_spoiler: *Optional*. Pass :code:`True` if the photo needs to be covered - with a spoiler animation - :return: None - """ - self._add( - InputMediaPhoto( - media=media, - caption=caption, - parse_mode=parse_mode, - caption_entities=caption_entities, - has_spoiler=has_spoiler, - **kwargs, - ) - ) - - def add_video( - self, - media: Union[str, InputFile], - thumbnail: Optional[InputFile] = None, - caption: Optional[str] = None, - parse_mode: Optional[str] = UNSET_PARSE_MODE, - caption_entities: Optional[List[MessageEntity]] = None, - width: Optional[int] = None, - height: Optional[int] = None, - duration: Optional[int] = None, - supports_streaming: Optional[bool] = None, - has_spoiler: Optional[bool] = None, - **kwargs: Any, - ) -> None: - """ - Add a video to the media group. - - :param media: File to send. Pass a file_id to send a file that exists on the - Telegram servers (recommended), pass an HTTP URL for Telegram to get a file - from the Internet, or pass 'attach://' to upload a new one - using multipart/form-data under name. - :ref:`More information on Sending Files » ` - :param thumbnail: *Optional*. Thumbnail of the file sent; can be ignored if thumbnail - generation for the file is supported server-side. The thumbnail should be in JPEG - format and less than 200 kB in size. A thumbnail's width and height should - not exceed 320. Ignored if the file is not uploaded using multipart/form-data. - Thumbnails can't be reused and can be only uploaded as a new file, so you - can pass 'attach://' if the thumbnail was uploaded using - multipart/form-data under . - :ref:`More information on Sending Files » ` - :param caption: *Optional*. Caption of the video to be sent, - 0-1024 characters after entities parsing - :param parse_mode: *Optional*. Mode for parsing entities in the video caption. - See `formatting options `_ - for more details. - :param caption_entities: *Optional*. List of special entities that appear in the caption, - which can be specified instead of *parse_mode* - :param width: *Optional*. Video width - :param height: *Optional*. Video height - :param duration: *Optional*. Video duration in seconds - :param supports_streaming: *Optional*. Pass :code:`True` if the uploaded video is - suitable for streaming - :param has_spoiler: *Optional*. Pass :code:`True` if the video needs to be covered - with a spoiler animation - :return: None - """ - self._add( - InputMediaVideo( - media=media, - thumbnail=thumbnail, - caption=caption, - parse_mode=parse_mode, - caption_entities=caption_entities, - width=width, - height=height, - duration=duration, - supports_streaming=supports_streaming, - has_spoiler=has_spoiler, - **kwargs, - ) - ) - - def add_document( - self, - media: Union[str, InputFile], - thumbnail: Optional[InputFile] = None, - caption: Optional[str] = None, - parse_mode: Optional[str] = UNSET_PARSE_MODE, - caption_entities: Optional[List[MessageEntity]] = None, - disable_content_type_detection: Optional[bool] = None, - **kwargs: Any, - ) -> None: - """ - Add a document to the media group. - - :param media: File to send. Pass a file_id to send a file that exists on the - Telegram servers (recommended), pass an HTTP URL for Telegram to get a file - from the Internet, or pass 'attach://' to upload a new one using - multipart/form-data under name. - :ref:`More information on Sending Files » ` - :param thumbnail: *Optional*. Thumbnail of the file sent; can be ignored - if thumbnail generation for the file is supported server-side. - The thumbnail should be in JPEG format and less than 200 kB in size. - A thumbnail's width and height should not exceed 320. - Ignored if the file is not uploaded using multipart/form-data. - Thumbnails can't be reused and can be only uploaded as a new file, - so you can pass 'attach://' if the thumbnail was uploaded - using multipart/form-data under . - :ref:`More information on Sending Files » ` - :param caption: *Optional*. Caption of the document to be sent, - 0-1024 characters after entities parsing - :param parse_mode: *Optional*. Mode for parsing entities in the document caption. - See `formatting options `_ - for more details. - :param caption_entities: *Optional*. List of special entities that appear - in the caption, which can be specified instead of *parse_mode* - :param disable_content_type_detection: *Optional*. Disables automatic server-side - content type detection for files uploaded using multipart/form-data. - Always :code:`True`, if the document is sent as part of an album. - :return: None - - """ - self._add( - InputMediaDocument( - media=media, - thumbnail=thumbnail, - caption=caption, - parse_mode=parse_mode, - caption_entities=caption_entities, - disable_content_type_detection=disable_content_type_detection, - **kwargs, - ) - ) - - def build(self) -> List[MediaType]: - """ - Builds a list of media objects for a media group. - - Adds the caption to the first media object if it is present. - - :return: List of media objects. - """ - update_first_media: Dict[str, Any] = {"caption": self.caption} - if self.caption_entities is not None: - update_first_media["caption_entities"] = self.caption_entities - update_first_media["parse_mode"] = None - - return [ - ( - media.model_copy(update=update_first_media) - if index == 0 and self.caption is not None - else media - ) - for index, media in enumerate(self._media) - ] diff --git a/env/Lib/site-packages/aiogram/utils/mixins.py b/env/Lib/site-packages/aiogram/utils/mixins.py deleted file mode 100644 index 86b3ed8..0000000 --- a/env/Lib/site-packages/aiogram/utils/mixins.py +++ /dev/null @@ -1,95 +0,0 @@ -from __future__ import annotations - -import contextvars -from typing import TYPE_CHECKING, Any, Dict, Generic, Optional, TypeVar, cast, overload - -if TYPE_CHECKING: - from typing_extensions import Literal - -__all__ = ("ContextInstanceMixin", "DataMixin") - - -class DataMixin: - @property - def data(self) -> Dict[str, Any]: - data: Optional[Dict[str, Any]] = getattr(self, "_data", None) - if data is None: - data = {} - setattr(self, "_data", data) - return data - - def __getitem__(self, key: str) -> Any: - return self.data[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.data[key] = value - - def __delitem__(self, key: str) -> None: - del self.data[key] - - def __contains__(self, key: str) -> bool: - return key in self.data - - def get(self, key: str, default: Optional[Any] = None) -> Optional[Any]: - return self.data.get(key, default) - - -ContextInstance = TypeVar("ContextInstance") - - -class ContextInstanceMixin(Generic[ContextInstance]): - __context_instance: contextvars.ContextVar[ContextInstance] - - def __init_subclass__(cls, **kwargs: Any) -> None: - super().__init_subclass__() - cls.__context_instance = contextvars.ContextVar(f"instance_{cls.__name__}") - - @overload # noqa: F811 - @classmethod - def get_current(cls) -> Optional[ContextInstance]: # pragma: no cover # noqa: F811 - ... - - @overload # noqa: F811 - @classmethod - def get_current( # noqa: F811 - cls, no_error: Literal[True] - ) -> Optional[ContextInstance]: # pragma: no cover # noqa: F811 - ... - - @overload # noqa: F811 - @classmethod - def get_current( # noqa: F811 - cls, no_error: Literal[False] - ) -> ContextInstance: # pragma: no cover # noqa: F811 - ... - - @classmethod # noqa: F811 - def get_current( # noqa: F811 - cls, no_error: bool = True - ) -> Optional[ContextInstance]: # pragma: no cover # noqa: F811 - # on mypy 0.770 I catch that contextvars.ContextVar always contextvars.ContextVar[Any] - cls.__context_instance = cast( - contextvars.ContextVar[ContextInstance], cls.__context_instance - ) - - try: - current: Optional[ContextInstance] = cls.__context_instance.get() - except LookupError: - if no_error: - current = None - else: - raise - - return current - - @classmethod - def set_current(cls, value: ContextInstance) -> contextvars.Token[ContextInstance]: - if not isinstance(value, cls): - raise TypeError( - f"Value should be instance of {cls.__name__!r} not {type(value).__name__!r}" - ) - return cls.__context_instance.set(value) - - @classmethod - def reset_current(cls, token: contextvars.Token[ContextInstance]) -> None: - cls.__context_instance.reset(token) diff --git a/env/Lib/site-packages/aiogram/utils/mypy_hacks.py b/env/Lib/site-packages/aiogram/utils/mypy_hacks.py deleted file mode 100644 index ea47a9d..0000000 --- a/env/Lib/site-packages/aiogram/utils/mypy_hacks.py +++ /dev/null @@ -1,16 +0,0 @@ -import functools -from typing import Callable, TypeVar - -T = TypeVar("T") - - -def lru_cache(maxsize: int = 128, typed: bool = False) -> Callable[[T], T]: - """ - fix: lru_cache annotation doesn't work with a property - this hack is only needed for the property, so type annotations are as they are - """ - - def wrapper(func: T) -> T: - return functools.lru_cache(maxsize, typed)(func) # type: ignore - - return wrapper diff --git a/env/Lib/site-packages/aiogram/utils/payload.py b/env/Lib/site-packages/aiogram/utils/payload.py deleted file mode 100644 index dbdba65..0000000 --- a/env/Lib/site-packages/aiogram/utils/payload.py +++ /dev/null @@ -1,109 +0,0 @@ -""" -Payload preparing - -We have added some utils to make work with payload easier. - -Basic encode example: - - .. code-block:: python - - from aiogram.utils.payload import encode_payload - - encoded = encode_payload("foo") - - # result: "Zm9v" - -Basic decode it back example: - - .. code-block:: python - - from aiogram.utils.payload import decode_payload - - encoded = "Zm9v" - decoded = decode_payload(encoded) - # result: "foo" - -Encoding and decoding with your own methods: - - 1. Create your own cryptor - - .. code-block:: python - - from Cryptodome.Cipher import AES - from Cryptodome.Util.Padding import pad, unpad - - class Cryptor: - def __init__(self, key: str): - self.key = key.encode("utf-8") - self.mode = AES.MODE_ECB # never use ECB in strong systems obviously - self.size = 32 - - @property - def cipher(self): - return AES.new(self.key, self.mode) - - def encrypt(self, data: bytes) -> bytes: - return self.cipher.encrypt(pad(data, self.size)) - - def decrypt(self, data: bytes) -> bytes: - decrypted_data = self.cipher.decrypt(data) - return unpad(decrypted_data, self.size) - - 2. Pass cryptor callable methods to aiogram payload tools - - .. code-block:: python - - cryptor = Cryptor("abcdefghijklmnop") - encoded = encode_payload("foo", encoder=cryptor.encrypt) - decoded = decode_payload(encoded_payload, decoder=cryptor.decrypt) - - # result: decoded == "foo" - -""" - -from base64 import urlsafe_b64decode, urlsafe_b64encode -from typing import Callable, Optional - - -def encode_payload( - payload: str, - encoder: Optional[Callable[[bytes], bytes]] = None, -) -> str: - """Encode payload with encoder. - - Result also will be encoded with URL-safe base64url. - """ - if not isinstance(payload, str): - payload = str(payload) - - payload_bytes = payload.encode("utf-8") - if encoder is not None: - payload_bytes = encoder(payload_bytes) - - return _encode_b64(payload_bytes) - - -def decode_payload( - payload: str, - decoder: Optional[Callable[[bytes], bytes]] = None, -) -> str: - """Decode URL-safe base64url payload with decoder.""" - original_payload = _decode_b64(payload) - - if decoder is None: - return original_payload.decode() - - return decoder(original_payload).decode() - - -def _encode_b64(payload: bytes) -> str: - """Encode with URL-safe base64url.""" - bytes_payload: bytes = urlsafe_b64encode(payload) - str_payload = bytes_payload.decode() - return str_payload.replace("=", "") - - -def _decode_b64(payload: str) -> bytes: - """Decode with URL-safe base64url.""" - payload += "=" * (4 - len(payload) % 4) - return urlsafe_b64decode(payload.encode()) diff --git a/env/Lib/site-packages/aiogram/utils/serialization.py b/env/Lib/site-packages/aiogram/utils/serialization.py deleted file mode 100644 index cc6ef8a..0000000 --- a/env/Lib/site-packages/aiogram/utils/serialization.py +++ /dev/null @@ -1,89 +0,0 @@ -from dataclasses import dataclass -from typing import Any, Dict, Optional - -from pydantic import BaseModel - -from aiogram import Bot -from aiogram.client.default import DefaultBotProperties -from aiogram.methods import TelegramMethod -from aiogram.types import InputFile - - -def _get_fake_bot(default: Optional[DefaultBotProperties] = None) -> Bot: - if default is None: - default = DefaultBotProperties() - return Bot(token="42:Fake", default=default) - - -@dataclass -class DeserializedTelegramObject: - """ - Represents a dumped Telegram object. - - :param data: The dumped data of the Telegram object. - :type data: Any - :param files: The dictionary containing the file names as keys - and the corresponding `InputFile` objects as values. - :type files: Dict[str, InputFile] - """ - - data: Any - files: Dict[str, InputFile] - - -def deserialize_telegram_object( - obj: Any, - default: Optional[DefaultBotProperties] = None, - include_api_method_name: bool = True, -) -> DeserializedTelegramObject: - """ - Deserialize Telegram Object to JSON compatible Python object. - - :param obj: The object to be deserialized. - :param default: Default bot properties - should be passed only if you want to use custom defaults. - :param include_api_method_name: Whether to include the API method name in the result. - :return: The deserialized Telegram object. - """ - extends = {} - if include_api_method_name and isinstance(obj, TelegramMethod): - extends["method"] = obj.__api_method__ - - if isinstance(obj, BaseModel): - obj = obj.model_dump(mode="python", warnings=False) - - # Fake bot is needed to exclude global defaults from the object. - fake_bot = _get_fake_bot(default=default) - - files: Dict[str, InputFile] = {} - prepared = fake_bot.session.prepare_value( - obj, - bot=fake_bot, - files=files, - _dumps_json=False, - ) - - if isinstance(prepared, dict): - prepared.update(extends) - return DeserializedTelegramObject(data=prepared, files=files) - - -def deserialize_telegram_object_to_python( - obj: Any, - default: Optional[DefaultBotProperties] = None, - include_api_method_name: bool = True, -) -> Any: - """ - Deserialize telegram object to JSON compatible Python object excluding files. - - :param obj: The telegram object to be deserialized. - :param default: Default bot properties - should be passed only if you want to use custom defaults. - :param include_api_method_name: Whether to include the API method name in the result. - :return: The deserialized telegram object. - """ - return deserialize_telegram_object( - obj, - default=default, - include_api_method_name=include_api_method_name, - ).data diff --git a/env/Lib/site-packages/aiogram/utils/text_decorations.py b/env/Lib/site-packages/aiogram/utils/text_decorations.py deleted file mode 100644 index 440fffa..0000000 --- a/env/Lib/site-packages/aiogram/utils/text_decorations.py +++ /dev/null @@ -1,274 +0,0 @@ -from __future__ import annotations - -import html -import re -from abc import ABC, abstractmethod -from typing import TYPE_CHECKING, Generator, List, Optional, Pattern, cast - -from aiogram.enums import MessageEntityType - -if TYPE_CHECKING: - from aiogram.types import MessageEntity - -__all__ = ( - "HtmlDecoration", - "MarkdownDecoration", - "TextDecoration", - "html_decoration", - "markdown_decoration", - "add_surrogates", - "remove_surrogates", -) - - -def add_surrogates(text: str) -> bytes: - return text.encode("utf-16-le") - - -def remove_surrogates(text: bytes) -> str: - return text.decode("utf-16-le") - - -class TextDecoration(ABC): - def apply_entity(self, entity: MessageEntity, text: str) -> str: - """ - Apply single entity to text - - :param entity: - :param text: - :return: - """ - if entity.type in { - MessageEntityType.BOT_COMMAND, - MessageEntityType.URL, - MessageEntityType.MENTION, - MessageEntityType.PHONE_NUMBER, - MessageEntityType.HASHTAG, - MessageEntityType.CASHTAG, - MessageEntityType.EMAIL, - }: - # These entities should not be changed - return text - if entity.type in { - MessageEntityType.BOLD, - MessageEntityType.ITALIC, - MessageEntityType.CODE, - MessageEntityType.UNDERLINE, - MessageEntityType.STRIKETHROUGH, - MessageEntityType.SPOILER, - MessageEntityType.BLOCKQUOTE, - MessageEntityType.EXPANDABLE_BLOCKQUOTE, - }: - return cast(str, getattr(self, entity.type)(value=text)) - if entity.type == MessageEntityType.PRE: - return ( - self.pre_language(value=text, language=entity.language) - if entity.language - else self.pre(value=text) - ) - if entity.type == MessageEntityType.TEXT_MENTION: - from aiogram.types import User - - user = cast(User, entity.user) - return self.link(value=text, link=f"tg://user?id={user.id}") - if entity.type == MessageEntityType.TEXT_LINK: - return self.link(value=text, link=cast(str, entity.url)) - if entity.type == MessageEntityType.CUSTOM_EMOJI: - return self.custom_emoji(value=text, custom_emoji_id=cast(str, entity.custom_emoji_id)) - - # This case is not possible because of `if` above, but if any new entity is added to - # API it will be here too - return self.quote(text) - - def unparse(self, text: str, entities: Optional[List[MessageEntity]] = None) -> str: - """ - Unparse message entities - - :param text: raw text - :param entities: Array of MessageEntities - :return: - """ - return "".join( - self._unparse_entities( - add_surrogates(text), - sorted(entities, key=lambda item: item.offset) if entities else [], - ) - ) - - def _unparse_entities( - self, - text: bytes, - entities: List[MessageEntity], - offset: Optional[int] = None, - length: Optional[int] = None, - ) -> Generator[str, None, None]: - if offset is None: - offset = 0 - length = length or len(text) - - for index, entity in enumerate(entities): - if entity.offset * 2 < offset: - continue - if entity.offset * 2 > offset: - yield self.quote(remove_surrogates(text[offset : entity.offset * 2])) - start = entity.offset * 2 - offset = entity.offset * 2 + entity.length * 2 - - sub_entities = list( - filter(lambda e: e.offset * 2 < (offset or 0), entities[index + 1 :]) - ) - yield self.apply_entity( - entity, - "".join(self._unparse_entities(text, sub_entities, offset=start, length=offset)), - ) - - if offset < length: - yield self.quote(remove_surrogates(text[offset:length])) - - @abstractmethod - def link(self, value: str, link: str) -> str: - pass - - @abstractmethod - def bold(self, value: str) -> str: - pass - - @abstractmethod - def italic(self, value: str) -> str: - pass - - @abstractmethod - def code(self, value: str) -> str: - pass - - @abstractmethod - def pre(self, value: str) -> str: - pass - - @abstractmethod - def pre_language(self, value: str, language: str) -> str: - pass - - @abstractmethod - def underline(self, value: str) -> str: - pass - - @abstractmethod - def strikethrough(self, value: str) -> str: - pass - - @abstractmethod - def spoiler(self, value: str) -> str: - pass - - @abstractmethod - def quote(self, value: str) -> str: - pass - - @abstractmethod - def custom_emoji(self, value: str, custom_emoji_id: str) -> str: - pass - - @abstractmethod - def blockquote(self, value: str) -> str: - pass - - @abstractmethod - def expandable_blockquote(self, value: str) -> str: - pass - - -class HtmlDecoration(TextDecoration): - BOLD_TAG = "b" - ITALIC_TAG = "i" - UNDERLINE_TAG = "u" - STRIKETHROUGH_TAG = "s" - SPOILER_TAG = "tg-spoiler" - EMOJI_TAG = "tg-emoji" - BLOCKQUOTE_TAG = "blockquote" - - def link(self, value: str, link: str) -> str: - return f'{value}' - - def bold(self, value: str) -> str: - return f"<{self.BOLD_TAG}>{value}" - - def italic(self, value: str) -> str: - return f"<{self.ITALIC_TAG}>{value}" - - def code(self, value: str) -> str: - return f"{value}" - - def pre(self, value: str) -> str: - return f"
{value}
" - - def pre_language(self, value: str, language: str) -> str: - return f'
{value}
' - - def underline(self, value: str) -> str: - return f"<{self.UNDERLINE_TAG}>{value}" - - def strikethrough(self, value: str) -> str: - return f"<{self.STRIKETHROUGH_TAG}>{value}" - - def spoiler(self, value: str) -> str: - return f"<{self.SPOILER_TAG}>{value}" - - def quote(self, value: str) -> str: - return html.escape(value, quote=False) - - def custom_emoji(self, value: str, custom_emoji_id: str) -> str: - return f'<{self.EMOJI_TAG} emoji-id="{custom_emoji_id}">{value}' - - def blockquote(self, value: str) -> str: - return f"<{self.BLOCKQUOTE_TAG}>{value}" - - def expandable_blockquote(self, value: str) -> str: - return f"<{self.BLOCKQUOTE_TAG} expandable>{value}" - - -class MarkdownDecoration(TextDecoration): - MARKDOWN_QUOTE_PATTERN: Pattern[str] = re.compile(r"([_*\[\]()~`>#+\-=|{}.!\\])") - - def link(self, value: str, link: str) -> str: - return f"[{value}]({link})" - - def bold(self, value: str) -> str: - return f"*{value}*" - - def italic(self, value: str) -> str: - return f"_\r{value}_\r" - - def code(self, value: str) -> str: - return f"`{value}`" - - def pre(self, value: str) -> str: - return f"```\n{value}\n```" - - def pre_language(self, value: str, language: str) -> str: - return f"```{language}\n{value}\n```" - - def underline(self, value: str) -> str: - return f"__\r{value}__\r" - - def strikethrough(self, value: str) -> str: - return f"~{value}~" - - def spoiler(self, value: str) -> str: - return f"||{value}||" - - def quote(self, value: str) -> str: - return re.sub(pattern=self.MARKDOWN_QUOTE_PATTERN, repl=r"\\\1", string=value) - - def custom_emoji(self, value: str, custom_emoji_id: str) -> str: - return f'!{self.link(value=value, link=f"tg://emoji?id={custom_emoji_id}")}' - - def blockquote(self, value: str) -> str: - return "\n".join(f">{line}" for line in value.splitlines()) - - def expandable_blockquote(self, value: str) -> str: - return "\n".join(f">{line}" for line in value.splitlines()) + "||" - - -html_decoration = HtmlDecoration() -markdown_decoration = MarkdownDecoration() diff --git a/env/Lib/site-packages/aiogram/utils/token.py b/env/Lib/site-packages/aiogram/utils/token.py deleted file mode 100644 index c073846..0000000 --- a/env/Lib/site-packages/aiogram/utils/token.py +++ /dev/null @@ -1,42 +0,0 @@ -from functools import lru_cache - - -class TokenValidationError(Exception): - pass - - -@lru_cache() -def validate_token(token: str) -> bool: - """ - Validate Telegram token - - :param token: - :return: - """ - if not isinstance(token, str): - raise TokenValidationError( - f"Token is invalid! It must be 'str' type instead of {type(token)} type." - ) - - if any(x.isspace() for x in token): - message = "Token is invalid! It can't contains spaces." - raise TokenValidationError(message) - - left, sep, right = token.partition(":") - if (not sep) or (not left.isdigit()) or (not right): - raise TokenValidationError("Token is invalid!") - - return True - - -@lru_cache() -def extract_bot_id(token: str) -> int: - """ - Extract bot ID from Telegram token - - :param token: - :return: - """ - validate_token(token) - raw_bot_id, *_ = token.split(":") - return int(raw_bot_id) diff --git a/env/Lib/site-packages/aiogram/utils/warnings.py b/env/Lib/site-packages/aiogram/utils/warnings.py deleted file mode 100644 index 3099fc3..0000000 --- a/env/Lib/site-packages/aiogram/utils/warnings.py +++ /dev/null @@ -1,6 +0,0 @@ -class AiogramWarning(Warning): - pass - - -class Recommendation(AiogramWarning): - pass diff --git a/env/Lib/site-packages/aiogram/utils/web_app.py b/env/Lib/site-packages/aiogram/utils/web_app.py deleted file mode 100644 index 192776f..0000000 --- a/env/Lib/site-packages/aiogram/utils/web_app.py +++ /dev/null @@ -1,183 +0,0 @@ -import hashlib -import hmac -import json -from datetime import datetime -from operator import itemgetter -from typing import Any, Callable, Optional -from urllib.parse import parse_qsl - -from aiogram.types import TelegramObject - - -class WebAppChat(TelegramObject): - """ - This object represents a chat. - - Source: https://core.telegram.org/bots/webapps#webappchat - """ - - id: int - """Unique identifier for this chat. This number may have more than 32 significant bits - and some programming languages may have difficulty/silent defects in interpreting it. - But it has at most 52 significant bits, so a signed 64-bit integer or double-precision - float type are safe for storing this identifier.""" - type: str - """Type of chat, can be either “group”, “supergroup” or “channel”""" - title: str - """Title of the chat""" - username: Optional[str] = None - """Username of the chat""" - photo_url: Optional[str] = None - """URL of the chat’s photo. The photo can be in .jpeg or .svg formats. - Only returned for Web Apps launched from the attachment menu.""" - - -class WebAppUser(TelegramObject): - """ - This object contains the data of the Web App user. - - Source: https://core.telegram.org/bots/webapps#webappuser - """ - - id: int - """A unique identifier for the user or bot. This number may have more than 32 significant bits - and some programming languages may have difficulty/silent defects in interpreting it. - It has at most 52 significant bits, so a 64-bit integer or a double-precision float type - is safe for storing this identifier.""" - is_bot: Optional[bool] = None - """True, if this user is a bot. Returns in the receiver field only.""" - first_name: str - """First name of the user or bot.""" - last_name: Optional[str] = None - """Last name of the user or bot.""" - username: Optional[str] = None - """Username of the user or bot.""" - language_code: Optional[str] = None - """IETF language tag of the user's language. Returns in user field only.""" - is_premium: Optional[bool] = None - """True, if this user is a Telegram Premium user.""" - added_to_attachment_menu: Optional[bool] = None - """True, if this user added the bot to the attachment menu.""" - allows_write_to_pm: Optional[bool] = None - """True, if this user allowed the bot to message them.""" - photo_url: Optional[str] = None - """URL of the user’s profile photo. The photo can be in .jpeg or .svg formats. - Only returned for Web Apps launched from the attachment menu.""" - - -class WebAppInitData(TelegramObject): - """ - This object contains data that is transferred to the Web App when it is opened. - It is empty if the Web App was launched from a keyboard button. - - Source: https://core.telegram.org/bots/webapps#webappinitdata - """ - - query_id: Optional[str] = None - """A unique identifier for the Web App session, required for sending messages - via the answerWebAppQuery method.""" - user: Optional[WebAppUser] = None - """An object containing data about the current user.""" - receiver: Optional[WebAppUser] = None - """An object containing data about the chat partner of the current user in the chat where - the bot was launched via the attachment menu. - Returned only for Web Apps launched via the attachment menu.""" - chat: Optional[WebAppChat] = None - """An object containing data about the chat where the bot was launched via the attachment menu. - Returned for supergroups, channels, and group chats – only for Web Apps launched via the - attachment menu.""" - chat_type: Optional[str] = None - """Type of the chat from which the Web App was opened. - Can be either “sender” for a private chat with the user opening the link, - “private”, “group”, “supergroup”, or “channel”. - Returned only for Web Apps launched from direct links.""" - chat_instance: Optional[str] = None - """Global identifier, uniquely corresponding to the chat from which the Web App was opened. - Returned only for Web Apps launched from a direct link.""" - start_param: Optional[str] = None - """The value of the startattach parameter, passed via link. - Only returned for Web Apps when launched from the attachment menu via link. - The value of the start_param parameter will also be passed in the GET-parameter - tgWebAppStartParam, so the Web App can load the correct interface right away.""" - can_send_after: Optional[int] = None - """Time in seconds, after which a message can be sent via the answerWebAppQuery method.""" - auth_date: datetime - """Unix time when the form was opened.""" - hash: str - """A hash of all passed parameters, which the bot server can use to check their validity.""" - - -def check_webapp_signature(token: str, init_data: str) -> bool: - """ - Check incoming WebApp init data signature - - Source: https://core.telegram.org/bots/webapps#validating-data-received-via-the-web-app - - :param token: bot Token - :param init_data: data from frontend to be validated - :return: - """ - try: - parsed_data = dict(parse_qsl(init_data, strict_parsing=True)) - except ValueError: # pragma: no cover - # Init data is not a valid query string - return False - if "hash" not in parsed_data: - # Hash is not present in init data - return False - hash_ = parsed_data.pop("hash") - - data_check_string = "\n".join( - f"{k}={v}" for k, v in sorted(parsed_data.items(), key=itemgetter(0)) - ) - secret_key = hmac.new(key=b"WebAppData", msg=token.encode(), digestmod=hashlib.sha256) - calculated_hash = hmac.new( - key=secret_key.digest(), msg=data_check_string.encode(), digestmod=hashlib.sha256 - ).hexdigest() - return calculated_hash == hash_ - - -def parse_webapp_init_data( - init_data: str, - *, - loads: Callable[..., Any] = json.loads, -) -> WebAppInitData: - """ - Parse WebApp init data and return it as WebAppInitData object - - This method doesn't make any security check, so you shall not trust to this data, - use :code:`safe_parse_webapp_init_data` instead. - - :param init_data: data from frontend to be parsed - :param loads: - :return: - """ - result = {} - for key, value in parse_qsl(init_data): - if (value.startswith("[") and value.endswith("]")) or ( - value.startswith("{") and value.endswith("}") - ): - value = loads(value) - result[key] = value - return WebAppInitData(**result) - - -def safe_parse_webapp_init_data( - token: str, - init_data: str, - *, - loads: Callable[..., Any] = json.loads, -) -> WebAppInitData: - """ - Validate raw WebApp init data and return it as WebAppInitData object - - Raise :obj:`ValueError` when data is invalid - - :param token: bot token - :param init_data: data from frontend to be parsed and validated - :param loads: - :return: - """ - if check_webapp_signature(token, init_data): - return parse_webapp_init_data(init_data, loads=loads) - raise ValueError("Invalid init data signature") diff --git a/env/Lib/site-packages/aiogram/webhook/__init__.py b/env/Lib/site-packages/aiogram/webhook/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/env/Lib/site-packages/aiogram/webhook/__pycache__/__init__.cpython-311.pyc b/env/Lib/site-packages/aiogram/webhook/__pycache__/__init__.cpython-311.pyc deleted file mode 100644 index dccb9ce..0000000 Binary files a/env/Lib/site-packages/aiogram/webhook/__pycache__/__init__.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/webhook/__pycache__/aiohttp_server.cpython-311.pyc b/env/Lib/site-packages/aiogram/webhook/__pycache__/aiohttp_server.cpython-311.pyc deleted file mode 100644 index 64bab52..0000000 Binary files a/env/Lib/site-packages/aiogram/webhook/__pycache__/aiohttp_server.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/webhook/__pycache__/security.cpython-311.pyc b/env/Lib/site-packages/aiogram/webhook/__pycache__/security.cpython-311.pyc deleted file mode 100644 index 80137c4..0000000 Binary files a/env/Lib/site-packages/aiogram/webhook/__pycache__/security.cpython-311.pyc and /dev/null differ diff --git a/env/Lib/site-packages/aiogram/webhook/aiohttp_server.py b/env/Lib/site-packages/aiogram/webhook/aiohttp_server.py deleted file mode 100644 index 7caa0e1..0000000 --- a/env/Lib/site-packages/aiogram/webhook/aiohttp_server.py +++ /dev/null @@ -1,295 +0,0 @@ -import asyncio -import secrets -from abc import ABC, abstractmethod -from asyncio import Transport -from typing import Any, Awaitable, Callable, Dict, Optional, Set, Tuple, cast - -from aiohttp import MultipartWriter, web -from aiohttp.abc import Application -from aiohttp.typedefs import Handler -from aiohttp.web_middlewares import middleware - -from aiogram import Bot, Dispatcher, loggers -from aiogram.methods import TelegramMethod -from aiogram.methods.base import TelegramType -from aiogram.types import InputFile -from aiogram.webhook.security import IPFilter - - -def setup_application(app: Application, dispatcher: Dispatcher, /, **kwargs: Any) -> None: - """ - This function helps to configure a startup-shutdown process - - :param app: aiohttp application - :param dispatcher: aiogram dispatcher - :param kwargs: additional data - :return: - """ - workflow_data = { - "app": app, - "dispatcher": dispatcher, - **dispatcher.workflow_data, - **kwargs, - } - - async def on_startup(*a: Any, **kw: Any) -> None: # pragma: no cover - await dispatcher.emit_startup(**workflow_data) - - async def on_shutdown(*a: Any, **kw: Any) -> None: # pragma: no cover - await dispatcher.emit_shutdown(**workflow_data) - - app.on_startup.append(on_startup) - app.on_shutdown.append(on_shutdown) - - -def check_ip(ip_filter: IPFilter, request: web.Request) -> Tuple[str, bool]: - # Try to resolve client IP over reverse proxy - if forwarded_for := request.headers.get("X-Forwarded-For", ""): - # Get the left-most ip when there is multiple ips - # (request got through multiple proxy/load balancers) - # https://github.com/aiogram/aiogram/issues/672 - forwarded_for, *_ = forwarded_for.split(",", maxsplit=1) - return forwarded_for, forwarded_for in ip_filter - - # When reverse proxy is not configured IP address can be resolved from incoming connection - if peer_name := cast(Transport, request.transport).get_extra_info("peername"): - host, _ = peer_name - return host, host in ip_filter - - # Potentially impossible case - return "", False # pragma: no cover - - -def ip_filter_middleware( - ip_filter: IPFilter, -) -> Callable[[web.Request, Handler], Awaitable[Any]]: - """ - - :param ip_filter: - :return: - """ - - @middleware - async def _ip_filter_middleware(request: web.Request, handler: Handler) -> Any: - ip_address, accept = check_ip(ip_filter=ip_filter, request=request) - if not accept: - loggers.webhook.warning("Blocking request from an unauthorized IP: %s", ip_address) - raise web.HTTPUnauthorized() - return await handler(request) - - return _ip_filter_middleware - - -class BaseRequestHandler(ABC): - def __init__( - self, - dispatcher: Dispatcher, - handle_in_background: bool = False, - **data: Any, - ) -> None: - """ - Base handler that helps to handle incoming request from aiohttp - and propagate it to the Dispatcher - - :param dispatcher: instance of :class:`aiogram.dispatcher.dispatcher.Dispatcher` - :param handle_in_background: immediately responds to the Telegram instead of - a waiting end of a handler process - """ - self.dispatcher = dispatcher - self.handle_in_background = handle_in_background - self.data = data - self._background_feed_update_tasks: Set[asyncio.Task[Any]] = set() - - def register(self, app: Application, /, path: str, **kwargs: Any) -> None: - """ - Register route and shutdown callback - - :param app: instance of aiohttp Application - :param path: route path - :param kwargs: - """ - app.on_shutdown.append(self._handle_close) - app.router.add_route("POST", path, self.handle, **kwargs) - - async def _handle_close(self, app: Application) -> None: - await self.close() - - @abstractmethod - async def close(self) -> None: - pass - - @abstractmethod - async def resolve_bot(self, request: web.Request) -> Bot: - """ - This method should be implemented in subclasses of this class. - - Resolve Bot instance from request. - - :param request: - :return: Bot instance - """ - pass - - @abstractmethod - def verify_secret(self, telegram_secret_token: str, bot: Bot) -> bool: - pass - - async def _background_feed_update(self, bot: Bot, update: Dict[str, Any]) -> None: - result = await self.dispatcher.feed_raw_update(bot=bot, update=update, **self.data) - if isinstance(result, TelegramMethod): - await self.dispatcher.silent_call_request(bot=bot, result=result) - - async def _handle_request_background(self, bot: Bot, request: web.Request) -> web.Response: - feed_update_task = asyncio.create_task( - self._background_feed_update( - bot=bot, update=await request.json(loads=bot.session.json_loads) - ) - ) - self._background_feed_update_tasks.add(feed_update_task) - feed_update_task.add_done_callback(self._background_feed_update_tasks.discard) - return web.json_response({}, dumps=bot.session.json_dumps) - - def _build_response_writer( - self, bot: Bot, result: Optional[TelegramMethod[TelegramType]] - ) -> MultipartWriter: - writer = MultipartWriter( - "form-data", - boundary=f"webhookBoundary{secrets.token_urlsafe(16)}", - ) - if not result: - return writer - - payload = writer.append(result.__api_method__) - payload.set_content_disposition("form-data", name="method") - - files: Dict[str, InputFile] = {} - for key, value in result.model_dump(warnings=False).items(): - value = bot.session.prepare_value(value, bot=bot, files=files) - if not value: - continue - payload = writer.append(value) - payload.set_content_disposition("form-data", name=key) - - for key, value in files.items(): - payload = writer.append(value.read(bot)) - payload.set_content_disposition( - "form-data", - name=key, - filename=value.filename or key, - ) - - return writer - - async def _handle_request(self, bot: Bot, request: web.Request) -> web.Response: - result: Optional[TelegramMethod[Any]] = await self.dispatcher.feed_webhook_update( - bot, - await request.json(loads=bot.session.json_loads), - **self.data, - ) - return web.Response(body=self._build_response_writer(bot=bot, result=result)) - - async def handle(self, request: web.Request) -> web.Response: - bot = await self.resolve_bot(request) - if not self.verify_secret(request.headers.get("X-Telegram-Bot-Api-Secret-Token", ""), bot): - return web.Response(body="Unauthorized", status=401) - if self.handle_in_background: - return await self._handle_request_background(bot=bot, request=request) - return await self._handle_request(bot=bot, request=request) - - __call__ = handle - - -class SimpleRequestHandler(BaseRequestHandler): - def __init__( - self, - dispatcher: Dispatcher, - bot: Bot, - handle_in_background: bool = True, - secret_token: Optional[str] = None, - **data: Any, - ) -> None: - """ - Handler for single Bot instance - - :param dispatcher: instance of :class:`aiogram.dispatcher.dispatcher.Dispatcher` - :param handle_in_background: immediately responds to the Telegram instead of - a waiting end of handler process - :param bot: instance of :class:`aiogram.client.bot.Bot` - """ - super().__init__(dispatcher=dispatcher, handle_in_background=handle_in_background, **data) - self.bot = bot - self.secret_token = secret_token - - def verify_secret(self, telegram_secret_token: str, bot: Bot) -> bool: - if self.secret_token: - return secrets.compare_digest(telegram_secret_token, self.secret_token) - return True - - async def close(self) -> None: - """ - Close bot session - """ - await self.bot.session.close() - - async def resolve_bot(self, request: web.Request) -> Bot: - return self.bot - - -class TokenBasedRequestHandler(BaseRequestHandler): - def __init__( - self, - dispatcher: Dispatcher, - handle_in_background: bool = True, - bot_settings: Optional[Dict[str, Any]] = None, - **data: Any, - ) -> None: - """ - Handler that supports multiple bots the context will be resolved - from path variable 'bot_token' - - .. note:: - - This handler is not recommended in due to token is available in URL - and can be logged by reverse proxy server or other middleware. - - :param dispatcher: instance of :class:`aiogram.dispatcher.dispatcher.Dispatcher` - :param handle_in_background: immediately responds to the Telegram instead of - a waiting end of handler process - :param bot_settings: kwargs that will be passed to new Bot instance - """ - super().__init__(dispatcher=dispatcher, handle_in_background=handle_in_background, **data) - if bot_settings is None: - bot_settings = {} - self.bot_settings = bot_settings - self.bots: Dict[str, Bot] = {} - - def verify_secret(self, telegram_secret_token: str, bot: Bot) -> bool: - return True - - async def close(self) -> None: - for bot in self.bots.values(): - await bot.session.close() - - def register(self, app: Application, /, path: str, **kwargs: Any) -> None: - """ - Validate path, register route and shutdown callback - - :param app: instance of aiohttp Application - :param path: route path - :param kwargs: - """ - if "{bot_token}" not in path: - raise ValueError("Path should contains '{bot_token}' substring") - super().register(app, path=path, **kwargs) - - async def resolve_bot(self, request: web.Request) -> Bot: - """ - Get bot token from a path and create or get from cache Bot instance - - :param request: - :return: - """ - token = request.match_info["bot_token"] - if token not in self.bots: - self.bots[token] = Bot(token=token, **self.bot_settings) - return self.bots[token] diff --git a/env/Lib/site-packages/aiogram/webhook/security.py b/env/Lib/site-packages/aiogram/webhook/security.py deleted file mode 100644 index 91d3820..0000000 --- a/env/Lib/site-packages/aiogram/webhook/security.py +++ /dev/null @@ -1,41 +0,0 @@ -from ipaddress import IPv4Address, IPv4Network -from typing import Optional, Sequence, Set, Union - -DEFAULT_TELEGRAM_NETWORKS = [ - IPv4Network("149.154.160.0/20"), - IPv4Network("91.108.4.0/22"), -] - - -class IPFilter: - def __init__(self, ips: Optional[Sequence[Union[str, IPv4Network, IPv4Address]]] = None): - self._allowed_ips: Set[IPv4Address] = set() - - if ips: - self.allow(*ips) - - def allow(self, *ips: Union[str, IPv4Network, IPv4Address]) -> None: - for ip in ips: - self.allow_ip(ip) - - def allow_ip(self, ip: Union[str, IPv4Network, IPv4Address]) -> None: - if isinstance(ip, str): - ip = IPv4Network(ip) if "/" in ip else IPv4Address(ip) - if isinstance(ip, IPv4Address): - self._allowed_ips.add(ip) - elif isinstance(ip, IPv4Network): - self._allowed_ips.update(ip.hosts()) - else: - raise ValueError(f"Invalid type of ipaddress: {type(ip)} ('{ip}')") - - @classmethod - def default(cls) -> "IPFilter": - return cls(DEFAULT_TELEGRAM_NETWORKS) - - def check(self, ip: Union[str, IPv4Address]) -> bool: - if not isinstance(ip, IPv4Address): - ip = IPv4Address(ip) - return ip in self._allowed_ips - - def __contains__(self, item: Union[str, IPv4Address]) -> bool: - return self.check(item) diff --git a/project/bot.py b/project/bot.py index 357653e..a247a55 100644 --- a/project/bot.py +++ b/project/bot.py @@ -29,11 +29,65 @@ def start_command(message): if user: bot.send_message(message.chat.id, f"Ваши данные:\nФИО: {user[0]}\nРоль: {user[1]}") - show_options(message, user[1]) + if user[1] == "Модератор": + show_moderator_options(message) + else: + show_options(message, user[1]) else: msg = bot.send_message(message.chat.id, "Добро пожаловать! Пожалуйста, укажите ваше полное имя.") bot.register_next_step_handler(msg, process_full_name) +# Функция для отображения опций модератора +def show_moderator_options(message): + markup = types.ReplyKeyboardMarkup(one_time_keyboard=True, resize_keyboard=True) + markup.add('Просмотр сообщений', 'Тех. поддержка', 'Старший куратор') + bot.send_message(message.chat.id, "Выберите одну из опций, Модератор:", reply_markup=markup) + + +# Команда для просмотра всех сообщений, на которые можно ответить +@bot.message_handler(func=lambda message: message.text == "Просмотр сообщений") +def view_messages(message): + cursor.execute("SELECT message_id, user_id, message_text FROM messages WHERE moderator_id IS NULL ORDER BY timestamp DESC") + messages = cursor.fetchall() + + if messages: + response = "Сообщения, на которые можно ответить:\n\n" + for msg in messages: + response += f"ID: {msg[0]}\nОт пользователя: {msg[1]}\nСообщение: {msg[2]}\n\n" + else: + response = "Нет сообщений, на которые можно ответить." + + bot.send_message(message.chat.id, response) + +# Команда для ответа на сообщение +@bot.message_handler(commands=['reply']) +def reply_to_user(message): + try: + args = message.text.split(' ', 2) # /reply + message_id = int(args[1]) + response_text = args[2] + + # Получаем информацию о пользователе по ID сообщения + cursor.execute("SELECT user_id FROM messages WHERE message_id = %s", (message_id,)) + user_id = cursor.fetchone() + + if user_id: + user_id = user_id[0] + bot.send_message(user_id, f"Ответ от модератора:\n{response_text}") + + # Обновляем информацию о модераторе, который ответил + cursor.execute( + "UPDATE messages SET moderator_id = %s WHERE message_id = %s", + (message.from_user.id, message_id) + ) + conn.commit() + + bot.send_message(message.chat.id, "Ваш ответ был отправлен пользователю.") + else: + bot.send_message(message.chat.id, "Сообщение с таким ID не найдено.") + except (IndexError, ValueError): + bot.send_message(message.chat.id, "Неверный формат команды. Используйте /reply <текст ответа>.") + # Получаем ФИО пользователя def process_full_name(message): full_name = message.text diff --git a/test.py b/test.py new file mode 100644 index 0000000..c2e5145 --- /dev/null +++ b/test.py @@ -0,0 +1,2 @@ +p = [0, 1] +print(p[2]) \ No newline at end of file