[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-python-telegram-bot--python-telegram-bot":3,"tool-python-telegram-bot--python-telegram-bot":61},[4,18,26,36,44,53],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":17},4358,"openclaw","openclaw\u002Fopenclaw","OpenClaw 是一款专为个人打造的本地化 AI 助手，旨在让你在自己的设备上拥有完全可控的智能伙伴。它打破了传统 AI 助手局限于特定网页或应用的束缚，能够直接接入你日常使用的各类通讯渠道，包括微信、WhatsApp、Telegram、Discord、iMessage 等数十种平台。无论你在哪个聊天软件中发送消息，OpenClaw 都能即时响应，甚至支持在 macOS、iOS 和 Android 设备上进行语音交互，并提供实时的画布渲染功能供你操控。\n\n这款工具主要解决了用户对数据隐私、响应速度以及“始终在线”体验的需求。通过将 AI 部署在本地，用户无需依赖云端服务即可享受快速、私密的智能辅助，真正实现了“你的数据，你做主”。其独特的技术亮点在于强大的网关架构，将控制平面与核心助手分离，确保跨平台通信的流畅性与扩展性。\n\nOpenClaw 非常适合希望构建个性化工作流的技术爱好者、开发者，以及注重隐私保护且不愿被单一生态绑定的普通用户。只要具备基础的终端操作能力（支持 macOS、Linux 及 Windows WSL2），即可通过简单的命令行引导完成部署。如果你渴望拥有一个懂你",349277,3,"2026-04-06T06:32:30",[13,14,15,16],"Agent","开发框架","图像","数据工具","ready",{"id":19,"name":20,"github_repo":21,"description_zh":22,"stars":23,"difficulty_score":10,"last_commit_at":24,"category_tags":25,"status":17},3808,"stable-diffusion-webui","AUTOMATIC1111\u002Fstable-diffusion-webui","stable-diffusion-webui 是一个基于 Gradio 构建的网页版操作界面，旨在让用户能够轻松地在本地运行和使用强大的 Stable Diffusion 图像生成模型。它解决了原始模型依赖命令行、操作门槛高且功能分散的痛点，将复杂的 AI 绘图流程整合进一个直观易用的图形化平台。\n\n无论是希望快速上手的普通创作者、需要精细控制画面细节的设计师，还是想要深入探索模型潜力的开发者与研究人员，都能从中获益。其核心亮点在于极高的功能丰富度：不仅支持文生图、图生图、局部重绘（Inpainting）和外绘（Outpainting）等基础模式，还独创了注意力机制调整、提示词矩阵、负向提示词以及“高清修复”等高级功能。此外，它内置了 GFPGAN 和 CodeFormer 等人脸修复工具，支持多种神经网络放大算法，并允许用户通过插件系统无限扩展能力。即使是显存有限的设备，stable-diffusion-webui 也提供了相应的优化选项，让高质量的 AI 艺术创作变得触手可及。",162132,"2026-04-05T11:01:52",[14,15,13],{"id":27,"name":28,"github_repo":29,"description_zh":30,"stars":31,"difficulty_score":32,"last_commit_at":33,"category_tags":34,"status":17},1381,"everything-claude-code","affaan-m\u002Feverything-claude-code","everything-claude-code 是一套专为 AI 编程助手（如 Claude Code、Codex、Cursor 等）打造的高性能优化系统。它不仅仅是一组配置文件，而是一个经过长期实战打磨的完整框架，旨在解决 AI 代理在实际开发中面临的效率低下、记忆丢失、安全隐患及缺乏持续学习能力等核心痛点。\n\n通过引入技能模块化、直觉增强、记忆持久化机制以及内置的安全扫描功能，everything-claude-code 能显著提升 AI 在复杂任务中的表现，帮助开发者构建更稳定、更智能的生产级 AI 代理。其独特的“研究优先”开发理念和针对 Token 消耗的优化策略，使得模型响应更快、成本更低，同时有效防御潜在的攻击向量。\n\n这套工具特别适合软件开发者、AI 研究人员以及希望深度定制 AI 工作流的技术团队使用。无论您是在构建大型代码库，还是需要 AI 协助进行安全审计与自动化测试，everything-claude-code 都能提供强大的底层支持。作为一个曾荣获 Anthropic 黑客大奖的开源项目，它融合了多语言支持与丰富的实战钩子（hooks），让 AI 真正成长为懂上",160784,2,"2026-04-19T11:32:54",[14,13,35],"语言模型",{"id":37,"name":38,"github_repo":39,"description_zh":40,"stars":41,"difficulty_score":32,"last_commit_at":42,"category_tags":43,"status":17},2271,"ComfyUI","Comfy-Org\u002FComfyUI","ComfyUI 是一款功能强大且高度模块化的视觉 AI 引擎，专为设计和执行复杂的 Stable Diffusion 图像生成流程而打造。它摒弃了传统的代码编写模式，采用直观的节点式流程图界面，让用户通过连接不同的功能模块即可构建个性化的生成管线。\n\n这一设计巧妙解决了高级 AI 绘图工作流配置复杂、灵活性不足的痛点。用户无需具备编程背景，也能自由组合模型、调整参数并实时预览效果，轻松实现从基础文生图到多步骤高清修复等各类复杂任务。ComfyUI 拥有极佳的兼容性，不仅支持 Windows、macOS 和 Linux 全平台，还广泛适配 NVIDIA、AMD、Intel 及苹果 Silicon 等多种硬件架构，并率先支持 SDXL、Flux、SD3 等前沿模型。\n\n无论是希望深入探索算法潜力的研究人员和开发者，还是追求极致创作自由度的设计师与资深 AI 绘画爱好者，ComfyUI 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",109154,"2026-04-18T11:18:24",[14,15,13],{"id":45,"name":46,"github_repo":47,"description_zh":48,"stars":49,"difficulty_score":32,"last_commit_at":50,"category_tags":51,"status":17},6121,"gemini-cli","google-gemini\u002Fgemini-cli","gemini-cli 是一款由谷歌推出的开源 AI 命令行工具，它将强大的 Gemini 大模型能力直接集成到用户的终端环境中。对于习惯在命令行工作的开发者而言，它提供了一条从输入提示词到获取模型响应的最短路径，无需切换窗口即可享受智能辅助。\n\n这款工具主要解决了开发过程中频繁上下文切换的痛点，让用户能在熟悉的终端界面内直接完成代码理解、生成、调试以及自动化运维任务。无论是查询大型代码库、根据草图生成应用，还是执行复杂的 Git 操作，gemini-cli 都能通过自然语言指令高效处理。\n\n它特别适合广大软件工程师、DevOps 人员及技术研究人员使用。其核心亮点包括支持高达 100 万 token 的超长上下文窗口，具备出色的逻辑推理能力；内置 Google 搜索、文件操作及 Shell 命令执行等实用工具；更独特的是，它支持 MCP（模型上下文协议），允许用户灵活扩展自定义集成，连接如图像生成等外部能力。此外，个人谷歌账号即可享受免费的额度支持，且项目基于 Apache 2.0 协议完全开源，是提升终端工作效率的理想助手。",100752,"2026-04-10T01:20:03",[52,13,15,14],"插件",{"id":54,"name":55,"github_repo":56,"description_zh":57,"stars":58,"difficulty_score":32,"last_commit_at":59,"category_tags":60,"status":17},4721,"markitdown","microsoft\u002Fmarkitdown","MarkItDown 是一款由微软 AutoGen 团队打造的轻量级 Python 工具，专为将各类文件高效转换为 Markdown 格式而设计。它支持 PDF、Word、Excel、PPT、图片（含 OCR）、音频（含语音转录）、HTML 乃至 YouTube 链接等多种格式的解析，能够精准提取文档中的标题、列表、表格和链接等关键结构信息。\n\n在人工智能应用日益普及的今天，大语言模型（LLM）虽擅长处理文本，却难以直接读取复杂的二进制办公文档。MarkItDown 恰好解决了这一痛点，它将非结构化或半结构化的文件转化为模型“原生理解”且 Token 效率极高的 Markdown 格式，成为连接本地文件与 AI 分析 pipeline 的理想桥梁。此外，它还提供了 MCP（模型上下文协议）服务器，可无缝集成到 Claude Desktop 等 LLM 应用中。\n\n这款工具特别适合开发者、数据科学家及 AI 研究人员使用，尤其是那些需要构建文档检索增强生成（RAG）系统、进行批量文本分析或希望让 AI 助手直接“阅读”本地文件的用户。虽然生成的内容也具备一定可读性，但其核心优势在于为机器",93400,"2026-04-06T19:52:38",[52,14],{"id":62,"github_repo":63,"name":64,"description_en":65,"description_zh":66,"ai_summary_zh":67,"readme_en":68,"readme_zh":69,"quickstart_zh":70,"use_case_zh":71,"hero_image_url":72,"owner_login":64,"owner_name":64,"owner_avatar_url":73,"owner_bio":74,"owner_company":75,"owner_location":75,"owner_email":76,"owner_twitter":75,"owner_website":77,"owner_url":78,"languages":79,"stars":91,"forks":92,"last_commit_at":93,"license":94,"difficulty_score":95,"env_os":74,"env_gpu":96,"env_ram":97,"env_deps":98,"category_tags":103,"github_topics":105,"view_count":32,"oss_zip_url":75,"oss_zip_packed_at":75,"status":17,"created_at":111,"updated_at":112,"faqs":113,"releases":144},9769,"python-telegram-bot\u002Fpython-telegram-bot","python-telegram-bot","We have made you a wrapper you can't refuse","python-telegram-bot 是一个专为 Python 开发者打造的异步库，旨在让创建 Telegram 机器人变得简单高效。它提供了对 Telegram Bot API（当前支持版本 9.5）的完整原生支持，将复杂的接口调用封装为直观的 Python 代码，帮助开发者快速实现消息收发、群组管理、按键交互等功能，无需从零处理底层网络请求或数据解析。\n\n该工具主要解决了手动对接 Telegram 接口时流程繁琐、易出错的问题。通过内置的高级模块（telegram.ext），它提供了许多便捷方法和封装类，大幅简化了开发流程，让用户能专注于业务逻辑而非通信细节。其核心亮点在于完全异步的架构设计，能够轻松应对高并发场景，确保机器人在处理大量用户请求时依然流畅稳定。此外，项目拥有活跃的社区支持和详尽的文档，便于遇到问题时快速获得帮助。\n\npython-telegram-bot 非常适合具备一定 Python 基础的开发者使用，无论是想构建自动回复助手、社群管理工具，还是集成外部服务的智能机器人，都能从中受益。虽然它不直接面向普通终端用户，但却是技术人员将创意转化为实际 Telegram","python-telegram-bot 是一个专为 Python 开发者打造的异步库，旨在让创建 Telegram 机器人变得简单高效。它提供了对 Telegram Bot API（当前支持版本 9.5）的完整原生支持，将复杂的接口调用封装为直观的 Python 代码，帮助开发者快速实现消息收发、群组管理、按键交互等功能，无需从零处理底层网络请求或数据解析。\n\n该工具主要解决了手动对接 Telegram 接口时流程繁琐、易出错的问题。通过内置的高级模块（telegram.ext），它提供了许多便捷方法和封装类，大幅简化了开发流程，让用户能专注于业务逻辑而非通信细节。其核心亮点在于完全异步的架构设计，能够轻松应对高并发场景，确保机器人在处理大量用户请求时依然流畅稳定。此外，项目拥有活跃的社区支持和详尽的文档，便于遇到问题时快速获得帮助。\n\npython-telegram-bot 非常适合具备一定 Python 基础的开发者使用，无论是想构建自动回复助手、社群管理工具，还是集成外部服务的智能机器人，都能从中受益。虽然它不直接面向普通终端用户，但却是技术人员将创意转化为实际 Telegram 应用的得力助手。凭借清晰的代码风格和稳定的更新维护，它已成为 Python 生态中开发 Telegram 机器人的首选方案之一。",".. image:: https:\u002F\u002Fraw.githubusercontent.com\u002Fpython-telegram-bot\u002Flogos\u002Fmaster\u002Flogo-text\u002Fpng\u002Fptb-logo-text_768.png\n   :align: center\n   :target: https:\u002F\u002Fpython-telegram-bot.org\n   :alt: python-telegram-bot Logo\n\n.. image:: https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fv\u002Fpython-telegram-bot.svg\n   :target: https:\u002F\u002Fpypi.org\u002Fproject\u002Fpython-telegram-bot\u002F\n   :alt: PyPi Package Version\n\n.. image:: https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fpyversions\u002Fpython-telegram-bot.svg\n   :target: https:\u002F\u002Fpypi.org\u002Fproject\u002Fpython-telegram-bot\u002F\n   :alt: Supported Python versions\n\n.. image:: https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FBot%20API-9.5-blue?logo=telegram\n   :target: https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi-changelog\n   :alt: Supported Bot API version\n\n.. image:: https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fdm\u002Fpython-telegram-bot\n   :target: https:\u002F\u002Fpypistats.org\u002Fpackages\u002Fpython-telegram-bot\n   :alt: PyPi Package Monthly Download\n\n.. image:: https:\u002F\u002Fapp.readthedocs.org\u002Fprojects\u002Fpython-telegram-bot\u002Fbadge\u002F?version=stable\n   :target: https:\u002F\u002Fdocs.python-telegram-bot.org\u002Fen\u002Fstable\u002F\n   :alt: Documentation Status\n\n.. image:: https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fl\u002Fpython-telegram-bot.svg\n   :target: https:\u002F\u002Fwww.gnu.org\u002Flicenses\u002Flgpl-3.0.html\n   :alt: LGPLv3 License\n\n.. image:: https:\u002F\u002Fgithub.com\u002Fpython-telegram-bot\u002Fpython-telegram-bot\u002Factions\u002Fworkflows\u002Funit_tests.yml\u002Fbadge.svg?branch=master\n   :target: https:\u002F\u002Fgithub.com\u002Fpython-telegram-bot\u002Fpython-telegram-bot\u002F\n   :alt: Github Actions workflow\n\n.. image:: https:\u002F\u002Fcodecov.io\u002Fgh\u002Fpython-telegram-bot\u002Fpython-telegram-bot\u002Fbranch\u002Fmaster\u002Fgraph\u002Fbadge.svg\n   :target: https:\u002F\u002Fapp.codecov.io\u002Fgh\u002Fpython-telegram-bot\u002Fpython-telegram-bot\n   :alt: Code coverage\n\n.. image:: https:\u002F\u002Fisitmaintained.com\u002Fbadge\u002Fresolution\u002Fpython-telegram-bot\u002Fpython-telegram-bot.svg\n   :target: https:\u002F\u002Fisitmaintained.com\u002Fproject\u002Fpython-telegram-bot\u002Fpython-telegram-bot\n   :alt: Median time to resolve an issue\n\n.. image:: https:\u002F\u002Fapi.codacy.com\u002Fproject\u002Fbadge\u002FGrade\u002F99d901eaa09b44b4819aec05c330c968\n   :target: https:\u002F\u002Fapp.codacy.com\u002Fgh\u002Fpython-telegram-bot\u002Fpython-telegram-bot\u002Fdashboard\n   :alt: Code quality: Codacy\n\n.. image:: https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fcode%20style-black-000000.svg\n   :target: https:\u002F\u002Fgithub.com\u002Fpsf\u002Fblack\n   :alt: Code Style: Black\n\n.. image:: https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FTelegram-Channel-blue.svg?logo=telegram\n   :target: https:\u002F\u002Ft.me\u002Fpythontelegrambotchannel\n   :alt: Telegram Channel\n\n.. image:: https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FTelegram-Group-blue.svg?logo=telegram\n   :target: https:\u002F\u002Ftelegram.me\u002Fpythontelegrambotgroup\n   :alt: Telegram Group\n\nWe have made you a wrapper you can't refuse\n\nWe have a vibrant community of developers helping each other in our `Telegram group \u003Chttps:\u002F\u002Ftelegram.me\u002Fpythontelegrambotgroup>`_. Join us!\n\n*Stay tuned for library updates and new releases on our* `Telegram Channel \u003Chttps:\u002F\u002Ftelegram.me\u002Fpythontelegrambotchannel>`_.\n\nIntroduction\n------------\n\nThis library provides a pure Python, asynchronous interface for the\n`Telegram Bot API \u003Chttps:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi>`_.\nIt's compatible with Python versions **3.10+**.\n\nIn addition to the pure API implementation, this library features several convenience methods and shortcuts as well as a number of high-level classes to\nmake the development of bots easy and straightforward. These classes are contained in the\n``telegram.ext`` submodule.\n\nAfter installing_ the library, be sure to check out the section on `working with PTB`_.\n\nTelegram API support\n~~~~~~~~~~~~~~~~~~~~\n\nAll types and methods of the Telegram Bot API **9.5** are natively supported by this library.\nIn addition, Bot API functionality not yet natively included can still be used as described `in our wiki \u003Chttps:\u002F\u002Fgithub.com\u002Fpython-telegram-bot\u002Fpython-telegram-bot\u002Fwiki\u002FBot-API-Forward-Compatibility>`_.\n\nNotable Features\n~~~~~~~~~~~~~~~~\n\n- `Fully asynchronous \u003Chttps:\u002F\u002Fgithub.com\u002Fpython-telegram-bot\u002Fpython-telegram-bot\u002Fwiki\u002FConcurrency>`_\n- Convenient shortcut methods, e.g. `Message.reply_text \u003Chttps:\u002F\u002Fdocs.python-telegram-bot.org\u002Fen\u002Fstable\u002Ftelegram.message.html#telegram.Message.reply_text>`_\n- `Fully annotated with static type hints \u003Chttps:\u002F\u002Fgithub.com\u002Fpython-telegram-bot\u002Fpython-telegram-bot\u002Fwiki\u002FType-Checking>`_\n- `Customizable and extendable interface \u003Chttps:\u002F\u002Fgithub.com\u002Fpython-telegram-bot\u002Fpython-telegram-bot\u002Fwiki\u002FArchitecture>`_\n- Seamless integration with `webhooks \u003Chttps:\u002F\u002Fgithub.com\u002Fpython-telegram-bot\u002Fpython-telegram-bot\u002Fwiki\u002FWebhooks>`_ and `polling \u003Chttps:\u002F\u002Fdocs.python-telegram-bot.org\u002Fen\u002Fstable\u002Ftelegram.ext.application.html#telegram.ext.Application.run_polling>`_\n- `Comprehensive documentation and examples \u003C#working-with-ptb>`_\n\nInstalling\n----------\n\nYou can install or upgrade ``python-telegram-bot`` via\n\n.. code:: shell\n\n    $ pip install python-telegram-bot --upgrade\n\nTo install a pre-release, use the ``--pre`` `flag \u003Chttps:\u002F\u002Fpip.pypa.io\u002Fen\u002Fstable\u002Fcli\u002Fpip_install\u002F#cmdoption-pre>`_ in addition.\n\nYou can also install ``python-telegram-bot`` from source, though this is usually not necessary.\n\n.. code:: shell\n\n    $ git clone https:\u002F\u002Fgithub.com\u002Fpython-telegram-bot\u002Fpython-telegram-bot\n    $ cd python-telegram-bot\n    $ pip install build\n    $ python -m build\n\nYou can also use your favored package manager (such as ``uv``, ``hatch``, ``poetry``, etc.) instead of ``pip``.\n\nVerifying Releases\n~~~~~~~~~~~~~~~~~~\n\nTo enable you to verify that a release file that you downloaded was indeed provided by the ``python-telegram-bot`` team, we have taken the following measures.\n\nStarting with v21.4, all releases are signed via `sigstore \u003Chttps:\u002F\u002Fwww.sigstore.dev>`_.\nThe corresponding signature files are uploaded to the `GitHub releases page`_.\nTo verify the signature, please install the `sigstore Python client \u003Chttps:\u002F\u002Fpypi.org\u002Fproject\u002Fsigstore\u002F>`_ and follow the instructions for `verifying signatures from GitHub Actions \u003Chttps:\u002F\u002Fgithub.com\u002Fsigstore\u002Fsigstore-python?tab=readme-ov-file>`_. As input for the ``--repository`` parameter, please use the value ``python-telegram-bot\u002Fpython-telegram-bot``.\n\nEarlier releases are signed with a GPG key.\nThe signatures are uploaded to both the `GitHub releases page`_ and the `PyPI project \u003Chttps:\u002F\u002Fpypi.org\u002Fproject\u002Fpython-telegram-bot\u002F>`_ and end with a suffix ``.asc``.\nPlease find the public keys `here \u003Chttps:\u002F\u002Fgithub.com\u002Fpython-telegram-bot\u002Fpython-telegram-bot\u002Ftree\u002Fmaster\u002Fpublic_keys>`_.\nThe keys are named in the format ``\u003Cfirst_version>-\u003Clast_version>.gpg``.\n\nIn addition, the GitHub release page also contains the sha1 hashes of the release files in the files with the suffix ``.sha1``.\n\nDependencies & Their Versions\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n``python-telegram-bot`` tries to use as few 3rd party dependencies as possible.\nHowever, for some features using a 3rd party library is more sane than implementing the functionality again.\nAs these features are *optional*, the corresponding 3rd party dependencies are not installed by default.\nInstead, they are listed as optional dependencies.\nThis allows to avoid unnecessary dependency conflicts for users who don't need the optional features.\n\nThe only required dependency is `httpx >=0.27,\u003C0.29 \u003Chttps:\u002F\u002Fwww.python-httpx.org>`_ for\n``telegram.request.HTTPXRequest``, the default networking backend.\n\n``python-telegram-bot`` is most useful when used along with additional libraries.\nTo minimize dependency conflicts, we try to be liberal in terms of version requirements on the (optional) dependencies.\nOn the other hand, we have to ensure stability of ``python-telegram-bot``, which is why we do apply version bounds.\nIf you encounter dependency conflicts due to these bounds, feel free to reach out.\n\nOptional Dependencies\n#####################\n\nPTB can be installed with optional dependencies:\n\n* ``pip install \"python-telegram-bot[passport]\"`` installs the `cryptography>=39.0.1 \u003Chttps:\u002F\u002Fcryptography.io\u002Fen\u002Fstable>`_ library. Use this, if you want to use Telegram Passport related functionality.\n* ``pip install \"python-telegram-bot[socks]\"`` installs `httpx[socks] \u003Chttps:\u002F\u002Fwww.python-httpx.org\u002F#dependencies>`_. Use this, if you want to work behind a Socks5 server.\n* ``pip install \"python-telegram-bot[http2]\"`` installs `httpx[http2] \u003Chttps:\u002F\u002Fwww.python-httpx.org\u002F#dependencies>`_. Use this, if you want to use HTTP\u002F2.\n* ``pip install \"python-telegram-bot[rate-limiter]\"`` installs `aiolimiter~=1.1,\u003C1.3 \u003Chttps:\u002F\u002Faiolimiter.readthedocs.io\u002Fen\u002Fstable\u002F>`_. Use this, if you want to use ``telegram.ext.AIORateLimiter``.\n* ``pip install \"python-telegram-bot[webhooks]\"`` installs the `tornado~=6.4 \u003Chttps:\u002F\u002Fwww.tornadoweb.org\u002Fen\u002Fstable\u002F>`_ library. Use this, if you want to use ``telegram.ext.Updater.start_webhook``\u002F``telegram.ext.Application.run_webhook``.\n* ``pip install \"python-telegram-bot[callback-data]\"`` installs the `cachetools>=5.3.3,\u003C6.3.0 \u003Chttps:\u002F\u002Fcachetools.readthedocs.io\u002Fen\u002Flatest\u002F>`_ library. Use this, if you want to use `arbitrary callback_data \u003Chttps:\u002F\u002Fgithub.com\u002Fpython-telegram-bot\u002Fpython-telegram-bot\u002Fwiki\u002FArbitrary-callback_data>`_.\n* ``pip install \"python-telegram-bot[job-queue]\"`` installs the `APScheduler>=3.10.4,\u003C3.12.0 \u003Chttps:\u002F\u002Fapscheduler.readthedocs.io\u002Fen\u002F3.x\u002F>`_ library. Use this, if you want to use the ``telegram.ext.JobQueue``.\n\nTo install multiple optional dependencies, separate them by commas, e.g. ``pip install \"python-telegram-bot[socks,webhooks]\"``.\n\nAdditionally, two shortcuts are provided:\n\n* ``pip install \"python-telegram-bot[all]\"`` installs all optional dependencies.\n* ``pip install \"python-telegram-bot[ext]\"`` installs all optional dependencies that are related to ``telegram.ext``, i.e. ``[rate-limiter, webhooks, callback-data, job-queue]``.\n\nWorking with PTB\n----------------\n\nOnce you have installed the library, you can begin working with it - so let's get started!\n\nQuick Start\n~~~~~~~~~~~\n\nOur Wiki contains an `Introduction to the API \u003Chttps:\u002F\u002Fgithub.com\u002Fpython-telegram-bot\u002Fpython-telegram-bot\u002Fwiki\u002FIntroduction-to-the-API>`_ explaining how the pure Bot API can be accessed via ``python-telegram-bot``.\nMoreover, the `Tutorial: Your first Bot \u003Chttps:\u002F\u002Fgithub.com\u002Fpython-telegram-bot\u002Fpython-telegram-bot\u002Fwiki\u002FExtensions---Your-first-Bot>`_ gives an introduction on how chatbots can be easily programmed with the help of the ``telegram.ext`` module.\n\nResources\n~~~~~~~~~\n\n- The `package documentation \u003Chttps:\u002F\u002Fdocs.python-telegram-bot.org\u002F>`_ is the technical reference for ``python-telegram-bot``.\n  It contains descriptions of all available classes, modules, methods and arguments as well as the `changelog \u003Chttps:\u002F\u002Fdocs.python-telegram-bot.org\u002Fchangelog.html>`_.\n- The `wiki \u003Chttps:\u002F\u002Fgithub.com\u002Fpython-telegram-bot\u002Fpython-telegram-bot\u002Fwiki\u002F>`_ is home to number of more elaborate introductions of the different features of ``python-telegram-bot`` and other useful resources that go beyond the technical documentation.\n- Our `examples section \u003Chttps:\u002F\u002Fdocs.python-telegram-bot.org\u002Fexamples.html>`_ contains several examples that showcase the different features of both the Bot API and ``python-telegram-bot``.\n  Even if it is not your approach for learning, please take a look at ``echobot.py``. It is the de facto base for most of the bots out there.\n  The code for these examples is released to the public domain, so you can start by grabbing the code and building on top of it.\n- The `official Telegram Bot API documentation \u003Chttps:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi>`_ is of course always worth a read.\n\nGetting help\n~~~~~~~~~~~~\n\nIf the resources mentioned above don't answer your questions or simply overwhelm you, there are several ways of getting help.\n\n1. We have a vibrant community of developers helping each other in our `Telegram group \u003Chttps:\u002F\u002Ftelegram.me\u002Fpythontelegrambotgroup>`_. Join us! Asking a question here is often the quickest way to get a pointer in the right direction.\n\n2. Ask questions by opening `a discussion \u003Chttps:\u002F\u002Fgithub.com\u002Fpython-telegram-bot\u002Fpython-telegram-bot\u002Fdiscussions\u002Fnew>`_.\n\n3. You can even ask for help on Stack Overflow using the `python-telegram-bot tag \u003Chttps:\u002F\u002Fstackoverflow.com\u002Fquestions\u002Ftagged\u002Fpython-telegram-bot>`_.\n\nConcurrency\n~~~~~~~~~~~\n\nSince v20.0, ``python-telegram-bot`` is built on top of Pythons ``asyncio`` module.\nBecause ``asyncio`` is in general single-threaded, ``python-telegram-bot`` currently does not aim to be thread-safe.\nNoteworthy parts of ``python-telegram-bots`` API that are likely to cause issues (e.g. race conditions) when used in a multi-threaded setting include:\n\n* ``telegram.ext.Application\u002FUpdater.update_queue``\n* ``telegram.ext.ConversationHandler.check\u002Fhandle_update``\n* ``telegram.ext.CallbackDataCache``\n* ``telegram.ext.BasePersistence``\n* all classes in the ``telegram.ext.filters`` module that allow to add\u002Fremove allowed users\u002Fchats at runtime\n\nFree threading\n~~~~~~~~~~~~~~\n\nWhile ``python-telegram-bot`` is tested to work with Python 3.14 free threading, we do not guarantee that\nPTB is thread-safe for all use cases. Please see issue `#4873 \u003Chttps:\u002F\u002Fgithub.com\u002Fpython-telegram-bot\u002Fpython-telegram-bot\u002Fissues\u002F4873>`_ for more information.\n\nContributing\n------------\n\nContributions of all sizes are welcome.\nPlease review our `contribution guidelines \u003Chttps:\u002F\u002Fgithub.com\u002Fpython-telegram-bot\u002Fpython-telegram-bot\u002Fblob\u002Fmaster\u002F.github\u002FCONTRIBUTING.rst>`_ to get started.\nYou can also help by `reporting bugs or feature requests \u003Chttps:\u002F\u002Fgithub.com\u002Fpython-telegram-bot\u002Fpython-telegram-bot\u002Fissues\u002Fnew\u002Fchoose>`_.\n\nDonating\n--------\nOccasionally we are asked if we accept donations to support the development.\nWhile we appreciate the thought, maintaining PTB is our hobby, and we have almost no running costs for it. We therefore have nothing set up to accept donations.\nIf you still want to donate, we kindly ask you to donate to another open source project\u002Finitiative of your choice instead.\n\nLicense\n-------\n\nYou may copy, distribute and modify the software provided that modifications are described and licensed for free under `LGPL-3 \u003Chttps:\u002F\u002Fwww.gnu.org\u002Flicenses\u002Flgpl-3.0.html>`_.\nDerivative works (including modifications or anything statically linked to the library) can only be redistributed under LGPL-3, but applications that use the library don't have to be.\n\n.. _`GitHub releases page`: https:\u002F\u002Fgithub.com\u002Fpython-telegram-bot\u002Fpython-telegram-bot\u002Freleases\n",".. image:: https:\u002F\u002Fraw.githubusercontent.com\u002Fpython-telegram-bot\u002Flogos\u002Fmaster\u002Flogo-text\u002Fpng\u002Fptb-logo-text_768.png\n   :align: center\n   :target: https:\u002F\u002Fpython-telegram-bot.org\n   :alt: python-telegram-bot 标志\n\n.. image:: https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fv\u002Fpython-telegram-bot.svg\n   :target: https:\u002F\u002Fpypi.org\u002Fproject\u002Fpython-telegram-bot\u002F\n   :alt: PyPI 包版本\n\n.. image:: https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fpyversions\u002Fpython-telegram-bot.svg\n   :target: https:\u002F\u002Fpypi.org\u002Fproject\u002Fpython-telegram-bot\u002F\n   :alt: 支持的 Python 版本\n\n.. image:: https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FBot%20API-9.5-blue?logo=telegram\n   :target: https:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi-changelog\n   :alt: 支持的 Bot API 版本\n\n.. image:: https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fdm\u002Fpython-telegram-bot\n   :target: https:\u002F\u002Fpypistats.org\u002Fpackages\u002Fpython-telegram-bot\n   :alt: PyPI 包月下载量\n\n.. image:: https:\u002F\u002Fapp.readthedocs.org\u002Fprojects\u002Fpython-telegram-bot\u002Fbadge\u002F?version=stable\n   :target: https:\u002F\u002Fdocs.python-telegram-bot.org\u002Fen\u002Fstable\u002F\n   :alt: 文档状态\n\n.. image:: https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fl\u002Fpython-telegram-bot.svg\n   :target: https:\u002F\u002Fwww.gnu.org\u002Flicenses\u002Flgpl-3.0.html\n   :alt: LGPLv3 许可证\n\n.. image:: https:\u002F\u002Fgithub.com\u002Fpython-telegram-bot\u002Fpython-telegram-bot\u002Factions\u002Fworkflows\u002Funit_tests.yml\u002Fbadge.svg?branch=master\n   :target: https:\u002F\u002Fgithub.com\u002Fpython-telegram-bot\u002Fpython-telegram-bot\u002F\n   :alt: Github Actions 工作流\n\n.. image:: https:\u002F\u002Fcodecov.io\u002Fgh\u002Fpython-telegram-bot\u002Fpython-telegram-bot\u002Fbranch\u002Fmaster\u002Fgraph\u002Fbadge.svg\n   :target: https:\u002F\u002Fapp.codecov.io\u002Fgh\u002Fpython-telegram-bot\u002Fpython-telegram-bot\n   :alt: 代码覆盖率\n\n.. image:: https:\u002F\u002Fisitmaintained.com\u002Fbadge\u002Fresolution\u002Fpython-telegram-bot\u002Fpython-telegram-bot.svg\n   :target: https:\u002F\u002Fisitmaintained.com\u002Fproject\u002Fpython-telegram-bot\u002Fpython-telegram-bot\n   :alt: 解决问题的中位时间\n\n.. image:: https:\u002F\u002Fapi.codacy.com\u002Fproject\u002Fbadge\u002FGrade\u002F99d901eaa09b44b4819aec05c330c968\n   :target: https:\u002F\u002Fapp.codacy.com\u002Fgh\u002Fpython-telegram-bot\u002Fpython-telegram-bot\u002Fdashboard\n   :alt: 代码质量：Codacy\n\n.. image:: https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fcode%20style-black-000000.svg\n   :target: https:\u002F\u002Fgithub.com\u002Fpsf\u002Fblack\n   :alt: 代码风格：Black\n\n.. image:: https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FTelegram-Channel-blue.svg?logo=telegram\n   :target: https:\u002F\u002Ft.me\u002Fpythontelegrambotchannel\n   :alt: Telegram 频道\n\n.. image:: https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FTelegram-Group-blue.svg?logo=telegram\n   :target: https:\u002F\u002Ftelegram.me\u002Fpythontelegrambotgroup\n   :alt: Telegram 群组\n\n我们为你打造了一个你无法拒绝的封装库。\n\n我们在 `Telegram 群组 \u003Chttps:\u002F\u002Ftelegram.me\u002Fpythontelegrambotgroup>`_ 中拥有一个充满活力的开发者社区，大家互相帮助。快来加入我们吧！\n\n*请关注我们的* `Telegram 频道 \u003Chttps:\u002F\u002Ftelegram.me\u002Fpythontelegrambotchannel>`_ *，以获取库的更新和新版本发布信息。*\n\n简介\n----\n\n本库为 `Telegram Bot API \u003Chttps:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi>`_ 提供了一个纯 Python 的异步接口。\n它兼容 Python **3.10 及以上**版本。\n\n除了纯 API 实现之外，本库还提供了一些便捷方法和快捷方式，以及多个高级类，使机器人开发变得简单直接。这些类包含在 ``telegram.ext`` 子模块中。\n\n安装_ 本库后，请务必查看关于 `使用 PTB`_ 的部分。\n\nTelegram API 支持\n~~~~~~~~~~~~~~~~~~\n\n本库原生支持 Telegram Bot API **9.5** 的所有类型和方法。\n此外，尚未原生包含的 Bot API 功能仍可按照 `我们的维基 \u003Chttps:\u002F\u002Fgithub.com\u002Fpython-telegram-bot\u002Fpython-telegram-bot\u002Fwiki\u002FBot-API-Forward-Compatibility>`_ 中的说明使用。\n\n显著特性\n~~~~~~~~\n\n- `完全异步 \u003Chttps:\u002F\u002Fgithub.com\u002Fpython-telegram-bot\u002Fpython-telegram-bot\u002Fwiki\u002FConcurrency>`_\n- 方便的快捷方法，例如 `Message.reply_text \u003Chttps:\u002F\u002Fdocs.python-telegram-bot.org\u002Fen\u002Fstable\u002Ftelegram.message.html#telegram.Message.reply_text>`_\n- `完全标注了静态类型提示 \u003Chttps:\u002F\u002Fgithub.com\u002Fpython-telegram-bot\u002Fpython-telegram-bot\u002Fwiki\u002FType-Checking>`_\n- `可定制且可扩展的接口 \u003Chttps:\u002F\u002Fgithub.com\u002Fpython-telegram-bot\u002Fpython-telegram-bot\u002Fwiki\u002FArchitecture>`_\n- 与 `webhook \u003Chttps:\u002F\u002Fgithub.com\u002Fpython-telegram-bot\u002Fpython-telegram-bot\u002Fwiki\u002FWebhooks>`_ 和 `轮询 \u003Chttps:\u002F\u002Fdocs.python-telegram-bot.org\u002Fen\u002Fstable\u002Ftelegram.ext.application.html#telegram.ext.Application.run_polling>`_ 的无缝集成\n- `全面的文档和示例 \u003C#working-with-ptb>`_\n\n安装\n----\n\n你可以通过以下命令安装或升级 ``python-telegram-bot``：\n\n.. code:: shell\n\n    $ pip install python-telegram-bot --upgrade\n\n若要安装预发布版本，还需添加 `--pre` 标志 `\u003Chttps:\u002F\u002Fpip.pypa.io\u002Fen\u002Fstable\u002Fcli\u002Fpip_install\u002F#cmdoption-pre>`_。\n\n你也可以从源码安装 ``python-telegram-bot``，不过通常情况下并不需要这样做。\n\n.. code:: shell\n\n    $ git clone https:\u002F\u002Fgithub.com\u002Fpython-telegram-bot\u002Fpython-telegram-bot\n    $ cd python-telegram-bot\n    $ pip install build\n    $ python -m build\n\n你还可以使用你喜欢的包管理工具（如 ``uv``、``hatch``、``poetry`` 等）代替 ``pip``。\n\n验证发布版本\n~~~~~~~~~~~~~\n\n为了让你能够确认所下载的发布文件确实是由 ``python-telegram-bot`` 团队提供的，我们采取了以下措施。\n\n自 v21.4 起，所有发布版本均通过 `sigstore \u003Chttps:\u002F\u002Fwww.sigstore.dev>`_ 进行签名。\n相应的签名文件已上传至 `GitHub 发布页面`_。\n要验证签名，请安装 `sigstore Python 客户端 \u003Chttps:\u002F\u002Fpypi.org\u002Fproject\u002Fsigstore\u002F>`_，并按照 `从 GitHub Actions 验证签名 \u003Chttps:\u002F\u002Fgithub.com\u002Fsigstore\u002Fsigstore-python?tab=readme-ov-file>`_ 的说明操作。\n请将 ``--repository`` 参数设置为值 ``python-telegram-bot\u002Fpython-telegram-bot``。\n\n较早的发布版本则使用 GPG 密钥进行签名。\n签名文件同时上传至 `GitHub 发布页面`_ 和 `PyPI 项目 \u003Chttps:\u002F\u002Fpypi.org\u002Fproject\u002Fpython-telegram-bot\u002F>`_，文件名以 ``.asc`` 结尾。\n公钥可在 `这里 \u003Chttps:\u002F\u002Fgithub.com\u002Fpython-telegram-bot\u002Fpython-telegram-bot\u002Ftree\u002Fmaster\u002Fpublic_keys>`_ 找到。\n密钥按格式命名：``\u003Cfirst_version>-\u003Clast_version>.gpg``。\n\n此外，GitHub 发布页面还包含发布文件的 sha1 哈希值，文件名为 ``.sha1``。\n\n依赖项及其版本\n~~~~~~~~~~~~~~~~~~\n\n``python-telegram-bot`` 尽量减少对第三方依赖的使用。\n然而，对于某些功能来说，使用第三方库比重新实现这些功能更为合理。\n由于这些功能是*可选的*，相应的第三方依赖不会被默认安装。\n相反，它们被列为可选依赖。\n这样可以避免那些不需要这些可选功能的用户遇到不必要的依赖冲突。\n\n唯一的必需依赖是 `httpx >=0.27,\u003C0.29 \u003Chttps:\u002F\u002Fwww.python-httpx.org>`_，用于默认的网络后端 ``telegram.request.HTTPXRequest``。\n\n``python-telegram-bot`` 在与其他库结合使用时最为有用。\n为了尽量减少依赖冲突，我们在（可选）依赖的版本要求上采取较为宽松的态度。\n另一方面，我们又必须确保 ``python-telegram-bot`` 的稳定性，因此还是会施加版本限制。\n如果您因这些版本限制而遇到依赖冲突，请随时联系我们。\n\n可选依赖\n#####################\n\nPTB 可以在安装时包含可选依赖：\n\n* ``pip install \"python-telegram-bot[passport]\"`` 会安装 `cryptography>=39.0.1 \u003Chttps:\u002F\u002Fcryptography.io\u002Fen\u002Fstable>`_ 库。如果您想使用与 Telegram Passport 相关的功能，请使用此选项。\n* ``pip install \"python-telegram-bot[socks]\"`` 会安装 `httpx[socks] \u003Chttps:\u002F\u002Fwww.python-httpx.org\u002F#dependencies>`_。如果您需要通过 Socks5 代理服务器工作，请使用此选项。\n* ``pip install \"python-telegram-bot[http2]\"`` 会安装 `httpx[http2] \u003Chttps:\u002F\u002Fwww.python-httpx.org\u002F#dependencies>`_。如果您想使用 HTTP\u002F2 协议，请使用此选项。\n* ``pip install \"python-telegram-bot[rate-limiter]\"`` 会安装 `aiolimiter~=1.1,\u003C1.3 \u003Chttps:\u002F\u002Faiolimiter.readthedocs.io\u002Fen\u002Fstable\u002F>`_ 库。如果您想使用 ``telegram.ext.AIORateLimiter``，请使用此选项。\n* ``pip install \"python-telegram-bot[webhooks]\"`` 会安装 `tornado~=6.4 \u003Chttps:\u002F\u002Fwww.tornadoweb.org\u002Fen\u002Fstable\u002F>`_ 库。如果您想使用 ``telegram.ext.Updater.start_webhook`` 或 ``telegram.ext.Application.run_webhook``，请使用此选项。\n* ``pip install \"python-telegram-bot[callback-data]\"`` 会安装 `cachetools>=5.3.3,\u003C6.3.0 \u003Chttps:\u002F\u002Fcachetools.readthedocs.io\u002Fen\u002Flatest\u002F>`_ 库。如果您想使用 `任意回调数据 \u003Chttps:\u002F\u002Fgithub.com\u002Fpython-telegram-bot\u002Fpython-telegram-bot\u002Fwiki\u002FArbitrary-callback_data>`_，请使用此选项。\n* ``pip install \"python-telegram-bot[job-queue]\"`` 会安装 `APScheduler>=3.10.4,\u003C3.12.0 \u003Chttps:\u002F\u002Fapscheduler.readthedocs.io\u002Fen\u002F3.x\u002F>`_ 库。如果您想使用 ``telegram.ext.JobQueue``，请使用此选项。\n\n若要安装多个可选依赖，可以用逗号分隔它们，例如 ``pip install \"python-telegram-bot[socks,webhooks]\"``。\n\n此外，还提供了两个快捷方式：\n\n* ``pip install \"python-telegram-bot[all]\"`` 会安装所有可选依赖。\n* ``pip install \"python-telegram-bot[ext]\"`` 会安装所有与 ``telegram.ext`` 相关的可选依赖，即 ``[rate-limiter, webhooks, callback-data, job-queue]``。\n\n使用 PTB\n----------------\n\n一旦您安装了该库，就可以开始使用它了——让我们马上开始吧！\n\n快速入门\n~~~~~~~~~~~\n\n我们的维基中有一篇 `API 简介 \u003Chttps:\u002F\u002Fgithub.com\u002Fpython-telegram-bot\u002Fpython-telegram-bot\u002Fwiki\u002FIntroduction-to-the-API>`_，解释了如何通过 ``python-telegram-bot`` 访问纯 Bot API。\n此外，`教程：您的第一个机器人 \u003Chttps:\u002F\u002Fgithub.com\u002Fpython-telegram-bot\u002Fpython-telegram-bot\u002Fwiki\u002FExtensions---Your-first-Bot>`_ 提供了关于如何借助 ``telegram.ext`` 模块轻松编写聊天机器人的介绍。\n\n资源\n~~~~~~~~~\n\n- `软件包文档 \u003Chttps:\u002F\u002Fdocs.python-telegram-bot.org\u002F>`_ 是 ``python-telegram-bot`` 的技术参考。\n  其中包含了所有可用类、模块、方法和参数的描述，以及 `变更日志 \u003Chttps:\u002F\u002Fdocs.python-telegram-bot.org\u002Fchangelog.html>`_。\n- `维基 \u003Chttps:\u002F\u002Fgithub.com\u002Fpython-telegram-bot\u002Fpython-telegram-bot\u002Fwiki\u002F>`_ 包含了许多关于 ``python-telegram-bot`` 各种功能的详细介绍以及其他超出技术文档范围的实用资源。\n- 我们的 `示例部分 \u003Chttps:\u002F\u002Fdocs.python-telegram-bot.org\u002Fexamples.html>`_ 中包含多个示例，展示了 Bot API 和 ``python-telegram-bot`` 的各种特性。\n  即使这不是您的学习方式，也请务必看看 ``echobot.py``。它是市面上大多数机器人的事实上的基础代码。\n  这些示例的代码已发布到公有领域，您可以直接获取并在此基础上进行开发。\n- 当然，`官方 Telegram Bot API 文档 \u003Chttps:\u002F\u002Fcore.telegram.org\u002Fbots\u002Fapi>`_ 也始终值得一读。\n\n寻求帮助\n~~~~~~~~~~~~\n\n如果上述资源未能解答您的问题，或者让您感到不知所措，您可以通过多种方式获得帮助。\n\n1. 我们有一个活跃的开发者社区，在 `Telegram 群组 \u003Chttps:\u002F\u002Ftelegram.me\u002Fpythontelegrambotgroup>`_ 中互相帮助。欢迎加入！在这里提问通常是获得正确方向指引的最快方式。\n\n2. 您可以通过打开 `讨论 \u003Chttps:\u002F\u002Fgithub.com\u002Fpython-telegram-bot\u002Fpython-telegram-bot\u002Fdiscussions\u002Fnew>`_ 来提问。\n\n3. 您还可以在 Stack Overflow 上使用 `python-telegram-bot 标签 \u003Chttps:\u002F\u002Fstackoverflow.com\u002Fquestions\u002Ftagged\u002Fpython-telegram-bot>`_ 寻求帮助。\n\n并发处理\n~~~~~~~~~~~\n\n自 v20.0 起，``python-telegram-bot`` 构建在 Python 的 ``asyncio`` 模块之上。\n由于 ``asyncio`` 通常是单线程的，因此 ``python-telegram-bot`` 目前并不追求线程安全。\n以下是一些在多线程环境中使用时可能引发问题（例如竞态条件）的 ``python-telegram-bot`` API 部分：\n\n* ``telegram.ext.Application\u002FUpdater.update_queue``\n* ``telegram.ext.ConversationHandler.check\u002Fhandle_update``\n* ``telegram.ext.CallbackDataCache``\n* ``telegram.ext.BasePersistence``\n* ``telegram.ext.filters`` 模块中的所有类，这些类允许在运行时添加或移除允许的用户\u002F聊天\n\n自由线程\n~~~~~~~~~~~~~~\n\n尽管 ``python-telegram-bot`` 已被测试可在 Python 3.14 的自由线程环境下正常工作，但我们并不能保证 PTB 在所有使用场景下都是线程安全的。更多信息请参阅议题 `#4873 \u003Chttps:\u002F\u002Fgithub.com\u002Fpython-telegram-bot\u002Fpython-telegram-bot\u002Fissues\u002F4873>`_。\n\n贡献\n------------\n\n我们欢迎任何形式的贡献。\n请查看我们的 `贡献指南 \u003Chttps:\u002F\u002Fgithub.com\u002Fpython-telegram-bot\u002Fpython-telegram-bot\u002Fblob\u002Fmaster\u002F.github\u002FCONTRIBUTING.rst>`_ 以开始贡献。\n您也可以通过 `报告 bug 或提出功能请求 \u003Chttps:\u002F\u002Fgithub.com\u002Fpython-telegram-bot\u002Fpython-telegram-bot\u002Fissues\u002Fnew\u002Fchoose>`_ 来提供帮助。\n\n捐赠\n--------\n有时我们会收到关于是否接受捐赠以支持开发的询问。\n虽然我们非常感谢您的好意，但维护 PTB 只是我们的业余爱好，几乎没有运营成本。因此，我们目前并没有设立任何接收捐赠的渠道。\n如果您仍然希望捐赠，恳请您考虑向您选择的其他开源项目或倡议进行捐赠。\n\n许可证\n-------\n\n您可以复制、分发和修改本软件，但前提是必须说明所做的修改，并且这些修改必须以 `LGPL-3 \u003Chttps:\u002F\u002Fwww.gnu.org\u002Flicenses\u002Flgpl-3.0.html>`_ 许可证免费授权。\n衍生作品（包括修改后的版本或与该库静态链接的任何内容）只能根据 LGPL-3 许可证重新分发，但使用该库的应用程序则无需遵循此许可。\n\n.. _`GitHub 发布页面`: https:\u002F\u002Fgithub.com\u002Fpython-telegram-bot\u002Fpython-telegram-bot\u002Freleases","# python-telegram-bot 快速上手指南\n\n`python-telegram-bot` 是一个纯 Python 编写的异步库，用于轻松开发 Telegram 机器人。它完美支持 Telegram Bot API 9.5+，并提供丰富的高级功能让开发更简单。\n\n## 环境准备\n\n*   **操作系统**：Linux, macOS, Windows 均支持。\n*   **Python 版本**：需要 **Python 3.10** 或更高版本。\n*   **前置依赖**：\n    *   需预先安装 `pip` 包管理工具。\n    *   核心依赖 `httpx` 会在安装时自动处理。\n    *   （可选）如需使用定时任务、Webhook 或 SOCKS 代理等功能，需在安装时指定额外依赖（见安装步骤）。\n\n## 安装步骤\n\n### 1. 基础安装\n使用 pip 安装最新稳定版：\n\n```bash\npip install python-telegram-bot --upgrade\n```\n\n> **国内开发者提示**：如果遇到网络下载缓慢，推荐使用国内镜像源加速：\n> ```bash\n> pip install python-telegram-bot --upgrade -i https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple\n> ```\n\n### 2. 安装可选功能\n根据需求安装特定功能模块（多个功能可用逗号分隔）：\n\n*   **定时任务 (JobQueue)**:\n    ```bash\n    pip install \"python-telegram-bot[job-queue]\"\n    ```\n*   **Webhook 支持**:\n    ```bash\n    pip install \"python-telegram-bot[webhooks]\"\n    ```\n*   **SOCKS 代理支持**:\n    ```bash\n    pip install \"python-telegram-bot[socks]\"\n    ```\n*   **安装所有可选依赖**:\n    ```bash\n    pip install \"python-telegram-bot[all]\"\n    ```\n\n## 基本使用\n\n以下是最简单的回声机器人（Echo Bot）示例，它会回复你发送的任何消息。\n\n### 1. 获取 Token\n在 Telegram 中搜索 `@BotFather`，创建新机器人并获取 **API Token**。\n\n### 2. 编写代码\n创建文件 `bot.py`，填入以下内容（将 `\u003CYOUR_TOKEN>` 替换为你的实际 Token）：\n\n```python\nfrom telegram import Update\nfrom telegram.ext import ApplicationBuilder, ContextTypes, CommandHandler, MessageHandler, filters\n\nasync def start(update: Update, context: ContextTypes.DEFAULT_TYPE):\n    await update.message.reply_text('你好！我是你的第一个 Python 机器人。')\n\nasync def echo(update: Update, context: ContextTypes.DEFAULT_TYPE):\n    await update.message.reply_text(update.message.text)\n\nif __name__ == '__main__':\n    # 替换为你的 Bot Token\n    token = '\u003CYOUR_TOKEN>'\n    \n    application = ApplicationBuilder().token(token).build()\n    \n    # 注册命令处理器 (\u002Fstart)\n    application.add_handler(CommandHandler(\"start\", start))\n    \n    # 注册消息处理器 (回复所有非命令文本)\n    application.add_handler(MessageHandler(filters.TEXT & ~filters.COMMAND, echo))\n    \n    print(\"机器人正在运行...\")\n    # 启动轮询模式\n    application.run_polling(allowed_updates=Update.ALL_TYPES)\n```\n\n### 3. 运行机器人\n在终端执行：\n\n```bash\npython bot.py\n```\n\n现在，在 Telegram 中找到你的机器人并发送 `\u002Fstart` 或任意消息，即可看到回复。\n\n> **下一步建议**：访问 [官方文档](https:\u002F\u002Fdocs.python-telegram-bot.org\u002F) 或查看 [GitHub Wiki](https:\u002F\u002Fgithub.com\u002Fpython-telegram-bot\u002Fpython-telegram-bot\u002Fwiki) 学习更多高级用法（如内联键盘、回调数据等）。","某电商初创团队需要构建一个 24 小时在线的自动订单通知与客服机器人，以处理用户下单确认及基础咨询。\n\n### 没有 python-telegram-bot 时\n- 开发者必须手动构造复杂的 HTTP POST 请求来处理 Telegram Bot API 的底层通信，代码冗长且极易出错。\n- 缺乏原生的异步支持，高并发下处理大量用户消息时容易阻塞主线程，导致回复延迟甚至服务崩溃。\n- 需要自行编写大量样板代码来解析 JSON 更新（Updates）并维护对话状态，开发周期被无谓拉长。\n- 遇到 API 版本更新或特殊类型（如回调查询、内联键盘）时，需反复查阅官方文档并重新适配底层逻辑。\n\n### 使用 python-telegram-bot 后\n- 直接调用封装好的高级方法（如 `Message.reply_text`），几行代码即可实现安全的消息发送与接收。\n- 依托其全异步架构，轻松支撑数千用户同时发起咨询，确保订单通知毫秒级触达且不阻塞系统。\n- 利用 `telegram.ext` 模块中的上下文处理器和会话管理功能，快速构建多轮对话逻辑，大幅精简代码量。\n- 原生支持最新的 Bot API 9.5 标准，所有新特性开箱即用，团队可专注于业务逻辑而非底层适配。\n\npython-telegram-bot 将繁琐的协议对接转化为简洁的 Python 对象操作，让开发者能以最快速度交付稳定高效的智能机器人。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fpython-telegram-bot_python-telegram-bot_9667d2c4.png","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Fpython-telegram-bot_2d50a250.png","",null,"devs@python-telegram-bot.org","https:\u002F\u002Fpython-telegram-bot.org\u002F","https:\u002F\u002Fgithub.com\u002Fpython-telegram-bot",[80,84,88],{"name":81,"color":82,"percentage":83},"Python","#3572A5",100,{"name":85,"color":86,"percentage":87},"Makefile","#427819",0,{"name":89,"color":90,"percentage":87},"Shell","#89e051",29035,6023,"2026-04-19T12:07:48","GPL-3.0",1,"不需要 GPU","未说明",{"notes":99,"python":100,"dependencies":101},"该库为纯 Python 异步接口，无操作系统限制。核心依赖仅为 httpx。其他功能（如 Passport、SOCKS 代理、HTTP\u002F2、限流器、Webhooks、回调数据缓存、定时任务队列）需安装对应的可选依赖包。若使用 Webhooks 功能需安装 tornado，使用定时任务需安装 APScheduler。","3.10+",[102],"httpx>=0.27,\u003C0.29",[35,104,14],"其他",[106,107,108,109,110],"python","telegram","bot","chatbot","framework","2026-03-27T02:49:30.150509","2026-04-20T04:04:14.150368",[114,119,124,129,134,139],{"id":115,"question_zh":116,"answer_zh":117,"source_url":118},43867,"如何在 IDE 中获得完整的类型提示（Type-hinting）支持？","项目已集成 PEP-484 标准的类型提示。如果您在使用旧版本，建议升级到最新版本以获得原生支持。对于自定义类型检查，可以使用 `# type: Message` 注释来辅助 IDE 识别变量类型。此外，社区曾建议使用 `pyannotate` 工具自动生成类型信息，但目前官方代码库已直接包含类型注解，无需额外配置 stub 文件。","https:\u002F\u002Fgithub.com\u002Fpython-telegram-bot\u002Fpython-telegram-bot\u002Fissues\u002F1373",{"id":120,"question_zh":121,"answer_zh":122,"source_url":123},43868,"使用 SOCKS 代理时出现 NetworkError 错误怎么办？","这是一个已修复的问题。在旧版本中，通过 `Request` 类配置 SOCKS 代理时，如果同时传递 `username` 和 `password` 到 `urllib3_proxy_kwargs` 可能会导致连接失败。解决方案是确保您使用的是最新版本的 `python-telegram-bot`，该版本已修复了与 `urllib3` 的兼容性问题。如果必须使用旧版本，请尝试仅通过 `proxy_url` 传递认证信息（格式：`socks5:\u002F\u002Fuser:pass@host:port\u002F`），或者升级库以获取稳定的代理支持。","https:\u002F\u002Fgithub.com\u002Fpython-telegram-bot\u002Fpython-telegram-bot\u002Fissues\u002F1077",{"id":125,"question_zh":126,"answer_zh":127,"source_url":128},43869,"如何检测消息中是否提及（Mention）了机器人？","您可以使用库中内置的过滤器来实现。具体逻辑是检查消息实体中是否包含 `MessageEntityType.MENTION` 类型，并验证该提及的用户名是否为当前机器人的用户名。在新版本中，官方可能已经添加了专门的过滤器（如 `filters.Mention` 或类似功能）。如果没有内置过滤器，可以手动实现：遍历 `message.entities`，找到类型为 `mention` 的实体，提取文本并与 `bot.username` 进行比对。","https:\u002F\u002Fgithub.com\u002Fpython-telegram-bot\u002Fpython-telegram-bot\u002Fissues\u002F3799",{"id":130,"question_zh":131,"answer_zh":132,"source_url":133},43870,"如何为 Chat 对象生成 HTML 或 Markdown 格式的提及链接？","可以参考 `User` 类中的 `mention_html` 和 `mention_markdown` 方法实现类似功能。对于 `Chat` 对象，逻辑是使用聊天标题（title）或“名 + 姓”作为显示文本，链接格式通常为 `tg:\u002F\u002Fresolve?domain=xxx` 或直接使用聊天 ID。如果您需要自定义链接前缀（例如使用 `https:\u002F\u002Ft.me\u002F` 而不是 `tg:\u002F\u002F`），目前标准属性可能不支持直接修改前缀，建议在调用时手动构建字符串或使用辅助函数：`mention_html(chat_id, name, prefix=\"https:\u002F\u002Ft.me\u002F\")`。","https:\u002F\u002Fgithub.com\u002Fpython-telegram-bot\u002Fpython-telegram-bot\u002Fissues\u002F3216",{"id":135,"question_zh":136,"answer_zh":137,"source_url":138},43871,"网络波动后机器人停止响应如何处理？","当网络中断恢复后，机器人可能因连接超时或会话状态异常而停止响应。解决方法包括：1. 确保使用的是最新版本的库，其中包含了更好的重连机制；2. 在启动 Bot 时配置合理的 `read_timeout` 和 `connect_timeout` 参数；3. 如果是长轮询（Long Polling）模式，捕获 `NetworkError` 异常并在循环中自动重启监听；4. 考虑使用 Webhook 模式代替长轮询，以减少对持久连接的依赖。","https:\u002F\u002Fgithub.com\u002Fpython-telegram-bot\u002Fpython-telegram-bot\u002Fissues\u002F510",{"id":140,"question_zh":141,"answer_zh":142,"source_url":143},43872,"在重构 InputMedia 子类时遇到类型注解测试失败怎么办？","如果在开发过程中遇到 `check_shortcut_signature` 测试失败，且错误涉及 `typing._UnionGenericAlias`，通常是因为类型注解的写法与测试脚本的预期不符。解决方案是将 `api_kwargs` 等参数明确注解为 `JSONDict`（即 `Dict[str, Any]` 的别名）。如果测试仍然失败且暂时无法修复，可以在测试函数上添加 `@pytest.xfail` 装饰器标记为预期失败，先提交主要功能代码，后续再专门修复类型检查问题。","https:\u002F\u002Fgithub.com\u002Fpython-telegram-bot\u002Fpython-telegram-bot\u002Fissues\u002F2573",[145,150,155,160,165,170,175,180,185,190,195,200,205,210,215,220,225,230,235,240],{"id":146,"version":147,"summary_zh":148,"released_at":149},351294,"v22.7","\u003Cb>我们刚刚发布了 v22.7\u003C\u002Fb>。\n感谢所有为本次发布做出贡献的开发者。\n与往常一样，请使用 \u003Ccode>pip install -U python-telegram-bot\u003C\u002Fcode> 进行升级。\n发行说明请见 \u003Ca href=\"https:\u002F\u002Fdocs.python-telegram-bot.org\u002Fen\u002Fv22.7\u002Fchangelog.html\">此处\u003C\u002Fa>。","2026-03-16T09:36:38",{"id":151,"version":152,"summary_zh":153,"released_at":154},351295,"v22.6","\u003Cb>我们刚刚发布了 v22.6\u003C\u002Fb>。\n感谢所有为本次发布做出贡献的开发者。\n和往常一样，使用 \u003Ccode>pip install -U python-telegram-bot\u003C\u002Fcode> 进行升级。\n发行说明请见 \u003Ca href=\"https:\u002F\u002Fdocs.python-telegram-bot.org\u002Fen\u002Fv22.6\u002Fchangelog.html\">此处\u003C\u002Fa>。","2026-01-24T13:57:34",{"id":156,"version":157,"summary_zh":158,"released_at":159},351296,"v22.5","\u003Cb>我们刚刚发布了 v22.5\u003C\u002Fb>。\n感谢所有为本次发布做出贡献的开发者。\n和往常一样，使用 \u003Ccode>pip install -U python-telegram-bot\u003C\u002Fcode> 进行升级。\n发行说明请见 \u003Ca href=\"https:\u002F\u002Fdocs.python-telegram-bot.org\u002Fen\u002Fv22.5\u002Fchangelog.html\">此处\u003C\u002Fa>。","2025-09-27T13:51:05",{"id":161,"version":162,"summary_zh":163,"released_at":164},351297,"v22.4","\u003Cb>我们刚刚发布了 v22.4\u003C\u002Fb>。\n感谢所有为本次发布做出贡献的开发者。\n和往常一样，使用 \u003Ccode>pip install -U python-telegram-bot\u003C\u002Fcode> 进行升级。\n发行说明请见 \u003Ca href=\"https:\u002F\u002Fdocs.python-telegram-bot.org\u002Fen\u002Fv22.4\u002Fchangelog.html\">此处\u003C\u002Fa>。","2025-09-13T15:16:53",{"id":166,"version":167,"summary_zh":168,"released_at":169},351298,"v22.3","\u003Cb>我们刚刚发布了 v22.3\u003C\u002Fb>。\n感谢所有为本次发布做出贡献的开发者。\n与往常一样，使用 \u003Ccode>pip install -U python-telegram-bot\u003C\u002Fcode> 进行升级。\n发行说明请见 \u003Ca href=\"https:\u002F\u002Fdocs.python-telegram-bot.org\u002Fen\u002Fv22.3\u002Fchangelog.html\">此处\u003C\u002Fa>。","2025-07-20T20:03:56",{"id":171,"version":172,"summary_zh":173,"released_at":174},351299,"v22.2","\u003Cb>我们刚刚发布了 v22.2\u003C\u002Fb>。\n感谢所有为本次发布做出贡献的开发者。\n和往常一样，使用 \u003Ccode>pip install -U python-telegram-bot\u003C\u002Fcode> 进行升级。\n发行说明请见 \u003Ca href=\"https:\u002F\u002Fdocs.python-telegram-bot.org\u002Fen\u002Fv22.2\u002Fchangelog.html\">此处\u003C\u002Fa>。","2025-06-29T18:06:38",{"id":176,"version":177,"summary_zh":178,"released_at":179},351300,"v22.1","\u003Cb>我们刚刚发布了 v22.1\u003C\u002Fb>。\n感谢所有为本次发布做出贡献的开发者。\n和往常一样，使用 \u003Ccode>pip install -U python-telegram-bot\u003C\u002Fcode> 进行升级。\n发行说明请见 \u003Ca href=\"https:\u002F\u002Fdocs.python-telegram-bot.org\u002Fen\u002Fv22.1\u002Fchangelog.html\">此处\u003C\u002Fa>。","2025-05-15T20:21:56",{"id":181,"version":182,"summary_zh":183,"released_at":184},351301,"v22.0","\u003Cb>我们刚刚发布了 v22.0\u003C\u002Fb>。\n感谢所有为本次发布做出贡献的开发者。\n和往常一样，使用 \u003Ccode>pip install -U python-telegram-bot\u003C\u002Fcode> 进行升级。\n\n发行说明请见 \u003Ca href=\"https:\u002F\u002Fdocs.python-telegram-bot.org\u002Fen\u002Fv22.0\u002Fchangelog.html\">此处\u003C\u002Fa>。","2025-03-15T08:58:15",{"id":186,"version":187,"summary_zh":188,"released_at":189},351302,"v21.11.1","# 版本 21.11.1\n*发布日期：2025年3月1日*\n\n这是版本 21.11.1 的技术变更日志。更详细的发布说明可在新闻频道 [@pythontelegrambotchannel](https:\u002F\u002Ft.me\u002Fpythontelegrambotchannel) 中找到。\n\n## 文档改进\n- 修复 ReadTheDocs 构建问题 (#4695)","2025-03-01T11:47:38",{"id":191,"version":192,"summary_zh":193,"released_at":194},351303,"v21.11","# 版本 21.11\n*发布日期：2025年3月1日*\n\n这是版本 21.11 的技术变更日志。更详细的发行说明可在新闻频道 [@pythontelegrambotchannel](https:\u002F\u002Ft.me\u002Fpythontelegrambotchannel) 中找到。\n\n## 主要变更与新功能\n\n- 完全支持 Bot API 8.3 (#4676 关闭 #4677、#4682，由 @aelkheir 提交；#4690 和 #4691 由 @aelkheir 提交)\n- 将 `provider_token` 参数设为可选 (#4689)\n- 移除已弃用的 `InlineQueryResultArticle.hide_url` (#4640 关闭 #4638)\n- 在 `Bot` 方法参数中接受 `datetime.timedelta` 类型的输入 (#4651)\n- 扩展对 `Bot.base_(file_)url` 的自定义支持 (#4632 关闭 #3355)\n- 在 `AIORateLimiter` 中支持 `allow_paid_broadcast` (#4627 关闭 #4578)\n- 添加 `BaseUpdateProcessor.current_concurrent_updates` (#4626 关闭 #3984)\n\n## 小幅变更与错误修复\n\n- 为 `Application.run_*` 添加引导逻辑 (#4673 关闭 #4657)\n- 修复 `edit_user_star_subscription` 中的一个错误 (#4681，由 @vavasik800 提交)\n- 简化 `TelegramObject.de_json` 及相关方法中对空数据的处理 (#4617 关闭 #4614)\n\n## 文档改进\n\n- 文档改进 (#4641)\n- 全面重构文档中的提示插入机制 (#4462 关闭 #4414)\n\n## 内部变更\n\n- 稳定链接检查测试 (#4693)\n- 将 `pre-commit` 钩子升级至最新版本 (#4643)\n- 重构带有子类的 `TelegramObject` 类的测试 (#4654 关闭 #4652)\n- 在 GitHub Actions 工作流中使用细粒度权限 (#4668)\n\n## 依赖项更新\n\n- 将 `actions\u002Fsetup-python` 从 5.3.0 升级至 5.4.0 (#4665)\n- 将 `dependabot\u002Ffetch-metadata` 从 2.2.0 升级至 2.3.0 (#4666)\n- 将 `actions\u002Fstale` 从 9.0.0 升级至 9.1.0 (#4667)\n- 将 `astral-sh\u002Fsetup-uv` 从 5.1.0 升级至 5.2.2 (#4664)\n- 将 `codecov\u002Ftest-results-action` 从 1.0.1 升级至 1.0.2 (#4663)","2025-03-01T11:05:44",{"id":196,"version":197,"summary_zh":198,"released_at":199},351304,"v21.10","# Version 21.10\r\n*Released 2025-01-03*\r\n\r\nThis is the technical changelog for version 21.10. More elaborate release notes can be found in the news channel [@pythontelegrambotchannel](https:\u002F\u002Ft.me\u002Fpythontelegrambotchannel).\r\n\r\n## Major Changes\r\n- Full Support for Bot API 8.2 (#4633)\r\n- Bump `apscheduler` & Deprecate `pytz` Support (#4582)\r\n\r\n## New Features\r\n- Add Parameter `pattern` to `JobQueue.jobs()` (#4613 closes #4544)\r\n- Allow Input of Type `Sticker` for Several Methods (#4616 closes #4580)\r\n\r\n## Bug Fixes\r\n- Ensure Forward Compatibility of `Gift` and `Gifts` (#4634 closes #4637)\r\n\r\n## Documentation Improvements & Internal Changes\r\n- Use Custom Labels for `dependabot` PRs (#4621)\r\n- Remove Redundant `pylint` Suppressions (#4628)\r\n- Update Copyright to 2025 (#4631)\r\n- Refactor Module Structure and Tests for Star Payments Classes (#4615 closes #4593)\r\n- Unify `datetime` Imports (#4605 by [@cuevasrja](https:\u002F\u002Fgithub.com\u002Fcuevasrja) closes #4577)\r\n- Add Static Security Analysis of GitHub Actions Workflows (#4606)\r\n\r\n## Dependency Updates\r\n- Bump `astral-sh\u002Fsetup-uv` from 4.2.0 to 5.1.0 (#4625)\r\n- Bump `codecov\u002Fcodecov-action` from 5.1.1 to 5.1.2 (#4622)\r\n- Bump `actions\u002Fupload-artifact` from 4.4.3 to 4.5.0 (#4623)\r\n- Bump `github\u002Fcodeql-action` from 3.27.9 to 3.28.0 (#4624)","2025-01-03T11:14:09",{"id":201,"version":202,"summary_zh":203,"released_at":204},351305,"v21.9","# Version 21.9\r\n*Released 2024-12-07*\r\n\r\nThis is the technical changelog for version 21.9. More elaborate release notes can be found in the news channel [@pythontelegrambotchannel](https:\u002F\u002Ft.me\u002Fpythontelegrambotchannel).\r\n\r\n## Major Changes\r\n- Full Support for Bot API 8.1 (#4594 closes #4592)\r\n\r\n## Minor Changes\r\n- Use `MessageLimit.DEEP_LINK_LENGTH` in `helpers.create_deep_linked_url` (#4597 by @nemacysts)\r\n- Allow `Sequence` Input for `allowed_updates` in `Application` and `Updater` Methods (#4589 by @nemacysts)\r\n\r\n## Dependency Updates\r\n- Update `aiolimiter` requirement from ~=1.1.0 to >=1.1,\u003C1.3 (#4595)\r\n- Bump `pytest` from 8.3.3 to 8.3.4 (#4596)\r\n- Bump `codecov\u002Fcodecov-action` from 4 to 5 (#4585)\r\n- Bump `pylint` to v3.3.2 to Improve Python 3.13 Support (#4590 by @nemacysts)\r\n- Bump `srvaroa\u002Flabeler` from 1.11.1 to 1.12.0 (#4586)","2024-12-07T12:42:24",{"id":206,"version":207,"summary_zh":208,"released_at":209},351306,"v21.8","# Version 21.8\r\n*Released 2024-12-01*\r\n\r\nThis is the technical changelog for version 21.8. More elaborate release notes can be found in the news channel [@pythontelegrambotchannel](https:\u002F\u002Ft.me\u002Fpythontelegrambotchannel).\r\n\r\n## Major Changes\r\n- Full Support for Bot API 8.0 (#4568, #4566 closes #4567, #4572, #4571, #4570, #4576, #4574)\r\n\r\n## Documentation Improvements\r\n- Documentation Improvements (#4565 by @Snehashish06, #4573)","2024-12-01T11:22:17",{"id":211,"version":212,"summary_zh":213,"released_at":214},351307,"v21.7","# Version 21.7\r\n*Released 2024-11-04*\r\n\r\nThis is the technical changelog for version 21.7. More elaborate release notes can be found in the news channel [@pythontelegrambotchannel](https:\u002F\u002Ft.me\u002Fpythontelegrambotchannel).\r\n\r\n## Major Changes\r\n- Full Support for Bot API 7.11 (#4546 closes #4543)\r\n- Add `Message.reply_paid_media` (#4551)\r\n- Drop Support for Python 3.8 (#4398 by @elpekenin)\r\n\r\n## Minor Changes\r\n- Allow `Sequence` in `Application.add_handlers` (#4531 by @roast-lord closes #4530)\r\n- Improve Exception Handling in `File.download_*` (#4542)\r\n- Use Stable Python 3.13 Release in Test Suite (#4535)\r\n\r\n## Documentation Improvements\r\n- Documentation Improvements (#4536 by @Ecode2, #4556)\r\n- Fix Linkcheck Workflow (#4545)\r\n- Use `sphinx-build-compatibility` to Keep Sphinx Compatibility (#4492)\r\n\r\n## Internal Changes\r\n- Improve Test Instability Caused by `Message` Fixtures (#4507)\r\n- Stabilize Some Flaky Tests (#4500)\r\n- Reduce Creation of HTTP Clients in Tests (#4493)\r\n- Update `pytest-xdist` Usage (#4491)\r\n- Fix Failing Tests by Making Them Independent (#4494)\r\n- Introduce Codecov's Test Analysis (#4487)\r\n- Maintenance Work on `Bot` Tests (#4489)\r\n- Introduce `conftest.py` for File Related Tests (#4488)\r\n- Update Issue Templates to Use Issue Types (#4553)\r\n- Update Automation to Label Changes (#4552)\r\n\r\n## Dependency Updates\r\n- Bump `srvaroa\u002Flabeler` from 1.11.0 to 1.11.1 (#4549)\r\n- Bump `sphinx` from 8.0.2 to 8.1.3 (#4532)\r\n- Bump `sphinxcontrib-mermaid` from 0.9.2 to 1.0.0 (#4529)\r\n- Bump `srvaroa\u002Flabeler` from 1.10.1 to 1.11.0 (#4509)\r\n- Bump `Bibo-Joshi\u002Fpyright-type-completeness` from 1.0.0 to 1.0.1 (#4510)","2024-11-04T20:32:37",{"id":216,"version":217,"summary_zh":218,"released_at":219},351308,"v21.6","# Version 21.6\r\n*Released 2024-09-19*\r\n\r\nThis is the technical changelog for version 21.6. More elaborate release notes can be found in the news channel [@pythontelegrambotchannel](https:\u002F\u002Ft.me\u002Fpythontelegrambotchannel).\r\n\r\n## New Features\r\n- Full Support for Bot API 7.10 (#4461 closes #4459, #4460, #4463 by aelkheir, #4464)\r\n- Add Parameter `httpx_kwargs` to `HTTPXRequest` (#4451 closes #4424)\r\n\r\n## Minor Changes\r\n- Improve Type Completeness (#4466)\r\n\r\n## Internal Changes\r\n- Update Python 3.13 Test Suite to RC2 (#4471)\r\n- Enforce the `offline_bot` Fixture in `Test*WithoutRequest` (#4465)\r\n- Make Tests for `telegram.ext` Independent of Networking (#4454)\r\n- Rename Testing Base Classes (#4453)\r\n\r\n## Dependency Updates\r\n- Bump `pytest` from 8.3.2 to 8.3.3 (#4475)","2024-09-19T18:21:41",{"id":221,"version":222,"summary_zh":223,"released_at":224},351309,"v21.5","# Version 21.5\r\n*Released 2024-09-01*\r\n\r\nThis is the technical changelog for version 21.5. More elaborate release notes can be found in the news channel [@pythontelegrambotchannel](https:\u002F\u002Ft.me\u002Fpythontelegrambotchannel).\r\n\r\n## Major Changes\r\n- Full Support for Bot API 7.9 (#4429)\r\n- Full Support for Bot API 7.8 (#4408)\r\n\r\n## New Features\r\n- Add `MessageEntity.shift_entities` and `MessageEntity.concatenate` (#4376 closes #4372)\r\n- Add Parameter `game_pattern` to `CallbackQueryHandler` (#4353 by @jainamoswal closes #4269)\r\n- Add Parameter `read_file_handle` to `InputFile` (#4388 closes #4339)\r\n\r\n## Documentation Improvements\r\n- Bugfix for \"Available In\" Admonitions (#4413)\r\n- Documentation Improvements (#4400 closes #4446, #4448 by @Palaptin)\r\n- Document Return Types of `RequestData` Members (#4396)\r\n- Add Introductory Paragraphs to Telegram Types Subsections (#4389 by @mohdyusuf2312 closes #4380)\r\n- Start Adapting to RTD Addons (#4386)\r\n\r\n## Minor and Internal Changes\r\n- Remove Surplus Logging from `Updater` Network Loop (#4432 by @MartinHjelmare)\r\n- Add Internal Constants for Encodings (#4378 by @elpekenin)\r\n- Improve PyPI Automation (#4375 closes #4373)\r\n- Update Test Suite to New Test Channel Setup (#4435)\r\n- Improve Fixture Usage in `test_message.py` (#4431 by @Palaptin)\r\n- Update Python 3.13 Test Suite to RC1 (#4415)\r\n- Bump `ruff` and Add New Rules (#4416)\r\n\r\n## Dependency Updates\r\n- Update `cachetools` requirement from \u003C5.5.0,>=5.3.3 to >=5.3.3,\u003C5.6.0 (#4437)\r\n- Bump `sphinx` from 7.4.7 to 8.0.2 and `furo` from 2024.7.18 to 2024.8.6 (#4412)\r\n- Bump `test-summary\u002Faction` from 2.3 to 2.4 (#4410)\r\n- Bump `pytest` from 8.2.2 to 8.3.2 (#4403)\r\n- Bump `dependabot\u002Ffetch-metadata` from 2.1.0 to 2.2.0 (#4411)\r\n- Update `cachetools` requirement from ~=5.3.3 to >=5.3.3,\u003C5.5.0 (#4390)\r\n- Bump `sphinx` from 7.3.7 to 7.4.7 (#4395)\r\n- Bump `furo` from 2024.5.6 to 2024.7.18 (#4392)","2024-09-01T13:36:27",{"id":226,"version":227,"summary_zh":228,"released_at":229},351310,"v21.4","# Version 21.4\r\n*Released 2024-07-12*\r\n\r\nThis is the technical changelog for version 21.4. More elaborate release notes can be found in the news channel [@pythontelegrambotchannel](https:\u002F\u002Ft.me\u002Fpythontelegrambotchannel).\r\n\r\n## Major Changes\r\n- Full Support for API 7.5 (#4328, #4316, #4315, #4312 closes #4310, #4311)\r\n- Full Support for API 7.6 (#4333 closes #4331, #4344, #4341, #4334, #4335, #4351, #4342, #4348)\r\n- Full Support for API 7.7 (#4356 closes #4355)\r\n- Drop `python-telegram-bot-raw` And Switch to `pyproject.toml` Based Packaging (#4288 closes #4129 and #4296)\r\n- Deprecate Inclusion of `successful_payment` in `Message.effective_attachment` (#4365 closes #4350)\r\n\r\n## New Features\r\n- Add Support for Python 3.13 Beta (#4253)\r\n- Add `filters.PAID_MEDIA` (#4357)\r\n- Log Received Data on Deserialization Errors (#4304)\r\n- Add `MessageEntity.adjust_message_entities_to_utf_16` Utility Function (#4323 by Antares0982 closes #4319)\r\n- Make Argument `bot` of `TelegramObject.de_json` Optional (#4320)\r\n\r\n## Documentation Improvements\r\n- Documentation Improvements (#4303 closes #4301)\r\n- Restructure Readme (#4362)\r\n- Fix Link-Check Workflow (#4332)\r\n\r\n## Internal Changes\r\n- Automate PyPI Releases (#4364 closes #4318)\r\n- Add `mise-en-place` to `.gitignore` (#4300)\r\n- Use a Composite Action for Testing Type Completeness (#4367)\r\n- Stabilize Some Concurrency Usages in Test Suite (#4360)\r\n- Add a Test Case for `MenuButton` (#4363)\r\n- Extend `SuccessfulPayment` Test (#4349)\r\n- Small Fixes for `test_stars.py` (#4347)\r\n- Use Python 3.13 Beta 3 in Test Suite (#4336)\r\n\r\n## Dependency Updates\r\n- Bump `ruff` and Add New Rules (#4329)\r\n- Bump `pre-commit` Hooks to Latest Versions (#4337)\r\n- Add Lower Bound for `flaky` Dependency (#4322 by Palaptin)\r\n- Bump `pytest` from 8.2.1 to 8.2.2 (#4294)","2024-07-12T15:44:23",{"id":231,"version":232,"summary_zh":233,"released_at":234},351311,"v21.3","# Version 21.3\r\n*Released 2024-06-07*\r\n\r\nThis is the technical changelog for version 21.3. More elaborate release notes can be found in the news channel [@pythontelegrambotchannel](https:\u002F\u002Ft.me\u002Fpythontelegrambotchannel).\r\n\r\n## Major Changes\r\n- Full Support for Bot API 7.4 (#4286, #4276 closes #4275, #4285, #4283, #4280, #4278, #4279)\r\n- Deprecate `python-telegram-bot-raw` (#4270)\r\n- Remove Functionality Deprecated in Bot API 7.3 (#4266 closes #4244)\r\n\r\n## New Features\r\n- Add Parameter `chat_id` to `ChatMemberHandler` (#4290 by uniquetrij closes #4287)\r\n\r\n## Documentation Improvements\r\n- Documentation Improvements (#4264 closes #4240)\r\n\r\n## Internal Changes\r\n- Add `setuptools` to `requirements-dev.txt` (#4282)\r\n- Update Settings for pre-commit.ci (#4265)\r\n\r\n## Dependency Updates\r\n- Bump `pytest` from 8.2.0 to 8.2.1 (#4272)","2024-06-07T14:58:05",{"id":236,"version":237,"summary_zh":238,"released_at":239},351312,"v21.2","# Version 21.2\r\n*Released 2024-05-20*\r\n\r\nThis is the technical changelog for version 21.2. More elaborate release notes can be found in the news channel [@pythontelegrambotchannel](https:\u002F\u002Ft.me\u002Fpythontelegrambotchannel).\r\n\r\n## Major Changes\r\n- Full Support for Bot API 7.3 (#4246, #4260, #4243, #4248, #4242 closes #4236, #4247 by aelkheir)\r\n- Remove Functionality Deprecated by Bot API 7.2 (#4245)\r\n\r\n## New Features\r\n- Add Version to `PTBDeprecationWarning` (#4262 closes #4261)\r\n- Handle Exceptions in building `CallbackContext` (#4222)\r\n\r\n## Bug Fixes\r\n- Call `Application.post_stop` Only if `Application.stop` was called (#4211 closes #4210)\r\n- Handle `SystemExit` raised in Handlers (#4157 closes #4155 and #4156)\r\n- Make `Birthdate.to_date` Return a `datetime.date` Object (#4251)\r\n\r\n## Documentation Improvements\r\n- Documentation Improvements (#4217)\r\n\r\n## Internal Changes\r\n- Add New Rules to `ruff` Config (#4250)\r\n- Adapt Test Suite to Changes in Error Messages (#4238)\r\n\r\n## Dependency Updates\r\n- Bump `furo` from 2024.4.27 to 2024.5.6 (#4252)\r\n- `pre-commit` autoupdate (#4239)\r\n- Bump `pytest` from 8.1.1 to 8.2.0 (#4231)\r\n- Bump `dependabot\u002Ffetch-metadata` from 2.0.0 to 2.1.0 (#4228)\r\n- Bump `pytest-asyncio` from 0.21.1 to 0.21.2 (#4232)\r\n- Bump `pytest-xdist` from 3.6.0 to 3.6.1 (#4233)\r\n- Bump `furo` from 2024.1.29 to 2024.4.27 (#4230)\r\n- Bump `srvaroa\u002Flabeler` from 1.10.0 to 1.10.1 (#4227)\r\n- Bump `pytest` from 7.4.4 to 8.1.1 (#4218)\r\n- Bump `sphinx` from 7.2.6 to 7.3.7 (#4215)\r\n- Bump `pytest-xdist` from 3.5.0 to 3.6.0 (#4215)","2024-05-20T15:31:10",{"id":241,"version":242,"summary_zh":243,"released_at":244},351313,"v21.1.1","# Version 21.1.1\r\n*Released 2024-04-15*\r\n\r\nThis is the technical changelog for version 21.1.1. More elaborate release notes can be found in the news channel [@pythontelegrambotchannel](https:\u002F\u002Ft.me\u002Fpythontelegrambotchannel).\r\n\r\n## Bug Fixes\r\n- Fix Bug With Parameter `message_thread_id` of `Message.reply_*` (#4207 closes #4205)\r\n\r\n## Minor Changes\r\n- Remove Deprecation Warning in `JobQueue.run_daily` (#4206 by [@Konano](https:\u002F\u002Fgithub.com\u002FKonano))\r\n- Fix Annotation of `EncryptedCredentials.decrypted_secret` (#4199 by [@marinelay](https:\u002F\u002Fgithub.com\u002Fmarinelay) closes #4198)","2024-04-15T15:04:30"]