From e8e68cee309e7ac8654ebf2580a08bc318614a50 Mon Sep 17 00:00:00 2001 From: shriMADhav U k Date: Wed, 18 Feb 2026 18:53:16 +0100 Subject: [PATCH 1/4] fix ButtonStyle documentation --- compiler/docs/compiler.py | 1 + 1 file changed, 1 insertion(+) diff --git a/compiler/docs/compiler.py b/compiler/docs/compiler.py index 89b8a53bc9..a6a09657d5 100644 --- a/compiler/docs/compiler.py +++ b/compiler/docs/compiler.py @@ -1003,6 +1003,7 @@ def get_title_list(s: str) -> list: categories = dict( enums=""" Enumerations + ButtonStyle ChatAction ChatEventAction ChatMemberStatus From aef084b4d1e803561476371a68c77cc9a0e48ce1 Mon Sep 17 00:00:00 2001 From: shriMADhav U k Date: Fri, 20 Feb 2026 14:34:12 +0100 Subject: [PATCH 2/4] add error --- compiler/errors/source/400_BAD_REQUEST.tsv | 1 + 1 file changed, 1 insertion(+) diff --git a/compiler/errors/source/400_BAD_REQUEST.tsv b/compiler/errors/source/400_BAD_REQUEST.tsv index 15cd02f9d0..581d14233b 100644 --- a/compiler/errors/source/400_BAD_REQUEST.tsv +++ b/compiler/errors/source/400_BAD_REQUEST.tsv @@ -223,6 +223,7 @@ FRESH_CHANGE_ADMINS_FORBIDDEN You were just elected admin, you can't add or modi FROM_MESSAGE_BOT_DISABLED Bots can't use fromMessage min constructors. FROM_PEER_INVALID The specified from_id is invalid. FROZEN_PARTICIPANT_MISSING The current account is [frozen](https://core.telegram.org/api/auth#frozen-accounts), and cannot access the specified peer. +FUTURE_CREATOR_NONE The future creator after leave is only applicable to supergroups. GAME_BOT_INVALID Bots can't send another bot's game. GENERAL_MODIFY_ICON_FORBIDDEN You can't modify the icon of the 'General' topic. GEO_POINT_INVALID Invalid geoposition provided. From 674f4d45f2c5ed7c9aa32636a4b5bb23f928d4e4 Mon Sep 17 00:00:00 2001 From: shriMADhav U k Date: Fri, 20 Feb 2026 14:49:25 +0100 Subject: [PATCH 3/4] testing --- docs/source/conf.py | 13 +++++++++++++ pyproject.toml | 3 ++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index f5d9418eb8..156bdf22a0 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -45,6 +45,7 @@ # "sphinx.ext.viewcode", "sphinx_copybutton", # "sphinx.ext.coverage", + "sphinx_llms_txt", ] intersphinx_mapping = { @@ -135,3 +136,15 @@ if "html_context" not in globals(): html_context = {} html_context["READTHEDOCS"] = True + +# Provide a specific, agent-friendly summary of Pyrogram +llms_txt_summary = """Pyrogram is an elegant, modern, and asynchronous MTProto API framework for Telegram in Python for users and bots. +This documentation covers the Pyrogram Client High-Level API, the Smart Plugin system, and the raw Low-Level Telegram Functions Types. +""" + +# Exclude pages that just consume tokens without providing value (like indexes or search pages) +llms_txt_exclude = [ + "search", + "genindex", + "modindex", +] diff --git a/pyproject.toml b/pyproject.toml index 48db175796..0a2329a1db 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -95,7 +95,8 @@ docs = [ "furo<=2023.9.10", "sphinx-autobuild<=2021.3.14", "sphinx-copybutton<=0.5.2", - "pygments<=2.17.2" + "pygments<=2.17.2", + "sphinx-llms-txt==0.7.1" ] fast = [ From d7db6f0c278af63b9b720ed867ccdecb6519433b Mon Sep 17 00:00:00 2001 From: shriMADhav U k Date: Fri, 20 Feb 2026 15:12:13 +0100 Subject: [PATCH 4/4] test --- docs/source/conf.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index 156bdf22a0..87a8d2faf7 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -130,6 +130,8 @@ # Set canonical URL from the Read the Docs Domain html_baseurl = os.environ.get("READTHEDOCS_CANONICAL_URL", "") +if not html_baseurl: + html_baseurl = "/pyrogram/" # Tell Jinja2 templates the build is running on Read the Docs if os.environ.get("READTHEDOCS", "") == "True": @@ -137,11 +139,19 @@ html_context = {} html_context["READTHEDOCS"] = True +llms_txt_filename = "llms.txt" + +# Disable full documentation file +llms_txt_full_file = False + # Provide a specific, agent-friendly summary of Pyrogram llms_txt_summary = """Pyrogram is an elegant, modern, and asynchronous MTProto API framework for Telegram in Python for users and bots. -This documentation covers the Pyrogram Client High-Level API, the Smart Plugin system, and the raw Low-Level Telegram Functions Types. +This documentation covers the Pyrogram Client High-Level API, the Smart Plugin system, and the raw Low-Level Telegram Functions Types. +We merge changes made to few of pyrogram forks plus changes made by us to this repository. All the features are just customized feature mostly for personal use; there is no guarantee in them being stable, USE AT YOUR OWN RISK. """ +llms_txt_title = "PyroTGFork" + # Exclude pages that just consume tokens without providing value (like indexes or search pages) llms_txt_exclude = [ "search",