@volter/twin-telegram 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +53 -0
  3. package/dist/generated/pack-facts.json +53 -0
  4. package/dist/journeys/coverage.json +138 -0
  5. package/dist/journeys/customer-life.json +1229 -0
  6. package/dist/journeys/customer-life.outline.md +99 -0
  7. package/dist/journeys/customer-life.outline.verdict.json +76 -0
  8. package/dist/journeys/customer-life.verdict.json +134 -0
  9. package/dist/journeys/decisions.json +95 -0
  10. package/dist/journeys/demand.json +152 -0
  11. package/dist/journeys/score.json +163 -0
  12. package/dist/journeys/unreachable.json +29 -0
  13. package/dist/journeys/vendor-examples.json +1554 -0
  14. package/dist/journeys/vendor-examples.verdict.json +14 -0
  15. package/dist/spec/SOURCE.md +51 -0
  16. package/dist/spec/bot-api.html.gz +0 -0
  17. package/dist/spec/doc-examples.json +344 -0
  18. package/dist/spec/grouping.json +1 -0
  19. package/dist/spec/openapi.json.gz +0 -0
  20. package/dist/spec/page-to-openapi.ts +258 -0
  21. package/dist/spec/patches.json +289 -0
  22. package/dist/spec/sources.json +416 -0
  23. package/dist/src/cli.d.ts +2 -0
  24. package/dist/src/cli.js +21 -0
  25. package/dist/src/engine/media.d.ts +17 -0
  26. package/dist/src/engine/media.js +75 -0
  27. package/dist/src/engine/text.d.ts +45 -0
  28. package/dist/src/engine/text.js +512 -0
  29. package/dist/src/fetch.d.ts +2 -0
  30. package/dist/src/fetch.js +17 -0
  31. package/dist/src/generated/surface.gen.json +1 -0
  32. package/dist/src/generated/ui.gen.json +1 -0
  33. package/dist/src/index.d.ts +5 -0
  34. package/dist/src/index.js +9 -0
  35. package/dist/src/manifest.d.ts +2 -0
  36. package/dist/src/manifest.js +104 -0
  37. package/dist/src/semantics/around.d.ts +2 -0
  38. package/dist/src/semantics/around.js +32 -0
  39. package/dist/src/semantics/available-methods.d.ts +12 -0
  40. package/dist/src/semantics/available-methods.js +266 -0
  41. package/dist/src/semantics/doors.d.ts +18 -0
  42. package/dist/src/semantics/doors.js +292 -0
  43. package/dist/src/semantics/getting-updates.d.ts +3 -0
  44. package/dist/src/semantics/getting-updates.js +68 -0
  45. package/dist/src/semantics/index.d.ts +2 -0
  46. package/dist/src/semantics/index.js +19 -0
  47. package/dist/src/semantics/shared.d.ts +112 -0
  48. package/dist/src/semantics/shared.js +424 -0
  49. package/dist/src/semantics/states.d.ts +18 -0
  50. package/dist/src/semantics/states.js +37 -0
  51. package/dist/src/semantics/updating-messages.d.ts +2 -0
  52. package/dist/src/semantics/updating-messages.js +48 -0
  53. package/dist/src/server.d.ts +7 -0
  54. package/dist/src/server.js +24 -0
  55. package/generated/pack-facts.json +53 -0
  56. package/journeys/coverage.json +138 -0
  57. package/journeys/customer-life.json +1229 -0
  58. package/journeys/customer-life.outline.md +99 -0
  59. package/journeys/customer-life.outline.verdict.json +76 -0
  60. package/journeys/customer-life.verdict.json +134 -0
  61. package/journeys/decisions.json +95 -0
  62. package/journeys/demand.json +152 -0
  63. package/journeys/score.json +163 -0
  64. package/journeys/unreachable.json +29 -0
  65. package/journeys/vendor-examples.json +1554 -0
  66. package/journeys/vendor-examples.verdict.json +14 -0
  67. package/package.json +37 -0
  68. package/spec/SOURCE.md +51 -0
  69. package/spec/bot-api.html.gz +0 -0
  70. package/spec/doc-examples.json +344 -0
  71. package/spec/grouping.json +1 -0
  72. package/spec/openapi.json.gz +0 -0
  73. package/spec/page-to-openapi.ts +258 -0
  74. package/spec/patches.json +289 -0
  75. package/spec/sources.json +416 -0
  76. package/src/cli.ts +22 -0
  77. package/src/engine/media.ts +67 -0
  78. package/src/engine/text.ts +409 -0
  79. package/src/fetch.ts +18 -0
  80. package/src/generated/surface.gen.json +1 -0
  81. package/src/generated/ui.gen.json +1 -0
  82. package/src/index.ts +11 -0
  83. package/src/manifest.ts +114 -0
  84. package/src/semantics/around.ts +33 -0
  85. package/src/semantics/available-methods.ts +253 -0
  86. package/src/semantics/doors.ts +277 -0
  87. package/src/semantics/getting-updates.ts +64 -0
  88. package/src/semantics/index.ts +23 -0
  89. package/src/semantics/shared.ts +428 -0
  90. package/src/semantics/states.ts +38 -0
  91. package/src/semantics/updating-messages.ts +41 -0
  92. package/src/server.ts +17 -0
@@ -0,0 +1,14 @@
1
+ {
2
+ "judge": {
3
+ "agent": "Claude Code (Claude Agent SDK), model claude-opus-5-5",
4
+ "name": "Contributor 106"
5
+ },
6
+ "authors": [
7
+ "Contributor 173"
8
+ ],
9
+ "bar": "829132787d94a2d4",
10
+ "sha256": "fcd35e8064871b6b6b87c60ea7eb9a6bf92a1740269afa3aed217a10a2104ac5",
11
+ "judgedAt": "2026-10-02",
12
+ "plausible": true,
13
+ "rulings": []
14
+ }
package/package.json ADDED
@@ -0,0 +1,37 @@
1
+ {
2
+ "name": "@volter/twin-telegram",
3
+ "version": "1.0.0",
4
+ "description": "The telegram twin (Protocol 3).",
5
+ "author": "Volter (https://github.com/volter-ai)",
6
+ "license": "Apache-2.0",
7
+ "type": "module",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/src/index.d.ts",
11
+ "default": "./dist/src/index.js"
12
+ }
13
+ },
14
+ "bin": {
15
+ "world-telegram": "dist/src/cli.js"
16
+ },
17
+ "files": [
18
+ "src",
19
+ "journeys",
20
+ "spec",
21
+ "README.md",
22
+ "!**/*.test.ts",
23
+ "dist",
24
+ "generated"
25
+ ],
26
+ "peerDependencies": {
27
+ "@volter/world-core": "^3.0.38"
28
+ },
29
+ "engines": {
30
+ "node": ">=22.3"
31
+ },
32
+ "repository": {
33
+ "type": "git",
34
+ "url": "git+https://github.com/volter-ai/twin-packs-p3.git",
35
+ "directory": "telegram"
36
+ }
37
+ }
package/spec/SOURCE.md ADDED
@@ -0,0 +1,51 @@
1
+ # telegram spec — provenance
2
+
3
+ - **Why this document:** Telegram publishes no machine-readable description of its Bot API. `openapi.json.gz` is written
4
+ from its reference page, https://core.telegram.org/bots/api, as Telegram serves it (fetched 2026-10-02, HTML,
5
+ 860074 bytes, sha256 `9da688c4213864d7911fcf0f501d2d7a8c3bbc351b8b4325e85e509bcc9d969f`; the page's "Recent changes"
6
+ head it **Bot API 10.3**, August 24, 2026).
7
+ - **How it was written:** mechanically from the page's HTML by `page-to-openapi.ts`, kept here
8
+ (`gunzip -c spec/bot-api.html.gz > page.html; bun spec/page-to-openapi.ts page.html openapi.json`, then `gzip -n -9`), from the bytes named above, kept here as `bot-api.html.gz`, every
9
+ section of methods and types it documents (Getting updates, Available types, Available methods, Updating messages,
10
+ Stickers, Rich messages, Inline mode, Payments, Telegram Passport, Games): 185 methods and 400 types.
11
+ - A method (an `h4` with a lower-case name and a Parameter/Type/Required/Description table) is
12
+ `POST /bot{token}/<method>` (the page's "https://api.telegram.org/bot<token>/METHOD_NAME"), its operationId the
13
+ method's name, its tag the page's section; its parameters a body taken as JSON, form or multipart, and the same
14
+ parameters again in the query string, none required there (the page's "four ways of passing parameters", the
15
+ first of them the URL query string: Postiz's node-telegram-bot-api sends a medium's chat_id and caption in the
16
+ query beside its multipart file), `Required: Yes` required in the body; its answer `{ ok: true, result }` with the result the
17
+ method's text says is returned (a linked type, "Array of", True, String or Integer; several, `oneOf`), and any
18
+ other answer the error envelope `{ ok: false, error_code, description, parameters? }` (Making requests).
19
+ - Every type a method's result names (by itself, as an array's items, or as one of several) is declared a resource
20
+ under its own name (`x-resourceId`): it is what the Bot API answers under `result` ("the result of the query can be
21
+ found in the 'result' field", Making requests). The page has no GET read for the spec IR to infer resources from
22
+ (every method is written as a POST), and without them the IR reads no answer through its envelope: with them, each
23
+ such operation answers its type under `answers.key: result`, which perform and refresh read.
24
+ - A type (an `h4` with a capitalized name) is an object of its Field/Type/Description table, a field whose description
25
+ begins "Optional." optional; one described as one of a list of types, a `oneOf` of them. A type cell reads Integer,
26
+ String, Boolean, True, Float, InputFile (binary), "Array of X" and "X or Y"; a string field whose description states
27
+ its values in quotes ("can be", "must be", "one of", "always") takes them as its `enum`.
28
+ - The file download getFile names, `GET /file/bot{token}/{file_path}`, is the operation `downloadFile`.
29
+ - Not carried: that every method is also asked by GET, and that method names are matched without case (the page's
30
+ Making requests); the document declares the POST under the documented name, and the twin's around.ts routes the
31
+ other forms to it.
32
+ - **Version:** `10.3` (`info.version`); server `https://api.telegram.org`.
33
+ - **SHA-256 of the uncompressed document:** `2517cfd1598ef743219d56788e772d88cc2420538a9d2688d5fd38d429cb023d`
34
+ (`openapi.json.gz` is it gzipped with no name or time, `gzip -n -9`).
35
+ - **Corrections:** `patches.json` (RFC 6902, each with its reason and source): `reply_to_message_id` added to the
36
+ bodies and the query parameters of sendMessage, sendPhoto, sendVideo, sendDocument and sendMediaGroup. The page no longer lists it, but the Bot
37
+ API server still reads it when a request carries no `reply_parameters` (tdlib/telegram-bot-api, Client.cpp at
38
+ e3e9dd8), and node-telegram-bot-api 0.66.0, as Postiz calls it, sends it.
39
+ - **Grouping:** `grouping.json` (`{ "by": "tag" }`): every path begins `/bot{token}/`, so an operation's family is the
40
+ page's section it is documented in.
41
+ - **Other sources read:** the Bot API server's own source, which the page names ("Using a Local Bot API Server"),
42
+ tdlib/telegram-bot-api at e3e9dd8 (Client.cpp, Client.h, ClientManager.cpp, HttpConnection.cpp, Query.cpp), and the
43
+ TDLib it relays errors from, tdlib/td at 42e6a52 (td/telegram/MessageEntity.cpp, MessageContent.cpp,
44
+ MessagesManager.cpp), each read as raw files and cited where the page says nothing (the refusals' words, the token's
45
+ check, getUpdates' limits, the HTML parse mode); https://core.telegram.org/bots/features (BotFather, privacy mode)
46
+ and https://core.telegram.org/bots/faq (the limits), read with `twin-standard read-page`.
47
+ - **Cited pages:** `sources.json`, check-sources' record of every page a `// source:` line cites.
48
+ - **Read:** 2026-10-02; written again from
49
+ the same bytes with the query parameters, 2026-10-02, and again with
50
+ the answered types' `x-resourceId`, 2026-10-02; derived with
51
+ `bun scripts/derive-pack.ts telegram`, which writes `../src/generated/surface.gen.json`.
Binary file
@@ -0,0 +1,344 @@
1
+ [
2
+ {
3
+ "title": "Making requests: getMe",
4
+ "source": "https://core.telegram.org/bots/api#making-requests",
5
+ "operation": "getMe",
6
+ "means": "All queries to the Telegram Bot API must be served over HTTPS and need to be presented in this form: https://api.telegram.org/bot<token>/METHOD_NAME. Like this for example: https://api.telegram.org/bot123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11/getMe We support GET and POST HTTP methods."
7
+ },
8
+ {
9
+ "title": "Making requests: methods are case-insensitive",
10
+ "source": "https://core.telegram.org/bots/api#making-requests",
11
+ "operation": "getMe",
12
+ "means": "All methods in the Bot API are case-insensitive."
13
+ },
14
+ {
15
+ "title": "HTML style",
16
+ "source": "https://core.telegram.org/bots/api#html-style",
17
+ "operation": "sendMessage",
18
+ "input": {
19
+ "text": "<b>bold</b>, <strong>bold</strong>\n<i>italic</i>, <em>italic</em>\n<u>underline</u>, <ins>underline</ins>\n<s>strikethrough</s>, <strike>strikethrough</strike>, <del>strikethrough</del>\n<span class=\"tg-spoiler\">spoiler</span>, <tg-spoiler>spoiler</tg-spoiler>\n<b>bold <i>italic bold <s>italic bold strikethrough <span class=\"tg-spoiler\">italic bold strikethrough spoiler</span></s> <u>underline italic bold</u></i> bold</b>\n<a href=\"http://www.example.com/\">inline URL</a>\n<a href=\"tg://user?id=123456789\">inline mention of a user</a>\n<tg-emoji emoji-id=\"5368324170671202286\">👍</tg-emoji>\n<tg-time unix=\"1647531900\" format=\"wDT\">22:45 tomorrow</tg-time>\n<tg-time unix=\"1647531900\" format=\"t\">22:45 tomorrow</tg-time>\n<tg-time unix=\"1647531900\" format=\"r\">22:45 tomorrow</tg-time>\n<tg-time unix=\"1647531900\">22:45 tomorrow</tg-time>\n<code>inline fixed-width code</code>\n<pre>pre-formatted fixed-width code block</pre>\n<pre><code class=\"language-python\">pre-formatted fixed-width code block written in the Python programming language</code></pre>\n<blockquote>Block quotation started\nBlock quotation continued\nThe last line of the block quotation</blockquote>\n<blockquote expandable>Expandable block quotation started\nExpandable block quotation continued\nExpandable block quotation continued\nHidden by default part of the block quotation started\nExpandable block quotation continued\nThe last line of the block quotation</blockquote>",
20
+ "parse_mode": "HTML"
21
+ },
22
+ "means": "To use this mode, pass HTML in the parse_mode field. The following tags are currently supported:"
23
+ },
24
+ {
25
+ "title": "HTML style: only the tags mentioned",
26
+ "source": "https://core.telegram.org/bots/api#html-style",
27
+ "operation": "sendMessage",
28
+ "status": 400,
29
+ "input": {
30
+ "text": "<p>Standup notes</p>",
31
+ "parse_mode": "HTML"
32
+ },
33
+ "means": "Only the tags mentioned above are currently supported."
34
+ },
35
+ {
36
+ "title": "HTML style: symbols outside a tag must be entities",
37
+ "source": "https://core.telegram.org/bots/api#html-style",
38
+ "operation": "sendMessage",
39
+ "status": 400,
40
+ "input": {
41
+ "text": "Ship if 2 < 3",
42
+ "parse_mode": "HTML"
43
+ },
44
+ "means": "All < , > and & symbols that are not a part of a tag or an HTML entity must be replaced with the corresponding HTML entities ( < with &lt; , > with &gt; and & with &amp; )."
45
+ },
46
+ {
47
+ "title": "HTML style: entities",
48
+ "source": "https://core.telegram.org/bots/api#html-style",
49
+ "operation": "sendMessage",
50
+ "input": {
51
+ "text": "Tide &amp; Co &#128640; &#x2764; &lt;3 &hearts;",
52
+ "parse_mode": "HTML"
53
+ },
54
+ "means": "All numerical HTML entities are supported. The API currently supports only the following named HTML entities: &lt; , &gt; , &amp; and &quot; ."
55
+ },
56
+ {
57
+ "title": "sendMessage: text over 4096 characters",
58
+ "source": "https://core.telegram.org/bots/api#sendmessage",
59
+ "operation": "sendMessage",
60
+ "status": 400,
61
+ "input": {
62
+ "text": "Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the standup. Notes from the st"
63
+ },
64
+ "means": "Text of the message to be sent, 1-4096 characters after entities parsing"
65
+ },
66
+ {
67
+ "title": "sendMessage: no text",
68
+ "source": "https://core.telegram.org/bots/api#sendmessage",
69
+ "operation": "sendMessage",
70
+ "status": 400,
71
+ "input": {
72
+ "text": ""
73
+ },
74
+ "means": "Text of the message to be sent, 1-4096 characters after entities parsing"
75
+ },
76
+ {
77
+ "title": "getUpdates: limit",
78
+ "source": "https://core.telegram.org/bots/api#getupdates",
79
+ "operation": "getUpdates",
80
+ "input": {
81
+ "limit": 1
82
+ },
83
+ "means": "Limits the number of updates to be retrieved. Values between 1-100 are accepted. Defaults to 100."
84
+ },
85
+ {
86
+ "title": "getUpdates: a negative offset",
87
+ "source": "https://core.telegram.org/bots/api#getupdates",
88
+ "operation": "getUpdates",
89
+ "input": {
90
+ "offset": -1
91
+ },
92
+ "means": "The negative offset can be specified to retrieve updates starting from -offset update from the end of the updates queue. All previous updates will be forgotten."
93
+ },
94
+ {
95
+ "title": "getUpdates: allowed_updates and the updates made before",
96
+ "source": "https://core.telegram.org/bots/api#getupdates",
97
+ "operation": "getUpdates",
98
+ "input": {
99
+ "allowed_updates": [
100
+ "channel_post"
101
+ ]
102
+ },
103
+ "means": "Please note that this parameter doesn't affect updates created before the call to getUpdates, so unwanted updates may be received for a short period of time."
104
+ },
105
+ {
106
+ "title": "deleteWebhook: drop pending updates",
107
+ "source": "https://core.telegram.org/bots/api#deletewebhook",
108
+ "operation": "deleteWebhook",
109
+ "input": {
110
+ "drop_pending_updates": true
111
+ },
112
+ "means": "Pass True to drop all pending updates"
113
+ },
114
+ {
115
+ "title": "sendChatAction: an action",
116
+ "source": "https://core.telegram.org/bots/api#sendchataction",
117
+ "operation": "sendChatAction",
118
+ "status": 400,
119
+ "input": {
120
+ "action": "thinking"
121
+ },
122
+ "means": "Type of action to broadcast. Choose one, depending on what the user is about to receive: typing for text messages , upload_photo for photos , record_video or upload_video for videos , record_voice or upload_voice for voice notes , upload_document for general files , choose_sticker for stickers , find_location for location data , record_video_note or upload_video_note for video notes ."
123
+ },
124
+ {
125
+ "title": "deleteMessage: an incoming message in a private chat",
126
+ "source": "https://core.telegram.org/bots/api#deletemessage",
127
+ "operation": "deleteMessage",
128
+ "means": "Bots can delete incoming messages in private chats."
129
+ },
130
+ {
131
+ "title": "deleteMessage: 48 hours",
132
+ "source": "https://core.telegram.org/bots/api#deletemessage",
133
+ "operation": "deleteMessage",
134
+ "status": 400,
135
+ "means": "A message can only be deleted if it was sent less than 48 hours ago."
136
+ },
137
+ {
138
+ "title": "deleteMessage: a channel's creation",
139
+ "source": "https://core.telegram.org/bots/api#deletemessage",
140
+ "operation": "deleteMessage",
141
+ "status": 400,
142
+ "input": {
143
+ "message_id": 1
144
+ },
145
+ "means": "Service messages about a supergroup, channel, or forum topic creation can't be deleted."
146
+ },
147
+ {
148
+ "title": "deleteMessage: an administrator of a group",
149
+ "source": "https://core.telegram.org/bots/api#deletemessage",
150
+ "operation": "deleteMessage",
151
+ "means": "If the bot is an administrator of a group, it can delete any message there."
152
+ },
153
+ {
154
+ "title": "deleteMessage: outgoing in a group",
155
+ "source": "https://core.telegram.org/bots/api#deletemessage",
156
+ "operation": "deleteMessage",
157
+ "means": "Bots can delete outgoing messages in private chats, groups, and supergroups."
158
+ },
159
+ {
160
+ "title": "sendMediaGroup: documents with their own type only",
161
+ "source": "https://core.telegram.org/bots/api#sendmediagroup",
162
+ "operation": "sendMediaGroup",
163
+ "status": 400,
164
+ "means": "Documents and audio files can be only grouped in an album with messages of the same type."
165
+ },
166
+ {
167
+ "title": "sendPhoto: width and height ratio",
168
+ "source": "https://core.telegram.org/bots/api#sendphoto",
169
+ "operation": "sendPhoto",
170
+ "status": 400,
171
+ "means": "The photo's width and height must not exceed 10000 in total. Width and height ratio must be at most 20."
172
+ },
173
+ {
174
+ "title": "sendPhoto: 10 MB",
175
+ "source": "https://core.telegram.org/bots/api#sendphoto",
176
+ "operation": "sendPhoto",
177
+ "status": 400,
178
+ "means": "The photo must be at most 10 MB in size."
179
+ },
180
+ {
181
+ "title": "sendVideo: 50 MB",
182
+ "source": "https://core.telegram.org/bots/api#sendvideo",
183
+ "operation": "sendVideo",
184
+ "status": 400,
185
+ "means": "Bots can currently send video files of up to 50 MB in size, this limit may be changed in the future."
186
+ },
187
+ {
188
+ "title": "sendDocument: 50 MB",
189
+ "source": "https://core.telegram.org/bots/api#senddocument",
190
+ "operation": "sendDocument",
191
+ "status": 400,
192
+ "means": "Bots can currently send files of any type of up to 50 MB in size, this limit may be changed in the future."
193
+ },
194
+ {
195
+ "title": "MarkdownV2 style",
196
+ "source": "https://core.telegram.org/bots/api#markdownv2-style",
197
+ "operation": "sendMessage",
198
+ "input": {
199
+ "text": "*bold \\*text*\n_italic \\*text_\n__underline__\n~strikethrough~\n||spoiler||\n*bold _italic bold ~italic bold strikethrough ||italic bold strikethrough spoiler||~ __underline italic bold___ bold*\n[inline URL](http://www.example.com/)\n[inline mention of a user](tg://user?id=123456789)\n![👍](tg://emoji?id=5368324170671202286)\n![22:45 tomorrow](tg://time?unix=1647531900&format=wDT)\n![22:45 tomorrow](tg://time?unix=1647531900&format=t)\n![22:45 tomorrow](tg://time?unix=1647531900&format=r)\n![22:45 tomorrow](tg://time?unix=1647531900)\n`inline fixed-width code`\n```\npre-formatted fixed-width code block\n```\n```python\npre-formatted fixed-width code block written in the Python programming language\n```\n>Block quotation started\n>Block quotation continued\n>Block quotation continued\n>Block quotation continued\n>The last line of the block quotation\n**>The expandable block quotation started right after the previous block quotation\n>It is separated from the previous block quotation by an empty bold entity\n>Expandable block quotation continued\n>Hidden by default part of the expandable block quotation started\n>Expandable block quotation continued\n>The last line of the expandable block quotation with the expandability mark||",
200
+ "parse_mode": "MarkdownV2"
201
+ },
202
+ "means": "To use this mode, pass MarkdownV2 in the parse_mode field. Use the following syntax in your message:"
203
+ },
204
+ {
205
+ "title": "Markdown style",
206
+ "source": "https://core.telegram.org/bots/api#markdown-style",
207
+ "operation": "sendMessage",
208
+ "input": {
209
+ "text": "*bold text*\n_italic text_\n[inline URL](http://www.example.com/)\n[inline mention of a user](tg://user?id=123456789)\n`inline fixed-width code`\n```\npre-formatted fixed-width code block\n```\n```python\npre-formatted fixed-width code block written in the Python programming language\n```",
210
+ "parse_mode": "Markdown"
211
+ },
212
+ "means": "This is a legacy mode, retained for backward compatibility. To use this mode, pass Markdown in the parse_mode field. Use the following syntax in your message:"
213
+ },
214
+ {
215
+ "title": "MarkdownV2 style: reserved characters",
216
+ "source": "https://core.telegram.org/bots/api#markdownv2-style",
217
+ "operation": "sendMessage",
218
+ "status": 400,
219
+ "input": {
220
+ "text": "Standup moved to 10.30",
221
+ "parse_mode": "MarkdownV2"
222
+ },
223
+ "means": "In all other places characters '_', '*', '[', ']', '(', ')', '~', '`', '>', '#', '+', '-', '=', '|', '{', '}', '.', '!' must be escaped with the preceding character '\\'."
224
+ },
225
+ {
226
+ "title": "MarkdownV2 style: italic and underline",
227
+ "source": "https://core.telegram.org/bots/api#markdownv2-style",
228
+ "operation": "sendMessage",
229
+ "input": {
230
+ "text": "___italic underline_**__",
231
+ "parse_mode": "MarkdownV2"
232
+ },
233
+ "means": "In case of ambiguity between italic and underline entities __ is always greedily treated from left to right as beginning or end of an underline entity, so instead of ___italic underline___ use ___italic underline_**__ , adding an empty bold entity as a separator."
234
+ },
235
+ {
236
+ "title": "MarkdownV2 style: the expandability mark",
237
+ "source": "https://core.telegram.org/bots/api#markdownv2-style",
238
+ "operation": "sendMessage",
239
+ "means": "The last line of the expandable block quotation with the expandability mark||"
240
+ },
241
+ {
242
+ "title": "Markdown style: escaping",
243
+ "source": "https://core.telegram.org/bots/api#markdown-style",
244
+ "operation": "sendMessage",
245
+ "input": {
246
+ "text": "_snake_\\__case_ and *2*\\**2=4*",
247
+ "parse_mode": "Markdown"
248
+ },
249
+ "means": "Escaping inside entities is not allowed, so entity must be closed first and reopened again: use _snake_\\__case_ for italic snake_case and *2*\\**2=4* for bold 2*2=4 ."
250
+ },
251
+ {
252
+ "title": "Formatting options: a mention by id",
253
+ "source": "https://core.telegram.org/bots/api#formatting-options",
254
+ "operation": "sendMessage",
255
+ "means": "Links tg://user?id=<user_id> can be used to mention a user by their identifier without using a username."
256
+ },
257
+ {
258
+ "title": "sendPhoto: a file Telegram cannot process as an image",
259
+ "source": "https://core.telegram.org/method/messages.sendMedia",
260
+ "operation": "sendPhoto",
261
+ "status": 400,
262
+ "means": "IMAGE_PROCESS_FAILED Failure while processing image."
263
+ },
264
+ {
265
+ "title": "sendMessage: a channel's username",
266
+ "source": "https://core.telegram.org/bots/api#sendmessage",
267
+ "operation": "sendMessage",
268
+ "input": {
269
+ "chat_id": "@rui_notes_news",
270
+ "text": "The notes channel is open."
271
+ },
272
+ "means": "Unique identifier for the target chat or username of the target bot, supergroup or channel in the format @username"
273
+ },
274
+ {
275
+ "title": "ReplyParameters: sent without the message replied to",
276
+ "source": "https://core.telegram.org/bots/api#replyparameters",
277
+ "operation": "sendMessage",
278
+ "input": {
279
+ "text": "Re: the printer shop",
280
+ "reply_parameters": {
281
+ "message_id": 999,
282
+ "allow_sending_without_reply": true
283
+ }
284
+ },
285
+ "means": "Pass True if the message should be sent even if the specified message to be replied to is not found."
286
+ },
287
+ {
288
+ "title": "sendPhoto: a file_id",
289
+ "source": "https://core.telegram.org/bots/api#sendphoto",
290
+ "operation": "sendPhoto",
291
+ "means": "Pass a file_id as String to send a photo that exists on the Telegram servers (recommended)"
292
+ },
293
+ {
294
+ "title": "sendPhoto: an HTTP URL",
295
+ "source": "https://core.telegram.org/bots/api#sendphoto",
296
+ "operation": "sendPhoto",
297
+ "input": {
298
+ "photo": "https://telegram.org/img/t_logo.png"
299
+ },
300
+ "means": "pass an HTTP URL as a String for Telegram to get a photo from the Internet"
301
+ },
302
+ {
303
+ "title": "Sending files: a file_id is one bot's",
304
+ "source": "https://core.telegram.org/bots/api#sending-files",
305
+ "operation": "sendPhoto",
306
+ "status": 400,
307
+ "means": "file_id is unique for each individual bot and can't be transferred from one bot to another."
308
+ },
309
+ {
310
+ "title": "Sending files: a file keeps its type",
311
+ "source": "https://core.telegram.org/bots/api#sending-files",
312
+ "operation": "sendDocument",
313
+ "status": 400,
314
+ "means": "It is not possible to change the file type when resending by file_id . I.e. a video can't be sent as a photo , a photo can't be sent as a document , etc."
315
+ },
316
+ {
317
+ "title": "ChatMemberAdministrator: posting in a channel",
318
+ "source": "https://core.telegram.org/bots/api#chatmemberadministrator",
319
+ "operation": "sendMessage",
320
+ "status": 400,
321
+ "means": "Optional . True , if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only"
322
+ },
323
+ {
324
+ "title": "ChatMemberBanned: a banned bot",
325
+ "source": "https://core.telegram.org/bots/api#chatmemberbanned",
326
+ "operation": "getChat",
327
+ "status": 403,
328
+ "means": "Represents a chat member that was banned in the chat and can't return to the chat or view chat messages."
329
+ },
330
+ {
331
+ "title": "ChatMemberLeft: a bot not in a channel",
332
+ "source": "https://core.telegram.org/bots/api#chatmemberleft",
333
+ "operation": "sendMessage",
334
+ "status": 403,
335
+ "means": "Represents a chat member that isn't currently a member of the chat, but may join it themselves."
336
+ },
337
+ {
338
+ "title": "getFile: 20 MB",
339
+ "source": "https://core.telegram.org/bots/api#getfile",
340
+ "operation": "getFile",
341
+ "status": 400,
342
+ "means": "For the moment, bots can download files of up to 20MB in size."
343
+ }
344
+ ]
@@ -0,0 +1 @@
1
+ { "by": "tag" }
Binary file