pyTelegramBotAPI 4.24.0__tar.gz → 4.26.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 (209) hide show
  1. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/PKG-INFO +5 -4
  2. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/README.md +2 -2
  3. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/docs/source/conf.py +1 -1
  4. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/serverless/flask_google_cloud_bot/requirements.txt +4 -4
  5. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/pyproject.toml +1 -1
  6. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/requirements.txt +1 -1
  7. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/telebot/__init__.py +195 -2
  8. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/telebot/apihelper.py +87 -1
  9. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/telebot/async_telebot.py +188 -2
  10. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/telebot/asyncio_helper.py +82 -1
  11. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/telebot/formatting.py +1 -1
  12. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/telebot/types.py +216 -3
  13. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/telebot/version.py +1 -1
  14. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/.github/ISSUE_TEMPLATE +0 -0
  15. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
  16. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/.github/workflows/setup_python.yml +0 -0
  17. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/.gitignore +0 -0
  18. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/.readthedocs.yml +0 -0
  19. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/.travis.yml +0 -0
  20. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/LICENSE +0 -0
  21. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/doc_req.txt +0 -0
  22. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/docs/Makefile +0 -0
  23. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/docs/source/_static/logo.png +0 -0
  24. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/docs/source/_static/logo2.png +0 -0
  25. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/docs/source/async_version/index.rst +0 -0
  26. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/docs/source/calldata.rst +0 -0
  27. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/docs/source/formatting.rst +0 -0
  28. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/docs/source/index.rst +0 -0
  29. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/docs/source/install.rst +0 -0
  30. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/docs/source/locales/en/LC_MESSAGES/async_version.po +0 -0
  31. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/docs/source/locales/en/LC_MESSAGES/calldata.po +0 -0
  32. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/docs/source/locales/en/LC_MESSAGES/formatting.po +0 -0
  33. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/docs/source/locales/en/LC_MESSAGES/index.po +0 -0
  34. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/docs/source/locales/en/LC_MESSAGES/install.po +0 -0
  35. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/docs/source/locales/en/LC_MESSAGES/quick_start.po +0 -0
  36. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/docs/source/locales/en/LC_MESSAGES/sync_version.po +0 -0
  37. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/docs/source/locales/en/LC_MESSAGES/types.po +0 -0
  38. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/docs/source/locales/en/LC_MESSAGES/util.po +0 -0
  39. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/docs/source/locales/ru/LC_MESSAGES/async_version.po +0 -0
  40. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/docs/source/locales/ru/LC_MESSAGES/calldata.po +0 -0
  41. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/docs/source/locales/ru/LC_MESSAGES/formatting.po +0 -0
  42. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/docs/source/locales/ru/LC_MESSAGES/index.po +0 -0
  43. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/docs/source/locales/ru/LC_MESSAGES/install.po +0 -0
  44. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/docs/source/locales/ru/LC_MESSAGES/quick_start.po +0 -0
  45. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/docs/source/locales/ru/LC_MESSAGES/sync_version.po +0 -0
  46. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/docs/source/locales/ru/LC_MESSAGES/types.po +0 -0
  47. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/docs/source/locales/ru/LC_MESSAGES/util.po +0 -0
  48. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/docs/source/quick_start.rst +0 -0
  49. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/docs/source/sync_version/index.rst +0 -0
  50. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/docs/source/types.rst +0 -0
  51. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/docs/source/util.rst +0 -0
  52. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/anonymous_bot.py +0 -0
  53. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/asynchronous_telebot/callback_data_examples/advanced_calendar_example/filters.py +0 -0
  54. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/asynchronous_telebot/callback_data_examples/advanced_calendar_example/keyboards.py +0 -0
  55. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/asynchronous_telebot/callback_data_examples/advanced_calendar_example/main.py +0 -0
  56. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/asynchronous_telebot/callback_data_examples/simple_products_example.py +0 -0
  57. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/asynchronous_telebot/chat_join_request.py +0 -0
  58. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/asynchronous_telebot/chat_member_example.py +0 -0
  59. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/asynchronous_telebot/continue_handling.py +0 -0
  60. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/asynchronous_telebot/custom_filters/admin_filter_example.py +0 -0
  61. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/asynchronous_telebot/custom_filters/advanced_text_filter.py +0 -0
  62. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/asynchronous_telebot/custom_filters/general_custom_filters.py +0 -0
  63. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/asynchronous_telebot/custom_filters/id_filter_example.py +0 -0
  64. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/asynchronous_telebot/custom_filters/is_filter_example.py +0 -0
  65. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/asynchronous_telebot/custom_filters/text_filter_example.py +0 -0
  66. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/asynchronous_telebot/custom_states.py +0 -0
  67. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/asynchronous_telebot/detect_changes.py +0 -0
  68. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/asynchronous_telebot/download_file_example.py +0 -0
  69. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/asynchronous_telebot/echo_bot.py +0 -0
  70. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/asynchronous_telebot/exception_handler.py +0 -0
  71. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/asynchronous_telebot/formatting_example.py +0 -0
  72. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/asynchronous_telebot/message_reaction_example.py +0 -0
  73. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/asynchronous_telebot/middleware/flooding_middleware.py +0 -0
  74. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/asynchronous_telebot/middleware/i18n.py +0 -0
  75. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/asynchronous_telebot/middleware/i18n_middleware_example/i18n_base_midddleware.py +0 -0
  76. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/asynchronous_telebot/middleware/i18n_middleware_example/keyboards.py +0 -0
  77. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/asynchronous_telebot/middleware/i18n_middleware_example/locales/en/LC_MESSAGES/messages.po +0 -0
  78. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/asynchronous_telebot/middleware/i18n_middleware_example/locales/ru/LC_MESSAGES/messages.po +0 -0
  79. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/asynchronous_telebot/middleware/i18n_middleware_example/locales/uz_Latn/LC_MESSAGES/messages.po +0 -0
  80. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/asynchronous_telebot/middleware/i18n_middleware_example/main.py +0 -0
  81. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/asynchronous_telebot/mini_app.py +0 -0
  82. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/asynchronous_telebot/multibot/README.MD +0 -0
  83. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/asynchronous_telebot/multibot/config.py +0 -0
  84. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/asynchronous_telebot/multibot/handlers.py +0 -0
  85. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/asynchronous_telebot/multibot/main.py +0 -0
  86. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/asynchronous_telebot/multibot/nginx_conf.conf +0 -0
  87. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/asynchronous_telebot/register_handler.py +0 -0
  88. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/asynchronous_telebot/send_file_example.py +0 -0
  89. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/asynchronous_telebot/set_command_example.py +0 -0
  90. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/asynchronous_telebot/skip_updates_example.py +0 -0
  91. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/asynchronous_telebot/timer_bot_async.py +0 -0
  92. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/asynchronous_telebot/update_listener.py +0 -0
  93. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/asynchronous_telebot/webhooks/async_webhook_aiohttp_echo_bot.py +0 -0
  94. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/asynchronous_telebot/webhooks/run_webhooks.py +0 -0
  95. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/asynchronous_telebot/webhooks/webhook_starlette_echo_bot.py +0 -0
  96. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/callback_data_examples/advanced_calendar_example/filters.py +0 -0
  97. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/callback_data_examples/advanced_calendar_example/keyboards.py +0 -0
  98. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/callback_data_examples/advanced_calendar_example/main.py +0 -0
  99. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/callback_data_examples/simple_products_example.py +0 -0
  100. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/chat_join_request.py +0 -0
  101. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/chat_member_example.py +0 -0
  102. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/continue_handling.py +0 -0
  103. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/create_invite_link.py +0 -0
  104. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/custom_filters/admin_filter_example.py +0 -0
  105. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/custom_filters/advanced_text_filter.py +0 -0
  106. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/custom_filters/general_custom_filters.py +0 -0
  107. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/custom_filters/id_filter_example.py +0 -0
  108. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/custom_filters/is_filter_example.py +0 -0
  109. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/custom_filters/text_filter_example.py +0 -0
  110. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/custom_states.py +0 -0
  111. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/deep_linking.py +0 -0
  112. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/detailed_example/detailed_example.py +0 -0
  113. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/detailed_example/kitten.jpg +0 -0
  114. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/detailed_example/rooster.jpg +0 -0
  115. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/detect_changes.py +0 -0
  116. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/download_file_example.py +0 -0
  117. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/echo_bot.py +0 -0
  118. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/formatting_example.py +0 -0
  119. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/inline_example.py +0 -0
  120. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/inline_keyboard_example.py +0 -0
  121. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/message_reaction_example.py +0 -0
  122. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/middleware/README.md +0 -0
  123. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/middleware/class_based/antiflood_middleware.py +0 -0
  124. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/middleware/class_based/basic_example.py +0 -0
  125. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/middleware/class_based/i18n_middleware/i18n_base_middleware.py +0 -0
  126. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/middleware/class_based/i18n_middleware/keyboards.py +0 -0
  127. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/middleware/class_based/i18n_middleware/locales/en/LC_MESSAGES/messages.po +0 -0
  128. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/middleware/class_based/i18n_middleware/locales/ru/LC_MESSAGES/messages.po +0 -0
  129. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/middleware/class_based/i18n_middleware/locales/uz_Latn/LC_MESSAGES/messages.po +0 -0
  130. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/middleware/class_based/i18n_middleware/main.py +0 -0
  131. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/middleware/function_based/i18n.py +0 -0
  132. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/middleware/function_based/i18n_gettext/i18n_class.py +0 -0
  133. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/middleware/function_based/i18n_gettext/keyboards.py +0 -0
  134. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/middleware/function_based/i18n_gettext/locales/en/LC_MESSAGES/messages.po +0 -0
  135. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/middleware/function_based/i18n_gettext/locales/ru/LC_MESSAGES/messages.po +0 -0
  136. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/middleware/function_based/i18n_gettext/locales/uz_Latn/LC_MESSAGES/messages.po +0 -0
  137. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/middleware/function_based/i18n_gettext/main.py +0 -0
  138. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/middleware/function_based/session.py +0 -0
  139. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/mini_app.py +0 -0
  140. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/mini_app_web/index.html +0 -0
  141. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/mini_app_web/script.js +0 -0
  142. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/mini_app_web/style.css +0 -0
  143. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/multibot/README.MD +0 -0
  144. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/multibot/config.py +0 -0
  145. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/multibot/handlers.py +0 -0
  146. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/multibot/main.py +0 -0
  147. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/multibot/nginx_conf.conf +0 -0
  148. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/payments_example.py +0 -0
  149. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/poll_example.py +0 -0
  150. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/register_handler.py +0 -0
  151. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/reply_keyboard_markup_example.py +0 -0
  152. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/serverless/aws_lambda_function.py +0 -0
  153. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/serverless/azure_functions +0 -0
  154. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/serverless/flask_google_cloud_bot/.gcloudignore +0 -0
  155. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/serverless/flask_google_cloud_bot/app.yaml +0 -0
  156. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/serverless/flask_google_cloud_bot/main.py +0 -0
  157. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/set_command_example.py +0 -0
  158. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/skip_updates_example.py +0 -0
  159. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/step_example.py +0 -0
  160. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/telebot_bot/telebot_bot.py +0 -0
  161. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/timer_bot.py +0 -0
  162. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/webhook_examples/README.md +0 -0
  163. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/webhook_examples/run_webhooks.py +0 -0
  164. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/webhook_examples/webhook_aiohttp_echo_bot.py +0 -0
  165. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/webhook_examples/webhook_cherrypy_echo_bot.py +0 -0
  166. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/webhook_examples/webhook_cpython_echo_bot.py +0 -0
  167. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/webhook_examples/webhook_fastapi_echo_bot.py +0 -0
  168. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/webhook_examples/webhook_flask_echo_bot.py +0 -0
  169. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/webhook_examples/webhook_flask_heroku_echo.py +0 -0
  170. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/webhook_examples/webhook_tornado_echo_bot.py +0 -0
  171. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/examples/webhook_examples/webhook_twisted_echo_bot.py +0 -0
  172. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/telebot/asyncio_filters.py +0 -0
  173. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/telebot/asyncio_handler_backends.py +0 -0
  174. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/telebot/asyncio_storage/__init__.py +0 -0
  175. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/telebot/asyncio_storage/base_storage.py +0 -0
  176. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/telebot/asyncio_storage/memory_storage.py +0 -0
  177. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/telebot/asyncio_storage/pickle_storage.py +0 -0
  178. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/telebot/asyncio_storage/redis_storage.py +0 -0
  179. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/telebot/callback_data.py +0 -0
  180. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/telebot/custom_filters.py +0 -0
  181. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/telebot/ext/__init__.py +0 -0
  182. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/telebot/ext/aio/__init__.py +0 -0
  183. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/telebot/ext/aio/webhooks.py +0 -0
  184. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/telebot/ext/reloader.py +0 -0
  185. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/telebot/ext/sync/__init__.py +0 -0
  186. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/telebot/ext/sync/webhooks.py +0 -0
  187. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/telebot/handler_backends.py +0 -0
  188. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/telebot/service_utils.py +0 -0
  189. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/telebot/states/__init__.py +0 -0
  190. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/telebot/states/asyncio/__init__.py +0 -0
  191. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/telebot/states/asyncio/context.py +0 -0
  192. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/telebot/states/asyncio/middleware.py +0 -0
  193. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/telebot/states/sync/__init__.py +0 -0
  194. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/telebot/states/sync/context.py +0 -0
  195. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/telebot/states/sync/middleware.py +0 -0
  196. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/telebot/storage/__init__.py +0 -0
  197. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/telebot/storage/base_storage.py +0 -0
  198. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/telebot/storage/memory_storage.py +0 -0
  199. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/telebot/storage/pickle_storage.py +0 -0
  200. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/telebot/storage/redis_storage.py +0 -0
  201. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/telebot/util.py +0 -0
  202. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/tests/__init__.py +0 -0
  203. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/tests/test_data/record.mp3 +0 -0
  204. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/tests/test_data/record.ogg +0 -0
  205. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/tests/test_data/record.wav +0 -0
  206. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/tests/test_data/test_video.mp4 +0 -0
  207. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/tests/test_handler_backends.py +0 -0
  208. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/tests/test_telebot.py +0 -0
  209. {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.26.0}/tests/test_types.py +0 -0
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.3
1
+ Metadata-Version: 2.4
2
2
  Name: pyTelegramBotAPI
3
- Version: 4.24.0
3
+ Version: 4.26.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
@@ -8,6 +8,7 @@ Project-URL: Repository, https://github.com/eternnoir/pyTelegramBotAPI
8
8
  Project-URL: Issues, https://github.com/eternnoir/pyTelegramBotAPI/issues
9
9
  Author-email: eternnoir <eternnoir@gmail.com>
10
10
  License: GPL2
11
+ License-File: LICENSE
11
12
  Keywords: api,bot,telegram,tools
12
13
  Classifier: Development Status :: 5 - Production/Stable
13
14
  Classifier: Environment :: Console
@@ -52,7 +53,7 @@ Description-Content-Type: text/markdown
52
53
  <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
54
  <p align="center">Both synchronous and asynchronous.</p>
54
55
 
55
- ## <p align="center">Supported Bot API version: <a href="https://core.telegram.org/bots/api#october-31-2024"><img src="https://img.shields.io/badge/Bot%20API-7.11-blue?logo=telegram" alt="Supported Bot API version"></a>
56
+ ## <p align="center">Supported Bot API version: <a href="https://core.telegram.org/bots/api#january-1-2025"><img src="https://img.shields.io/badge/Bot%20API-8.2-blue?logo=telegram" alt="Supported Bot API version"></a>
56
57
 
57
58
  <h2><a href='https://pytba.readthedocs.io/en/latest/index.html'>Official documentation</a></h2>
58
59
  <h2><a href='https://pytba.readthedocs.io/ru/latest/index.html'>Official ru documentation</a></h2>
@@ -872,7 +873,7 @@ Here are some examples of template:
872
873
  * [RadRetroRobot](https://github.com/Tronikart/RadRetroRobot) by *Tronikart* - Multifunctional Telegram Bot RadRetroRobot.
873
874
  * [League of Legends bot](https://telegram.me/League_of_Legends_bot) ([source](https://github.com/i32ropie/lol)) by *i32ropie*
874
875
  * [NeoBot](https://github.com/neoranger/NeoBot) by [@NeoRanger](https://github.com/neoranger)
875
- * [ColorCodeBot](https://t.me/colorcodebot) ([source](https://github.com/andydecleyre/colorcodebot)) - Share code snippets as beautifully syntax-highlighted HTML and/or images.
876
+ * [ColorCodeBot](https://t.me/colorcodebot) ([source](https://github.com/andydecleyre/colorcodebot)) - Share code snippets as beautifully syntax-highlighted images.
876
877
  * [ComedoresUGRbot](http://telegram.me/ComedoresUGRbot) ([source](https://github.com/alejandrocq/ComedoresUGRbot)) by [*alejandrocq*](https://github.com/alejandrocq) - Telegram bot to check the menu of Universidad de Granada dining hall.
877
878
  * [proxybot](https://github.com/p-hash/proxybot) - Simple Proxy Bot for Telegram. by p-hash
878
879
  * [DonantesMalagaBot](https://github.com/vfranch/DonantesMalagaBot) - DonantesMalagaBot facilitates information to Malaga blood donors about the places where they can donate today or in the incoming days. It also records the date of the last donation so that it helps the donors to know when they can donate again. - by vfranch
@@ -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#october-31-2024"><img src="https://img.shields.io/badge/Bot%20API-7.11-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#january-1-2025"><img src="https://img.shields.io/badge/Bot%20API-8.2-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>
@@ -830,7 +830,7 @@ Here are some examples of template:
830
830
  * [RadRetroRobot](https://github.com/Tronikart/RadRetroRobot) by *Tronikart* - Multifunctional Telegram Bot RadRetroRobot.
831
831
  * [League of Legends bot](https://telegram.me/League_of_Legends_bot) ([source](https://github.com/i32ropie/lol)) by *i32ropie*
832
832
  * [NeoBot](https://github.com/neoranger/NeoBot) by [@NeoRanger](https://github.com/neoranger)
833
- * [ColorCodeBot](https://t.me/colorcodebot) ([source](https://github.com/andydecleyre/colorcodebot)) - Share code snippets as beautifully syntax-highlighted HTML and/or images.
833
+ * [ColorCodeBot](https://t.me/colorcodebot) ([source](https://github.com/andydecleyre/colorcodebot)) - Share code snippets as beautifully syntax-highlighted images.
834
834
  * [ComedoresUGRbot](http://telegram.me/ComedoresUGRbot) ([source](https://github.com/alejandrocq/ComedoresUGRbot)) by [*alejandrocq*](https://github.com/alejandrocq) - Telegram bot to check the menu of Universidad de Granada dining hall.
835
835
  * [proxybot](https://github.com/p-hash/proxybot) - Simple Proxy Bot for Telegram. by p-hash
836
836
  * [DonantesMalagaBot](https://github.com/vfranch/DonantesMalagaBot) - DonantesMalagaBot facilitates information to Malaga blood donors about the places where they can donate today or in the incoming days. It also records the date of the last donation so that it helps the donors to know when they can donate again. - by vfranch
@@ -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.24.0'
25
+ release = '4.26.0'
26
26
 
27
27
 
28
28
  # -- General configuration ---------------------------------------------------
@@ -1,4 +1,4 @@
1
- pyTelegramBotAPI==4.11.0
2
- Flask==3.0.0
3
- gunicorn==22.0.0
4
- Werkzeug==3.0.3
1
+ pyTelegramBotAPI==4.11.0
2
+ Flask==3.0.0
3
+ gunicorn==22.0.0
4
+ Werkzeug==3.0.6
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "pyTelegramBotAPI"
7
- version = "4.24.0"
7
+ version = "4.26.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.32.0
3
3
  wheel==0.38.1
4
- aiohttp==3.10.2
4
+ aiohttp==3.10.11
@@ -1512,6 +1512,26 @@ class TeleBot:
1512
1512
  apihelper.get_user_profile_photos(self.token, user_id, offset=offset, limit=limit)
1513
1513
  )
1514
1514
 
1515
+ def set_user_emoji_status(self, user_id: int, emoji_status_custom_emoji_id: Optional[str]=None, emoji_status_expiration_date: Optional[int]=None) -> bool:
1516
+ """
1517
+ Changes the emoji status for a given user that previously allowed the bot to manage their emoji status via the Mini App method requestEmojiStatusAccess. Returns True on success.
1518
+
1519
+ Telegram documentation: https://core.telegram.org/bots/api#setuseremojistatus
1520
+
1521
+ :param user_id: Unique identifier of the target user
1522
+ :type user_id: :obj:`int`
1523
+
1524
+ :param emoji_status_custom_emoji_id: Custom emoji identifier of the emoji status to set. Pass an empty string to remove the status.
1525
+ :type emoji_status_custom_emoji_id: :obj:`str`
1526
+
1527
+ :param emoji_status_expiration_date: Expiration date of the emoji status, if any
1528
+ :type emoji_status_expiration_date: :obj:`int`
1529
+
1530
+ :return: :obj:`bool`
1531
+ """
1532
+ return apihelper.set_user_emoji_status(
1533
+ self.token, user_id, emoji_status_custom_emoji_id=emoji_status_custom_emoji_id, emoji_status_expiration_date=emoji_status_expiration_date)
1534
+
1515
1535
 
1516
1536
  def get_chat(self, chat_id: Union[int, str]) -> types.ChatFullInfo:
1517
1537
  """
@@ -5418,7 +5438,9 @@ class TeleBot:
5418
5438
  need_shipping_address: Optional[bool]=None,
5419
5439
  send_phone_number_to_provider: Optional[bool]=None,
5420
5440
  send_email_to_provider: Optional[bool]=None,
5421
- is_flexible: Optional[bool]=None) -> str:
5441
+ is_flexible: Optional[bool]=None,
5442
+ subscription_period: Optional[int]=None,
5443
+ business_connection_id: Optional[str]=None) -> str:
5422
5444
 
5423
5445
  """
5424
5446
  Use this method to create a link for an invoice.
@@ -5427,6 +5449,9 @@ class TeleBot:
5427
5449
  Telegram documentation:
5428
5450
  https://core.telegram.org/bots/api#createinvoicelink
5429
5451
 
5452
+ :param business_connection_id: Unique identifier of the business connection on behalf of which the link will be created
5453
+ :type business_connection_id: :obj:`str`
5454
+
5430
5455
  :param title: Product name, 1-32 characters
5431
5456
  :type title: :obj:`str`
5432
5457
 
@@ -5449,6 +5474,11 @@ class TeleBot:
5449
5474
  (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.)
5450
5475
  :type prices: :obj:`list` of :obj:`types.LabeledPrice`
5451
5476
 
5477
+ :param subscription_period: The number of seconds the subscription will be active for before the next payment.
5478
+ The currency must be set to “XTR” (Telegram Stars) if the parameter is used. Currently, it must always
5479
+ be 2592000 (30 days) if specified.
5480
+ :type subscription_period: :obj:`int`
5481
+
5452
5482
  :param max_tip_amount: The maximum accepted amount for tips in the smallest units of the currency
5453
5483
  :type max_tip_amount: :obj:`int`
5454
5484
 
@@ -5505,7 +5535,8 @@ class TeleBot:
5505
5535
  photo_width=photo_width, photo_height=photo_height, need_name=need_name,
5506
5536
  need_phone_number=need_phone_number, need_email=need_email,
5507
5537
  need_shipping_address=need_shipping_address, send_phone_number_to_provider=send_phone_number_to_provider,
5508
- send_email_to_provider=send_email_to_provider, is_flexible=is_flexible)
5538
+ send_email_to_provider=send_email_to_provider, is_flexible=is_flexible ,subscription_period=subscription_period,
5539
+ business_connection_id=business_connection_id)
5509
5540
 
5510
5541
 
5511
5542
  # noinspection PyShadowingBuiltins
@@ -5803,6 +5834,26 @@ class TeleBot:
5803
5834
  """
5804
5835
  return apihelper.refund_star_payment(self.token, user_id, telegram_payment_charge_id)
5805
5836
 
5837
+ def edit_user_star_subscription(self, user_id: int, telegram_payment_charge_id: str, is_canceled: bool) -> bool:
5838
+ """
5839
+ Allows the bot to cancel or re-enable extension of a subscription paid in Telegram Stars. Returns True on success.
5840
+
5841
+ Telegram documentation: https://core.telegram.org/bots/api#edituserstarsubscription
5842
+
5843
+ :param user_id: Identifier of the user whose subscription will be edited
5844
+ :type user_id: :obj:`int`
5845
+
5846
+ :param telegram_payment_charge_id: Telegram payment identifier for the subscription
5847
+ :type telegram_payment_charge_id: :obj:`str`
5848
+
5849
+ :param is_canceled: Pass True to cancel extension of the user subscription; the subscription must be active up to the end of the current subscription period. Pass False to allow the user to re-enable a subscription that was previously canceled by the bot.
5850
+ :type is_canceled: :obj:`bool`
5851
+
5852
+ :return: On success, True is returned.
5853
+ :rtype: :obj:`bool`
5854
+ """
5855
+ return apihelper.edit_user_star_subscription(self.token, user_id, telegram_payment_charge_id, is_canceled)
5856
+
5806
5857
  def edit_message_caption(
5807
5858
  self, caption: str, chat_id: Optional[Union[int, str]]=None,
5808
5859
  message_id: Optional[int]=None,
@@ -6199,6 +6250,112 @@ class TeleBot:
6199
6250
  """
6200
6251
  return apihelper.delete_sticker_set(self.token, name)
6201
6252
 
6253
+ def send_gift(self, user_id: int, gift_id: str, text: Optional[str]=None, text_parse_mode: Optional[str]=None,
6254
+ text_entities: Optional[List[types.MessageEntity]]=None, pay_for_upgrade: Optional[bool]=None) -> bool:
6255
+ """
6256
+ Sends a gift to the given user. The gift can't be converted to Telegram Stars by the user. Returns True on success.
6257
+
6258
+ Telegram documentation: https://core.telegram.org/bots/api#sendgift
6259
+
6260
+ :param user_id: Unique identifier of the target user that will receive the gift
6261
+ :type user_id: :obj:`int`
6262
+
6263
+ :param gift_id: Identifier of the gift
6264
+ :type gift_id: :obj:`str`
6265
+
6266
+ :param pay_for_upgrade: Pass True to pay for the gift upgrade from the bot's balance, thereby making the upgrade free for the receiver
6267
+ :type pay_for_upgrade: :obj:`bool`
6268
+
6269
+ :param text: Text that will be shown along with the gift; 0-255 characters
6270
+ :type text: :obj:`str`
6271
+
6272
+ :param text_parse_mode: Mode for parsing entities in the text. See formatting options for more details. Entities other than “bold”, “italic”, “underline”, “strikethrough”, “spoiler”, and “custom_emoji” are ignored.
6273
+ :type text_parse_mode: :obj:`str`
6274
+
6275
+ :param text_entities: A JSON-serialized list of special entities that appear in the gift text. It can be specified instead of text_parse_mode. Entities other than “bold”, “italic”, “underline”, “strikethrough”, “spoiler”, and “custom_emoji” are ignored.
6276
+ :type text_entities: :obj:`list` of :obj:`types.MessageEntity`
6277
+
6278
+ :return: Returns True on success.
6279
+ :rtype: :obj:`bool`
6280
+ """
6281
+ return apihelper.send_gift(self.token, user_id, gift_id, text=text, text_parse_mode=text_parse_mode, text_entities=text_entities,
6282
+ pay_for_upgrade=pay_for_upgrade)
6283
+
6284
+ def verify_user(self, user_id: int, custom_description: Optional[str]=None) -> bool:
6285
+ """
6286
+ Verifies a user on behalf of the organization which is represented by the bot. Returns True on success.
6287
+
6288
+ Telegram documentation: https://core.telegram.org/bots/api#verifyuser
6289
+
6290
+ :param user_id: Unique identifier of the target user
6291
+ :type user_id: :obj:`int`
6292
+
6293
+ :param custom_description: Custom description for the verification; 0-70 characters. Must be empty if the organization isn't allowed to provide a custom verification description.
6294
+ :type custom_description: :obj:`str`
6295
+
6296
+ :return: Returns True on success.
6297
+ :rtype: :obj:`bool`
6298
+ """
6299
+ return apihelper.verify_user(self.token, user_id, custom_description=custom_description)
6300
+
6301
+ def verify_chat(self, chat_id: Union[int, str], custom_description: Optional[str]=None) -> bool:
6302
+ """
6303
+ Verifies a chat on behalf of the organization which is represented by the bot. Returns True on success.
6304
+
6305
+ Telegram documentation: https://core.telegram.org/bots/api#verifychat
6306
+
6307
+ :param chat_id: Unique identifier for the target chat or username of the target channel (in the format @channelusername)
6308
+ :type chat_id: :obj:`int` | :obj:`str`
6309
+
6310
+ :param custom_description: Custom description for the verification; 0-70 characters. Must be empty if the organization isn't allowed to provide a custom verification description.
6311
+ :type custom_description: :obj:`str`
6312
+
6313
+ :return: Returns True on success.
6314
+ :rtype: :obj:`bool`
6315
+ """
6316
+ return apihelper.verify_chat(self.token, chat_id, custom_description=custom_description)
6317
+
6318
+ def remove_user_verification(self, user_id: int) -> bool:
6319
+ """
6320
+ Removes verification from a user who is currently verified on behalf of the organization represented by the bot. Returns True on success.
6321
+
6322
+ Telegram documentation: https://core.telegram.org/bots/api#removeuserverification
6323
+
6324
+ :param user_id: Unique identifier of the target user
6325
+ :type user_id: :obj:`int`
6326
+
6327
+ :return: Returns True on success.
6328
+ :rtype: :obj:`bool`
6329
+ """
6330
+
6331
+ return apihelper.remove_user_verification(self.token, user_id)
6332
+
6333
+ def remove_chat_verification(self, chat_id: Union[int, str]) -> bool:
6334
+ """
6335
+ Removes verification from a chat that is currently verified on behalf of the organization represented by the bot. Returns True on success.
6336
+
6337
+ Telegram documentation: https://core.telegram.org/bots/api#removechatverification
6338
+
6339
+ :param chat_id: Unique identifier for the target chat or username of the target channel (in the format @channelusername)
6340
+ :type chat_id: :obj:`int` | :obj:`str`
6341
+
6342
+ :return: Returns True on success.
6343
+ :rtype: :obj:`bool`
6344
+ """
6345
+ return apihelper.remove_chat_verification(self.token, chat_id)
6346
+
6347
+ def get_available_gifts(self) -> types.Gifts:
6348
+ """
6349
+ Returns the list of gifts that can be sent by the bot to users. Requires no parameters. Returns a Gifts object.
6350
+
6351
+ Telegram documentation: https://core.telegram.org/bots/api#getavailablegifts
6352
+
6353
+ :return: On success, a Gifts object is returned.
6354
+ :rtype: :class:`telebot.types.Gifts`
6355
+ """
6356
+ return types.Gifts.de_json(
6357
+ apihelper.get_available_gifts(self.token)
6358
+ )
6202
6359
 
6203
6360
  def replace_sticker_in_set(self, user_id: int, name: str, old_sticker: str, sticker: types.InputSticker) -> bool:
6204
6361
  """
@@ -6718,6 +6875,42 @@ class TeleBot:
6718
6875
  """
6719
6876
  return apihelper.answer_web_app_query(self.token, web_app_query_id, result)
6720
6877
 
6878
+ def save_prepared_inline_message(
6879
+ self, user_id: int, result: types.InlineQueryResultBase, allow_user_chats: Optional[bool]=None,
6880
+ allow_bot_chats: Optional[bool]=None, allow_group_chats: Optional[bool]=None,
6881
+ allow_channel_chats: Optional[bool]=None) -> types.PreparedInlineMessage:
6882
+ """
6883
+ Use this method to store a message that can be sent by a user of a Mini App.
6884
+ Returns a PreparedInlineMessage object.
6885
+
6886
+ Telegram Documentation: https://core.telegram.org/bots/api#savepreparedinlinemessage
6887
+
6888
+ :param user_id: Unique identifier of the target user that can use the prepared message
6889
+ :type user_id: :obj:`int`
6890
+
6891
+ :param result: A JSON-serialized object describing the message to be sent
6892
+ :type result: :class:`telebot.types.InlineQueryResultBase`
6893
+
6894
+ :param allow_user_chats: Pass True if the message can be sent to private chats with users
6895
+ :type allow_user_chats: :obj:`bool`
6896
+
6897
+ :param allow_bot_chats: Pass True if the message can be sent to private chats with bots
6898
+ :type allow_bot_chats: :obj:`bool`
6899
+
6900
+ :param allow_group_chats: Pass True if the message can be sent to group and supergroup chats
6901
+ :type allow_group_chats: :obj:`bool`
6902
+
6903
+ :param allow_channel_chats: Pass True if the message can be sent to channel chats
6904
+ :type allow_channel_chats: :obj:`bool`
6905
+
6906
+ :return: On success, a PreparedInlineMessage object is returned.
6907
+ :rtype: :class:`telebot.types.PreparedInlineMessage`
6908
+ """
6909
+ return types.PreparedInlineMessage.de_json(
6910
+ apihelper.save_prepared_inline_message(
6911
+ self.token, user_id, result, allow_user_chats=allow_user_chats, allow_bot_chats=allow_bot_chats,
6912
+ allow_group_chats=allow_group_chats, allow_channel_chats=allow_channel_chats)
6913
+ )
6721
6914
 
6722
6915
  def register_for_reply(self, message: types.Message, callback: Callable, *args, **kwargs) -> None:
6723
6916
  """
@@ -341,6 +341,16 @@ def get_user_profile_photos(token, user_id, offset=None, limit=None):
341
341
  payload['limit'] = limit
342
342
  return _make_request(token, method_url, params=payload)
343
343
 
344
+
345
+ def set_user_emoji_status(token, user_id, emoji_status_custom_emoji_id=None, emoji_status_expiration_date=None):
346
+ method_url = r'setUserEmojiStatus'
347
+ payload = {'user_id': user_id}
348
+ if emoji_status_custom_emoji_id:
349
+ payload['emoji_status_custom_emoji_id'] = emoji_status_custom_emoji_id
350
+ if emoji_status_expiration_date:
351
+ payload['emoji_status_expiration_date'] = emoji_status_expiration_date
352
+ return _make_request(token, method_url, params=payload)
353
+
344
354
  def set_message_reaction(token, chat_id, message_id, reaction=None, is_big=None):
345
355
  method_url = r'setMessageReaction'
346
356
  payload = {'chat_id': chat_id, 'message_id': message_id}
@@ -1805,6 +1815,11 @@ def refund_star_payment(token, user_id, telegram_payment_charge_id):
1805
1815
  payload = {'user_id': user_id, 'telegram_payment_charge_id': telegram_payment_charge_id}
1806
1816
  return _make_request(token, method_url, params=payload)
1807
1817
 
1818
+ def edit_user_star_subscription(token, user_id, telegram_payment_charge_id, is_canceled):
1819
+ method_url = 'editUserStarSubscription'
1820
+ payload = {'user_id': user_id, 'telegram_payment_charge_id': telegram_payment_charge_id, 'is_canceled': is_canceled}
1821
+ return _make_request(token, method_url, params=payload)
1822
+
1808
1823
 
1809
1824
  def unpin_all_general_forum_topic_messages(token, chat_id):
1810
1825
  method_url = 'unpinAllGeneralForumTopicMessages'
@@ -1909,6 +1924,52 @@ def delete_sticker_set(token, name):
1909
1924
  return _make_request(token, method_url, params=payload, method='post')
1910
1925
 
1911
1926
 
1927
+ def get_available_gifts(token):
1928
+ method_url = 'getAvailableGifts'
1929
+ return _make_request(token, method_url)
1930
+
1931
+
1932
+ def send_gift(token, user_id, gift_id, text=None, text_parse_mode=None, text_entities=None, pay_for_upgrade=None):
1933
+ method_url = 'sendGift'
1934
+ payload = {'user_id': user_id, 'gift_id': gift_id}
1935
+ if text:
1936
+ payload['text'] = text
1937
+ if text_parse_mode:
1938
+ payload['text_parse_mode'] = text_parse_mode
1939
+ if text_entities:
1940
+ payload['text_entities'] = json.dumps(types.MessageEntity.to_list_of_dicts(text_entities))
1941
+ if pay_for_upgrade is not None:
1942
+ payload['pay_for_upgrade'] = pay_for_upgrade
1943
+ return _make_request(token, method_url, params=payload, method='post')
1944
+
1945
+
1946
+ def verify_user(token, user_id, custom_description=None):
1947
+ method_url = 'verifyUser'
1948
+ payload = {'user_id': user_id}
1949
+ if custom_description:
1950
+ payload['custom_description'] = custom_description
1951
+ return _make_request(token, method_url, params=payload, method='post')
1952
+
1953
+
1954
+ def verify_chat(token, chat_id, custom_description=None):
1955
+ method_url = 'verifyChat'
1956
+ payload = {'chat_id': chat_id}
1957
+ if custom_description:
1958
+ payload['custom_description'] = custom_description
1959
+ return _make_request(token, method_url, params=payload, method='post')
1960
+
1961
+
1962
+ def remove_user_verification(token, user_id):
1963
+ method_url = 'removeUserVerification'
1964
+ payload = {'user_id': user_id}
1965
+ return _make_request(token, method_url, params=payload, method='post')
1966
+
1967
+
1968
+ def remove_chat_verification(token, chat_id):
1969
+ method_url = 'removeChatVerification'
1970
+ payload = {'chat_id': chat_id}
1971
+ return _make_request(token, method_url, params=payload, method='post')
1972
+
1912
1973
  def set_sticker_emoji_list(token, sticker, emoji_list):
1913
1974
  method_url = 'setStickerEmojiList'
1914
1975
  payload = {'sticker': sticker, 'emoji_list': json.dumps(emoji_list)}
@@ -1966,11 +2027,26 @@ def answer_web_app_query(token, web_app_query_id, result: types.InlineQueryResul
1966
2027
  return _make_request(token, method_url, params=payload, method='post')
1967
2028
 
1968
2029
 
2030
+ def save_prepared_inline_message(token, user_id, result: types.InlineQueryResultBase, allow_user_chats=None,
2031
+ allow_bot_chats=None, allow_group_chats=None, allow_channel_chats=None):
2032
+ method_url = 'savePreparedInlineMessage'
2033
+ payload = {'user_id': user_id, 'result': result.to_json()}
2034
+ if allow_user_chats is not None:
2035
+ payload['allow_user_chats'] = allow_user_chats
2036
+ if allow_bot_chats is not None:
2037
+ payload['allow_bot_chats'] = allow_bot_chats
2038
+ if allow_group_chats is not None:
2039
+ payload['allow_group_chats'] = allow_group_chats
2040
+ if allow_channel_chats is not None:
2041
+ payload['allow_channel_chats'] = allow_channel_chats
2042
+ return _make_request(token, method_url, params=payload, method='post')
2043
+
2044
+
1969
2045
  def create_invoice_link(token, title, description, payload, provider_token,
1970
2046
  currency, prices, max_tip_amount=None, suggested_tip_amounts=None, provider_data=None,
1971
2047
  photo_url=None, photo_size=None, photo_width=None, photo_height=None, need_name=None, need_phone_number=None,
1972
2048
  need_email=None, need_shipping_address=None, send_phone_number_to_provider=None,
1973
- send_email_to_provider=None, is_flexible=None):
2049
+ send_email_to_provider=None, is_flexible=None, subscription_period=None, business_connection_id=None):
1974
2050
  method_url = r'createInvoiceLink'
1975
2051
  payload = {'title': title, 'description': description, 'payload': payload,
1976
2052
  'currency': currency, 'prices': _convert_list_json_serializable(prices)}
@@ -2004,6 +2080,10 @@ def create_invoice_link(token, title, description, payload, provider_token,
2004
2080
  payload['is_flexible'] = is_flexible
2005
2081
  if provider_token is not None:
2006
2082
  payload['provider_token'] = provider_token
2083
+ if subscription_period:
2084
+ payload['subscription_period'] = subscription_period
2085
+ if business_connection_id:
2086
+ payload['business_connection_id'] = business_connection_id
2007
2087
  return _make_request(token, method_url, params=payload, method='post')
2008
2088
 
2009
2089
 
@@ -2221,6 +2301,12 @@ def convert_input_media_array(array):
2221
2301
  if media_dict['media'].startswith('attach://'):
2222
2302
  key = media_dict['media'].replace('attach://', '')
2223
2303
  files[key] = input_media.media
2304
+ if 'thumbnail' in media_dict:
2305
+ thumbnail = media_dict['thumbnail']
2306
+ if isinstance(thumbnail, types.InputFile):
2307
+ thumbnail_key = 'thumbnail_' + key
2308
+ files[thumbnail_key] = thumbnail
2309
+ media_dict['thumbnail'] = 'attach://' + thumbnail_key
2224
2310
  media.append(media_dict)
2225
2311
  return json.dumps(media), files
2226
2312