pyTelegramBotAPI 4.24.0__tar.gz → 4.25.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.
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/PKG-INFO +3 -3
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/README.md +2 -2
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/docs/source/conf.py +1 -1
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/serverless/flask_google_cloud_bot/requirements.txt +4 -4
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/pyproject.toml +1 -1
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/telebot/__init__.py +127 -2
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/telebot/apihelper.py +51 -1
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/telebot/async_telebot.py +120 -2
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/telebot/asyncio_helper.py +50 -1
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/telebot/formatting.py +1 -1
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/telebot/types.py +208 -3
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/telebot/version.py +1 -1
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/.github/ISSUE_TEMPLATE +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/.github/workflows/setup_python.yml +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/.gitignore +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/.readthedocs.yml +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/.travis.yml +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/LICENSE +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/doc_req.txt +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/docs/Makefile +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/docs/source/_static/logo.png +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/docs/source/_static/logo2.png +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/docs/source/async_version/index.rst +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/docs/source/calldata.rst +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/docs/source/formatting.rst +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/docs/source/index.rst +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/docs/source/install.rst +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/docs/source/locales/en/LC_MESSAGES/async_version.po +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/docs/source/locales/en/LC_MESSAGES/calldata.po +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/docs/source/locales/en/LC_MESSAGES/formatting.po +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/docs/source/locales/en/LC_MESSAGES/index.po +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/docs/source/locales/en/LC_MESSAGES/install.po +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/docs/source/locales/en/LC_MESSAGES/quick_start.po +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/docs/source/locales/en/LC_MESSAGES/sync_version.po +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/docs/source/locales/en/LC_MESSAGES/types.po +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/docs/source/locales/en/LC_MESSAGES/util.po +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/docs/source/locales/ru/LC_MESSAGES/async_version.po +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/docs/source/locales/ru/LC_MESSAGES/calldata.po +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/docs/source/locales/ru/LC_MESSAGES/formatting.po +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/docs/source/locales/ru/LC_MESSAGES/index.po +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/docs/source/locales/ru/LC_MESSAGES/install.po +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/docs/source/locales/ru/LC_MESSAGES/quick_start.po +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/docs/source/locales/ru/LC_MESSAGES/sync_version.po +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/docs/source/locales/ru/LC_MESSAGES/types.po +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/docs/source/locales/ru/LC_MESSAGES/util.po +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/docs/source/quick_start.rst +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/docs/source/sync_version/index.rst +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/docs/source/types.rst +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/docs/source/util.rst +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/anonymous_bot.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/asynchronous_telebot/callback_data_examples/advanced_calendar_example/filters.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/asynchronous_telebot/callback_data_examples/advanced_calendar_example/keyboards.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/asynchronous_telebot/callback_data_examples/advanced_calendar_example/main.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/asynchronous_telebot/callback_data_examples/simple_products_example.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/asynchronous_telebot/chat_join_request.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/asynchronous_telebot/chat_member_example.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/asynchronous_telebot/continue_handling.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/asynchronous_telebot/custom_filters/admin_filter_example.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/asynchronous_telebot/custom_filters/advanced_text_filter.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/asynchronous_telebot/custom_filters/general_custom_filters.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/asynchronous_telebot/custom_filters/id_filter_example.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/asynchronous_telebot/custom_filters/is_filter_example.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/asynchronous_telebot/custom_filters/text_filter_example.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/asynchronous_telebot/custom_states.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/asynchronous_telebot/detect_changes.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/asynchronous_telebot/download_file_example.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/asynchronous_telebot/echo_bot.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/asynchronous_telebot/exception_handler.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/asynchronous_telebot/formatting_example.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/asynchronous_telebot/message_reaction_example.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/asynchronous_telebot/middleware/flooding_middleware.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/asynchronous_telebot/middleware/i18n.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/asynchronous_telebot/middleware/i18n_middleware_example/i18n_base_midddleware.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/asynchronous_telebot/middleware/i18n_middleware_example/keyboards.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/asynchronous_telebot/middleware/i18n_middleware_example/locales/en/LC_MESSAGES/messages.po +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/asynchronous_telebot/middleware/i18n_middleware_example/locales/ru/LC_MESSAGES/messages.po +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/asynchronous_telebot/middleware/i18n_middleware_example/locales/uz_Latn/LC_MESSAGES/messages.po +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/asynchronous_telebot/middleware/i18n_middleware_example/main.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/asynchronous_telebot/mini_app.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/asynchronous_telebot/multibot/README.MD +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/asynchronous_telebot/multibot/config.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/asynchronous_telebot/multibot/handlers.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/asynchronous_telebot/multibot/main.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/asynchronous_telebot/multibot/nginx_conf.conf +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/asynchronous_telebot/register_handler.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/asynchronous_telebot/send_file_example.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/asynchronous_telebot/set_command_example.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/asynchronous_telebot/skip_updates_example.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/asynchronous_telebot/timer_bot_async.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/asynchronous_telebot/update_listener.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/asynchronous_telebot/webhooks/async_webhook_aiohttp_echo_bot.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/asynchronous_telebot/webhooks/run_webhooks.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/asynchronous_telebot/webhooks/webhook_starlette_echo_bot.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/callback_data_examples/advanced_calendar_example/filters.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/callback_data_examples/advanced_calendar_example/keyboards.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/callback_data_examples/advanced_calendar_example/main.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/callback_data_examples/simple_products_example.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/chat_join_request.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/chat_member_example.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/continue_handling.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/create_invite_link.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/custom_filters/admin_filter_example.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/custom_filters/advanced_text_filter.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/custom_filters/general_custom_filters.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/custom_filters/id_filter_example.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/custom_filters/is_filter_example.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/custom_filters/text_filter_example.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/custom_states.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/deep_linking.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/detailed_example/detailed_example.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/detailed_example/kitten.jpg +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/detailed_example/rooster.jpg +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/detect_changes.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/download_file_example.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/echo_bot.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/formatting_example.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/inline_example.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/inline_keyboard_example.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/message_reaction_example.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/middleware/README.md +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/middleware/class_based/antiflood_middleware.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/middleware/class_based/basic_example.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/middleware/class_based/i18n_middleware/i18n_base_middleware.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/middleware/class_based/i18n_middleware/keyboards.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/middleware/class_based/i18n_middleware/locales/en/LC_MESSAGES/messages.po +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/middleware/class_based/i18n_middleware/locales/ru/LC_MESSAGES/messages.po +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/middleware/class_based/i18n_middleware/locales/uz_Latn/LC_MESSAGES/messages.po +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/middleware/class_based/i18n_middleware/main.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/middleware/function_based/i18n.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/middleware/function_based/i18n_gettext/i18n_class.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/middleware/function_based/i18n_gettext/keyboards.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/middleware/function_based/i18n_gettext/locales/en/LC_MESSAGES/messages.po +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/middleware/function_based/i18n_gettext/locales/ru/LC_MESSAGES/messages.po +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/middleware/function_based/i18n_gettext/locales/uz_Latn/LC_MESSAGES/messages.po +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/middleware/function_based/i18n_gettext/main.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/middleware/function_based/session.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/mini_app.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/mini_app_web/index.html +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/mini_app_web/script.js +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/mini_app_web/style.css +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/multibot/README.MD +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/multibot/config.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/multibot/handlers.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/multibot/main.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/multibot/nginx_conf.conf +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/payments_example.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/poll_example.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/register_handler.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/reply_keyboard_markup_example.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/serverless/aws_lambda_function.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/serverless/azure_functions +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/serverless/flask_google_cloud_bot/.gcloudignore +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/serverless/flask_google_cloud_bot/app.yaml +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/serverless/flask_google_cloud_bot/main.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/set_command_example.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/skip_updates_example.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/step_example.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/telebot_bot/telebot_bot.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/timer_bot.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/webhook_examples/README.md +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/webhook_examples/run_webhooks.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/webhook_examples/webhook_aiohttp_echo_bot.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/webhook_examples/webhook_cherrypy_echo_bot.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/webhook_examples/webhook_cpython_echo_bot.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/webhook_examples/webhook_fastapi_echo_bot.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/webhook_examples/webhook_flask_echo_bot.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/webhook_examples/webhook_flask_heroku_echo.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/webhook_examples/webhook_tornado_echo_bot.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/examples/webhook_examples/webhook_twisted_echo_bot.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/requirements.txt +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/telebot/asyncio_filters.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/telebot/asyncio_handler_backends.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/telebot/asyncio_storage/__init__.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/telebot/asyncio_storage/base_storage.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/telebot/asyncio_storage/memory_storage.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/telebot/asyncio_storage/pickle_storage.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/telebot/asyncio_storage/redis_storage.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/telebot/callback_data.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/telebot/custom_filters.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/telebot/ext/__init__.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/telebot/ext/aio/__init__.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/telebot/ext/aio/webhooks.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/telebot/ext/reloader.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/telebot/ext/sync/__init__.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/telebot/ext/sync/webhooks.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/telebot/handler_backends.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/telebot/service_utils.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/telebot/states/__init__.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/telebot/states/asyncio/__init__.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/telebot/states/asyncio/context.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/telebot/states/asyncio/middleware.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/telebot/states/sync/__init__.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/telebot/states/sync/context.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/telebot/states/sync/middleware.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/telebot/storage/__init__.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/telebot/storage/base_storage.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/telebot/storage/memory_storage.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/telebot/storage/pickle_storage.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/telebot/storage/redis_storage.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/telebot/util.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/tests/__init__.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/tests/test_data/record.mp3 +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/tests/test_data/record.ogg +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/tests/test_data/record.wav +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/tests/test_data/test_video.mp4 +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/tests/test_handler_backends.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/tests/test_telebot.py +0 -0
- {pytelegrambotapi-4.24.0 → pytelegrambotapi-4.25.0}/tests/test_types.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: pyTelegramBotAPI
|
|
3
|
-
Version: 4.
|
|
3
|
+
Version: 4.25.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#
|
|
55
|
+
## <p align="center">Supported Bot API version: <a href="https://core.telegram.org/bots/api#november-17-2024"><img src="https://img.shields.io/badge/Bot%20API-8.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>
|
|
@@ -872,7 +872,7 @@ Here are some examples of template:
|
|
|
872
872
|
* [RadRetroRobot](https://github.com/Tronikart/RadRetroRobot) by *Tronikart* - Multifunctional Telegram Bot RadRetroRobot.
|
|
873
873
|
* [League of Legends bot](https://telegram.me/League_of_Legends_bot) ([source](https://github.com/i32ropie/lol)) by *i32ropie*
|
|
874
874
|
* [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
|
|
875
|
+
* [ColorCodeBot](https://t.me/colorcodebot) ([source](https://github.com/andydecleyre/colorcodebot)) - Share code snippets as beautifully syntax-highlighted images.
|
|
876
876
|
* [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
877
|
* [proxybot](https://github.com/p-hash/proxybot) - Simple Proxy Bot for Telegram. by p-hash
|
|
878
878
|
* [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#
|
|
13
|
+
## <p align="center">Supported Bot API version: <a href="https://core.telegram.org/bots/api#november-17-2024"><img src="https://img.shields.io/badge/Bot%20API-8.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>
|
|
@@ -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
|
|
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.
|
|
25
|
+
release = '4.25.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.
|
|
1
|
+
pyTelegramBotAPI==4.11.0
|
|
2
|
+
Flask==3.0.0
|
|
3
|
+
gunicorn==22.0.0
|
|
4
|
+
Werkzeug==3.0.6
|
|
@@ -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
|
|
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
|
+
: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,44 @@ 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, text_entities: Optional[List[types.MessageEntity]]=None) -> bool:
|
|
6254
|
+
"""
|
|
6255
|
+
Sends a gift to the given user. The gift can't be converted to Telegram Stars by the user. Returns True on success.
|
|
6256
|
+
|
|
6257
|
+
Telegram documentation: https://core.telegram.org/bots/api#sendgift
|
|
6258
|
+
|
|
6259
|
+
:param user_id: Unique identifier of the target user that will receive the gift
|
|
6260
|
+
:type user_id: :obj:`int`
|
|
6261
|
+
|
|
6262
|
+
:param gift_id: Identifier of the gift
|
|
6263
|
+
:type gift_id: :obj:`str`
|
|
6264
|
+
|
|
6265
|
+
:param text: Text that will be shown along with the gift; 0-255 characters
|
|
6266
|
+
:type text: :obj:`str`
|
|
6267
|
+
|
|
6268
|
+
: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.
|
|
6269
|
+
:type text_parse_mode: :obj:`str`
|
|
6270
|
+
|
|
6271
|
+
: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.
|
|
6272
|
+
:type text_entities: :obj:`list` of :obj:`types.MessageEntity`
|
|
6273
|
+
|
|
6274
|
+
:return: Returns True on success.
|
|
6275
|
+
:rtype: :obj:`bool`
|
|
6276
|
+
"""
|
|
6277
|
+
return apihelper.send_gift(self.token, user_id, gift_id, text=text, text_parse_mode=text_parse_mode, text_entities=text_entities)
|
|
6278
|
+
|
|
6279
|
+
def get_available_gifts(self) -> types.Gifts:
|
|
6280
|
+
"""
|
|
6281
|
+
Returns the list of gifts that can be sent by the bot to users. Requires no parameters. Returns a Gifts object.
|
|
6282
|
+
|
|
6283
|
+
Telegram documentation: https://core.telegram.org/bots/api#getavailablegifts
|
|
6284
|
+
|
|
6285
|
+
:return: On success, a Gifts object is returned.
|
|
6286
|
+
:rtype: :class:`telebot.types.Gifts`
|
|
6287
|
+
"""
|
|
6288
|
+
return types.Gifts.de_json(
|
|
6289
|
+
apihelper.get_available_gifts(self.token)
|
|
6290
|
+
)
|
|
6202
6291
|
|
|
6203
6292
|
def replace_sticker_in_set(self, user_id: int, name: str, old_sticker: str, sticker: types.InputSticker) -> bool:
|
|
6204
6293
|
"""
|
|
@@ -6718,6 +6807,42 @@ class TeleBot:
|
|
|
6718
6807
|
"""
|
|
6719
6808
|
return apihelper.answer_web_app_query(self.token, web_app_query_id, result)
|
|
6720
6809
|
|
|
6810
|
+
def save_prepared_inline_message(
|
|
6811
|
+
self, user_id: int, result: types.InlineQueryResultBase, allow_user_chats: Optional[bool]=None,
|
|
6812
|
+
allow_bot_chats: Optional[bool]=None, allow_group_chats: Optional[bool]=None,
|
|
6813
|
+
allow_channel_chats: Optional[bool]=None) -> types.PreparedInlineMessage:
|
|
6814
|
+
"""
|
|
6815
|
+
Use this method to store a message that can be sent by a user of a Mini App.
|
|
6816
|
+
Returns a PreparedInlineMessage object.
|
|
6817
|
+
|
|
6818
|
+
Telegram Documentation: https://core.telegram.org/bots/api#savepreparedinlinemessage
|
|
6819
|
+
|
|
6820
|
+
:param user_id: Unique identifier of the target user that can use the prepared message
|
|
6821
|
+
:type user_id: :obj:`int`
|
|
6822
|
+
|
|
6823
|
+
:param result: A JSON-serialized object describing the message to be sent
|
|
6824
|
+
:type result: :class:`telebot.types.InlineQueryResultBase`
|
|
6825
|
+
|
|
6826
|
+
:param allow_user_chats: Pass True if the message can be sent to private chats with users
|
|
6827
|
+
:type allow_user_chats: :obj:`bool`
|
|
6828
|
+
|
|
6829
|
+
:param allow_bot_chats: Pass True if the message can be sent to private chats with bots
|
|
6830
|
+
:type allow_bot_chats: :obj:`bool`
|
|
6831
|
+
|
|
6832
|
+
:param allow_group_chats: Pass True if the message can be sent to group and supergroup chats
|
|
6833
|
+
:type allow_group_chats: :obj:`bool`
|
|
6834
|
+
|
|
6835
|
+
:param allow_channel_chats: Pass True if the message can be sent to channel chats
|
|
6836
|
+
:type allow_channel_chats: :obj:`bool`
|
|
6837
|
+
|
|
6838
|
+
:return: On success, a PreparedInlineMessage object is returned.
|
|
6839
|
+
:rtype: :class:`telebot.types.PreparedInlineMessage`
|
|
6840
|
+
"""
|
|
6841
|
+
return types.PreparedInlineMessage.de_json(
|
|
6842
|
+
apihelper.save_prepared_inline_message(
|
|
6843
|
+
self.token, user_id, result, allow_user_chats=allow_user_chats, allow_bot_chats=allow_bot_chats,
|
|
6844
|
+
allow_group_chats=allow_group_chats, allow_channel_chats=allow_channel_chats)
|
|
6845
|
+
)
|
|
6721
6846
|
|
|
6722
6847
|
def register_for_reply(self, message: types.Message, callback: Callable, *args, **kwargs) -> None:
|
|
6723
6848
|
"""
|
|
@@ -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,22 @@ 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):
|
|
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
|
+
return _make_request(token, method_url, params=payload, method='post')
|
|
1942
|
+
|
|
1912
1943
|
def set_sticker_emoji_list(token, sticker, emoji_list):
|
|
1913
1944
|
method_url = 'setStickerEmojiList'
|
|
1914
1945
|
payload = {'sticker': sticker, 'emoji_list': json.dumps(emoji_list)}
|
|
@@ -1966,11 +1997,26 @@ def answer_web_app_query(token, web_app_query_id, result: types.InlineQueryResul
|
|
|
1966
1997
|
return _make_request(token, method_url, params=payload, method='post')
|
|
1967
1998
|
|
|
1968
1999
|
|
|
2000
|
+
def save_prepared_inline_message(token, user_id, result: types.InlineQueryResultBase, allow_user_chats=None,
|
|
2001
|
+
allow_bot_chats=None, allow_group_chats=None, allow_channel_chats=None):
|
|
2002
|
+
method_url = 'savePreparedInlineMessage'
|
|
2003
|
+
payload = {'user_id': user_id, 'result': result.to_json()}
|
|
2004
|
+
if allow_user_chats is not None:
|
|
2005
|
+
payload['allow_user_chats'] = allow_user_chats
|
|
2006
|
+
if allow_bot_chats is not None:
|
|
2007
|
+
payload['allow_bot_chats'] = allow_bot_chats
|
|
2008
|
+
if allow_group_chats is not None:
|
|
2009
|
+
payload['allow_group_chats'] = allow_group_chats
|
|
2010
|
+
if allow_channel_chats is not None:
|
|
2011
|
+
payload['allow_channel_chats'] = allow_channel_chats
|
|
2012
|
+
return _make_request(token, method_url, params=payload, method='post')
|
|
2013
|
+
|
|
2014
|
+
|
|
1969
2015
|
def create_invoice_link(token, title, description, payload, provider_token,
|
|
1970
2016
|
currency, prices, max_tip_amount=None, suggested_tip_amounts=None, provider_data=None,
|
|
1971
2017
|
photo_url=None, photo_size=None, photo_width=None, photo_height=None, need_name=None, need_phone_number=None,
|
|
1972
2018
|
need_email=None, need_shipping_address=None, send_phone_number_to_provider=None,
|
|
1973
|
-
send_email_to_provider=None, is_flexible=None):
|
|
2019
|
+
send_email_to_provider=None, is_flexible=None, subscription_period=None, business_connection_id=None):
|
|
1974
2020
|
method_url = r'createInvoiceLink'
|
|
1975
2021
|
payload = {'title': title, 'description': description, 'payload': payload,
|
|
1976
2022
|
'currency': currency, 'prices': _convert_list_json_serializable(prices)}
|
|
@@ -2004,6 +2050,10 @@ def create_invoice_link(token, title, description, payload, provider_token,
|
|
|
2004
2050
|
payload['is_flexible'] = is_flexible
|
|
2005
2051
|
if provider_token is not None:
|
|
2006
2052
|
payload['provider_token'] = provider_token
|
|
2053
|
+
if subscription_period:
|
|
2054
|
+
payload['subscription_period'] = subscription_period
|
|
2055
|
+
if business_connection_id:
|
|
2056
|
+
payload['business_connection_id'] = business_connection_id
|
|
2007
2057
|
return _make_request(token, method_url, params=payload, method='post')
|
|
2008
2058
|
|
|
2009
2059
|
|
|
@@ -2987,6 +2987,26 @@ class AsyncTeleBot:
|
|
|
2987
2987
|
"""
|
|
2988
2988
|
result = await asyncio_helper.get_user_profile_photos(self.token, user_id, offset, limit)
|
|
2989
2989
|
return types.UserProfilePhotos.de_json(result)
|
|
2990
|
+
|
|
2991
|
+
async 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:
|
|
2992
|
+
"""
|
|
2993
|
+
Use this method to change the emoji status for a given user that previously allowed the bot to manage their emoji status via the Mini App method requestEmojiStatusAccess.
|
|
2994
|
+
|
|
2995
|
+
Telegram documentation: https://core.telegram.org/bots/api#setuseremojistatus
|
|
2996
|
+
|
|
2997
|
+
:param user_id: Unique identifier of the target user
|
|
2998
|
+
:type user_id: :obj:`int`
|
|
2999
|
+
|
|
3000
|
+
:param emoji_status_custom_emoji_id: Custom emoji identifier of the emoji status to set. Pass an empty string to remove the status.
|
|
3001
|
+
:type emoji_status_custom_emoji_id: :obj:`str`, optional
|
|
3002
|
+
|
|
3003
|
+
:param emoji_status_expiration_date: Expiration date of the emoji status, if any
|
|
3004
|
+
:type emoji_status_expiration_date: :obj:`int`, optional
|
|
3005
|
+
|
|
3006
|
+
:return: :obj:`bool`
|
|
3007
|
+
"""
|
|
3008
|
+
result = await asyncio_helper.set_user_emoji_status(self.token, user_id, emoji_status_custom_emoji_id, emoji_status_expiration_date)
|
|
3009
|
+
return result
|
|
2990
3010
|
|
|
2991
3011
|
async def get_chat(self, chat_id: Union[int, str]) -> types.ChatFullInfo:
|
|
2992
3012
|
"""
|
|
@@ -3128,6 +3148,36 @@ class AsyncTeleBot:
|
|
|
3128
3148
|
|
|
3129
3149
|
return await asyncio_helper.answer_web_app_query(self.token, web_app_query_id, result)
|
|
3130
3150
|
|
|
3151
|
+
async def save_prepared_inline_message(self, user_id: int, result: types.InlineQueryResultBase, allow_user_chats: Optional[bool]=None,
|
|
3152
|
+
allow_bot_chats: Optional[bool]=None, allow_group_chats: Optional[bool]=None, allow_channel_chats: Optional[bool]=None) -> types.PreparedInlineMessage:
|
|
3153
|
+
"""
|
|
3154
|
+
Stores a message that can be sent by a user of a Mini App. Returns a PreparedInlineMessage object.
|
|
3155
|
+
|
|
3156
|
+
Telegram Documentation: https://core.telegram.org/bots/api#savepreparedinlinemessage
|
|
3157
|
+
|
|
3158
|
+
:param user_id: Unique identifier of the target user that can use the prepared message
|
|
3159
|
+
:type user_id: :obj:`int`
|
|
3160
|
+
|
|
3161
|
+
:param result: A JSON-serialized object describing the message to be sent
|
|
3162
|
+
:type result: :class:`telebot.types.InlineQueryResultBase`
|
|
3163
|
+
|
|
3164
|
+
:param allow_user_chats: Pass True if the message can be sent to private chats with users
|
|
3165
|
+
:type allow_user_chats: :obj:`bool`, optional
|
|
3166
|
+
|
|
3167
|
+
:param allow_bot_chats: Pass True if the message can be sent to private chats with bots
|
|
3168
|
+
:type allow_bot_chats: :obj:`bool`, optional
|
|
3169
|
+
|
|
3170
|
+
:param allow_group_chats: Pass True if the message can be sent to group and supergroup chats
|
|
3171
|
+
:type allow_group_chats: :obj:`bool`, optional
|
|
3172
|
+
|
|
3173
|
+
:param allow_channel_chats: Pass True if the message can be sent to channel chats
|
|
3174
|
+
:type allow_channel_chats: :obj:`bool`, optional
|
|
3175
|
+
|
|
3176
|
+
:return: :class:`telebot.types.PreparedInlineMessage`
|
|
3177
|
+
"""
|
|
3178
|
+
result = await asyncio_helper.save_prepared_inline_message(self.token, user_id, result, allow_user_chats, allow_bot_chats, allow_group_chats, allow_channel_chats)
|
|
3179
|
+
return types.PreparedInlineMessage.de_json(result)
|
|
3180
|
+
|
|
3131
3181
|
async def get_chat_member(self, chat_id: Union[int, str], user_id: int) -> types.ChatMember:
|
|
3132
3182
|
"""
|
|
3133
3183
|
Use this method to get information about a member of a chat. Returns a ChatMember object on success.
|
|
@@ -6836,7 +6886,9 @@ class AsyncTeleBot:
|
|
|
6836
6886
|
need_shipping_address: Optional[bool]=None,
|
|
6837
6887
|
send_phone_number_to_provider: Optional[bool]=None,
|
|
6838
6888
|
send_email_to_provider: Optional[bool]=None,
|
|
6839
|
-
is_flexible: Optional[bool]=None
|
|
6889
|
+
is_flexible: Optional[bool]=None,
|
|
6890
|
+
subscription_period: Optional[int]=None,
|
|
6891
|
+
business_connection_id: Optional[str]=None) -> str:
|
|
6840
6892
|
|
|
6841
6893
|
"""
|
|
6842
6894
|
Use this method to create a link for an invoice.
|
|
@@ -6844,6 +6896,9 @@ class AsyncTeleBot:
|
|
|
6844
6896
|
|
|
6845
6897
|
Telegram documentation:
|
|
6846
6898
|
https://core.telegram.org/bots/api#createinvoicelink
|
|
6899
|
+
|
|
6900
|
+
:param business_connection_id: Unique identifier of the business connection on behalf of which the link will be created
|
|
6901
|
+
:type business_connection_id: :obj:`str`
|
|
6847
6902
|
|
|
6848
6903
|
:param title: Product name, 1-32 characters
|
|
6849
6904
|
:type title: :obj:`str`
|
|
@@ -6867,6 +6922,11 @@ class AsyncTeleBot:
|
|
|
6867
6922
|
(e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.)
|
|
6868
6923
|
:type prices: :obj:`list` of :obj:`types.LabeledPrice`
|
|
6869
6924
|
|
|
6925
|
+
:subscription_period: The number of seconds the subscription will be active for before the next payment.
|
|
6926
|
+
The currency must be set to “XTR” (Telegram Stars) if the parameter is used. Currently, it must always
|
|
6927
|
+
be 2592000 (30 days) if specified.
|
|
6928
|
+
:type subscription_period: :obj:`int`
|
|
6929
|
+
|
|
6870
6930
|
:param max_tip_amount: The maximum accepted amount for tips in the smallest units of the currency
|
|
6871
6931
|
:type max_tip_amount: :obj:`int`
|
|
6872
6932
|
|
|
@@ -6921,7 +6981,7 @@ class AsyncTeleBot:
|
|
|
6921
6981
|
currency, prices, max_tip_amount, suggested_tip_amounts, provider_data,
|
|
6922
6982
|
photo_url, photo_size, photo_width, photo_height, need_name, need_phone_number,
|
|
6923
6983
|
need_email, need_shipping_address, send_phone_number_to_provider,
|
|
6924
|
-
send_email_to_provider, is_flexible)
|
|
6984
|
+
send_email_to_provider, is_flexible, subscription_period=subscription_period, business_connection_id=business_connection_id)
|
|
6925
6985
|
return result
|
|
6926
6986
|
|
|
6927
6987
|
# noinspection PyShadowingBuiltins
|
|
@@ -7210,6 +7270,26 @@ class AsyncTeleBot:
|
|
|
7210
7270
|
"""
|
|
7211
7271
|
return await asyncio_helper.refund_star_payment(self.token, user_id, telegram_payment_charge_id)
|
|
7212
7272
|
|
|
7273
|
+
async def edit_user_star_subscription(self, user_id: int, telegram_payment_charge_id: str, is_canceled: bool) -> bool:
|
|
7274
|
+
"""
|
|
7275
|
+
Allows the bot to cancel or re-enable extension of a subscription paid in Telegram Stars. Returns True on success.
|
|
7276
|
+
|
|
7277
|
+
Telegram documentation: https://core.telegram.org/bots/api#edituserstarsubscription
|
|
7278
|
+
|
|
7279
|
+
:param user_id: Identifier of the user whose subscription will be edited
|
|
7280
|
+
:type user_id: :obj:`int`
|
|
7281
|
+
|
|
7282
|
+
:param telegram_payment_charge_id: Telegram payment identifier for the subscription
|
|
7283
|
+
:type telegram_payment_charge_id: :obj:`str`
|
|
7284
|
+
|
|
7285
|
+
: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.
|
|
7286
|
+
:type is_canceled: :obj:`bool`
|
|
7287
|
+
|
|
7288
|
+
:return: On success, True is returned.
|
|
7289
|
+
:rtype: :obj:`bool`
|
|
7290
|
+
"""
|
|
7291
|
+
return await asyncio_helper.edit_user_star_subscription(self.token, user_id, telegram_payment_charge_id, is_canceled)
|
|
7292
|
+
|
|
7213
7293
|
async def edit_message_caption(
|
|
7214
7294
|
self, caption: str, chat_id: Optional[Union[int, str]]=None,
|
|
7215
7295
|
message_id: Optional[int]=None,
|
|
@@ -7626,6 +7706,44 @@ class AsyncTeleBot:
|
|
|
7626
7706
|
"""
|
|
7627
7707
|
|
|
7628
7708
|
return await asyncio_helper.delete_sticker_set(self.token, name)
|
|
7709
|
+
|
|
7710
|
+
async def send_gift(self, user_id: int, gift_id: str, text: Optional[str]=None, text_parse_mode: Optional[str]=None, text_entities: Optional[List[types.MessageEntity]]=None) -> bool:
|
|
7711
|
+
"""
|
|
7712
|
+
Sends a gift to the given user. The gift can't be converted to Telegram Stars by the user. Returns True on success.
|
|
7713
|
+
|
|
7714
|
+
Telegram documentation: https://core.telegram.org/bots/api#sendgift
|
|
7715
|
+
|
|
7716
|
+
:param user_id: Unique identifier of the target user that will receive the gift
|
|
7717
|
+
:type user_id: :obj:`int`
|
|
7718
|
+
|
|
7719
|
+
:param gift_id: Identifier of the gift
|
|
7720
|
+
:type gift_id: :obj:`str`
|
|
7721
|
+
|
|
7722
|
+
:param text: Text that will be shown along with the gift; 0-255 characters
|
|
7723
|
+
:type text: :obj:`str`
|
|
7724
|
+
|
|
7725
|
+
: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.
|
|
7726
|
+
:type text_parse_mode: :obj:`str`
|
|
7727
|
+
|
|
7728
|
+
: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.
|
|
7729
|
+
:type text_entities: :obj:`list` of :obj:`types.MessageEntity`
|
|
7730
|
+
|
|
7731
|
+
:return: Returns True on success.
|
|
7732
|
+
:rtype: :obj:`bool`
|
|
7733
|
+
"""
|
|
7734
|
+
return await asyncio_helper.send_gift(self.token, user_id, gift_id, text, text_parse_mode, text_entities)
|
|
7735
|
+
|
|
7736
|
+
async def get_available_gifts(self) -> types.Gifts:
|
|
7737
|
+
"""
|
|
7738
|
+
Returns the list of gifts that can be sent by the bot to users. Requires no parameters. Returns a Gifts object.
|
|
7739
|
+
|
|
7740
|
+
Telegram documentation: https://core.telegram.org/bots/api#getavailablegifts
|
|
7741
|
+
|
|
7742
|
+
:return: On success, a Gifts object is returned.
|
|
7743
|
+
:rtype: :class:`telebot.types.Gifts`
|
|
7744
|
+
"""
|
|
7745
|
+
|
|
7746
|
+
return types.Gifts.de_json(await asyncio_helper.get_available_gifts(self.token))
|
|
7629
7747
|
|
|
7630
7748
|
async def replace_sticker_in_set(self, user_id: int, name: str, old_sticker: str, sticker: types.InputSticker) -> bool:
|
|
7631
7749
|
"""
|
|
@@ -325,6 +325,16 @@ async def get_user_profile_photos(token, user_id, offset=None, limit=None):
|
|
|
325
325
|
payload['limit'] = limit
|
|
326
326
|
return await _process_request(token, method_url, params=payload)
|
|
327
327
|
|
|
328
|
+
|
|
329
|
+
async def set_user_emoji_status(token, user_id, emoji_status_custom_emoji_id=None, emoji_status_expiration_date=None):
|
|
330
|
+
method_url = r'setUserEmojiStatus'
|
|
331
|
+
payload = {'user_id': user_id}
|
|
332
|
+
if emoji_status_custom_emoji_id:
|
|
333
|
+
payload['emoji_status_custom_emoji_id'] = emoji_status_custom_emoji_id
|
|
334
|
+
if emoji_status_expiration_date:
|
|
335
|
+
payload['emoji_status_expiration_date'] = emoji_status_expiration_date
|
|
336
|
+
return await _process_request(token, method_url, params=payload)
|
|
337
|
+
|
|
328
338
|
async def set_message_reaction(token, chat_id, message_id, reaction=None, is_big=None):
|
|
329
339
|
method_url = r'setMessageReaction'
|
|
330
340
|
payload = {'chat_id': chat_id, 'message_id': message_id}
|
|
@@ -396,6 +406,20 @@ async def answer_web_app_query(token, web_app_query_id, result: types.InlineQuer
|
|
|
396
406
|
return await _process_request(token, method_url, params=payload, method='post')
|
|
397
407
|
|
|
398
408
|
|
|
409
|
+
async def save_prepared_inline_message(token, user_id, result: types.InlineQueryResultBase, allow_user_chats=None, allow_bot_chats=None, allow_group_chats=None, allow_channel_chats=None):
|
|
410
|
+
method_url = r'savePreparedInlineMessage'
|
|
411
|
+
payload = {'user_id': user_id, 'result': result.to_json()}
|
|
412
|
+
if allow_user_chats is not None:
|
|
413
|
+
payload['allow_user_chats'] = allow_user_chats
|
|
414
|
+
if allow_bot_chats is not None:
|
|
415
|
+
payload['allow_bot_chats'] = allow_bot_chats
|
|
416
|
+
if allow_group_chats is not None:
|
|
417
|
+
payload['allow_group_chats'] = allow_group_chats
|
|
418
|
+
if allow_channel_chats is not None:
|
|
419
|
+
payload['allow_channel_chats'] = allow_channel_chats
|
|
420
|
+
return await _process_request(token, method_url, params=payload)
|
|
421
|
+
|
|
422
|
+
|
|
399
423
|
async def get_chat_member(token, chat_id, user_id):
|
|
400
424
|
method_url = r'getChatMember'
|
|
401
425
|
payload = {'chat_id': chat_id, 'user_id': user_id}
|
|
@@ -1793,6 +1817,12 @@ async def refund_star_payment(token, user_id, telegram_payment_charge_id):
|
|
|
1793
1817
|
return await _process_request(token, method_url, params=payload)
|
|
1794
1818
|
|
|
1795
1819
|
|
|
1820
|
+
async def edit_user_star_subscription(token, user_id, telegram_payment_charge_id, is_canceled):
|
|
1821
|
+
method_url = 'editUserStarSubscription'
|
|
1822
|
+
payload = {'user_id': user_id, 'telegram_payment_charge_id': telegram_payment_charge_id, 'is_canceled': is_canceled}
|
|
1823
|
+
return await _process_request(token, method_url, params=payload)
|
|
1824
|
+
|
|
1825
|
+
|
|
1796
1826
|
async def unpin_all_general_forum_topic_messages(token, chat_id):
|
|
1797
1827
|
method_url = 'unpinAllGeneralForumTopicMessages'
|
|
1798
1828
|
payload = {'chat_id': chat_id}
|
|
@@ -1886,6 +1916,21 @@ async def delete_sticker_set(token, name):
|
|
|
1886
1916
|
payload = {'name': name}
|
|
1887
1917
|
return await _process_request(token, method_url, params=payload, method='post')
|
|
1888
1918
|
|
|
1919
|
+
async def send_gift(token, user_id, gift_id, text=None, text_parse_mode=None, text_entities=None):
|
|
1920
|
+
method_url = 'sendGift'
|
|
1921
|
+
payload = {'user_id': user_id, 'gift_id': gift_id}
|
|
1922
|
+
if text:
|
|
1923
|
+
payload['text'] = text
|
|
1924
|
+
if text_parse_mode:
|
|
1925
|
+
payload['text_parse_mode'] = text_parse_mode
|
|
1926
|
+
if text_entities:
|
|
1927
|
+
payload['text_entities'] = json.dumps(types.MessageEntity.to_list_of_dicts(text_entities))
|
|
1928
|
+
return await _process_request(token, method_url, params=payload, method='post')
|
|
1929
|
+
|
|
1930
|
+
async def get_available_gifts(token):
|
|
1931
|
+
method_url = 'getAvailableGifts'
|
|
1932
|
+
return await _process_request(token, method_url)
|
|
1933
|
+
|
|
1889
1934
|
async def set_custom_emoji_sticker_set_thumbnail(token, name, custom_emoji_id=None):
|
|
1890
1935
|
method_url = 'setCustomEmojiStickerSetThumbnail'
|
|
1891
1936
|
payload = {'name': name}
|
|
@@ -1952,7 +1997,7 @@ async def create_invoice_link(token, title, description, payload, provider_token
|
|
|
1952
1997
|
currency, prices, max_tip_amount=None, suggested_tip_amounts=None, provider_data=None,
|
|
1953
1998
|
photo_url=None, photo_size=None, photo_width=None, photo_height=None, need_name=None, need_phone_number=None,
|
|
1954
1999
|
need_email=None, need_shipping_address=None, send_phone_number_to_provider=None,
|
|
1955
|
-
send_email_to_provider=None, is_flexible=None):
|
|
2000
|
+
send_email_to_provider=None, is_flexible=None, subscription_period=None, business_connection_id=None):
|
|
1956
2001
|
method_url = r'createInvoiceLink'
|
|
1957
2002
|
payload = {'title': title, 'description': description, 'payload': payload,
|
|
1958
2003
|
'currency': currency, 'prices': await _convert_list_json_serializable(prices)}
|
|
@@ -1986,6 +2031,10 @@ async def create_invoice_link(token, title, description, payload, provider_token
|
|
|
1986
2031
|
payload['is_flexible'] = is_flexible
|
|
1987
2032
|
if provider_token is not None:
|
|
1988
2033
|
payload['provider_token'] = provider_token
|
|
2034
|
+
if subscription_period:
|
|
2035
|
+
payload['subscription_period'] = subscription_period
|
|
2036
|
+
if business_connection_id:
|
|
2037
|
+
payload['business_connection_id'] = business_connection_id
|
|
1989
2038
|
return await _process_request(token, method_url, params=payload, method='post')
|
|
1990
2039
|
|
|
1991
2040
|
|
|
@@ -240,7 +240,7 @@ def mlink(content: str, url: str, escape: Optional[bool]=True) -> str:
|
|
|
240
240
|
:return: The formatted string.
|
|
241
241
|
:rtype: :obj:`str`
|
|
242
242
|
"""
|
|
243
|
-
return '[{}]({})'.format(escape_markdown(content), escape_markdown(url) if escape else
|
|
243
|
+
return '[{}]({})'.format(escape_markdown(content), escape_markdown(url) if escape else url)
|
|
244
244
|
|
|
245
245
|
|
|
246
246
|
def hlink(content: str, url: str, escape: Optional[bool]=True) -> str:
|