@mtkruto/node 0.0.997 → 0.0.999

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 (347) hide show
  1. package/esm/0_deps.d.ts +2 -2
  2. package/esm/0_deps.js +2 -2
  3. package/esm/3_types.d.ts +39 -3
  4. package/esm/3_types.js +39 -3
  5. package/esm/4_constants.d.ts +1 -1
  6. package/esm/4_constants.js +1 -1
  7. package/esm/client/0_html.js +1 -1
  8. package/esm/client/3_types.d.ts +3 -6
  9. package/esm/client/3_types.js +1 -1
  10. package/esm/client/4_client.d.ts +20 -5
  11. package/esm/client/4_client.js +56 -40
  12. package/esm/connection/1_connection_web_socket.js +2 -1
  13. package/esm/deps/deno.land/std@0.201.0/assert/assert_greater.d.ts +5 -0
  14. package/esm/deps/deno.land/std@0.201.0/assert/assert_greater.js +14 -0
  15. package/esm/deps/deno.land/std@0.201.0/assert/assert_greater_or_equal.d.ts +5 -0
  16. package/esm/deps/deno.land/std@0.201.0/assert/assert_greater_or_equal.js +14 -0
  17. package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_instance_of.js +2 -2
  18. package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_is_error.js +4 -1
  19. package/esm/deps/deno.land/std@0.201.0/assert/assert_less.d.ts +5 -0
  20. package/esm/deps/deno.land/std@0.201.0/assert/assert_less.js +14 -0
  21. package/esm/deps/deno.land/std@0.201.0/assert/assert_less_or_equal.d.ts +5 -0
  22. package/esm/deps/deno.land/std@0.201.0/assert/assert_less_or_equal.js +14 -0
  23. package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/mod.d.ts +4 -0
  24. package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/mod.js +4 -0
  25. package/{script/deps/deno.land/std@0.200.0 → esm/deps/deno.land/std@0.201.0}/fmt/colors.d.ts +8 -1
  26. package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/fmt/colors.js +8 -1
  27. package/esm/tl/3_tl_reader.d.ts +1 -1
  28. package/esm/tl/3_tl_reader.js +6 -0
  29. package/esm/tl/4_tl_writer.js +8 -0
  30. package/esm/tl/6_message.js +3 -0
  31. package/esm/types/0_bot_command.d.ts +4 -0
  32. package/esm/types/0_chat_action.d.ts +1 -1
  33. package/esm/types/0_chat_id.d.ts +4 -0
  34. package/esm/types/0_chat_id.js +1 -0
  35. package/esm/types/0_chat_photo.js +1 -1
  36. package/esm/types/0_input_contact_message_content.d.ts +6 -0
  37. package/esm/types/0_input_contact_message_content.js +1 -0
  38. package/esm/types/0_input_location_message_content.d.ts +8 -0
  39. package/esm/types/0_input_location_message_content.js +1 -0
  40. package/esm/types/0_input_venue_message_content.d.ts +10 -0
  41. package/esm/types/0_input_venue_message_content.js +1 -0
  42. package/esm/types/0_labeled_price.d.ts +4 -0
  43. package/esm/types/0_labeled_price.js +1 -0
  44. package/esm/types/0_message_entity.d.ts +10 -10
  45. package/esm/types/0_message_entity.js +12 -12
  46. package/esm/types/0_parse_mode.d.ts +1 -0
  47. package/esm/types/0_parse_mode.js +1 -0
  48. package/esm/types/0_thumbnail.js +1 -1
  49. package/esm/types/{!0_misc.d.ts → 1__getters.d.ts} +7 -0
  50. package/esm/types/1__getters.js +1 -0
  51. package/esm/types/1_bot_command_scope.d.ts +32 -0
  52. package/esm/types/1_bot_command_scope.js +27 -0
  53. package/esm/types/1_chat.d.ts +5 -10
  54. package/esm/types/1_chat.js +4 -11
  55. package/esm/types/1_inline_query_result_button.d.ts +6 -0
  56. package/esm/types/1_inline_query_result_button.js +1 -0
  57. package/esm/types/1_input_invoice_message_content.d.ts +23 -0
  58. package/esm/types/1_input_invoice_message_content.js +1 -0
  59. package/esm/types/1_input_text_message_content.d.ts +8 -0
  60. package/esm/types/1_input_text_message_content.js +1 -0
  61. package/esm/types/1_photo.js +1 -1
  62. package/esm/types/1_sticker.d.ts +2 -2
  63. package/esm/types/1_sticker.js +1 -1
  64. package/esm/types/2_game.js +1 -1
  65. package/esm/types/{1_inline_keyboard_button.d.ts → 2_inline_keyboard_button.d.ts} +2 -2
  66. package/esm/types/2_inline_query.d.ts +1 -1
  67. package/esm/types/2_input_message_content.d.ts +6 -0
  68. package/esm/types/2_input_message_content.js +1 -0
  69. package/{script/types/2_inline_keyboard_markup.d.ts → esm/types/3_inline_keyboard_markup.d.ts} +3 -2
  70. package/esm/types/{2_inline_keyboard_markup.js → 3_inline_keyboard_markup.js} +1 -1
  71. package/esm/types/3_message.d.ts +2 -2
  72. package/esm/types/3_message.js +5 -5
  73. package/esm/types/4_callback_query.d.ts +1 -1
  74. package/esm/types/4_inline_query_result_article.d.ts +15 -0
  75. package/esm/types/4_inline_query_result_article.js +1 -0
  76. package/esm/types/4_inline_query_result_audio.d.ts +17 -0
  77. package/esm/types/4_inline_query_result_audio.js +1 -0
  78. package/esm/types/4_inline_query_result_cached_audio.d.ts +14 -0
  79. package/esm/types/4_inline_query_result_cached_audio.js +1 -0
  80. package/esm/types/4_inline_query_result_cached_document.d.ts +15 -0
  81. package/esm/types/4_inline_query_result_cached_document.js +1 -0
  82. package/esm/types/4_inline_query_result_cached_gif.d.ts +15 -0
  83. package/esm/types/4_inline_query_result_cached_gif.js +1 -0
  84. package/esm/types/4_inline_query_result_cached_mpeg4_gif.d.ts +15 -0
  85. package/esm/types/4_inline_query_result_cached_mpeg4_gif.js +1 -0
  86. package/esm/types/4_inline_query_result_cached_photo.d.ts +16 -0
  87. package/esm/types/4_inline_query_result_cached_photo.js +1 -0
  88. package/esm/types/4_inline_query_result_cached_sticker.d.ts +9 -0
  89. package/esm/types/4_inline_query_result_cached_sticker.js +1 -0
  90. package/esm/types/4_inline_query_result_cached_video.d.ts +16 -0
  91. package/esm/types/4_inline_query_result_cached_video.js +1 -0
  92. package/esm/types/4_inline_query_result_cached_voice.d.ts +15 -0
  93. package/esm/types/4_inline_query_result_cached_voice.js +1 -0
  94. package/esm/types/4_inline_query_result_contact.d.ts +15 -0
  95. package/esm/types/4_inline_query_result_contact.js +1 -0
  96. package/esm/types/4_inline_query_result_document.d.ts +18 -0
  97. package/esm/types/4_inline_query_result_document.js +1 -0
  98. package/esm/types/4_inline_query_result_game.d.ts +7 -0
  99. package/esm/types/4_inline_query_result_game.js +1 -0
  100. package/esm/types/4_inline_query_result_gif.d.ts +20 -0
  101. package/esm/types/4_inline_query_result_gif.js +1 -0
  102. package/esm/types/4_inline_query_result_location.d.ts +18 -0
  103. package/esm/types/4_inline_query_result_location.js +1 -0
  104. package/esm/types/4_inline_query_result_mpeg4_gif.d.ts +20 -0
  105. package/esm/types/4_inline_query_result_mpeg4_gif.js +1 -0
  106. package/esm/types/4_inline_query_result_photo.d.ts +19 -0
  107. package/esm/types/4_inline_query_result_photo.js +1 -0
  108. package/esm/types/4_inline_query_result_venue.d.ts +19 -0
  109. package/esm/types/4_inline_query_result_venue.js +1 -0
  110. package/esm/types/4_inline_query_result_video.d.ts +21 -0
  111. package/esm/types/4_inline_query_result_video.js +1 -0
  112. package/esm/types/4_inline_query_result_voice.d.ts +16 -0
  113. package/esm/types/4_inline_query_result_voice.js +1 -0
  114. package/esm/types/4_reply_markup.d.ts +7 -0
  115. package/esm/types/4_reply_markup.js +22 -0
  116. package/esm/types/5_inline_query_result.d.ts +29 -0
  117. package/esm/types/5_inline_query_result.js +256 -0
  118. package/package.json +1 -1
  119. package/script/0_deps.d.ts +2 -2
  120. package/script/0_deps.js +2 -2
  121. package/script/3_types.d.ts +39 -3
  122. package/script/3_types.js +39 -3
  123. package/script/4_constants.d.ts +1 -1
  124. package/script/4_constants.js +1 -1
  125. package/script/client/0_html.js +1 -1
  126. package/script/client/3_types.d.ts +3 -6
  127. package/script/client/3_types.js +3 -0
  128. package/script/client/4_client.d.ts +20 -5
  129. package/script/client/4_client.js +55 -39
  130. package/script/connection/1_connection_web_socket.js +2 -1
  131. package/script/deps/deno.land/std@0.201.0/assert/assert_greater.d.ts +5 -0
  132. package/script/deps/deno.land/std@0.201.0/assert/assert_greater.js +18 -0
  133. package/script/deps/deno.land/std@0.201.0/assert/assert_greater_or_equal.d.ts +5 -0
  134. package/script/deps/deno.land/std@0.201.0/assert/assert_greater_or_equal.js +18 -0
  135. package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_instance_of.js +2 -2
  136. package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_is_error.js +4 -1
  137. package/script/deps/deno.land/std@0.201.0/assert/assert_less.d.ts +5 -0
  138. package/script/deps/deno.land/std@0.201.0/assert/assert_less.js +18 -0
  139. package/script/deps/deno.land/std@0.201.0/assert/assert_less_or_equal.d.ts +5 -0
  140. package/script/deps/deno.land/std@0.201.0/assert/assert_less_or_equal.js +18 -0
  141. package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/mod.d.ts +4 -0
  142. package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/mod.js +4 -0
  143. package/{esm/deps/deno.land/std@0.200.0 → script/deps/deno.land/std@0.201.0}/fmt/colors.d.ts +8 -1
  144. package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/fmt/colors.js +10 -3
  145. package/script/tl/3_tl_reader.d.ts +1 -1
  146. package/script/tl/3_tl_reader.js +6 -0
  147. package/script/tl/4_tl_writer.js +8 -0
  148. package/script/tl/6_message.js +3 -0
  149. package/script/types/0_bot_command.d.ts +4 -0
  150. package/script/types/0_chat_action.d.ts +1 -1
  151. package/script/types/0_chat_id.d.ts +4 -0
  152. package/script/types/0_chat_id.js +2 -0
  153. package/script/types/0_chat_photo.js +7 -7
  154. package/script/types/0_input_contact_message_content.d.ts +6 -0
  155. package/script/types/0_input_contact_message_content.js +2 -0
  156. package/script/types/0_input_location_message_content.d.ts +8 -0
  157. package/script/types/0_input_location_message_content.js +2 -0
  158. package/script/types/0_input_venue_message_content.d.ts +10 -0
  159. package/script/types/0_input_venue_message_content.js +2 -0
  160. package/script/types/0_labeled_price.d.ts +4 -0
  161. package/script/types/0_labeled_price.js +2 -0
  162. package/script/types/0_message_entity.d.ts +10 -10
  163. package/script/types/0_message_entity.js +12 -12
  164. package/script/types/0_parse_mode.d.ts +1 -0
  165. package/script/types/0_parse_mode.js +2 -0
  166. package/script/types/0_thumbnail.js +5 -5
  167. package/script/types/{!0_misc.d.ts → 1__getters.d.ts} +7 -0
  168. package/script/types/1__getters.js +2 -0
  169. package/script/types/1_bot_command_scope.d.ts +32 -0
  170. package/script/types/1_bot_command_scope.js +31 -0
  171. package/script/types/1_chat.d.ts +5 -10
  172. package/script/types/1_chat.js +5 -12
  173. package/script/types/1_inline_query_result_button.d.ts +6 -0
  174. package/script/types/1_inline_query_result_button.js +2 -0
  175. package/script/types/1_input_invoice_message_content.d.ts +23 -0
  176. package/script/types/1_input_invoice_message_content.js +2 -0
  177. package/script/types/1_input_text_message_content.d.ts +8 -0
  178. package/script/types/1_input_text_message_content.js +2 -0
  179. package/script/types/1_photo.js +5 -5
  180. package/script/types/1_sticker.d.ts +2 -2
  181. package/script/types/1_sticker.js +1 -1
  182. package/script/types/2_game.js +3 -3
  183. package/script/types/{1_inline_keyboard_button.d.ts → 2_inline_keyboard_button.d.ts} +2 -2
  184. package/script/types/2_inline_query.d.ts +1 -1
  185. package/script/types/2_input_message_content.d.ts +6 -0
  186. package/script/types/2_input_message_content.js +2 -0
  187. package/{esm/types/2_inline_keyboard_markup.d.ts → script/types/3_inline_keyboard_markup.d.ts} +3 -2
  188. package/script/types/{2_inline_keyboard_markup.js → 3_inline_keyboard_markup.js} +3 -3
  189. package/script/types/3_message.d.ts +2 -2
  190. package/script/types/3_message.js +14 -14
  191. package/script/types/4_callback_query.d.ts +1 -1
  192. package/script/types/4_inline_query_result_article.d.ts +15 -0
  193. package/script/types/4_inline_query_result_article.js +2 -0
  194. package/script/types/4_inline_query_result_audio.d.ts +17 -0
  195. package/script/types/4_inline_query_result_audio.js +2 -0
  196. package/script/types/4_inline_query_result_cached_audio.d.ts +14 -0
  197. package/script/types/4_inline_query_result_cached_audio.js +2 -0
  198. package/script/types/4_inline_query_result_cached_document.d.ts +15 -0
  199. package/script/types/4_inline_query_result_cached_document.js +2 -0
  200. package/script/types/4_inline_query_result_cached_gif.d.ts +15 -0
  201. package/script/types/4_inline_query_result_cached_gif.js +2 -0
  202. package/script/types/4_inline_query_result_cached_mpeg4_gif.d.ts +15 -0
  203. package/script/types/4_inline_query_result_cached_mpeg4_gif.js +2 -0
  204. package/script/types/4_inline_query_result_cached_photo.d.ts +16 -0
  205. package/script/types/4_inline_query_result_cached_photo.js +2 -0
  206. package/script/types/4_inline_query_result_cached_sticker.d.ts +9 -0
  207. package/script/types/4_inline_query_result_cached_sticker.js +2 -0
  208. package/script/types/4_inline_query_result_cached_video.d.ts +16 -0
  209. package/script/types/4_inline_query_result_cached_video.js +2 -0
  210. package/script/types/4_inline_query_result_cached_voice.d.ts +15 -0
  211. package/script/types/4_inline_query_result_cached_voice.js +2 -0
  212. package/script/types/4_inline_query_result_contact.d.ts +15 -0
  213. package/script/types/4_inline_query_result_contact.js +2 -0
  214. package/script/types/4_inline_query_result_document.d.ts +18 -0
  215. package/script/types/4_inline_query_result_document.js +2 -0
  216. package/script/types/4_inline_query_result_game.d.ts +7 -0
  217. package/script/types/4_inline_query_result_game.js +2 -0
  218. package/script/types/4_inline_query_result_gif.d.ts +20 -0
  219. package/script/types/4_inline_query_result_gif.js +2 -0
  220. package/script/types/4_inline_query_result_location.d.ts +18 -0
  221. package/script/types/4_inline_query_result_location.js +2 -0
  222. package/script/types/4_inline_query_result_mpeg4_gif.d.ts +20 -0
  223. package/script/types/4_inline_query_result_mpeg4_gif.js +2 -0
  224. package/script/types/4_inline_query_result_photo.d.ts +19 -0
  225. package/script/types/4_inline_query_result_photo.js +2 -0
  226. package/script/types/4_inline_query_result_venue.d.ts +19 -0
  227. package/script/types/4_inline_query_result_venue.js +2 -0
  228. package/script/types/4_inline_query_result_video.d.ts +21 -0
  229. package/script/types/4_inline_query_result_video.js +2 -0
  230. package/script/types/4_inline_query_result_voice.d.ts +16 -0
  231. package/script/types/4_inline_query_result_voice.js +2 -0
  232. package/script/types/4_reply_markup.d.ts +7 -0
  233. package/script/types/4_reply_markup.js +26 -0
  234. package/script/types/5_inline_query_result.d.ts +29 -0
  235. package/script/types/5_inline_query_result.js +260 -0
  236. /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/_constants.d.ts +0 -0
  237. /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/_constants.js +0 -0
  238. /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/_diff.d.ts +0 -0
  239. /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/_diff.js +0 -0
  240. /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/_format.d.ts +0 -0
  241. /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/_format.js +0 -0
  242. /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert.d.ts +0 -0
  243. /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert.js +0 -0
  244. /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_almost_equals.d.ts +0 -0
  245. /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_almost_equals.js +0 -0
  246. /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_array_includes.d.ts +0 -0
  247. /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_array_includes.js +0 -0
  248. /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_equals.d.ts +0 -0
  249. /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_equals.js +0 -0
  250. /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_exists.d.ts +0 -0
  251. /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_exists.js +0 -0
  252. /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_false.d.ts +0 -0
  253. /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_false.js +0 -0
  254. /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_instance_of.d.ts +0 -0
  255. /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_is_error.d.ts +0 -0
  256. /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_match.d.ts +0 -0
  257. /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_match.js +0 -0
  258. /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_not_equals.d.ts +0 -0
  259. /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_not_equals.js +0 -0
  260. /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_not_instance_of.d.ts +0 -0
  261. /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_not_instance_of.js +0 -0
  262. /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_not_match.d.ts +0 -0
  263. /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_not_match.js +0 -0
  264. /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_not_strict_equals.d.ts +0 -0
  265. /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_not_strict_equals.js +0 -0
  266. /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_object_match.d.ts +0 -0
  267. /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_object_match.js +0 -0
  268. /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_rejects.d.ts +0 -0
  269. /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_rejects.js +0 -0
  270. /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_strict_equals.d.ts +0 -0
  271. /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_strict_equals.js +0 -0
  272. /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_string_includes.d.ts +0 -0
  273. /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_string_includes.js +0 -0
  274. /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_throws.d.ts +0 -0
  275. /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_throws.js +0 -0
  276. /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assertion_error.d.ts +0 -0
  277. /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assertion_error.js +0 -0
  278. /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/equal.d.ts +0 -0
  279. /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/equal.js +0 -0
  280. /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/fail.d.ts +0 -0
  281. /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/fail.js +0 -0
  282. /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/unimplemented.d.ts +0 -0
  283. /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/unimplemented.js +0 -0
  284. /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/unreachable.d.ts +0 -0
  285. /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/unreachable.js +0 -0
  286. /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/encoding/base64.d.ts +0 -0
  287. /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/encoding/base64.js +0 -0
  288. /package/esm/types/{!0_file_id.d.ts → 0__file_id.d.ts} +0 -0
  289. /package/esm/types/{!0_file_id.js → 0__file_id.js} +0 -0
  290. /package/esm/types/{!0_misc.js → 0_bot_command.js} +0 -0
  291. /package/esm/types/{1_inline_keyboard_button.js → 2_inline_keyboard_button.js} +0 -0
  292. /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/_constants.d.ts +0 -0
  293. /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/_constants.js +0 -0
  294. /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/_diff.d.ts +0 -0
  295. /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/_diff.js +0 -0
  296. /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/_format.d.ts +0 -0
  297. /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/_format.js +0 -0
  298. /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert.d.ts +0 -0
  299. /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert.js +0 -0
  300. /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_almost_equals.d.ts +0 -0
  301. /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_almost_equals.js +0 -0
  302. /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_array_includes.d.ts +0 -0
  303. /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_array_includes.js +0 -0
  304. /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_equals.d.ts +0 -0
  305. /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_equals.js +0 -0
  306. /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_exists.d.ts +0 -0
  307. /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_exists.js +0 -0
  308. /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_false.d.ts +0 -0
  309. /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_false.js +0 -0
  310. /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_instance_of.d.ts +0 -0
  311. /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_is_error.d.ts +0 -0
  312. /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_match.d.ts +0 -0
  313. /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_match.js +0 -0
  314. /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_not_equals.d.ts +0 -0
  315. /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_not_equals.js +0 -0
  316. /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_not_instance_of.d.ts +0 -0
  317. /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_not_instance_of.js +0 -0
  318. /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_not_match.d.ts +0 -0
  319. /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_not_match.js +0 -0
  320. /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_not_strict_equals.d.ts +0 -0
  321. /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_not_strict_equals.js +0 -0
  322. /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_object_match.d.ts +0 -0
  323. /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_object_match.js +0 -0
  324. /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_rejects.d.ts +0 -0
  325. /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_rejects.js +0 -0
  326. /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_strict_equals.d.ts +0 -0
  327. /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_strict_equals.js +0 -0
  328. /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_string_includes.d.ts +0 -0
  329. /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_string_includes.js +0 -0
  330. /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_throws.d.ts +0 -0
  331. /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_throws.js +0 -0
  332. /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assertion_error.d.ts +0 -0
  333. /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assertion_error.js +0 -0
  334. /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/equal.d.ts +0 -0
  335. /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/equal.js +0 -0
  336. /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/fail.d.ts +0 -0
  337. /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/fail.js +0 -0
  338. /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/unimplemented.d.ts +0 -0
  339. /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/unimplemented.js +0 -0
  340. /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/unreachable.d.ts +0 -0
  341. /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/unreachable.js +0 -0
  342. /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/encoding/base64.d.ts +0 -0
  343. /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/encoding/base64.js +0 -0
  344. /package/script/types/{!0_file_id.d.ts → 0__file_id.d.ts} +0 -0
  345. /package/script/types/{!0_file_id.js → 0__file_id.js} +0 -0
  346. /package/script/types/{!0_misc.js → 0_bot_command.js} +0 -0
  347. /package/script/types/{1_inline_keyboard_button.js → 2_inline_keyboard_button.js} +0 -0
@@ -10,7 +10,7 @@ function constructMessageEntity(obj) {
10
10
  return { type: "hashtag", offset: obj.offset, length: obj.length };
11
11
  }
12
12
  else if (obj instanceof _2_tl_js_1.types.MessageEntityBotCommand) {
13
- return { type: "bot_command", offset: obj.offset ?? 0, length: obj.length };
13
+ return { type: "botCommand", offset: obj.offset ?? 0, length: obj.length };
14
14
  }
15
15
  else if (obj instanceof _2_tl_js_1.types.MessageEntityURL) {
16
16
  return { type: "url", offset: obj.offset, length: obj.length };
@@ -31,16 +31,16 @@ function constructMessageEntity(obj) {
31
31
  return { type: "pre", offset: obj.offset, length: obj.length, language: obj.language };
32
32
  }
33
33
  else if (obj instanceof _2_tl_js_1.types.MessageEntityTextURL) {
34
- return { type: "text_link", offset: obj.offset, length: obj.length, url: obj.url };
34
+ return { type: "textLink", offset: obj.offset, length: obj.length, url: obj.url };
35
35
  }
36
36
  else if (obj instanceof _2_tl_js_1.types.MessageEntityMentionName) {
37
- return { type: "text_mention", offset: obj.offset, length: obj.length, userId: Number(obj.userId) };
37
+ return { type: "textMention", offset: obj.offset, length: obj.length, userId: Number(obj.userId) };
38
38
  }
39
39
  else if (obj instanceof _2_tl_js_1.types.MessageEntityCashtag) {
40
40
  return { type: "cashtag", offset: obj.offset, length: obj.length };
41
41
  }
42
42
  else if (obj instanceof _2_tl_js_1.types.MessageEntityPhone) {
43
- return { type: "phone_number", offset: obj.offset, length: obj.length };
43
+ return { type: "phoneNumber", offset: obj.offset, length: obj.length };
44
44
  }
45
45
  else if (obj instanceof _2_tl_js_1.types.MessageEntityUnderline) {
46
46
  return { type: "underline", offset: obj.offset, length: obj.length };
@@ -52,13 +52,13 @@ function constructMessageEntity(obj) {
52
52
  return { type: "blockquote", offset: obj.offset, length: obj.length };
53
53
  }
54
54
  else if (obj instanceof _2_tl_js_1.types.MessageEntityBankCard) {
55
- return { type: "bank_card", offset: obj.offset, length: obj.length };
55
+ return { type: "bankCard", offset: obj.offset, length: obj.length };
56
56
  }
57
57
  else if (obj instanceof _2_tl_js_1.types.MessageEntitySpoiler) {
58
58
  return { type: "spoiler", offset: obj.offset, length: obj.length };
59
59
  }
60
60
  else if (obj instanceof _2_tl_js_1.types.MessageEntityCustomEmoji) {
61
- return { type: "custom_emoji", offset: obj.offset, length: obj.length, customEmojiId: String(obj.documentId) };
61
+ return { type: "customEmoji", offset: obj.offset, length: obj.length, customEmojiId: String(obj.documentId) };
62
62
  }
63
63
  else {
64
64
  return null;
@@ -72,7 +72,7 @@ function messageEntityToTlObject(entity) {
72
72
  return new _2_tl_js_1.types.MessageEntityMention({ offset, length });
73
73
  case "hashtag":
74
74
  return new _2_tl_js_1.types.MessageEntityHashtag({ offset, length });
75
- case "bot_command":
75
+ case "botCommand":
76
76
  return new _2_tl_js_1.types.MessageEntityBotCommand({ offset, length });
77
77
  case "url":
78
78
  return new _2_tl_js_1.types.MessageEntityURL({ offset, length });
@@ -86,13 +86,13 @@ function messageEntityToTlObject(entity) {
86
86
  return new _2_tl_js_1.types.MessageEntityCode({ offset, length });
87
87
  case "pre":
88
88
  return new _2_tl_js_1.types.MessageEntityPre({ offset, length, language: entity.language });
89
- case "text_link":
89
+ case "textLink":
90
90
  return new _2_tl_js_1.types.MessageEntityTextURL({ offset, length, url: entity.url });
91
- case "text_mention":
91
+ case "textMention":
92
92
  return new _2_tl_js_1.types.MessageEntityMentionName({ offset, length, userId: BigInt(entity.userId) });
93
93
  case "cashtag":
94
94
  return new _2_tl_js_1.types.MessageEntityCashtag({ offset, length });
95
- case "phone_number":
95
+ case "phoneNumber":
96
96
  return new _2_tl_js_1.types.MessageEntityPhone({ offset, length });
97
97
  case "underline":
98
98
  return new _2_tl_js_1.types.MessageEntityUnderline({ offset, length });
@@ -100,11 +100,11 @@ function messageEntityToTlObject(entity) {
100
100
  return new _2_tl_js_1.types.MessageEntityStrike({ offset, length });
101
101
  case "blockquote":
102
102
  return new _2_tl_js_1.types.MessageEntityBlockquote({ offset, length });
103
- case "bank_card":
103
+ case "bankCard":
104
104
  return new _2_tl_js_1.types.MessageEntityBankCard({ offset, length });
105
105
  case "spoiler":
106
106
  return new _2_tl_js_1.types.MessageEntitySpoiler({ offset, length });
107
- case "custom_emoji":
107
+ case "customEmoji":
108
108
  return new _2_tl_js_1.types.MessageEntityCustomEmoji({ offset, length, documentId: BigInt(entity.customEmojiId) });
109
109
  }
110
110
  }
@@ -0,0 +1 @@
1
+ export type ParseMode = "HTML" | null;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -2,20 +2,20 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.constructThumbnail = void 0;
4
4
  const _2_tl_js_1 = require("../2_tl.js");
5
- const _0_file_id_js_1 = require("./!0_file_id.js");
5
+ const _0__file_id_js_1 = require("./0__file_id.js");
6
6
  function constructThumbnail(size, file) {
7
- const fileType = file instanceof _2_tl_js_1.types.Photo ? _0_file_id_js_1.FileType.Photo : _0_file_id_js_1.FileType.Document;
8
- const fileId = new _0_file_id_js_1.FileID(null, null, fileType, file.dcId, {
7
+ const fileType = file instanceof _2_tl_js_1.types.Photo ? _0__file_id_js_1.FileType.Photo : _0__file_id_js_1.FileType.Document;
8
+ const fileId = new _0__file_id_js_1.FileID(null, null, fileType, file.dcId, {
9
9
  mediaId: file.id,
10
10
  accessHash: file.accessHash,
11
11
  fileReference: file.fileReference,
12
12
  thumbnailFileType: fileType,
13
- thumbnailSource: _0_file_id_js_1.ThumbnailSource.Thumbnail,
13
+ thumbnailSource: _0__file_id_js_1.ThumbnailSource.Thumbnail,
14
14
  thumbnailSize: size.type,
15
15
  volumeId: 0n,
16
16
  localId: 0,
17
17
  }).encode();
18
- const fileUniqueId = new _0_file_id_js_1.FileUniqueID(_0_file_id_js_1.FileUniqueType.Document, { mediaId: file.id }).encode();
18
+ const fileUniqueId = new _0__file_id_js_1.FileUniqueID(_0__file_id_js_1.FileUniqueType.Document, { mediaId: file.id }).encode();
19
19
  return {
20
20
  fileId,
21
21
  fileUniqueId,
@@ -1,7 +1,14 @@
1
1
  import { MaybePromise } from "../1_utilities.js";
2
2
  import { types } from "../2_tl.js";
3
+ import { ChatID } from "./0_chat_id.js";
3
4
  export interface EntityGetter {
4
5
  (peer: types.PeerUser): MaybePromise<types.User | null>;
5
6
  (peer: types.PeerChat): MaybePromise<types.Chat | null>;
6
7
  (peer: types.PeerChannel): MaybePromise<types.Channel | null>;
7
8
  }
9
+ export interface InputPeerGetter {
10
+ (id: ChatID): Promise<types.InputPeerUser | types.InputPeerChannel | types.InputPeerChat>;
11
+ }
12
+ export interface UsernameResolver {
13
+ (username: string): MaybePromise<types.InputUser>;
14
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,32 @@
1
+ import { ChatID } from "./0_chat_id.js";
2
+ import { types } from "../2_tl.js";
3
+ import { InputPeerGetter } from "./1__getters.js";
4
+ export declare namespace BotCommandScope {
5
+ interface Default {
6
+ type: "default";
7
+ }
8
+ interface AllPrivateChats {
9
+ type: "allPrivateChats";
10
+ }
11
+ interface AllGroupChats {
12
+ type: "allGroupChats";
13
+ }
14
+ interface AllChatAdministrators {
15
+ type: "allChatAdministrators";
16
+ }
17
+ interface Chat {
18
+ type: "chat";
19
+ chatId: ChatID;
20
+ }
21
+ interface ChatAdministrators {
22
+ type: "chatAdministrators";
23
+ chatId: ChatID;
24
+ }
25
+ interface ChatMember {
26
+ type: "chatMember";
27
+ chatId: ChatID;
28
+ userId: number;
29
+ }
30
+ }
31
+ export type BotCommandScope = BotCommandScope.Default | BotCommandScope.AllPrivateChats | BotCommandScope.AllGroupChats | BotCommandScope.AllChatAdministrators | BotCommandScope.Chat | BotCommandScope.ChatAdministrators | BotCommandScope.ChatMember;
32
+ export declare function botCommandScopeToTlObject(scope: BotCommandScope, getInputPeer: InputPeerGetter): Promise<types.BotCommandScopeDefault | types.BotCommandScopeUsers | types.BotCommandScopeChats | types.BotCommandScopeChatAdmins | types.BotCommandScopePeer | types.BotCommandScopePeerAdmins | types.BotCommandScopePeerUser>;
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.botCommandScopeToTlObject = void 0;
4
+ const _2_tl_js_1 = require("../2_tl.js");
5
+ const _1_utilities_js_1 = require("../1_utilities.js");
6
+ async function botCommandScopeToTlObject(scope, getInputPeer) {
7
+ switch (scope.type) {
8
+ case "default":
9
+ return new _2_tl_js_1.types.BotCommandScopeDefault();
10
+ case "allPrivateChats":
11
+ return new _2_tl_js_1.types.BotCommandScopeUsers();
12
+ case "allGroupChats":
13
+ return new _2_tl_js_1.types.BotCommandScopeChats();
14
+ case "allChatAdministrators":
15
+ return new _2_tl_js_1.types.BotCommandScopeChatAdmins();
16
+ case "chat":
17
+ return new _2_tl_js_1.types.BotCommandScopePeer({ peer: await getInputPeer(scope.chatId) });
18
+ case "chatAdministrators":
19
+ return new _2_tl_js_1.types.BotCommandScopePeerAdmins({ peer: await getInputPeer(scope.chatId) });
20
+ case "chatMember": {
21
+ const user = await getInputPeer(scope.userId);
22
+ if (!(user instanceof _2_tl_js_1.types.InputPeerUser)) {
23
+ (0, _1_utilities_js_1.UNREACHABLE)();
24
+ }
25
+ return new _2_tl_js_1.types.BotCommandScopePeerUser({ peer: await getInputPeer(scope.chatId), userId: new _2_tl_js_1.types.InputUser({ userId: user.userId, accessHash: user.accessHash }) });
26
+ }
27
+ default:
28
+ (0, _1_utilities_js_1.UNREACHABLE)();
29
+ }
30
+ }
31
+ exports.botCommandScopeToTlObject = botCommandScopeToTlObject;
@@ -1,12 +1,7 @@
1
1
  import { types } from "../2_tl.js";
2
2
  import { Color } from "./0_color.js";
3
3
  import { ChatPhoto } from "./0_chat_photo.js";
4
- export declare enum ChatType {
5
- Private = "private",
6
- Group = "group",
7
- Supergroup = "supergroup",
8
- Channel = "channel"
9
- }
4
+ export type ChatType = "private" | "group" | "supergroup" | "channel";
10
5
  export declare namespace Chat {
11
6
  interface Base {
12
7
  /** Type of chat, can be either "private", "group", "supergroup" or "channel" */
@@ -18,7 +13,7 @@ export declare namespace Chat {
18
13
  photo?: ChatPhoto;
19
14
  }
20
15
  interface Private extends Base {
21
- type: ChatType.Private;
16
+ type: "private";
22
17
  /** True, if this user is a bot */
23
18
  isBot?: boolean;
24
19
  /** First name of the other party in a private chat */
@@ -45,7 +40,7 @@ export declare namespace Chat {
45
40
  restrictionReason?: types.RestrictionReason[];
46
41
  }
47
42
  interface Group extends Base {
48
- type: ChatType.Group;
43
+ type: "group";
49
44
  /** Title, for supergroups, channels and group chats */
50
45
  title: string;
51
46
  /** Chat photo. */
@@ -74,7 +69,7 @@ export declare namespace Chat {
74
69
  restrictionReason?: types.RestrictionReason[];
75
70
  }
76
71
  interface Channel extends ChannelBase {
77
- type: ChatType.Channel;
72
+ type: "channel";
78
73
  /** Title, for supergroups, channels and group chats */
79
74
  title: string;
80
75
  /** Username, for private chats, supergroups and channels if available */
@@ -83,7 +78,7 @@ export declare namespace Chat {
83
78
  also?: string[];
84
79
  }
85
80
  interface Supergroup extends ChannelBase {
86
- type: ChatType.Supergroup;
81
+ type: "supergroup";
87
82
  /** True, if the supergroup chat is a forum (has [topics](https://telegram.org/blog/topics-in-groups-collectible-usernames#topics-in-groups) enabled) */
88
83
  isForum: boolean;
89
84
  }
@@ -1,23 +1,16 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.constructChat = exports.ChatType = void 0;
3
+ exports.constructChat = void 0;
4
4
  const _1_utilities_js_1 = require("../1_utilities.js");
5
5
  const _2_tl_js_1 = require("../2_tl.js");
6
6
  const _4_constants_js_1 = require("../4_constants.js");
7
7
  const _0_color_js_1 = require("./0_color.js");
8
8
  const _0_chat_photo_js_1 = require("./0_chat_photo.js");
9
- var ChatType;
10
- (function (ChatType) {
11
- ChatType["Private"] = "private";
12
- ChatType["Group"] = "group";
13
- ChatType["Supergroup"] = "supergroup";
14
- ChatType["Channel"] = "channel";
15
- })(ChatType = exports.ChatType || (exports.ChatType = {}));
16
9
  function constructChat(chat) {
17
10
  if (chat instanceof _2_tl_js_1.types.User) {
18
11
  const id = Number(chat.id);
19
12
  const chat_ = {
20
- type: ChatType.Private,
13
+ type: "private",
21
14
  isBot: chat.bot || false,
22
15
  id,
23
16
  color: (0, _0_color_js_1.getColor)(id),
@@ -40,7 +33,7 @@ function constructChat(chat) {
40
33
  else if (chat instanceof _2_tl_js_1.types.Chat) {
41
34
  const id = Number(-chat.id);
42
35
  const chat_ = {
43
- type: ChatType.Group,
36
+ type: "group",
44
37
  id,
45
38
  color: (0, _0_color_js_1.getColor)(id),
46
39
  title: chat.title,
@@ -59,7 +52,7 @@ function constructChat(chat) {
59
52
  chat_ = {
60
53
  id,
61
54
  color: (0, _0_color_js_1.getColor)(id),
62
- type: ChatType.Supergroup,
55
+ type: "supergroup",
63
56
  title,
64
57
  isScam,
65
58
  isFake,
@@ -73,7 +66,7 @@ function constructChat(chat) {
73
66
  chat_ = {
74
67
  id,
75
68
  color: (0, _0_color_js_1.getColor)(id),
76
- type: ChatType.Channel,
69
+ type: "channel",
77
70
  title,
78
71
  isScam,
79
72
  isFake,
@@ -0,0 +1,6 @@
1
+ import { WebAppInfo } from "./0_web_app_info.js";
2
+ export interface InlineQueryResultButton {
3
+ text: string;
4
+ webApp?: WebAppInfo;
5
+ startParameter?: string;
6
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,23 @@
1
+ import { LabeledPrice } from "../tl/2_types.js";
2
+ export interface InputInvoiceMessageContent {
3
+ title: string;
4
+ description: string;
5
+ payload: string;
6
+ providerToken: string;
7
+ currency: string;
8
+ prices: LabeledPrice[];
9
+ maxTipAmount?: number;
10
+ suggestedTipAmounts?: number[];
11
+ providerData?: string;
12
+ photoUrl?: string;
13
+ photoSize?: number;
14
+ photoWidth?: number;
15
+ photoHeight?: number;
16
+ needName?: boolean;
17
+ needPhoneNumber?: boolean;
18
+ needEmail?: boolean;
19
+ needShippingAAddress?: boolean;
20
+ sendPhoneNumberToPorvider?: boolean;
21
+ sendEmailToProvider?: boolean;
22
+ isFlexible?: boolean;
23
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,8 @@
1
+ import { MessageEntity } from "./0_message_entity.js";
2
+ import { ParseMode } from "./0_parse_mode.js";
3
+ export interface InputTextMessageContent {
4
+ messageText: string;
5
+ parseMode?: ParseMode;
6
+ entities?: MessageEntity[];
7
+ disableWebPagePreview?: boolean;
8
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.constructPhoto = void 0;
4
4
  const _2_tl_js_1 = require("../2_tl.js");
5
- const _0_file_id_js_1 = require("./!0_file_id.js");
5
+ const _0__file_id_js_1 = require("./0__file_id.js");
6
6
  const _0_thumbnail_js_1 = require("./0_thumbnail.js");
7
7
  function constructPhoto(photo) {
8
8
  const sizes = photo.sizes
@@ -18,14 +18,14 @@ function constructPhoto(photo) {
18
18
  .sort((a, b) => a.size - b.size);
19
19
  const largest = sizes.slice(-1)[0];
20
20
  const { dcId, id: mediaId, accessHash, fileReference } = photo;
21
- const fileUniqueId = new _0_file_id_js_1.FileUniqueID(_0_file_id_js_1.FileUniqueType.Document, { mediaId: photo.id }).encode();
21
+ const fileUniqueId = new _0__file_id_js_1.FileUniqueID(_0__file_id_js_1.FileUniqueType.Document, { mediaId: photo.id }).encode();
22
22
  return {
23
- fileId: new _0_file_id_js_1.FileID(null, null, _0_file_id_js_1.FileType.Photo, dcId, {
23
+ fileId: new _0__file_id_js_1.FileID(null, null, _0__file_id_js_1.FileType.Photo, dcId, {
24
24
  mediaId,
25
25
  accessHash,
26
26
  fileReference,
27
- thumbnailSource: _0_file_id_js_1.ThumbnailSource.Thumbnail,
28
- thumbnailFileType: _0_file_id_js_1.FileType.Photo,
27
+ thumbnailSource: _0__file_id_js_1.ThumbnailSource.Thumbnail,
28
+ thumbnailFileType: _0__file_id_js_1.FileType.Photo,
29
29
  thumbnailSize: largest.type,
30
30
  volumeId: 0n,
31
31
  localId: 0,
@@ -8,8 +8,8 @@ export interface Sticker {
8
8
  fileId: string;
9
9
  /** Unique identifier for this file, which is supposed to be the same over time and for different users and bots. Can't be used to download or reuse the file. */
10
10
  fileUniqueId: string;
11
- /** Type of the sticker, currently one of "regular", "mask", "custom_emoji". The type of the sticker is independent from its format, which is determined by the fields is_animated and is_video. */
12
- type: "regular" | "mask" | "custom_emoji";
11
+ /** Type of the sticker, currently one of "regular", "mask", "customEmoji". The type of the sticker is independent from its format, which is determined by the fields is_animated and is_video. */
12
+ type: "regular" | "mask" | "customEmoji";
13
13
  /** Sticker width */
14
14
  width: number;
15
15
  /** Sticker height */
@@ -12,7 +12,7 @@ async function constructSticker(document, fileId, fileUniqueId, getStickerSetNam
12
12
  return {
13
13
  fileId,
14
14
  fileUniqueId,
15
- // TODO: custom_emoji type?
15
+ // TODO: custom emoji type?
16
16
  type: stickerAttribute.mask ? "mask" : "regular",
17
17
  width: imageSizeAttribute ? imageSizeAttribute.w : videoAttribute ? videoAttribute.w : 512,
18
18
  height: imageSizeAttribute ? imageSizeAttribute.h : videoAttribute ? videoAttribute.h : 512,
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.constructGame = void 0;
4
4
  const _1_utilities_js_1 = require("../1_utilities.js");
5
5
  const _2_tl_js_1 = require("../2_tl.js");
6
- const _0_file_id_js_1 = require("./!0_file_id.js");
6
+ const _0__file_id_js_1 = require("./0__file_id.js");
7
7
  const _1_animation_js_1 = require("./1_animation.js");
8
8
  const _1_photo_js_1 = require("./1_photo.js");
9
9
  function constructGame(media_) {
@@ -14,11 +14,11 @@ function constructGame(media_) {
14
14
  description: media_.game.description,
15
15
  photo: (0, _1_photo_js_1.constructPhoto)(game_.photo[_2_tl_js_1.as](_2_tl_js_1.types.Photo)),
16
16
  animation: document_
17
- ? (0, _1_animation_js_1.constructAnimation)(document_, document_.attributes.find((v) => v instanceof _2_tl_js_1.types.DocumentAttributeVideo), document_.attributes.find((v) => v instanceof _2_tl_js_1.types.DocumentAttributeFilename), new _0_file_id_js_1.FileID(null, null, _0_file_id_js_1.FileType.Animation, document_.dcId, {
17
+ ? (0, _1_animation_js_1.constructAnimation)(document_, document_.attributes.find((v) => v instanceof _2_tl_js_1.types.DocumentAttributeVideo), document_.attributes.find((v) => v instanceof _2_tl_js_1.types.DocumentAttributeFilename), new _0__file_id_js_1.FileID(null, null, _0__file_id_js_1.FileType.Animation, document_.dcId, {
18
18
  mediaId: document_.id,
19
19
  accessHash: document_.accessHash,
20
20
  fileReference: document_.fileReference,
21
- }).encode(), new _0_file_id_js_1.FileUniqueID(_0_file_id_js_1.FileUniqueType.Document, { mediaId: document_.id }).encode())
21
+ }).encode(), new _0__file_id_js_1.FileUniqueID(_0__file_id_js_1.FileUniqueType.Document, { mediaId: document_.id }).encode())
22
22
  : undefined,
23
23
  });
24
24
  }
@@ -1,7 +1,7 @@
1
- import { MaybePromise } from "../1_utilities.js";
2
1
  import { types } from "../2_tl.js";
3
2
  import { WebAppInfo } from "./0_web_app_info.js";
4
3
  import { LoginUrl } from "./0_login_url.js";
4
+ import { UsernameResolver } from "./1__getters.js";
5
5
  export declare namespace InlineKeyboardButton {
6
6
  interface Base {
7
7
  /** Label text on the button */
@@ -42,4 +42,4 @@ export declare namespace InlineKeyboardButton {
42
42
  /** This object represents one button of an inline keyboard. You **must** use exactly one of the optional fields. */
43
43
  export type InlineKeyboardButton = InlineKeyboardButton.URL | InlineKeyboardButton.Callback | InlineKeyboardButton.WebApp | InlineKeyboardButton.Login | InlineKeyboardButton.SwitchInline | InlineKeyboardButton.SwitchInlineCurrent | InlineKeyboardButton.Game | InlineKeyboardButton.Pay;
44
44
  export declare function constructInlineKeyboardButton(button_: types.TypeKeyboardButton): InlineKeyboardButton;
45
- export declare function inlineKeyboardButtonToTlObject(button: InlineKeyboardButton, usernameResolver: (username: string) => MaybePromise<types.InputUser>): Promise<types.KeyboardButtonURL | types.KeyboardButtonCallback | types.KeyboardButtonSwitchInline | types.KeyboardButtonBuy | types.InputKeyboardButtonURLAuth | types.KeyboardButtonWebView>;
45
+ export declare function inlineKeyboardButtonToTlObject(button: InlineKeyboardButton, usernameResolver: UsernameResolver): Promise<types.KeyboardButtonURL | types.KeyboardButtonCallback | types.KeyboardButtonSwitchInline | types.KeyboardButtonBuy | types.InputKeyboardButtonURLAuth | types.KeyboardButtonWebView>;
@@ -1,6 +1,6 @@
1
1
  import { types } from "../2_tl.js";
2
- import { EntityGetter } from "./!0_misc.js";
3
2
  import { Location } from "./0_location.js";
3
+ import { EntityGetter } from "./1__getters.js";
4
4
  import { User } from "./1_user.js";
5
5
  export interface InlineQuery {
6
6
  /** Unique identifier for this query */
@@ -0,0 +1,6 @@
1
+ import { InputContactMessageContent } from "./0_input_contact_message_content.js";
2
+ import { InputLocationMessageContent } from "./0_input_location_message_content.js";
3
+ import { InputVenuMessageContent } from "./0_input_venue_message_content.js";
4
+ import { InputInvoiceMessageContent } from "./1_input_invoice_message_content.js";
5
+ import { InputTextMessageContent } from "./1_input_text_message_content.js";
6
+ export type InputMessageContent = InputTextMessageContent | InputLocationMessageContent | InputVenuMessageContent | InputContactMessageContent | InputInvoiceMessageContent;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,9 +1,10 @@
1
1
  import { types } from "../2_tl.js";
2
- import { InlineKeyboardButton, inlineKeyboardButtonToTlObject } from "./1_inline_keyboard_button.js";
2
+ import { UsernameResolver } from "./1__getters.js";
3
+ import { InlineKeyboardButton } from "./2_inline_keyboard_button.js";
3
4
  /** This object represents an inline keyboard that appears right next to the message it belongs to. */
4
5
  export interface InlineKeyboardMarkup {
5
6
  /** Array of button rows, each represented by an Array of InlineKeyboardButton objects */
6
7
  inlineKeyboard: InlineKeyboardButton[][];
7
8
  }
8
9
  export declare function constructInlineKeyboardMarkup(keyboard_: types.ReplyInlineMarkup): InlineKeyboardMarkup;
9
- export declare function inlineKeyboardMarkupToTlObject(keyboard: InlineKeyboardMarkup, usernameResolver: Parameters<typeof inlineKeyboardButtonToTlObject>[1]): Promise<types.ReplyInlineMarkup>;
10
+ export declare function inlineKeyboardMarkupToTlObject(keyboard: InlineKeyboardMarkup, usernameResolver: UsernameResolver): Promise<types.ReplyInlineMarkup>;
@@ -2,13 +2,13 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.inlineKeyboardMarkupToTlObject = exports.constructInlineKeyboardMarkup = void 0;
4
4
  const _2_tl_js_1 = require("../2_tl.js");
5
- const _1_inline_keyboard_button_js_1 = require("./1_inline_keyboard_button.js");
5
+ const _2_inline_keyboard_button_js_1 = require("./2_inline_keyboard_button.js");
6
6
  function constructInlineKeyboardMarkup(keyboard_) {
7
7
  const rows = new Array();
8
8
  for (const row_ of keyboard_.rows) {
9
9
  const row = new Array();
10
10
  for (const button_ of row_.buttons) {
11
- row.push((0, _1_inline_keyboard_button_js_1.constructInlineKeyboardButton)(button_));
11
+ row.push((0, _2_inline_keyboard_button_js_1.constructInlineKeyboardButton)(button_));
12
12
  }
13
13
  rows.push(row);
14
14
  }
@@ -20,7 +20,7 @@ async function inlineKeyboardMarkupToTlObject(keyboard, usernameResolver) {
20
20
  for (const row of keyboard.inlineKeyboard) {
21
21
  const row_ = new Array();
22
22
  for (const button of row) {
23
- row_.push(await (0, _1_inline_keyboard_button_js_1.inlineKeyboardButtonToTlObject)(button, usernameResolver));
23
+ row_.push(await (0, _2_inline_keyboard_button_js_1.inlineKeyboardButtonToTlObject)(button, usernameResolver));
24
24
  }
25
25
  rows_.push(new _2_tl_js_1.types.KeyboardButtonRow({ buttons: row_ }));
26
26
  }
@@ -1,6 +1,5 @@
1
1
  import { MaybePromise } from "../1_utilities.js";
2
2
  import { types } from "../2_tl.js";
3
- import { EntityGetter } from "./!0_misc.js";
4
3
  import { ForceReply } from "./0_force_reply.js";
5
4
  import { MessageEntity } from "./0_message_entity.js";
6
5
  import { Audio } from "./0_audio.js";
@@ -10,6 +9,7 @@ import { Venue } from "./0_venue.js";
10
9
  import { Location } from "./0_location.js";
11
10
  import { Dice } from "./0_dice.js";
12
11
  import { ReplyKeyboardRemove } from "./0_reply_keyboard_remove.js";
12
+ import { EntityGetter } from "./1__getters.js";
13
13
  import { Chat } from "./1_chat.js";
14
14
  import { Photo } from "./1_photo.js";
15
15
  import { Document } from "./1_document.js";
@@ -19,7 +19,7 @@ import { Animation } from "./1_animation.js";
19
19
  import { User } from "./1_user.js";
20
20
  import { Poll } from "./1_poll.js";
21
21
  import { Sticker, StickerSetNameGetter } from "./1_sticker.js";
22
- import { InlineKeyboardMarkup } from "./2_inline_keyboard_markup.js";
22
+ import { InlineKeyboardMarkup } from "./3_inline_keyboard_markup.js";
23
23
  import { ReplyKeyboardMarkup } from "./2_reply_keyboard_markup.js";
24
24
  import { Game } from "./2_game.js";
25
25
  /** This object represents a message. */
@@ -5,7 +5,7 @@ const _0_deps_js_1 = require("../0_deps.js");
5
5
  const _1_utilities_js_1 = require("../1_utilities.js");
6
6
  const _2_tl_js_1 = require("../2_tl.js");
7
7
  const _4_constants_js_1 = require("../4_constants.js");
8
- const _0_file_id_js_1 = require("./!0_file_id.js");
8
+ const _0__file_id_js_1 = require("./0__file_id.js");
9
9
  const _0_force_reply_js_1 = require("./0_force_reply.js");
10
10
  const _0_message_entity_js_1 = require("./0_message_entity.js");
11
11
  const _0_audio_js_1 = require("./0_audio.js");
@@ -24,7 +24,7 @@ const _1_animation_js_1 = require("./1_animation.js");
24
24
  const _1_user_js_1 = require("./1_user.js");
25
25
  const _1_poll_js_1 = require("./1_poll.js");
26
26
  const _1_sticker_js_1 = require("./1_sticker.js");
27
- const _2_inline_keyboard_markup_js_1 = require("./2_inline_keyboard_markup.js");
27
+ const _3_inline_keyboard_markup_js_1 = require("./3_inline_keyboard_markup.js");
28
28
  const _2_reply_keyboard_markup_js_1 = require("./2_reply_keyboard_markup.js");
29
29
  const _2_game_js_1 = require("./2_game.js");
30
30
  const d = (0, _0_deps_js_1.debug)("types/Message");
@@ -120,10 +120,10 @@ async function constructServiceMessage(message_, chat, getEntity, getMessage) {
120
120
  }
121
121
  }
122
122
  else if (message_.action instanceof _2_tl_js_1.types.MessageActionChannelCreate) {
123
- if (message.chat.type == _1_chat_js_1.ChatType.Channel) {
123
+ if (message.chat.type == "channel") {
124
124
  message.channelCreated = true;
125
125
  }
126
- else if (message.chat.type == _1_chat_js_1.ChatType.Supergroup) {
126
+ else if (message.chat.type == "supergroup") {
127
127
  message.supergroupCreated = true;
128
128
  }
129
129
  else {
@@ -264,7 +264,7 @@ async function constructMessage(message_, getEntity, getMessage, getStickerSetNa
264
264
  message.replyMarkup = (0, _2_reply_keyboard_markup_js_1.constructReplyKeyboardMarkup)(message_.replyMarkup);
265
265
  }
266
266
  else if (message_.replyMarkup instanceof _2_tl_js_1.types.ReplyInlineMarkup) {
267
- message.replyMarkup = (0, _2_inline_keyboard_markup_js_1.constructInlineKeyboardMarkup)(message_.replyMarkup);
267
+ message.replyMarkup = (0, _3_inline_keyboard_markup_js_1.constructInlineKeyboardMarkup)(message_.replyMarkup);
268
268
  }
269
269
  else if (message_.replyMarkup instanceof _2_tl_js_1.types.ReplyKeyboardHide) {
270
270
  message.replyMarkup = (0, _0_reply_keyboard_remove_js_1.constructReplyKeyboardRemove)(message_.replyMarkup);
@@ -334,41 +334,41 @@ async function constructMessage(message_, getEntity, getMessage, getStickerSetNa
334
334
  else if (message_.media instanceof _2_tl_js_1.types.MessageMediaDocument) {
335
335
  const { document } = message_.media;
336
336
  if (document instanceof _2_tl_js_1.types.Document) {
337
- const getFileId = (type) => new _0_file_id_js_1.FileID(null, null, type, document.dcId, {
337
+ const getFileId = (type) => new _0__file_id_js_1.FileID(null, null, type, document.dcId, {
338
338
  mediaId: document.id,
339
339
  accessHash: document.accessHash,
340
340
  fileReference: document.fileReference,
341
341
  }).encode();
342
- const fileUniqueId = new _0_file_id_js_1.FileUniqueID(_0_file_id_js_1.FileUniqueType.Document, { mediaId: document.id }).encode();
342
+ const fileUniqueId = new _0__file_id_js_1.FileUniqueID(_0__file_id_js_1.FileUniqueType.Document, { mediaId: document.id }).encode();
343
343
  const animated = document.attributes.find((v) => v instanceof _2_tl_js_1.types.DocumentAttributeAnimated);
344
344
  const audio = document.attributes.find((v) => v instanceof _2_tl_js_1.types.DocumentAttributeAudio);
345
345
  const fileName = document.attributes.find((v) => v instanceof _2_tl_js_1.types.DocumentAttributeFilename);
346
346
  const sticker = document.attributes.find((v) => v instanceof _2_tl_js_1.types.DocumentAttributeSticker);
347
347
  const video = document.attributes.find((v) => v instanceof _2_tl_js_1.types.DocumentAttributeVideo);
348
348
  if (animated) {
349
- message.animation = (0, _1_animation_js_1.constructAnimation)(document, video, fileName, getFileId(_0_file_id_js_1.FileType.Animation), fileUniqueId);
349
+ message.animation = (0, _1_animation_js_1.constructAnimation)(document, video, fileName, getFileId(_0__file_id_js_1.FileType.Animation), fileUniqueId);
350
350
  }
351
351
  else if (video) {
352
352
  if (video.roundMessage) {
353
- message.videoNote = (0, _1_video_note_js_1.constructVideoNote)(document, video, getFileId(_0_file_id_js_1.FileType.VideoNote), fileUniqueId);
353
+ message.videoNote = (0, _1_video_note_js_1.constructVideoNote)(document, video, getFileId(_0__file_id_js_1.FileType.VideoNote), fileUniqueId);
354
354
  }
355
355
  else {
356
- message.video = (0, _1_video_js_1.constructVideo)(document, video, fileName?.fileName, getFileId(_0_file_id_js_1.FileType.Video), fileUniqueId);
356
+ message.video = (0, _1_video_js_1.constructVideo)(document, video, fileName?.fileName, getFileId(_0__file_id_js_1.FileType.Video), fileUniqueId);
357
357
  }
358
358
  }
359
359
  else if (audio) {
360
360
  if (audio.voice) {
361
- message.voice = (0, _0_voice_js_1.constructVoice)(document, audio, getFileId(_0_file_id_js_1.FileType.Voice), fileUniqueId);
361
+ message.voice = (0, _0_voice_js_1.constructVoice)(document, audio, getFileId(_0__file_id_js_1.FileType.Voice), fileUniqueId);
362
362
  }
363
363
  else {
364
- message.audio = (0, _0_audio_js_1.constructAudio)(document, audio, getFileId(_0_file_id_js_1.FileType.Audio), fileUniqueId);
364
+ message.audio = (0, _0_audio_js_1.constructAudio)(document, audio, getFileId(_0__file_id_js_1.FileType.Audio), fileUniqueId);
365
365
  }
366
366
  }
367
367
  else if (sticker) {
368
- message.sticker = await (0, _1_sticker_js_1.constructSticker)(document, getFileId(_0_file_id_js_1.FileType.Sticker), fileUniqueId, getStickerSetName);
368
+ message.sticker = await (0, _1_sticker_js_1.constructSticker)(document, getFileId(_0__file_id_js_1.FileType.Sticker), fileUniqueId, getStickerSetName);
369
369
  }
370
370
  else if (fileName) {
371
- message.document = (0, _1_document_js_1.constructDocument)(document, fileName, getFileId(_0_file_id_js_1.FileType.Document), fileUniqueId);
371
+ message.document = (0, _1_document_js_1.constructDocument)(document, fileName, getFileId(_0__file_id_js_1.FileType.Document), fileUniqueId);
372
372
  }
373
373
  else {
374
374
  (0, _1_utilities_js_1.UNREACHABLE)();