pyTelegramBotAPI 4.34.0__tar.gz → 4.35.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (215) hide show
  1. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/PKG-INFO +2 -2
  2. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/README.md +1 -1
  3. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/docs/source/conf.py +1 -1
  4. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/pyproject.toml +1 -1
  5. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/requirements.txt +1 -1
  6. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/telebot/__init__.py +149 -5
  7. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/telebot/apihelper.py +63 -3
  8. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/telebot/async_telebot.py +158 -5
  9. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/telebot/asyncio_helper.py +60 -4
  10. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/telebot/types.py +1878 -11
  11. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/telebot/version.py +1 -1
  12. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/.github/ISSUE_TEMPLATE +0 -0
  13. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
  14. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/.github/workflows/setup_python.yml +0 -0
  15. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/.gitignore +0 -0
  16. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/.readthedocs.yml +0 -0
  17. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/.travis.yml +0 -0
  18. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/LICENSE +0 -0
  19. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/doc_req.txt +0 -0
  20. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/docs/Makefile +0 -0
  21. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/docs/source/_static/logo.png +0 -0
  22. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/docs/source/_static/logo2.png +0 -0
  23. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/docs/source/async_version/index.rst +0 -0
  24. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/docs/source/calldata.rst +0 -0
  25. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/docs/source/formatting.rst +0 -0
  26. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/docs/source/index.rst +0 -0
  27. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/docs/source/install.rst +0 -0
  28. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/docs/source/locales/en/LC_MESSAGES/async_version.po +0 -0
  29. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/docs/source/locales/en/LC_MESSAGES/calldata.po +0 -0
  30. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/docs/source/locales/en/LC_MESSAGES/formatting.po +0 -0
  31. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/docs/source/locales/en/LC_MESSAGES/index.po +0 -0
  32. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/docs/source/locales/en/LC_MESSAGES/install.po +0 -0
  33. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/docs/source/locales/en/LC_MESSAGES/quick_start.po +0 -0
  34. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/docs/source/locales/en/LC_MESSAGES/sync_version.po +0 -0
  35. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/docs/source/locales/en/LC_MESSAGES/types.po +0 -0
  36. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/docs/source/locales/en/LC_MESSAGES/util.po +0 -0
  37. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/docs/source/locales/ru/LC_MESSAGES/async_version.po +0 -0
  38. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/docs/source/locales/ru/LC_MESSAGES/calldata.po +0 -0
  39. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/docs/source/locales/ru/LC_MESSAGES/formatting.po +0 -0
  40. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/docs/source/locales/ru/LC_MESSAGES/index.po +0 -0
  41. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/docs/source/locales/ru/LC_MESSAGES/install.po +0 -0
  42. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/docs/source/locales/ru/LC_MESSAGES/quick_start.po +0 -0
  43. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/docs/source/locales/ru/LC_MESSAGES/sync_version.po +0 -0
  44. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/docs/source/locales/ru/LC_MESSAGES/types.po +0 -0
  45. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/docs/source/locales/ru/LC_MESSAGES/util.po +0 -0
  46. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/docs/source/quick_start.rst +0 -0
  47. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/docs/source/sync_version/index.rst +0 -0
  48. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/docs/source/types.rst +0 -0
  49. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/docs/source/util.rst +0 -0
  50. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/anonymous_bot.py +0 -0
  51. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/asynchronous_telebot/callback_data_examples/advanced_calendar_example/filters.py +0 -0
  52. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/asynchronous_telebot/callback_data_examples/advanced_calendar_example/keyboards.py +0 -0
  53. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/asynchronous_telebot/callback_data_examples/advanced_calendar_example/main.py +0 -0
  54. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/asynchronous_telebot/callback_data_examples/simple_products_example.py +0 -0
  55. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/asynchronous_telebot/chat_join_request.py +0 -0
  56. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/asynchronous_telebot/chat_member_example.py +0 -0
  57. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/asynchronous_telebot/continue_handling.py +0 -0
  58. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/asynchronous_telebot/custom_filters/admin_filter_example.py +0 -0
  59. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/asynchronous_telebot/custom_filters/advanced_text_filter.py +0 -0
  60. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/asynchronous_telebot/custom_filters/general_custom_filters.py +0 -0
  61. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/asynchronous_telebot/custom_filters/id_filter_example.py +0 -0
  62. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/asynchronous_telebot/custom_filters/is_filter_example.py +0 -0
  63. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/asynchronous_telebot/custom_filters/text_filter_example.py +0 -0
  64. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/asynchronous_telebot/custom_states.py +0 -0
  65. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/asynchronous_telebot/detect_changes.py +0 -0
  66. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/asynchronous_telebot/download_file_example.py +0 -0
  67. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/asynchronous_telebot/echo_bot.py +0 -0
  68. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/asynchronous_telebot/exception_handler.py +0 -0
  69. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/asynchronous_telebot/formatting_example.py +0 -0
  70. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/asynchronous_telebot/message_reaction_example.py +0 -0
  71. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/asynchronous_telebot/middleware/flooding_middleware.py +0 -0
  72. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/asynchronous_telebot/middleware/i18n.py +0 -0
  73. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/asynchronous_telebot/middleware/i18n_middleware_example/i18n_base_midddleware.py +0 -0
  74. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/asynchronous_telebot/middleware/i18n_middleware_example/keyboards.py +0 -0
  75. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/asynchronous_telebot/middleware/i18n_middleware_example/locales/en/LC_MESSAGES/messages.po +0 -0
  76. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/asynchronous_telebot/middleware/i18n_middleware_example/locales/ru/LC_MESSAGES/messages.po +0 -0
  77. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/asynchronous_telebot/middleware/i18n_middleware_example/locales/uz_Latn/LC_MESSAGES/messages.po +0 -0
  78. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/asynchronous_telebot/middleware/i18n_middleware_example/main.py +0 -0
  79. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/asynchronous_telebot/mini_app.py +0 -0
  80. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/asynchronous_telebot/multibot/README.MD +0 -0
  81. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/asynchronous_telebot/multibot/config.py +0 -0
  82. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/asynchronous_telebot/multibot/handlers.py +0 -0
  83. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/asynchronous_telebot/multibot/main.py +0 -0
  84. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/asynchronous_telebot/multibot/nginx_conf.conf +0 -0
  85. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/asynchronous_telebot/register_handler.py +0 -0
  86. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/asynchronous_telebot/send_file_example.py +0 -0
  87. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/asynchronous_telebot/send_message_draft_example.py +0 -0
  88. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/asynchronous_telebot/set_command_example.py +0 -0
  89. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/asynchronous_telebot/skip_updates_example.py +0 -0
  90. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/asynchronous_telebot/timer_bot_async.py +0 -0
  91. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/asynchronous_telebot/update_listener.py +0 -0
  92. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/asynchronous_telebot/webhooks/async_webhook_aiohttp_echo_bot.py +0 -0
  93. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/asynchronous_telebot/webhooks/run_webhooks.py +0 -0
  94. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/asynchronous_telebot/webhooks/webhook_starlette_echo_bot.py +0 -0
  95. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/callback_data_examples/advanced_calendar_example/filters.py +0 -0
  96. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/callback_data_examples/advanced_calendar_example/keyboards.py +0 -0
  97. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/callback_data_examples/advanced_calendar_example/main.py +0 -0
  98. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/callback_data_examples/simple_products_example.py +0 -0
  99. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/chat_join_request.py +0 -0
  100. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/chat_member_example.py +0 -0
  101. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/continue_handling.py +0 -0
  102. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/create_invite_link.py +0 -0
  103. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/custom_filters/admin_filter_example.py +0 -0
  104. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/custom_filters/advanced_text_filter.py +0 -0
  105. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/custom_filters/general_custom_filters.py +0 -0
  106. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/custom_filters/id_filter_example.py +0 -0
  107. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/custom_filters/is_filter_example.py +0 -0
  108. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/custom_filters/text_filter_example.py +0 -0
  109. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/custom_states.py +0 -0
  110. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/deep_linking.py +0 -0
  111. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/detailed_example/detailed_example.py +0 -0
  112. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/detailed_example/kitten.jpg +0 -0
  113. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/detailed_example/rooster.jpg +0 -0
  114. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/detect_changes.py +0 -0
  115. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/download_file_example.py +0 -0
  116. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/echo_bot.py +0 -0
  117. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/formatting_example.py +0 -0
  118. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/inline_example.py +0 -0
  119. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/inline_keyboard_example.py +0 -0
  120. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/message_reaction_example.py +0 -0
  121. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/middleware/README.md +0 -0
  122. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/middleware/class_based/antiflood_middleware.py +0 -0
  123. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/middleware/class_based/basic_example.py +0 -0
  124. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/middleware/class_based/i18n_middleware/i18n_base_middleware.py +0 -0
  125. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/middleware/class_based/i18n_middleware/keyboards.py +0 -0
  126. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/middleware/class_based/i18n_middleware/locales/en/LC_MESSAGES/messages.po +0 -0
  127. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/middleware/class_based/i18n_middleware/locales/ru/LC_MESSAGES/messages.po +0 -0
  128. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/middleware/class_based/i18n_middleware/locales/uz_Latn/LC_MESSAGES/messages.po +0 -0
  129. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/middleware/class_based/i18n_middleware/main.py +0 -0
  130. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/middleware/function_based/i18n.py +0 -0
  131. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/middleware/function_based/i18n_gettext/i18n_class.py +0 -0
  132. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/middleware/function_based/i18n_gettext/keyboards.py +0 -0
  133. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/middleware/function_based/i18n_gettext/locales/en/LC_MESSAGES/messages.po +0 -0
  134. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/middleware/function_based/i18n_gettext/locales/ru/LC_MESSAGES/messages.po +0 -0
  135. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/middleware/function_based/i18n_gettext/locales/uz_Latn/LC_MESSAGES/messages.po +0 -0
  136. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/middleware/function_based/i18n_gettext/main.py +0 -0
  137. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/middleware/function_based/session.py +0 -0
  138. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/mini_app.py +0 -0
  139. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/mini_app_web/index.html +0 -0
  140. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/mini_app_web/script.js +0 -0
  141. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/mini_app_web/style.css +0 -0
  142. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/multibot/README.MD +0 -0
  143. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/multibot/config.py +0 -0
  144. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/multibot/handlers.py +0 -0
  145. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/multibot/main.py +0 -0
  146. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/multibot/nginx_conf.conf +0 -0
  147. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/payments_example.py +0 -0
  148. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/poll_example.py +0 -0
  149. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/register_handler.py +0 -0
  150. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/reply_keyboard_markup_example.py +0 -0
  151. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/send_message_draft_example.py +0 -0
  152. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/serverless/aws_lambda_function.py +0 -0
  153. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/serverless/azure_functions +0 -0
  154. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/serverless/flask_google_cloud_bot/.gcloudignore +0 -0
  155. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/serverless/flask_google_cloud_bot/app.yaml +0 -0
  156. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/serverless/flask_google_cloud_bot/main.py +0 -0
  157. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/serverless/flask_google_cloud_bot/requirements.txt +0 -0
  158. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/set_command_example.py +0 -0
  159. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/skip_updates_example.py +0 -0
  160. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/stars_payment.py +0 -0
  161. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/step_example.py +0 -0
  162. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/telebot_bot/telebot_bot.py +0 -0
  163. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/timer_bot.py +0 -0
  164. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/webhook_examples/README.md +0 -0
  165. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/webhook_examples/run_webhooks.py +0 -0
  166. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/webhook_examples/webhook_aiohttp_echo_bot.py +0 -0
  167. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/webhook_examples/webhook_cherrypy_echo_bot.py +0 -0
  168. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/webhook_examples/webhook_cpython_echo_bot.py +0 -0
  169. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/webhook_examples/webhook_fastapi_echo_bot.py +0 -0
  170. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/webhook_examples/webhook_flask_echo_bot.py +0 -0
  171. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/webhook_examples/webhook_flask_heroku_echo.py +0 -0
  172. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/webhook_examples/webhook_tornado_echo_bot.py +0 -0
  173. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/examples/webhook_examples/webhook_twisted_echo_bot.py +0 -0
  174. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/telebot/asyncio_filters.py +0 -0
  175. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/telebot/asyncio_handler_backends.py +0 -0
  176. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/telebot/asyncio_storage/__init__.py +0 -0
  177. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/telebot/asyncio_storage/base_storage.py +0 -0
  178. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/telebot/asyncio_storage/memory_storage.py +0 -0
  179. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/telebot/asyncio_storage/pickle_storage.py +0 -0
  180. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/telebot/asyncio_storage/redis_storage.py +0 -0
  181. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/telebot/callback_data.py +0 -0
  182. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/telebot/custom_filters.py +0 -0
  183. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/telebot/ext/__init__.py +0 -0
  184. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/telebot/ext/aio/__init__.py +0 -0
  185. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/telebot/ext/aio/webhooks.py +0 -0
  186. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/telebot/ext/reloader.py +0 -0
  187. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/telebot/ext/sync/__init__.py +0 -0
  188. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/telebot/ext/sync/webhooks.py +0 -0
  189. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/telebot/formatting.py +0 -0
  190. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/telebot/handler_backends.py +0 -0
  191. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/telebot/py.typed +0 -0
  192. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/telebot/service_utils.py +0 -0
  193. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/telebot/states/__init__.py +0 -0
  194. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/telebot/states/asyncio/__init__.py +0 -0
  195. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/telebot/states/asyncio/context.py +0 -0
  196. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/telebot/states/asyncio/middleware.py +0 -0
  197. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/telebot/states/sync/__init__.py +0 -0
  198. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/telebot/states/sync/context.py +0 -0
  199. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/telebot/states/sync/middleware.py +0 -0
  200. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/telebot/storage/__init__.py +0 -0
  201. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/telebot/storage/base_storage.py +0 -0
  202. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/telebot/storage/memory_storage.py +0 -0
  203. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/telebot/storage/pickle_storage.py +0 -0
  204. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/telebot/storage/redis_storage.py +0 -0
  205. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/telebot/util.py +0 -0
  206. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/tests/__init__.py +0 -0
  207. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/tests/test_apihelper_95.py +0 -0
  208. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/tests/test_async_telebot.py +0 -0
  209. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/tests/test_data/record.mp3 +0 -0
  210. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/tests/test_data/record.ogg +0 -0
  211. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/tests/test_data/record.wav +0 -0
  212. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/tests/test_data/test_video.mp4 +0 -0
  213. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/tests/test_handler_backends.py +0 -0
  214. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/tests/test_telebot.py +0 -0
  215. {pytelegrambotapi-4.34.0 → pytelegrambotapi-4.35.0}/tests/test_types.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyTelegramBotAPI
3
- Version: 4.34.0
3
+ Version: 4.35.0
4
4
  Summary: Python Telegram bot API.
5
5
  Project-URL: Homepage, https://github.com/eternnoir/pyTelegramBotAPI
6
6
  Project-URL: Documentation, https://pytba.readthedocs.org
@@ -52,7 +52,7 @@ Description-Content-Type: text/markdown
52
52
  <p align="center">A simple, but extensible Python implementation for the <a href="https://core.telegram.org/bots/api">Telegram Bot API</a>.</p>
53
53
  <p align="center">Both synchronous and asynchronous.</p>
54
54
 
55
- ## <p align="center">Supported Bot API version: <a href="https://core.telegram.org/bots/api#may-8-2026"><img src="https://img.shields.io/badge/Bot%20API-10.0-blue?logo=telegram" alt="Supported Bot API version"></a>
55
+ ## <p align="center">Supported Bot API version: <a href="https://core.telegram.org/bots/api#june-11-2026"><img src="https://img.shields.io/badge/Bot%20API-10.1-blue?logo=telegram" alt="Supported Bot API version"></a>
56
56
 
57
57
  <h2><a href='https://pytba.readthedocs.io/en/latest/index.html'>Official documentation</a></h2>
58
58
  <h2><a href='https://pytba.readthedocs.io/ru/latest/index.html'>Official ru documentation</a></h2>
@@ -10,7 +10,7 @@
10
10
  <p align="center">A simple, but extensible Python implementation for the <a href="https://core.telegram.org/bots/api">Telegram Bot API</a>.</p>
11
11
  <p align="center">Both synchronous and asynchronous.</p>
12
12
 
13
- ## <p align="center">Supported Bot API version: <a href="https://core.telegram.org/bots/api#may-8-2026"><img src="https://img.shields.io/badge/Bot%20API-10.0-blue?logo=telegram" alt="Supported Bot API version"></a>
13
+ ## <p align="center">Supported Bot API version: <a href="https://core.telegram.org/bots/api#june-11-2026"><img src="https://img.shields.io/badge/Bot%20API-10.1-blue?logo=telegram" alt="Supported Bot API version"></a>
14
14
 
15
15
  <h2><a href='https://pytba.readthedocs.io/en/latest/index.html'>Official documentation</a></h2>
16
16
  <h2><a href='https://pytba.readthedocs.io/ru/latest/index.html'>Official ru documentation</a></h2>
@@ -22,7 +22,7 @@ author = 'coder2020official'
22
22
  copyright = f'2022-{datetime.now().year}, {author}'
23
23
 
24
24
  # The full version, including alpha/beta/rc tags
25
- release = '4.34.0'
25
+ release = '4.35.0'
26
26
 
27
27
 
28
28
  # -- General configuration ---------------------------------------------------
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "pyTelegramBotAPI"
7
- version = "4.34.0"
7
+ version = "4.35.0"
8
8
  description = "Python Telegram bot API."
9
9
  authors = [{name = "eternnoir", email = "eternnoir@gmail.com"}]
10
10
  license = {text = "GPL2"}
@@ -1,4 +1,4 @@
1
1
  pytest
2
2
  requests==2.33.0
3
3
  wheel==0.46.2
4
- aiohttp==3.13.4
4
+ aiohttp==3.14.1
@@ -4453,7 +4453,105 @@ class TeleBot:
4453
4453
  """
4454
4454
  return apihelper.send_message_draft(
4455
4455
  self.token, chat_id, draft_id, text, parse_mode=parse_mode, entities=entities, message_thread_id=message_thread_id)
4456
+
4457
+ def send_rich_message(
4458
+ self, chat_id: Union[int, str],
4459
+ rich_message: types.InputRichMessage,
4460
+ business_connection_id: Optional[str]=None,
4461
+ message_thread_id: Optional[int]=None,
4462
+ direct_messages_topic_id: Optional[int]=None,
4463
+ disable_notification: Optional[bool]=None,
4464
+ protect_content: Optional[bool]=None,
4465
+ allow_paid_broadcast: Optional[bool]=None,
4466
+ message_effect_id: Optional[str]=None,
4467
+ suggested_post_parameters: Optional[types.SuggestedPostParameters]=None,
4468
+ reply_parameters: Optional[types.ReplyParameters]=None,
4469
+ reply_markup: Optional[REPLY_MARKUP_TYPES]=None) -> types.Message:
4470
+ """
4471
+ Use this method to send rich messages. If the message contains a block with a media element,
4472
+ then the bot must have the right to send the media to the chat. On success, the sent Message is returned.
4473
+
4474
+ Telegram documentation: https://core.telegram.org/bots/api#sendrichmessage
4475
+
4476
+ :param chat_id: Unique identifier for the target chat or username of the target bot, supergroup or channel in the format @username
4477
+ :type chat_id: :obj:`int` or :obj:`str`
4478
+
4479
+ :param rich_message: The message to be sent
4480
+ :type rich_message: :class:`telebot.types.InputRichMessage`
4481
+
4482
+ :param disable_notification: Sends the message silently. Users will receive a notification with no sound.
4483
+ :type disable_notification: :obj:`bool`
4484
+
4485
+ :param protect_content: Protects the contents of the sent message from forwarding and saving
4486
+ :type protect_content: :obj:`bool`
4487
+
4488
+ :param allow_paid_broadcast: Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance.
4489
+ :type allow_paid_broadcast: :obj:`bool`
4490
+
4491
+ :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only
4492
+ :type message_effect_id: :obj:`str`
4493
+
4494
+ :param suggested_post_parameters: A JSON-serialized object containing the parameters of the suggested post to send;
4495
+ for direct messages chats only. If the message is sent as a reply to another suggested post, then that suggested post is automatically declined.
4496
+ :type suggested_post_parameters: :class:`telebot.types.SuggestedPostParameters`
4497
+
4498
+ :param reply_parameters: Description of the message to reply to
4499
+ :type reply_parameters: :class:`telebot.types.ReplyParameters`
4500
+
4501
+ :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.
4502
+ :type reply_markup: :class:`telebot.types.InlineKeyboardMarkup` or :class:`telebot.types.ReplyKeyboardMarkup` or :class:`telebot.types.ReplyKeyboardRemove` or :class:`telebot.types.ForceReply`
4503
+
4504
+ :param business_connection_id: Identifier of a business connection
4505
+ :type business_connection_id: :obj:`str`
4506
+
4507
+ :param message_thread_id: The thread identifier of a message from which the reply will be sent
4508
+ :type message_thread_id: :obj:`int`
4509
+
4510
+ :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
4511
+ :type direct_messages_topic_id: :obj:`int`
4512
+
4513
+ :return: On success, the sent Message is returned.
4514
+ :rtype: :class:`telebot.types.Message`
4515
+ """
4516
+ disable_notification = self.disable_notification if (disable_notification is None) else disable_notification
4517
+ protect_content = self.protect_content if (protect_content is None) else protect_content
4518
+
4519
+ return types.Message.de_json(
4520
+ apihelper.send_rich_message(
4521
+ self.token, chat_id, rich_message, disable_notification=disable_notification, protect_content=protect_content,
4522
+ allow_paid_broadcast=allow_paid_broadcast, message_effect_id=message_effect_id, suggested_post_parameters=suggested_post_parameters, reply_parameters=reply_parameters,
4523
+ reply_markup=reply_markup, business_connection_id=business_connection_id, message_thread_id=message_thread_id, direct_messages_topic_id=direct_messages_topic_id)
4524
+ )
4525
+
4526
+ def send_rich_message_draft(
4527
+ self, chat_id: int,
4528
+ draft_id: int,
4529
+ rich_message: types.InputRichMessage,
4530
+ message_thread_id: Optional[int]=None) -> bool:
4531
+ """
4532
+ Use this method to stream a partial rich message to a user while the message is being generated
4533
+ Note that the streamed draft is ephemeral and acts as a temporary 30-second preview - once the output
4534
+ is finalized, you must call sendRichMessage with the complete message to persist it in the user's chat. Returns True on success.
4535
+
4536
+ Telegram documentation: https://core.telegram.org/bots/api#sendrichmessagedraft
4456
4537
 
4538
+ :param chat_id: Unique identifier for the target private chat
4539
+ :type chat_id: :obj:`int`
4540
+
4541
+ :param draft_id: Unique identifier of the message draft; must be non-zero. Changes to drafts with the same identifier are animated.
4542
+ :type draft_id: :obj:`int`
4543
+
4544
+ :param rich_message: The partial message to be streamed
4545
+ :type rich_message: :class:`telebot.types.InputRichMessage`
4546
+
4547
+ :param message_thread_id: Unique identifier for the target message thread
4548
+ :type message_thread_id: :obj:`int`
4549
+
4550
+ :return: Returns True on success.
4551
+ :rtype: :obj:`bool`
4552
+ """
4553
+ return apihelper.send_rich_message_draft(
4554
+ self.token, chat_id, draft_id, rich_message, message_thread_id=message_thread_id)
4457
4555
 
4458
4556
 
4459
4557
  def send_chat_action(
@@ -5114,6 +5212,42 @@ class TeleBot:
5114
5212
  """
5115
5213
  return apihelper.decline_chat_join_request(self.token, chat_id, user_id)
5116
5214
 
5215
+ def answer_chat_join_request_query(self, chat_join_request_query_id: str, result: str) -> bool:
5216
+ """
5217
+ Use this method to process a received chat join request query. Returns True on success.
5218
+
5219
+ Telegram documentation: https://core.telegram.org/bots/api#answerchatjoinrequestquery
5220
+
5221
+ :param chat_join_request_query_id: Unique identifier of the join request query
5222
+ :type chat_join_request_query_id: :obj:`str`
5223
+
5224
+ :param result: Result of the query. Must be either “approve” to allow the user to join the chat,
5225
+ “decline” to disallow the user to join the chat, or “queue” to leave the decision to other administrators.
5226
+ :type result: :obj:`str`
5227
+
5228
+ :return: True on success.
5229
+ :rtype: :obj:`bool`
5230
+ """
5231
+ return apihelper.answer_chat_join_request_query(self.token, chat_join_request_query_id, result)
5232
+
5233
+ def send_chat_join_request_web_app(self, chat_join_request_query_id: str, web_app_url: str) -> bool:
5234
+ """
5235
+ Use this method to process a received chat join request query by showing a Mini App to the
5236
+ user before deciding the outcome. Call answerChatJoinRequestQuery to resolve the join request query based on the user interaction with the Mini App.
5237
+ Returns True on success.
5238
+
5239
+ Telegram documentation: https://core.telegram.org/bots/api#sendchatjoinrequestwebapp
5240
+
5241
+ :param chat_join_request_query_id: Unique identifier of the join request query
5242
+ :type chat_join_request_query_id: :obj:`str`
5243
+
5244
+ :param web_app_url: The URL of the Mini App to be opened
5245
+ :type web_app_url: :obj:`str`
5246
+
5247
+ :return: True on success.
5248
+ :rtype: :obj:`bool`
5249
+ """
5250
+ return apihelper.send_chat_join_request_web_app(self.token, chat_join_request_query_id, web_app_url)
5117
5251
 
5118
5252
  def set_chat_photo(self, chat_id: Union[int, str], photo: Any) -> bool:
5119
5253
  """
@@ -5649,7 +5783,7 @@ class TeleBot:
5649
5783
 
5650
5784
 
5651
5785
  def edit_message_text(
5652
- self, text: str,
5786
+ self, text: Optional[str]=None,
5653
5787
  chat_id: Optional[Union[int, str]]=None,
5654
5788
  message_id: Optional[int]=None,
5655
5789
  inline_message_id: Optional[str]=None,
@@ -5659,13 +5793,14 @@ class TeleBot:
5659
5793
  reply_markup: Optional[types.InlineKeyboardMarkup]=None,
5660
5794
  link_preview_options : Optional[types.LinkPreviewOptions]=None,
5661
5795
  business_connection_id: Optional[str]=None,
5662
- timeout: Optional[int]=None) -> Union[types.Message, bool]:
5796
+ timeout: Optional[int]=None,
5797
+ rich_message: Optional[types.InputRichMessage]=None) -> Union[types.Message, bool]:
5663
5798
  """
5664
5799
  Use this method to edit text and game messages.
5665
5800
 
5666
5801
  Telegram documentation: https://core.telegram.org/bots/api#editmessagetext
5667
5802
 
5668
- :param text: New text of the message, 1-4096 characters after entities parsing
5803
+ :param text: New text of the message, 1-4096 characters after entity parsing; required if rich_message isn't specified
5669
5804
  :type text: :obj:`str`
5670
5805
 
5671
5806
  :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 @channelusername)
@@ -5698,10 +5833,19 @@ class TeleBot:
5698
5833
  :param timeout: Timeout in seconds for the request.
5699
5834
  :type timeout: :obj:`int`
5700
5835
 
5836
+ :param rich_message: New rich content of the message; required if text isn't specified
5837
+ :type rich_message: :obj:`types.InputRichMessage`
5838
+
5701
5839
  :return: On success, if edited message is sent by the bot, the edited Message is returned, otherwise True is returned.
5702
5840
  :rtype: :obj:`types.Message` or :obj:`bool`
5703
5841
  """
5704
5842
  parse_mode = self.parse_mode if (parse_mode is None) else parse_mode
5843
+ disable_web_page_preview = self.disable_web_page_preview if (disable_web_page_preview is None) else disable_web_page_preview
5844
+
5845
+ if (rich_message is not None) and (text is not None):
5846
+ raise ValueError("Both 'rich_message' and 'text' parameters are provided. Only one of them should be provided.")
5847
+ if (rich_message is None) and (text is None):
5848
+ raise ValueError("Both 'rich_message' and 'text' parameters are None. One of them should be provided.")
5705
5849
 
5706
5850
  if disable_web_page_preview is not None:
5707
5851
  # show a deprecation warning
@@ -5723,9 +5867,9 @@ class TeleBot:
5723
5867
  link_preview_options = types.LinkPreviewOptions(is_disabled=self.disable_web_page_preview)
5724
5868
 
5725
5869
  result = apihelper.edit_message_text(
5726
- self.token, text, chat_id=chat_id, message_id=message_id, inline_message_id=inline_message_id,
5870
+ self.token, text=text, chat_id=chat_id, message_id=message_id, inline_message_id=inline_message_id,
5727
5871
  parse_mode=parse_mode, entities=entities, reply_markup=reply_markup, link_preview_options=link_preview_options,
5728
- business_connection_id=business_connection_id, timeout=timeout)
5872
+ business_connection_id=business_connection_id, timeout=timeout, rich_message=rich_message)
5729
5873
 
5730
5874
  if isinstance(result, bool): # if edit inline message return is bool not Message.
5731
5875
  return result
@@ -282,6 +282,44 @@ def send_message(
282
282
  return _make_request(token, method_url, params=payload, method='post')
283
283
 
284
284
 
285
+ def send_rich_message(
286
+ token, chat_id, rich_message,
287
+ disable_notification=None, protect_content=None, message_effect_id=None,
288
+ reply_parameters=None, reply_markup=None, business_connection_id=None,
289
+ direct_messages_topic_id=None, suggested_post_parameters=None, allow_paid_broadcast=None,
290
+ message_thread_id=None):
291
+ method_url = r'sendRichMessage'
292
+ payload = {'chat_id': chat_id, 'rich_message': rich_message.to_json()}
293
+ if disable_notification is not None:
294
+ payload['disable_notification'] = disable_notification
295
+ if protect_content is not None:
296
+ payload['protect_content'] = protect_content
297
+ if message_effect_id:
298
+ payload['message_effect_id'] = message_effect_id
299
+ if reply_parameters:
300
+ payload['reply_parameters'] = reply_parameters.to_json()
301
+ if reply_markup:
302
+ payload['reply_markup'] = _convert_markup(reply_markup)
303
+ if business_connection_id:
304
+ payload['business_connection_id'] = business_connection_id
305
+ if direct_messages_topic_id is not None:
306
+ payload['direct_messages_topic_id'] = direct_messages_topic_id
307
+ if suggested_post_parameters is not None:
308
+ payload['suggested_post_parameters'] = suggested_post_parameters.to_json()
309
+ if allow_paid_broadcast is not None:
310
+ payload['allow_paid_broadcast'] = allow_paid_broadcast
311
+ if message_thread_id is not None:
312
+ payload['message_thread_id'] = message_thread_id
313
+ return _make_request(token, method_url, params=payload, method='post')
314
+
315
+ def send_rich_message_draft(token, chat_id, draft_id, rich_message, message_thread_id=None):
316
+ method_url = r'sendRichMessageDraft'
317
+ payload = {'chat_id': str(chat_id), 'draft_id': draft_id, 'rich_message': rich_message.to_json()}
318
+ if message_thread_id is not None:
319
+ payload['message_thread_id'] = message_thread_id
320
+ return _make_request(token, method_url, params=payload, method='post')
321
+
322
+
285
323
  def set_webhook(token, url=None, certificate=None, max_connections=None, allowed_updates=None, ip_address=None,
286
324
  drop_pending_updates = None, timeout=None, secret_token=None):
287
325
  method_url = r'setWebhook'
@@ -1516,6 +1554,24 @@ def decline_chat_join_request(token, chat_id, user_id):
1516
1554
  return _make_request(token, method_url, params=payload, method='post')
1517
1555
 
1518
1556
 
1557
+ def answer_chat_join_request_query(token, chat_join_request_query_id, result):
1558
+ method_url = 'answerChatJoinRequestQuery'
1559
+ payload = {
1560
+ 'chat_join_request_query_id': chat_join_request_query_id,
1561
+ 'result': result
1562
+ }
1563
+ return _make_request(token, method_url, params=payload, method='post')
1564
+
1565
+
1566
+ def send_chat_join_request_web_app(token, chat_join_request_query_id, web_app_url):
1567
+ method_url = 'sendChatJoinRequestWebApp'
1568
+ payload = {
1569
+ 'chat_join_request_query_id': chat_join_request_query_id,
1570
+ 'web_app_url': web_app_url
1571
+ }
1572
+ return _make_request(token, method_url, params=payload, method='post')
1573
+
1574
+
1519
1575
  def set_chat_photo(token, chat_id, photo):
1520
1576
  method_url = 'setChatPhoto'
1521
1577
  payload = {'chat_id': chat_id}
@@ -1736,10 +1792,12 @@ def unpin_all_chat_messages(token, chat_id):
1736
1792
  # Updating messages
1737
1793
 
1738
1794
  def edit_message_text(
1739
- token, text, chat_id=None, message_id=None, inline_message_id=None, parse_mode=None, entities = None,
1740
- reply_markup=None, link_preview_options=None, business_connection_id=None, timeout=None):
1795
+ token, text=None, chat_id=None, message_id=None, inline_message_id=None, parse_mode=None, entities = None,
1796
+ reply_markup=None, link_preview_options=None, business_connection_id=None, timeout=None, rich_message=None):
1741
1797
  method_url = r'editMessageText'
1742
- payload = {'text': text}
1798
+ payload = {}
1799
+ if text:
1800
+ payload['text'] = text
1743
1801
  if chat_id:
1744
1802
  payload['chat_id'] = chat_id
1745
1803
  if message_id:
@@ -1758,6 +1816,8 @@ def edit_message_text(
1758
1816
  payload['business_connection_id'] = business_connection_id
1759
1817
  if timeout:
1760
1818
  payload['timeout'] = timeout
1819
+ if rich_message:
1820
+ payload['rich_message'] = rich_message.to_json()
1761
1821
  return _make_request(token, method_url, params=payload, method='post')
1762
1822
 
1763
1823
 
@@ -6062,6 +6062,112 @@ class AsyncTeleBot:
6062
6062
  protect_content, message_thread_id, reply_parameters, business_connection_id,
6063
6063
  message_effect_id=message_effect_id, allow_paid_broadcast=allow_paid_broadcast,
6064
6064
  direct_messages_topic_id=direct_messages_topic_id, suggested_post_parameters=suggested_post_parameters))
6065
+
6066
+ async def send_rich_message(
6067
+ self, chat_id: Union[int, str],
6068
+ rich_message: types.InputRichMessage,
6069
+ business_connection_id: Optional[str]=None,
6070
+ message_thread_id: Optional[int]=None,
6071
+ direct_messages_topic_id: Optional[int]=None,
6072
+ disable_notification: Optional[bool]=None,
6073
+ protect_content: Optional[bool]=None,
6074
+ allow_paid_broadcast: Optional[bool]=None,
6075
+ message_effect_id: Optional[str]=None,
6076
+ suggested_post_parameters: Optional[types.SuggestedPostParameters]=None,
6077
+ reply_parameters: Optional[types.ReplyParameters]=None,
6078
+ reply_markup: Optional[REPLY_MARKUP_TYPES]=None) -> types.Message:
6079
+ """
6080
+ Use this method to send rich messages. If the message contains a block with a media element then
6081
+ the bot must have the right to send the media to the chat. On success, the sent Message is returned.
6082
+
6083
+ Telegram documentation: https://core.telegram.org/bots/api#sendrichmessage
6084
+
6085
+ :param chat_id: Unique identifier for the target chat or username of the target bot, supergroup or channel in the format @username
6086
+ :type chat_id: :obj:`int` or :obj:`str`
6087
+
6088
+ :param rich_message: The message to be sent
6089
+ :type rich_message: :class:`telebot.types.InputRichMessage`
6090
+
6091
+ :param business_connection_id: Unique identifier of the business connection on behalf of which the message will be sent.
6092
+ Bot can send rich messages on behalf of a business account only if the corresponding user can send rich messages.
6093
+ :type business_connection_id: :obj:`str`
6094
+
6095
+ :param message_thread_id: Unique identifier for the target message thread (topic) of a forum; for forum supergroups
6096
+ and private chats of bots with forum topic mode enabled only
6097
+ :type message_thread_id: :obj:`int`
6098
+
6099
+ :param direct_messages_topic_id: Identifier of the direct messages topic to which the message will be sent;
6100
+ required if the message is sent to a direct messages chat
6101
+ :type direct_messages_topic_id: :obj:`int`
6102
+
6103
+ :param disable_notification: Sends the message silently. Users will receive a notification with no sound.
6104
+ :type disable_notification: :obj:`bool`
6105
+
6106
+ :param protect_content: Protects the contents of the sent message from forwarding and saving
6107
+ :type protect_content: :obj:`bool`
6108
+
6109
+ :param allow_paid_broadcast: Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee
6110
+ of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance.
6111
+ :type allow_paid_broadcast: :obj:`bool`
6112
+
6113
+ :param message_effect_id: Unique identifier of the message effect to be added to the message; for private chats only
6114
+ :type message_effect_id: :obj:`str`
6115
+
6116
+ :param suggested_post_parameters: A JSON-serialized object containing the parameters of the suggested post to send;
6117
+ for direct messages chats only. If the message is sent as a reply to another suggested post, then that suggested post
6118
+ is automatically declined.
6119
+ :type suggested_post_parameters: :class:`telebot.types.SuggestedPostParameters`
6120
+
6121
+ :param reply_parameters: Description of the message to reply to
6122
+ :type reply_parameters: :class:`telebot.types.ReplyParameters`
6123
+
6124
+ :param reply_markup: Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard,
6125
+ instructions to remove a reply keyboard or to force a reply from the user.
6126
+ :type reply_markup: :class:`telebot.types.InlineKeyboardMarkup` or :class:`telebot.types.ReplyKeyboardMarkup` or :class:`telebot.types.ReplyKeyboardRemove`
6127
+ or :class:`telebot.types.ForceReply`
6128
+
6129
+ :return: On success, the sent Message is returned.
6130
+ :rtype: :class:`telebot.types.Message`
6131
+ """
6132
+ disable_notification = self.disable_notification if (disable_notification is None) else disable_notification
6133
+ protect_content = self.protect_content if (protect_content is None) else protect_content
6134
+
6135
+ return types.Message.de_json(
6136
+ await asyncio_helper.send_rich_message(
6137
+ self.token, chat_id, rich_message, business_connection_id=business_connection_id, message_thread_id=message_thread_id, direct_messages_topic_id=direct_messages_topic_id,
6138
+ disable_notification=disable_notification, protect_content=protect_content, allow_paid_broadcast=allow_paid_broadcast, message_effect_id=message_effect_id, suggested_post_parameters=suggested_post_parameters
6139
+ , reply_parameters=reply_parameters, reply_markup=reply_markup)
6140
+ )
6141
+
6142
+ async def send_rich_message_draft(
6143
+ self, chat_id: int,
6144
+ draft_id: int,
6145
+ rich_message: types.InputRichMessage,
6146
+ message_thread_id: Optional[int]=None) -> bool:
6147
+ """
6148
+ Use this method to stream a partial rich message to a user while the message is being generated
6149
+ Note that the streamed draft is ephemeral and acts as a temporary 30-second preview - once the output is finalized,
6150
+ you must call sendRichMessage with the complete message to persist it in the user's chat. Returns True on success.
6151
+
6152
+ Telegram documentation: https://core.telegram.org/bots/api#sendrichmessagedraft
6153
+
6154
+ :param chat_id: Unique identifier for the target private chat
6155
+ :type chat_id: :obj:`int`
6156
+
6157
+ :param draft_id: Unique identifier of the message draft; must be non-zero. Changes to drafts with the same identifier are animated.
6158
+ :type draft_id: :obj:`int`
6159
+
6160
+ :param rich_message: The partial message to be streamed
6161
+ :type rich_message: :class:`telebot.types.InputRichMessage`
6162
+
6163
+ :param message_thread_id: Unique identifier for the target message thread
6164
+ :type message_thread_id: :obj:`int`
6165
+
6166
+ :return: Returns True on success.
6167
+ :rtype: :obj:`bool`
6168
+ """
6169
+ return await asyncio_helper.send_rich_message_draft(
6170
+ self.token, chat_id, draft_id, rich_message, message_thread_id=message_thread_id)
6065
6171
 
6066
6172
  async def send_message_draft(
6067
6173
  self, chat_id: int,
@@ -6739,6 +6845,43 @@ class AsyncTeleBot:
6739
6845
  """
6740
6846
  return await asyncio_helper.decline_chat_join_request(self.token, chat_id, user_id)
6741
6847
 
6848
+ async def answer_chat_join_request_query(self, chat_join_request_query_id: str, result: str) -> bool:
6849
+ """
6850
+ Use this method to process a received chat join request query. Returns True on success.
6851
+
6852
+ Telegram documentation: https://core.telegram.org/bots/api#answerchatjoinrequestquery
6853
+
6854
+ :param chat_join_request_query_id: Unique identifier of the join request query
6855
+ :type chat_join_request_query_id: :obj:`str`
6856
+
6857
+ :param result: Result of the query. Must be either “approve” to allow the user to join the chat, “decline”
6858
+ to disallow the user to join the chat, or “queue” to leave the decision to other administrators.
6859
+ :type result: :obj:`str`
6860
+
6861
+ :return: True on success.
6862
+ :rtype: :obj:`bool`
6863
+ """
6864
+ return await asyncio_helper.answer_chat_join_request_query(self.token, chat_join_request_query_id, result)
6865
+
6866
+ async def send_chat_join_request_web_app(self, chat_join_request_query_id: str, web_app_url: str) -> bool:
6867
+ """
6868
+ Use this method to process a received chat join request query by showing a Mini App to the
6869
+ user before deciding the outcome. Call answerChatJoinRequestQuery to resolve the join request query based on the user interaction with the Mini App.
6870
+ Returns True on success.
6871
+
6872
+ Telegram documentation: https://core.telegram.org/bots/api#sendchatjoinrequestwebapp
6873
+
6874
+ :param chat_join_request_query_id: Unique identifier of the join request query
6875
+ :type chat_join_request_query_id: :obj:`str`
6876
+
6877
+ :param web_app_url: The URL of the Mini App to be opened
6878
+ :type web_app_url: :obj:`str`
6879
+
6880
+ :return: True on success.
6881
+ :rtype: :obj:`bool`
6882
+ """
6883
+ return await asyncio_helper.send_chat_join_request_web_app(self.token, chat_join_request_query_id, web_app_url)
6884
+
6742
6885
  async def set_chat_photo(self, chat_id: Union[int, str], photo: Any) -> bool:
6743
6886
  """
6744
6887
  Use this method to set a new profile photo for the chat. Photos can't be changed for private chats.
@@ -7250,7 +7393,7 @@ class AsyncTeleBot:
7250
7393
  return await asyncio_helper.unpin_all_chat_messages(self.token, chat_id)
7251
7394
 
7252
7395
  async def edit_message_text(
7253
- self, text: str,
7396
+ self, text: Optional[str]=None,
7254
7397
  chat_id: Optional[Union[int, str]]=None,
7255
7398
  message_id: Optional[int]=None,
7256
7399
  inline_message_id: Optional[str]=None,
@@ -7260,13 +7403,14 @@ class AsyncTeleBot:
7260
7403
  reply_markup: Optional[types.InlineKeyboardMarkup]=None,
7261
7404
  link_preview_options: Optional[types.LinkPreviewOptions]=None,
7262
7405
  business_connection_id: Optional[str]=None,
7263
- timeout: Optional[int]=None) -> Union[types.Message, bool]:
7406
+ timeout: Optional[int]=None,
7407
+ rich_message: Optional[types.InputRichMessage]=None) -> Union[types.Message, bool]:
7264
7408
  """
7265
7409
  Use this method to edit text and game messages.
7266
7410
 
7267
7411
  Telegram documentation: https://core.telegram.org/bots/api#editmessagetext
7268
7412
 
7269
- :param text: New text of the message, 1-4096 characters after entities parsing
7413
+ :param text: New text of the message, 1-4096 characters after entity parsing; required if rich_message isn't specified
7270
7414
  :type text: :obj:`str`
7271
7415
 
7272
7416
  :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 @channelusername)
@@ -7299,12 +7443,20 @@ class AsyncTeleBot:
7299
7443
  :param timeout: Timeout in seconds for the request.
7300
7444
  :type timeout: :obj:`int`
7301
7445
 
7446
+ :param rich_message: New rich content of the message; required if text isn't specified
7447
+ :type rich_message: :obj:`types.InputRichMessage`
7448
+
7302
7449
  :return: On success, if edited message is sent by the bot, the edited Message is returned, otherwise True is returned.
7303
7450
  :rtype: :obj:`types.Message` or :obj:`bool`
7304
7451
  """
7305
7452
  parse_mode = self.parse_mode if (parse_mode is None) else parse_mode
7306
7453
  disable_web_page_preview = self.disable_web_page_preview if (disable_web_page_preview is None) else disable_web_page_preview
7307
7454
 
7455
+ if (rich_message is not None) and (text is not None):
7456
+ raise ValueError("Both 'rich_message' and 'text' parameters are provided. Only one of them should be provided.")
7457
+ if (rich_message is None) and (text is None):
7458
+ raise ValueError("Both 'rich_message' and 'text' parameters are None. One of them should be provided.")
7459
+
7308
7460
  if disable_web_page_preview is not None:
7309
7461
  if link_preview_options:
7310
7462
  # show a conflict warning
@@ -7324,8 +7476,9 @@ class AsyncTeleBot:
7324
7476
  link_preview_options = types.LinkPreviewOptions(is_disabled=self.disable_web_page_preview)
7325
7477
 
7326
7478
  result = await asyncio_helper.edit_message_text(
7327
- self.token, text, chat_id, message_id, inline_message_id, parse_mode, entities, reply_markup,
7328
- link_preview_options, business_connection_id, timeout)
7479
+ self.token, text=text, chat_id=chat_id, message_id=message_id, inline_message_id=inline_message_id,
7480
+ parse_mode=parse_mode, entities=entities, reply_markup=reply_markup,
7481
+ link_preview_options=link_preview_options, business_connection_id=business_connection_id, timeout=timeout, rich_message=rich_message)
7329
7482
  if isinstance(result, bool): # if edit inline message return is bool not Message.
7330
7483
  return result
7331
7484
  return types.Message.de_json(result)