@mtkruto/node 0.68.0 → 0.70.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 (1453) hide show
  1. package/esm/0_deps.d.ts +14 -12
  2. package/esm/0_deps.d.ts.map +1 -1
  3. package/esm/0_deps.js +16 -14
  4. package/esm/3_types.d.ts +36 -33
  5. package/esm/3_types.d.ts.map +1 -1
  6. package/esm/3_types.js +36 -33
  7. package/esm/4_constants.d.ts +1 -1
  8. package/esm/4_constants.d.ts.map +1 -1
  9. package/esm/4_errors.d.ts +2 -2
  10. package/esm/4_errors.d.ts.map +1 -1
  11. package/esm/_dnt.polyfills.d.ts +7 -0
  12. package/esm/_dnt.polyfills.d.ts.map +1 -1
  13. package/esm/_dnt.polyfills.js +109 -0
  14. package/esm/client/0_abortable_loop.d.ts +27 -0
  15. package/esm/client/0_abortable_loop.d.ts.map +1 -0
  16. package/esm/client/0_abortable_loop.js +49 -0
  17. package/esm/client/0_client_abstract.d.ts +3 -3
  18. package/esm/client/0_client_abstract.d.ts.map +1 -1
  19. package/esm/client/0_filters.d.ts +10 -4
  20. package/esm/client/0_filters.d.ts.map +1 -1
  21. package/esm/client/0_filters.js +6 -3
  22. package/esm/client/0_html.d.ts +1 -1
  23. package/esm/client/0_html.d.ts.map +1 -1
  24. package/esm/client/0_html.js +1 -1
  25. package/esm/client/0_markdown.d.ts +1 -1
  26. package/esm/client/0_markdown.d.ts.map +1 -1
  27. package/esm/client/0_markdown.js +8 -8
  28. package/esm/client/0_params.d.ts +42 -8
  29. package/esm/client/0_params.d.ts.map +1 -1
  30. package/esm/client/0_password.d.ts +2 -2
  31. package/esm/client/0_password.d.ts.map +1 -1
  32. package/esm/client/0_password.js +1 -1
  33. package/esm/client/0_storage_operations.d.ts +55 -73
  34. package/esm/client/0_storage_operations.d.ts.map +1 -1
  35. package/esm/client/0_storage_operations.js +254 -251
  36. package/esm/client/0_update_processor.d.ts +4 -4
  37. package/esm/client/0_update_processor.d.ts.map +1 -1
  38. package/esm/client/0_utilities.d.ts +2 -2
  39. package/esm/client/0_utilities.d.ts.map +1 -1
  40. package/esm/client/0_utilities.js +8 -8
  41. package/esm/client/1_client_plain.d.ts +3 -3
  42. package/esm/client/1_client_plain.d.ts.map +1 -1
  43. package/esm/client/1_client_plain.js +2 -2
  44. package/esm/client/1_composer.d.ts +3 -3
  45. package/esm/client/1_composer.d.ts.map +1 -1
  46. package/esm/client/1_composer.js +7 -7
  47. package/esm/client/1_types.d.ts +5 -5
  48. package/esm/client/1_types.d.ts.map +1 -1
  49. package/esm/client/2_account_manager.d.ts +3 -3
  50. package/esm/client/2_account_manager.d.ts.map +1 -1
  51. package/esm/client/2_account_manager.js +7 -7
  52. package/esm/client/2_bot_info_manager.d.ts +3 -3
  53. package/esm/client/2_bot_info_manager.d.ts.map +1 -1
  54. package/esm/client/2_business_connection_manager.d.ts +4 -4
  55. package/esm/client/2_business_connection_manager.d.ts.map +1 -1
  56. package/esm/client/2_business_connection_manager.js +3 -3
  57. package/esm/client/2_client_encrypted.d.ts +3 -3
  58. package/esm/client/2_client_encrypted.d.ts.map +1 -1
  59. package/esm/client/2_file_manager.d.ts +3 -3
  60. package/esm/client/2_file_manager.d.ts.map +1 -1
  61. package/esm/client/2_file_manager.js +45 -31
  62. package/esm/client/2_network_statistics_manager.d.ts +1 -1
  63. package/esm/client/2_network_statistics_manager.d.ts.map +1 -1
  64. package/esm/client/2_payment_manager.d.ts +5 -5
  65. package/esm/client/2_payment_manager.d.ts.map +1 -1
  66. package/esm/client/2_payment_manager.js +2 -2
  67. package/esm/client/2_reaction_manager.d.ts +4 -4
  68. package/esm/client/2_reaction_manager.d.ts.map +1 -1
  69. package/esm/client/2_reaction_manager.js +2 -2
  70. package/esm/client/2_translations_manager.d.ts +5 -5
  71. package/esm/client/2_translations_manager.d.ts.map +1 -1
  72. package/esm/client/2_translations_manager.js +20 -16
  73. package/esm/client/2_update_manager.d.ts +6 -4
  74. package/esm/client/2_update_manager.d.ts.map +1 -1
  75. package/esm/client/2_update_manager.js +76 -94
  76. package/esm/client/3_client_encrypted_pool.d.ts +1 -1
  77. package/esm/client/3_client_encrypted_pool.d.ts.map +1 -1
  78. package/esm/client/3_message_manager.d.ts +12 -9
  79. package/esm/client/3_message_manager.d.ts.map +1 -1
  80. package/esm/client/3_message_manager.js +166 -45
  81. package/esm/client/3_video_chat_manager.d.ts +6 -6
  82. package/esm/client/3_video_chat_manager.d.ts.map +1 -1
  83. package/esm/client/3_video_chat_manager.js +7 -7
  84. package/esm/client/4_callback_query_manager.d.ts +6 -6
  85. package/esm/client/4_callback_query_manager.d.ts.map +1 -1
  86. package/esm/client/4_callback_query_manager.js +3 -3
  87. package/esm/client/4_chat_list_manager.d.ts +8 -9
  88. package/esm/client/4_chat_list_manager.d.ts.map +1 -1
  89. package/esm/client/4_chat_list_manager.js +18 -273
  90. package/esm/client/4_chat_manager.d.ts +9 -9
  91. package/esm/client/4_chat_manager.d.ts.map +1 -1
  92. package/esm/client/4_chat_manager.js +11 -11
  93. package/esm/client/4_forum_manager.d.ts +4 -4
  94. package/esm/client/4_forum_manager.d.ts.map +1 -1
  95. package/esm/client/4_gift_manager.d.ts +4 -4
  96. package/esm/client/4_gift_manager.d.ts.map +1 -1
  97. package/esm/client/4_gift_manager.js +4 -4
  98. package/esm/client/4_inline_query_manager.d.ts +6 -6
  99. package/esm/client/4_inline_query_manager.d.ts.map +1 -1
  100. package/esm/client/4_inline_query_manager.js +4 -4
  101. package/esm/client/4_link_preview_manager.d.ts +6 -6
  102. package/esm/client/4_link_preview_manager.d.ts.map +1 -1
  103. package/esm/client/4_link_preview_manager.js +3 -3
  104. package/esm/client/4_poll_manager.d.ts +5 -5
  105. package/esm/client/4_poll_manager.d.ts.map +1 -1
  106. package/esm/client/4_poll_manager.js +2 -2
  107. package/esm/client/4_story_manager.d.ts +8 -8
  108. package/esm/client/4_story_manager.d.ts.map +1 -1
  109. package/esm/client/4_story_manager.js +9 -9
  110. package/esm/client/5_client.d.ts +41 -23
  111. package/esm/client/5_client.d.ts.map +1 -1
  112. package/esm/client/5_client.js +476 -411
  113. package/esm/connection/0_connection.d.ts +1 -1
  114. package/esm/connection/0_connection.d.ts.map +1 -1
  115. package/esm/connection/1_connection_tcp.node.d.ts +1 -1
  116. package/esm/connection/1_connection_tcp.node.d.ts.map +1 -1
  117. package/esm/connection/1_connection_tcp.node.js +4 -4
  118. package/esm/connection/1_connection_web_socket.d.ts +1 -1
  119. package/esm/connection/1_connection_web_socket.d.ts.map +1 -1
  120. package/esm/connection/1_connection_web_socket.js +3 -3
  121. package/esm/deps/jsr.io/@std/assert/1.0.14/assert.d.ts.map +1 -0
  122. package/esm/deps/jsr.io/@std/assert/1.0.14/assertion_error.d.ts +26 -0
  123. package/esm/deps/jsr.io/@std/assert/1.0.14/assertion_error.d.ts.map +1 -0
  124. package/esm/deps/jsr.io/@std/assert/1.0.14/assertion_error.js +30 -0
  125. package/esm/deps/jsr.io/@std/assert/1.0.14/equal.d.ts.map +1 -0
  126. package/esm/deps/jsr.io/@std/assert/1.0.14/equals.d.ts.map +1 -0
  127. package/esm/deps/jsr.io/@std/assert/1.0.14/false.d.ts.map +1 -0
  128. package/esm/deps/jsr.io/@std/assert/1.0.14/unreachable.d.ts +15 -0
  129. package/esm/deps/jsr.io/@std/assert/1.0.14/unreachable.d.ts.map +1 -0
  130. package/esm/deps/jsr.io/@std/assert/1.0.14/unreachable.js +20 -0
  131. package/esm/deps/jsr.io/@std/async/1.0.14/_util.d.ts.map +1 -0
  132. package/esm/deps/jsr.io/@std/async/1.0.14/abortable.d.ts.map +1 -0
  133. package/esm/deps/jsr.io/@std/async/1.0.14/deadline.d.ts.map +1 -0
  134. package/esm/deps/jsr.io/@std/async/1.0.14/debounce.d.ts.map +1 -0
  135. package/esm/deps/jsr.io/@std/async/1.0.14/delay.d.ts.map +1 -0
  136. package/esm/deps/jsr.io/@std/async/1.0.14/delay.js +80 -0
  137. package/esm/deps/jsr.io/@std/async/1.0.14/mod.d.ts.map +1 -0
  138. package/esm/deps/jsr.io/@std/async/1.0.14/mux_async_iterator.d.ts.map +1 -0
  139. package/esm/deps/jsr.io/@std/async/1.0.14/pool.d.ts.map +1 -0
  140. package/esm/deps/jsr.io/@std/async/1.0.14/retry.d.ts.map +1 -0
  141. package/esm/deps/jsr.io/@std/async/1.0.14/tee.d.ts.map +1 -0
  142. package/esm/deps/jsr.io/@std/cache/0.2.0/_serialize_arg_list.d.ts +12 -0
  143. package/esm/deps/jsr.io/@std/cache/0.2.0/_serialize_arg_list.d.ts.map +1 -0
  144. package/esm/deps/jsr.io/@std/cache/0.2.0/_serialize_arg_list.js +69 -0
  145. package/esm/deps/jsr.io/@std/cache/0.2.0/lru_cache.d.ts +112 -0
  146. package/esm/deps/jsr.io/@std/cache/0.2.0/lru_cache.d.ts.map +1 -0
  147. package/esm/deps/jsr.io/@std/cache/0.2.0/lru_cache.js +140 -0
  148. package/esm/deps/jsr.io/@std/cache/0.2.0/memoize.d.ts +111 -0
  149. package/esm/deps/jsr.io/@std/cache/0.2.0/memoize.d.ts.map +1 -0
  150. package/esm/deps/jsr.io/@std/cache/0.2.0/memoize.js +82 -0
  151. package/esm/deps/jsr.io/@std/encoding/1.0.7/hex.d.ts +39 -0
  152. package/esm/deps/jsr.io/@std/encoding/1.0.7/hex.d.ts.map +1 -0
  153. package/esm/deps/jsr.io/@std/encoding/1.0.7/hex.js +109 -0
  154. package/esm/deps/jsr.io/@std/internal/1.0.10/_os.d.ts +2 -0
  155. package/esm/deps/jsr.io/@std/internal/1.0.10/_os.d.ts.map +1 -0
  156. package/esm/deps/jsr.io/@std/internal/1.0.10/_os.js +12 -0
  157. package/esm/deps/jsr.io/@std/internal/1.0.10/os.d.ts +3 -0
  158. package/esm/deps/jsr.io/@std/internal/1.0.10/os.d.ts.map +1 -0
  159. package/esm/deps/jsr.io/@std/internal/1.0.10/os.js +5 -0
  160. package/esm/deps/jsr.io/@std/path/1.1.2/_common/assert_path.d.ts.map +1 -0
  161. package/esm/deps/jsr.io/@std/path/1.1.2/_common/basename.d.ts.map +1 -0
  162. package/esm/deps/jsr.io/@std/path/1.1.2/_common/constants.d.ts.map +1 -0
  163. package/esm/deps/jsr.io/@std/path/1.1.2/_common/from_file_url.d.ts.map +1 -0
  164. package/esm/deps/jsr.io/@std/path/1.1.2/_common/normalize.d.ts.map +1 -0
  165. package/esm/deps/jsr.io/@std/path/1.1.2/_common/normalize_string.d.ts.map +1 -0
  166. package/esm/deps/jsr.io/@std/path/1.1.2/_common/strip_trailing_separators.d.ts.map +1 -0
  167. package/esm/deps/jsr.io/@std/path/1.1.2/_common/to_file_url.d.ts.map +1 -0
  168. package/esm/deps/jsr.io/@std/path/1.1.2/basename.d.ts.map +1 -0
  169. package/esm/deps/jsr.io/@std/path/1.1.2/basename.js +35 -0
  170. package/esm/deps/jsr.io/@std/path/1.1.2/extname.d.ts.map +1 -0
  171. package/esm/deps/jsr.io/@std/path/1.1.2/extname.js +28 -0
  172. package/esm/deps/jsr.io/@std/path/1.1.2/is_absolute.d.ts.map +1 -0
  173. package/esm/deps/jsr.io/@std/path/1.1.2/is_absolute.js +28 -0
  174. package/esm/deps/jsr.io/@std/path/1.1.2/join.d.ts.map +1 -0
  175. package/esm/deps/jsr.io/@std/path/1.1.2/join.js +29 -0
  176. package/esm/deps/jsr.io/@std/path/1.1.2/posix/_util.d.ts.map +1 -0
  177. package/esm/deps/jsr.io/@std/path/1.1.2/posix/basename.d.ts.map +1 -0
  178. package/esm/deps/jsr.io/@std/path/1.1.2/posix/extname.d.ts.map +1 -0
  179. package/esm/deps/jsr.io/@std/path/1.1.2/posix/from_file_url.d.ts.map +1 -0
  180. package/esm/deps/jsr.io/@std/path/1.1.2/posix/is_absolute.d.ts.map +1 -0
  181. package/esm/deps/jsr.io/@std/path/1.1.2/posix/join.d.ts.map +1 -0
  182. package/esm/deps/jsr.io/@std/path/1.1.2/posix/normalize.d.ts.map +1 -0
  183. package/esm/deps/jsr.io/@std/path/1.1.2/posix/to_file_url.d.ts.map +1 -0
  184. package/esm/deps/jsr.io/@std/path/1.1.2/to_file_url.d.ts.map +1 -0
  185. package/esm/deps/jsr.io/@std/path/1.1.2/to_file_url.js +28 -0
  186. package/esm/deps/jsr.io/@std/path/1.1.2/windows/_util.d.ts.map +1 -0
  187. package/esm/deps/jsr.io/@std/path/1.1.2/windows/basename.d.ts.map +1 -0
  188. package/esm/deps/jsr.io/@std/path/1.1.2/windows/extname.d.ts.map +1 -0
  189. package/esm/deps/jsr.io/@std/path/1.1.2/windows/from_file_url.d.ts.map +1 -0
  190. package/esm/deps/jsr.io/@std/path/1.1.2/windows/is_absolute.d.ts.map +1 -0
  191. package/esm/deps/jsr.io/@std/path/1.1.2/windows/join.d.ts.map +1 -0
  192. package/esm/deps/jsr.io/@std/path/1.1.2/windows/normalize.d.ts.map +1 -0
  193. package/esm/deps/jsr.io/@std/path/1.1.2/windows/to_file_url.d.ts.map +1 -0
  194. package/esm/deps/jsr.io/@std/streams/1.0.11/to_array_buffer.d.ts.map +1 -0
  195. package/esm/session/1_session.d.ts +2 -2
  196. package/esm/session/1_session.d.ts.map +1 -1
  197. package/esm/session/2_session_encrypted.d.ts +3 -3
  198. package/esm/session/2_session_encrypted.d.ts.map +1 -1
  199. package/esm/session/2_session_encrypted.js +76 -77
  200. package/esm/session/2_session_plain.js +1 -1
  201. package/esm/storage/0_storage.d.ts +2 -1
  202. package/esm/storage/0_storage.d.ts.map +1 -1
  203. package/esm/storage/1_utilities.d.ts +14 -11
  204. package/esm/storage/1_utilities.d.ts.map +1 -1
  205. package/esm/storage/1_utilities.js +17 -17
  206. package/esm/storage/2_storage_indexed_db.d.ts +2 -1
  207. package/esm/storage/2_storage_indexed_db.d.ts.map +1 -1
  208. package/esm/storage/2_storage_indexed_db.js +6 -3
  209. package/esm/storage/2_storage_local_storage.node.d.ts +2 -1
  210. package/esm/storage/2_storage_local_storage.node.d.ts.map +1 -1
  211. package/esm/storage/2_storage_local_storage.node.js +6 -3
  212. package/esm/storage/2_storage_memory.d.ts +3 -2
  213. package/esm/storage/2_storage_memory.d.ts.map +1 -1
  214. package/esm/storage/2_storage_memory.js +5 -2
  215. package/esm/storage/2_storage_session_storage.d.ts +3 -2
  216. package/esm/storage/2_storage_session_storage.d.ts.map +1 -1
  217. package/esm/storage/2_storage_session_storage.js +6 -3
  218. package/esm/tl/0_utilities.d.ts +1 -0
  219. package/esm/tl/0_utilities.d.ts.map +1 -1
  220. package/esm/tl/0_utilities.js +21 -2
  221. package/esm/tl/1_telegram_api.d.ts +810 -254
  222. package/esm/tl/1_telegram_api.d.ts.map +1 -1
  223. package/esm/tl/1_telegram_api.js +912 -213
  224. package/esm/tl/1_tl_reader.d.ts +3 -3
  225. package/esm/tl/1_tl_reader.d.ts.map +1 -1
  226. package/esm/tl/1_tl_reader.js +8 -8
  227. package/esm/tl/1_tl_writer.d.ts +3 -3
  228. package/esm/tl/1_tl_writer.d.ts.map +1 -1
  229. package/esm/tl/1_tl_writer.js +6 -6
  230. package/esm/tl/1_utilities.d.ts +1 -1
  231. package/esm/tl/1_utilities.d.ts.map +1 -1
  232. package/esm/tl/1_utilities.js +2 -2
  233. package/esm/tl/2_message.js +1 -1
  234. package/esm/tl/2_mtproto.d.ts +2 -2
  235. package/esm/tl/2_mtproto.d.ts.map +1 -1
  236. package/esm/tl/2_telegram.d.ts +1 -1
  237. package/esm/tl/2_telegram.d.ts.map +1 -1
  238. package/esm/transport/0_obfuscation.d.ts +1 -1
  239. package/esm/transport/0_obfuscation.d.ts.map +1 -1
  240. package/esm/transport/0_obfuscation.js +2 -2
  241. package/esm/transport/0_transport.d.ts +1 -1
  242. package/esm/transport/0_transport.d.ts.map +1 -1
  243. package/esm/transport/1_transport_abridged.d.ts +1 -1
  244. package/esm/transport/1_transport_abridged.d.ts.map +1 -1
  245. package/esm/transport/1_transport_intermediate.d.ts +1 -1
  246. package/esm/transport/1_transport_intermediate.d.ts.map +1 -1
  247. package/esm/transport/1_transport_provider.d.ts +2 -2
  248. package/esm/transport/1_transport_provider.d.ts.map +1 -1
  249. package/esm/transport/2_transport_provider_tcp.d.ts +1 -1
  250. package/esm/transport/2_transport_provider_tcp.d.ts.map +1 -1
  251. package/esm/transport/2_transport_provider_web_socket.d.ts +1 -1
  252. package/esm/transport/2_transport_provider_web_socket.d.ts.map +1 -1
  253. package/esm/transport/2_transport_provider_web_socket.js +1 -1
  254. package/esm/types/0_birthday.d.ts +1 -1
  255. package/esm/types/0_birthday.d.ts.map +1 -1
  256. package/esm/types/0_callback_query_answer.d.ts +1 -1
  257. package/esm/types/0_callback_query_answer.d.ts.map +1 -1
  258. package/esm/types/0_callback_query_question.js +2 -2
  259. package/esm/types/0_chat_administrator_rights.d.ts +1 -1
  260. package/esm/types/0_chat_administrator_rights.d.ts.map +1 -1
  261. package/esm/types/0_chat_member_rights.d.ts +1 -1
  262. package/esm/types/0_chat_member_rights.d.ts.map +1 -1
  263. package/esm/types/0_contact.d.ts +1 -1
  264. package/esm/types/0_contact.d.ts.map +1 -1
  265. package/esm/types/0_dice.d.ts +1 -1
  266. package/esm/types/0_dice.d.ts.map +1 -1
  267. package/esm/types/0_failed_invitation.d.ts +1 -1
  268. package/esm/types/0_failed_invitation.d.ts.map +1 -1
  269. package/esm/types/0_file_source.d.ts +1 -1
  270. package/esm/types/0_file_source.d.ts.map +1 -1
  271. package/esm/types/0_invoice.d.ts +1 -1
  272. package/esm/types/0_invoice.d.ts.map +1 -1
  273. package/esm/types/0_live_stream_channel.d.ts +1 -1
  274. package/esm/types/0_live_stream_channel.d.ts.map +1 -1
  275. package/esm/types/0_mask_position.d.ts +1 -1
  276. package/esm/types/0_mask_position.d.ts.map +1 -1
  277. package/esm/types/0_mask_position.js +1 -1
  278. package/esm/types/0_message_search_filter.d.ts +1 -1
  279. package/esm/types/0_message_search_filter.d.ts.map +1 -1
  280. package/esm/types/0_opening_hours.d.ts +1 -1
  281. package/esm/types/0_opening_hours.d.ts.map +1 -1
  282. package/esm/types/0_reaction.js +5 -5
  283. package/esm/types/0_refunded_payment.d.ts +1 -1
  284. package/esm/types/0_refunded_payment.d.ts.map +1 -1
  285. package/esm/types/0_restriction_reason.d.ts +1 -1
  286. package/esm/types/0_restriction_reason.d.ts.map +1 -1
  287. package/esm/types/0_self_destruct_option.js +3 -3
  288. package/esm/types/0_shipping_address.d.ts +1 -1
  289. package/esm/types/0_shipping_address.d.ts.map +1 -1
  290. package/esm/types/0_slow_mode_duration.js +2 -2
  291. package/esm/types/0_voice.d.ts +1 -1
  292. package/esm/types/0_voice.d.ts.map +1 -1
  293. package/esm/types/0_voice_transcription.d.ts +1 -1
  294. package/esm/types/0_voice_transcription.d.ts.map +1 -1
  295. package/esm/types/1_animation.d.ts +1 -1
  296. package/esm/types/1_animation.d.ts.map +1 -1
  297. package/esm/types/1_audio.d.ts +1 -1
  298. package/esm/types/1_audio.d.ts.map +1 -1
  299. package/esm/types/1_bot_command_scope.d.ts +2 -2
  300. package/esm/types/1_bot_command_scope.d.ts.map +1 -1
  301. package/esm/types/1_chat_p.d.ts +12 -2
  302. package/esm/types/1_chat_p.d.ts.map +1 -1
  303. package/esm/types/1_chat_p.js +6 -2
  304. package/esm/types/1_document.d.ts +1 -1
  305. package/esm/types/1_document.d.ts.map +1 -1
  306. package/esm/types/1_giveaway.d.ts +2 -2
  307. package/esm/types/1_giveaway.d.ts.map +1 -1
  308. package/esm/types/1_inline_keyboard_button.d.ts +3 -3
  309. package/esm/types/1_inline_keyboard_button.d.ts.map +1 -1
  310. package/esm/types/1_inline_keyboard_button.js +4 -4
  311. package/esm/types/1_inline_query_result_button.d.ts +1 -1
  312. package/esm/types/1_inline_query_result_button.d.ts.map +1 -1
  313. package/esm/types/1_input_story_content.d.ts +1 -1
  314. package/esm/types/1_input_story_content.d.ts.map +1 -1
  315. package/esm/types/1_keyboard_button.d.ts +3 -3
  316. package/esm/types/1_keyboard_button.d.ts.map +1 -1
  317. package/esm/types/1_keyboard_button.js +1 -1
  318. package/esm/types/1_message_reaction.d.ts +1 -1
  319. package/esm/types/1_message_reaction.d.ts.map +1 -1
  320. package/esm/types/1_message_reaction.js +2 -2
  321. package/esm/types/1_mini_app_info.d.ts +2 -2
  322. package/esm/types/1_mini_app_info.d.ts.map +1 -1
  323. package/esm/types/1_network_statistics.d.ts +1 -1
  324. package/esm/types/1_network_statistics.d.ts.map +1 -1
  325. package/esm/types/1_order_info.d.ts +2 -2
  326. package/esm/types/1_order_info.d.ts.map +1 -1
  327. package/esm/types/1_photo.d.ts +1 -1
  328. package/esm/types/1_photo.d.ts.map +1 -1
  329. package/esm/types/1_reaction_count.d.ts +2 -2
  330. package/esm/types/1_reaction_count.d.ts.map +1 -1
  331. package/esm/types/1_sticker.d.ts +3 -3
  332. package/esm/types/1_sticker.d.ts.map +1 -1
  333. package/esm/types/1_sticker.js +2 -2
  334. package/esm/types/1_story_reaction.d.ts +2 -2
  335. package/esm/types/1_story_reaction.d.ts.map +1 -1
  336. package/esm/types/1_venue.d.ts +1 -1
  337. package/esm/types/1_venue.d.ts.map +1 -1
  338. package/esm/types/1_video.d.ts +1 -1
  339. package/esm/types/1_video.d.ts.map +1 -1
  340. package/esm/types/1_video_note.d.ts +1 -1
  341. package/esm/types/1_video_note.d.ts.map +1 -1
  342. package/esm/types/2_chat.d.ts +6 -9
  343. package/esm/types/2_chat.d.ts.map +1 -1
  344. package/esm/types/2_chat.js +10 -15
  345. package/esm/types/2_inactive_chat.d.ts +1 -1
  346. package/esm/types/2_inactive_chat.d.ts.map +1 -1
  347. package/esm/types/2_message_entity.d.ts +139 -0
  348. package/esm/types/2_message_entity.d.ts.map +1 -0
  349. package/esm/types/2_message_entity.js +183 -0
  350. package/esm/types/2_message_interactions.d.ts +1 -1
  351. package/esm/types/2_message_interactions.d.ts.map +1 -1
  352. package/esm/types/2_message_reaction_count.d.ts +4 -5
  353. package/esm/types/2_message_reaction_count.d.ts.map +1 -1
  354. package/esm/types/2_message_reaction_count.js +4 -6
  355. package/esm/types/2_poll_answer.d.ts +3 -4
  356. package/esm/types/2_poll_answer.d.ts.map +1 -1
  357. package/esm/types/2_poll_answer.js +4 -5
  358. package/esm/types/2_reply_markup.d.ts +3 -3
  359. package/esm/types/2_reply_markup.d.ts.map +1 -1
  360. package/esm/types/2_sticker_set.d.ts +51 -0
  361. package/esm/types/2_sticker_set.d.ts.map +1 -0
  362. package/esm/types/2_sticker_set.js +91 -0
  363. package/esm/types/2_story_content.d.ts +2 -2
  364. package/esm/types/2_story_content.d.ts.map +1 -1
  365. package/esm/types/2_story_interactions.d.ts +2 -2
  366. package/esm/types/2_story_interactions.d.ts.map +1 -1
  367. package/esm/types/2_story_interactive_area.d.ts +6 -6
  368. package/esm/types/2_story_interactive_area.d.ts.map +1 -1
  369. package/esm/types/2_story_interactive_area.js +2 -2
  370. package/esm/types/2_story_privacy.d.ts +46 -0
  371. package/esm/types/2_story_privacy.d.ts.map +1 -0
  372. package/esm/types/2_story_privacy.js +76 -0
  373. package/esm/types/2_successful_payment.d.ts +2 -2
  374. package/esm/types/2_successful_payment.d.ts.map +1 -1
  375. package/esm/types/2_user.d.ts +65 -0
  376. package/esm/types/2_user.d.ts.map +1 -0
  377. package/esm/types/2_user.js +73 -0
  378. package/esm/types/3_business_connection.d.ts +37 -0
  379. package/esm/types/3_business_connection.d.ts.map +1 -0
  380. package/esm/types/3_business_connection.js +36 -0
  381. package/esm/types/3_chat_member.d.ts +70 -0
  382. package/esm/types/3_chat_member.d.ts.map +1 -0
  383. package/esm/types/3_chat_member.js +114 -0
  384. package/esm/types/3_chat_settings.d.ts +46 -0
  385. package/esm/types/3_chat_settings.d.ts.map +1 -0
  386. package/esm/types/3_chat_settings.js +51 -0
  387. package/esm/types/3_chosen_inline_result.d.ts +38 -0
  388. package/esm/types/3_chosen_inline_result.d.ts.map +1 -0
  389. package/esm/types/3_chosen_inline_result.js +37 -0
  390. package/esm/types/3_forward_header.d.ts +58 -0
  391. package/esm/types/3_forward_header.d.ts.map +1 -0
  392. package/esm/types/3_forward_header.js +73 -0
  393. package/esm/types/3_game.d.ts +40 -0
  394. package/esm/types/3_game.d.ts.map +1 -0
  395. package/esm/types/3_gift_upgraded_component.d.ts +95 -0
  396. package/esm/types/3_gift_upgraded_component.d.ts.map +1 -0
  397. package/esm/types/3_gift_upgraded_component.js +88 -0
  398. package/esm/types/3_inline_query.d.ts +40 -0
  399. package/esm/types/3_inline_query.d.ts.map +1 -0
  400. package/esm/types/3_inline_query.js +60 -0
  401. package/esm/types/3_input_media.d.ts +122 -0
  402. package/esm/types/3_input_media.d.ts.map +1 -0
  403. package/esm/types/3_invite_link.d.ts +47 -0
  404. package/esm/types/3_invite_link.d.ts.map +1 -0
  405. package/esm/types/3_invite_link.js +48 -0
  406. package/esm/types/3_message_reactions.d.ts +42 -0
  407. package/esm/types/3_message_reactions.d.ts.map +1 -0
  408. package/esm/types/3_message_reactions.js +54 -0
  409. package/esm/types/3_poll_option.d.ts +34 -0
  410. package/esm/types/3_poll_option.d.ts.map +1 -0
  411. package/esm/types/3_poll_option.js +29 -0
  412. package/esm/types/3_pre_checkout_query.d.ts +34 -0
  413. package/esm/types/3_pre_checkout_query.d.ts.map +1 -0
  414. package/esm/types/3_pre_checkout_query.js +39 -0
  415. package/esm/types/3_reply_quote.d.ts +32 -0
  416. package/esm/types/3_reply_quote.d.ts.map +1 -0
  417. package/esm/types/3_reply_quote.js +30 -0
  418. package/esm/types/3_story.d.ts +8 -9
  419. package/esm/types/3_story.d.ts.map +1 -1
  420. package/esm/types/3_story.js +6 -7
  421. package/esm/types/4_chat_member_updated.d.ts +43 -0
  422. package/esm/types/4_chat_member_updated.d.ts.map +1 -0
  423. package/esm/types/4_chat_member_updated.js +52 -0
  424. package/esm/types/4_gift.d.ts +94 -0
  425. package/esm/types/4_gift.d.ts.map +1 -0
  426. package/esm/types/4_gift.js +105 -0
  427. package/esm/types/4_join_request.d.ts +39 -0
  428. package/esm/types/4_join_request.d.ts.map +1 -0
  429. package/esm/types/4_join_request.js +62 -0
  430. package/esm/types/4_poll.d.ts +55 -0
  431. package/esm/types/4_poll.d.ts.map +1 -0
  432. package/esm/types/4_poll.js +43 -0
  433. package/esm/types/4_reply_to.d.ts +35 -0
  434. package/esm/types/4_reply_to.d.ts.map +1 -0
  435. package/esm/types/5_claimed_gift.d.ts +44 -0
  436. package/esm/types/5_claimed_gift.d.ts.map +1 -0
  437. package/esm/types/5_claimed_gift.js +48 -0
  438. package/esm/types/5_link_preview.d.ts +188 -0
  439. package/esm/types/5_link_preview.d.ts.map +1 -0
  440. package/esm/types/5_link_preview.js +218 -0
  441. package/esm/types/6_claimed_gifts.d.ts +33 -0
  442. package/esm/types/6_claimed_gifts.d.ts.map +1 -0
  443. package/esm/types/6_claimed_gifts.js +43 -0
  444. package/esm/types/6_message.d.ts +616 -0
  445. package/esm/types/6_message.d.ts.map +1 -0
  446. package/esm/types/6_message.js +520 -0
  447. package/esm/types/6_message_content.d.ts +119 -0
  448. package/esm/types/6_message_content.d.ts.map +1 -0
  449. package/esm/types/7_callback_query.d.ts +43 -0
  450. package/esm/types/7_callback_query.d.ts.map +1 -0
  451. package/esm/types/7_callback_query.js +59 -0
  452. package/esm/types/7_chat_list_item.d.ts +35 -0
  453. package/esm/types/7_chat_list_item.d.ts.map +1 -0
  454. package/esm/types/7_chat_list_item.js +87 -0
  455. package/esm/types/7_inline_query_result.d.ts +251 -0
  456. package/esm/types/7_inline_query_result.d.ts.map +1 -0
  457. package/esm/types/7_inline_query_result.js +380 -0
  458. package/esm/types/7_saved_chat.d.ts +35 -0
  459. package/esm/types/7_saved_chat.d.ts.map +1 -0
  460. package/esm/types/7_saved_chat.js +43 -0
  461. package/esm/types/7_topic.d.ts +34 -0
  462. package/esm/types/7_topic.d.ts.map +1 -0
  463. package/esm/types/7_topic.js +61 -0
  464. package/esm/types/8_inline_query_answer.d.ts +32 -0
  465. package/esm/types/8_inline_query_answer.d.ts.map +1 -0
  466. package/esm/types/8_inline_query_answer.js +28 -0
  467. package/esm/types/8_saved_chats.d.ts +33 -0
  468. package/esm/types/8_saved_chats.d.ts.map +1 -0
  469. package/esm/types/8_saved_chats.js +36 -0
  470. package/esm/types/8_update.d.ts +528 -0
  471. package/esm/types/8_update.d.ts.map +1 -0
  472. package/esm/types/_file_id.d.ts +61 -50
  473. package/esm/types/_file_id.d.ts.map +1 -1
  474. package/esm/types/_file_id.js +92 -73
  475. package/esm/types/_getters.d.ts +3 -10
  476. package/esm/types/_getters.d.ts.map +1 -1
  477. package/esm/utilities/0_bigint.js +5 -5
  478. package/esm/utilities/0_buffer.js +3 -3
  479. package/esm/utilities/0_env.js +1 -1
  480. package/esm/utilities/0_hash.d.ts +2 -2
  481. package/esm/utilities/0_hash.d.ts.map +1 -1
  482. package/esm/utilities/0_misc.d.ts +1 -0
  483. package/esm/utilities/0_misc.d.ts.map +1 -1
  484. package/esm/utilities/0_misc.js +18 -4
  485. package/esm/utilities/0_part_stream.d.ts +1 -1
  486. package/esm/utilities/0_part_stream.d.ts.map +1 -1
  487. package/esm/utilities/0_rle.js +1 -1
  488. package/esm/utilities/1_auth.js +1 -1
  489. package/esm/utilities/1_base64.js +1 -1
  490. package/esm/utilities/1_logger.js +2 -2
  491. package/esm/utilities/1_math.js +2 -2
  492. package/esm/utilities/2_queue.js +1 -1
  493. package/package.json +1 -1
  494. package/script/0_deps.d.ts +14 -12
  495. package/script/0_deps.d.ts.map +1 -1
  496. package/script/0_deps.js +20 -15
  497. package/script/3_types.d.ts +36 -33
  498. package/script/3_types.d.ts.map +1 -1
  499. package/script/3_types.js +36 -33
  500. package/script/4_constants.d.ts +1 -1
  501. package/script/4_constants.d.ts.map +1 -1
  502. package/script/4_errors.d.ts +2 -2
  503. package/script/4_errors.d.ts.map +1 -1
  504. package/script/_dnt.polyfills.d.ts +7 -0
  505. package/script/_dnt.polyfills.d.ts.map +1 -1
  506. package/script/_dnt.polyfills.js +109 -0
  507. package/script/client/0_abortable_loop.d.ts +27 -0
  508. package/script/client/0_abortable_loop.d.ts.map +1 -0
  509. package/script/client/0_abortable_loop.js +53 -0
  510. package/script/client/0_client_abstract.d.ts +3 -3
  511. package/script/client/0_client_abstract.d.ts.map +1 -1
  512. package/script/client/0_filters.d.ts +10 -4
  513. package/script/client/0_filters.d.ts.map +1 -1
  514. package/script/client/0_filters.js +6 -3
  515. package/script/client/0_html.d.ts +1 -1
  516. package/script/client/0_html.d.ts.map +1 -1
  517. package/script/client/0_html.js +1 -1
  518. package/script/client/0_markdown.d.ts +1 -1
  519. package/script/client/0_markdown.d.ts.map +1 -1
  520. package/script/client/0_markdown.js +8 -8
  521. package/script/client/0_params.d.ts +42 -8
  522. package/script/client/0_params.d.ts.map +1 -1
  523. package/script/client/0_password.d.ts +2 -2
  524. package/script/client/0_password.d.ts.map +1 -1
  525. package/script/client/0_password.js +1 -1
  526. package/script/client/0_storage_operations.d.ts +55 -73
  527. package/script/client/0_storage_operations.d.ts.map +1 -1
  528. package/script/client/0_storage_operations.js +252 -249
  529. package/script/client/0_update_processor.d.ts +4 -4
  530. package/script/client/0_update_processor.d.ts.map +1 -1
  531. package/script/client/0_utilities.d.ts +2 -2
  532. package/script/client/0_utilities.d.ts.map +1 -1
  533. package/script/client/0_utilities.js +8 -8
  534. package/script/client/1_client_plain.d.ts +3 -3
  535. package/script/client/1_client_plain.d.ts.map +1 -1
  536. package/script/client/1_client_plain.js +2 -2
  537. package/script/client/1_composer.d.ts +3 -3
  538. package/script/client/1_composer.d.ts.map +1 -1
  539. package/script/client/1_composer.js +7 -7
  540. package/script/client/1_types.d.ts +5 -5
  541. package/script/client/1_types.d.ts.map +1 -1
  542. package/script/client/2_account_manager.d.ts +3 -3
  543. package/script/client/2_account_manager.d.ts.map +1 -1
  544. package/script/client/2_account_manager.js +7 -7
  545. package/script/client/2_bot_info_manager.d.ts +3 -3
  546. package/script/client/2_bot_info_manager.d.ts.map +1 -1
  547. package/script/client/2_business_connection_manager.d.ts +4 -4
  548. package/script/client/2_business_connection_manager.d.ts.map +1 -1
  549. package/script/client/2_business_connection_manager.js +3 -3
  550. package/script/client/2_client_encrypted.d.ts +3 -3
  551. package/script/client/2_client_encrypted.d.ts.map +1 -1
  552. package/script/client/2_file_manager.d.ts +3 -3
  553. package/script/client/2_file_manager.d.ts.map +1 -1
  554. package/script/client/2_file_manager.js +45 -31
  555. package/script/client/2_network_statistics_manager.d.ts +1 -1
  556. package/script/client/2_network_statistics_manager.d.ts.map +1 -1
  557. package/script/client/2_payment_manager.d.ts +5 -5
  558. package/script/client/2_payment_manager.d.ts.map +1 -1
  559. package/script/client/2_payment_manager.js +2 -2
  560. package/script/client/2_reaction_manager.d.ts +4 -4
  561. package/script/client/2_reaction_manager.d.ts.map +1 -1
  562. package/script/client/2_reaction_manager.js +2 -2
  563. package/script/client/2_translations_manager.d.ts +5 -5
  564. package/script/client/2_translations_manager.d.ts.map +1 -1
  565. package/script/client/2_translations_manager.js +20 -16
  566. package/script/client/2_update_manager.d.ts +6 -4
  567. package/script/client/2_update_manager.d.ts.map +1 -1
  568. package/script/client/2_update_manager.js +76 -94
  569. package/script/client/3_client_encrypted_pool.d.ts +1 -1
  570. package/script/client/3_client_encrypted_pool.d.ts.map +1 -1
  571. package/script/client/3_message_manager.d.ts +12 -9
  572. package/script/client/3_message_manager.d.ts.map +1 -1
  573. package/script/client/3_message_manager.js +165 -44
  574. package/script/client/3_video_chat_manager.d.ts +6 -6
  575. package/script/client/3_video_chat_manager.d.ts.map +1 -1
  576. package/script/client/3_video_chat_manager.js +7 -7
  577. package/script/client/4_callback_query_manager.d.ts +6 -6
  578. package/script/client/4_callback_query_manager.d.ts.map +1 -1
  579. package/script/client/4_callback_query_manager.js +3 -3
  580. package/script/client/4_chat_list_manager.d.ts +8 -9
  581. package/script/client/4_chat_list_manager.d.ts.map +1 -1
  582. package/script/client/4_chat_list_manager.js +17 -272
  583. package/script/client/4_chat_manager.d.ts +9 -9
  584. package/script/client/4_chat_manager.d.ts.map +1 -1
  585. package/script/client/4_chat_manager.js +11 -11
  586. package/script/client/4_forum_manager.d.ts +4 -4
  587. package/script/client/4_forum_manager.d.ts.map +1 -1
  588. package/script/client/4_gift_manager.d.ts +4 -4
  589. package/script/client/4_gift_manager.d.ts.map +1 -1
  590. package/script/client/4_gift_manager.js +4 -4
  591. package/script/client/4_inline_query_manager.d.ts +6 -6
  592. package/script/client/4_inline_query_manager.d.ts.map +1 -1
  593. package/script/client/4_inline_query_manager.js +4 -4
  594. package/script/client/4_link_preview_manager.d.ts +6 -6
  595. package/script/client/4_link_preview_manager.d.ts.map +1 -1
  596. package/script/client/4_link_preview_manager.js +3 -3
  597. package/script/client/4_poll_manager.d.ts +5 -5
  598. package/script/client/4_poll_manager.d.ts.map +1 -1
  599. package/script/client/4_poll_manager.js +2 -2
  600. package/script/client/4_story_manager.d.ts +8 -8
  601. package/script/client/4_story_manager.d.ts.map +1 -1
  602. package/script/client/4_story_manager.js +9 -9
  603. package/script/client/5_client.d.ts +41 -23
  604. package/script/client/5_client.d.ts.map +1 -1
  605. package/script/client/5_client.js +474 -409
  606. package/script/connection/0_connection.d.ts +1 -1
  607. package/script/connection/0_connection.d.ts.map +1 -1
  608. package/script/connection/1_connection_tcp.node.d.ts +1 -1
  609. package/script/connection/1_connection_tcp.node.d.ts.map +1 -1
  610. package/script/connection/1_connection_tcp.node.js +4 -4
  611. package/script/connection/1_connection_web_socket.d.ts +1 -1
  612. package/script/connection/1_connection_web_socket.d.ts.map +1 -1
  613. package/script/connection/1_connection_web_socket.js +3 -3
  614. package/script/deps/jsr.io/@std/assert/1.0.14/assert.d.ts.map +1 -0
  615. package/script/deps/jsr.io/@std/assert/1.0.14/assertion_error.d.ts +26 -0
  616. package/script/deps/jsr.io/@std/assert/1.0.14/assertion_error.d.ts.map +1 -0
  617. package/script/deps/jsr.io/@std/assert/1.0.14/assertion_error.js +34 -0
  618. package/script/deps/jsr.io/@std/assert/1.0.14/equal.d.ts.map +1 -0
  619. package/script/deps/jsr.io/@std/assert/1.0.14/equals.d.ts.map +1 -0
  620. package/script/deps/jsr.io/@std/assert/1.0.14/false.d.ts.map +1 -0
  621. package/script/deps/jsr.io/@std/assert/1.0.14/unreachable.d.ts +15 -0
  622. package/script/deps/jsr.io/@std/assert/1.0.14/unreachable.d.ts.map +1 -0
  623. package/script/deps/jsr.io/@std/assert/1.0.14/unreachable.js +23 -0
  624. package/script/deps/jsr.io/@std/async/1.0.14/_util.d.ts.map +1 -0
  625. package/script/deps/jsr.io/@std/async/1.0.14/abortable.d.ts.map +1 -0
  626. package/script/deps/jsr.io/@std/async/1.0.14/deadline.d.ts.map +1 -0
  627. package/script/deps/jsr.io/@std/async/1.0.14/debounce.d.ts.map +1 -0
  628. package/script/deps/jsr.io/@std/async/1.0.14/delay.d.ts.map +1 -0
  629. package/script/deps/jsr.io/@std/async/1.0.14/delay.js +116 -0
  630. package/script/deps/jsr.io/@std/async/1.0.14/mod.d.ts.map +1 -0
  631. package/script/deps/jsr.io/@std/async/1.0.14/mux_async_iterator.d.ts.map +1 -0
  632. package/script/deps/jsr.io/@std/async/1.0.14/pool.d.ts.map +1 -0
  633. package/script/deps/jsr.io/@std/async/1.0.14/retry.d.ts.map +1 -0
  634. package/script/deps/jsr.io/@std/async/1.0.14/tee.d.ts.map +1 -0
  635. package/script/deps/jsr.io/@std/cache/0.2.0/_serialize_arg_list.d.ts +12 -0
  636. package/script/deps/jsr.io/@std/cache/0.2.0/_serialize_arg_list.d.ts.map +1 -0
  637. package/script/deps/jsr.io/@std/cache/0.2.0/_serialize_arg_list.js +72 -0
  638. package/script/deps/jsr.io/@std/cache/0.2.0/lru_cache.d.ts +112 -0
  639. package/script/deps/jsr.io/@std/cache/0.2.0/lru_cache.d.ts.map +1 -0
  640. package/script/deps/jsr.io/@std/cache/0.2.0/lru_cache.js +144 -0
  641. package/script/deps/jsr.io/@std/cache/0.2.0/memoize.d.ts +111 -0
  642. package/script/deps/jsr.io/@std/cache/0.2.0/memoize.d.ts.map +1 -0
  643. package/script/deps/jsr.io/@std/cache/0.2.0/memoize.js +85 -0
  644. package/script/deps/jsr.io/@std/encoding/1.0.7/hex.d.ts +39 -0
  645. package/script/deps/jsr.io/@std/encoding/1.0.7/hex.d.ts.map +1 -0
  646. package/script/deps/jsr.io/@std/encoding/1.0.7/hex.js +113 -0
  647. package/script/deps/jsr.io/@std/internal/1.0.10/_os.d.ts +2 -0
  648. package/script/deps/jsr.io/@std/internal/1.0.10/_os.d.ts.map +1 -0
  649. package/script/deps/jsr.io/@std/internal/1.0.10/_os.js +48 -0
  650. package/script/deps/jsr.io/@std/internal/1.0.10/os.d.ts +3 -0
  651. package/script/deps/jsr.io/@std/internal/1.0.10/os.d.ts.map +1 -0
  652. package/script/deps/jsr.io/@std/internal/1.0.10/os.js +8 -0
  653. package/script/deps/jsr.io/@std/path/1.1.2/_common/assert_path.d.ts.map +1 -0
  654. package/script/deps/jsr.io/@std/path/1.1.2/_common/basename.d.ts.map +1 -0
  655. package/script/deps/jsr.io/@std/path/1.1.2/_common/constants.d.ts.map +1 -0
  656. package/script/deps/jsr.io/@std/path/1.1.2/_common/from_file_url.d.ts.map +1 -0
  657. package/script/deps/jsr.io/@std/path/1.1.2/_common/normalize.d.ts.map +1 -0
  658. package/script/deps/jsr.io/@std/path/1.1.2/_common/normalize_string.d.ts.map +1 -0
  659. package/script/deps/jsr.io/@std/path/1.1.2/_common/strip_trailing_separators.d.ts.map +1 -0
  660. package/script/deps/jsr.io/@std/path/1.1.2/_common/to_file_url.d.ts.map +1 -0
  661. package/script/deps/jsr.io/@std/path/1.1.2/basename.d.ts.map +1 -0
  662. package/script/deps/jsr.io/@std/path/1.1.2/basename.js +38 -0
  663. package/script/deps/jsr.io/@std/path/1.1.2/extname.d.ts.map +1 -0
  664. package/script/deps/jsr.io/@std/path/1.1.2/extname.js +31 -0
  665. package/script/deps/jsr.io/@std/path/1.1.2/is_absolute.d.ts.map +1 -0
  666. package/script/deps/jsr.io/@std/path/1.1.2/is_absolute.js +31 -0
  667. package/script/deps/jsr.io/@std/path/1.1.2/join.d.ts.map +1 -0
  668. package/script/deps/jsr.io/@std/path/1.1.2/join.js +32 -0
  669. package/script/deps/jsr.io/@std/path/1.1.2/posix/_util.d.ts.map +1 -0
  670. package/script/deps/jsr.io/@std/path/1.1.2/posix/basename.d.ts.map +1 -0
  671. package/script/deps/jsr.io/@std/path/1.1.2/posix/extname.d.ts.map +1 -0
  672. package/script/deps/jsr.io/@std/path/1.1.2/posix/from_file_url.d.ts.map +1 -0
  673. package/script/deps/jsr.io/@std/path/1.1.2/posix/is_absolute.d.ts.map +1 -0
  674. package/script/deps/jsr.io/@std/path/1.1.2/posix/join.d.ts.map +1 -0
  675. package/script/deps/jsr.io/@std/path/1.1.2/posix/normalize.d.ts.map +1 -0
  676. package/script/deps/jsr.io/@std/path/1.1.2/posix/to_file_url.d.ts.map +1 -0
  677. package/script/deps/jsr.io/@std/path/1.1.2/to_file_url.d.ts.map +1 -0
  678. package/script/deps/jsr.io/@std/path/1.1.2/to_file_url.js +31 -0
  679. package/script/deps/jsr.io/@std/path/1.1.2/windows/_util.d.ts.map +1 -0
  680. package/script/deps/jsr.io/@std/path/1.1.2/windows/basename.d.ts.map +1 -0
  681. package/script/deps/jsr.io/@std/path/1.1.2/windows/extname.d.ts.map +1 -0
  682. package/script/deps/jsr.io/@std/path/1.1.2/windows/from_file_url.d.ts.map +1 -0
  683. package/script/deps/jsr.io/@std/path/1.1.2/windows/is_absolute.d.ts.map +1 -0
  684. package/script/deps/jsr.io/@std/path/1.1.2/windows/join.d.ts.map +1 -0
  685. package/script/deps/jsr.io/@std/path/1.1.2/windows/normalize.d.ts.map +1 -0
  686. package/script/deps/jsr.io/@std/path/1.1.2/windows/to_file_url.d.ts.map +1 -0
  687. package/script/deps/jsr.io/@std/streams/1.0.11/to_array_buffer.d.ts.map +1 -0
  688. package/script/session/1_session.d.ts +2 -2
  689. package/script/session/1_session.d.ts.map +1 -1
  690. package/script/session/2_session_encrypted.d.ts +3 -3
  691. package/script/session/2_session_encrypted.d.ts.map +1 -1
  692. package/script/session/2_session_encrypted.js +75 -76
  693. package/script/session/2_session_plain.js +1 -1
  694. package/script/storage/0_storage.d.ts +2 -1
  695. package/script/storage/0_storage.d.ts.map +1 -1
  696. package/script/storage/1_utilities.d.ts +14 -11
  697. package/script/storage/1_utilities.d.ts.map +1 -1
  698. package/script/storage/1_utilities.js +39 -39
  699. package/script/storage/2_storage_indexed_db.d.ts +2 -1
  700. package/script/storage/2_storage_indexed_db.d.ts.map +1 -1
  701. package/script/storage/2_storage_indexed_db.js +6 -3
  702. package/script/storage/2_storage_local_storage.node.d.ts +2 -1
  703. package/script/storage/2_storage_local_storage.node.d.ts.map +1 -1
  704. package/script/storage/2_storage_local_storage.node.js +6 -3
  705. package/script/storage/2_storage_memory.d.ts +3 -2
  706. package/script/storage/2_storage_memory.d.ts.map +1 -1
  707. package/script/storage/2_storage_memory.js +5 -2
  708. package/script/storage/2_storage_session_storage.d.ts +3 -2
  709. package/script/storage/2_storage_session_storage.d.ts.map +1 -1
  710. package/script/storage/2_storage_session_storage.js +6 -3
  711. package/script/tl/0_utilities.d.ts +1 -0
  712. package/script/tl/0_utilities.d.ts.map +1 -1
  713. package/script/tl/0_utilities.js +21 -1
  714. package/script/tl/1_telegram_api.d.ts +810 -254
  715. package/script/tl/1_telegram_api.d.ts.map +1 -1
  716. package/script/tl/1_telegram_api.js +912 -213
  717. package/script/tl/1_tl_reader.d.ts +3 -3
  718. package/script/tl/1_tl_reader.d.ts.map +1 -1
  719. package/script/tl/1_tl_reader.js +8 -8
  720. package/script/tl/1_tl_writer.d.ts +3 -3
  721. package/script/tl/1_tl_writer.d.ts.map +1 -1
  722. package/script/tl/1_tl_writer.js +6 -6
  723. package/script/tl/1_utilities.d.ts +1 -1
  724. package/script/tl/1_utilities.d.ts.map +1 -1
  725. package/script/tl/1_utilities.js +2 -2
  726. package/script/tl/2_message.js +1 -1
  727. package/script/tl/2_mtproto.d.ts +2 -2
  728. package/script/tl/2_mtproto.d.ts.map +1 -1
  729. package/script/tl/2_telegram.d.ts +1 -1
  730. package/script/tl/2_telegram.d.ts.map +1 -1
  731. package/script/transport/0_obfuscation.d.ts +1 -1
  732. package/script/transport/0_obfuscation.d.ts.map +1 -1
  733. package/script/transport/0_obfuscation.js +2 -2
  734. package/script/transport/0_transport.d.ts +1 -1
  735. package/script/transport/0_transport.d.ts.map +1 -1
  736. package/script/transport/1_transport_abridged.d.ts +1 -1
  737. package/script/transport/1_transport_abridged.d.ts.map +1 -1
  738. package/script/transport/1_transport_intermediate.d.ts +1 -1
  739. package/script/transport/1_transport_intermediate.d.ts.map +1 -1
  740. package/script/transport/1_transport_provider.d.ts +2 -2
  741. package/script/transport/1_transport_provider.d.ts.map +1 -1
  742. package/script/transport/2_transport_provider_tcp.d.ts +1 -1
  743. package/script/transport/2_transport_provider_tcp.d.ts.map +1 -1
  744. package/script/transport/2_transport_provider_web_socket.d.ts +1 -1
  745. package/script/transport/2_transport_provider_web_socket.d.ts.map +1 -1
  746. package/script/transport/2_transport_provider_web_socket.js +1 -1
  747. package/script/types/0_birthday.d.ts +1 -1
  748. package/script/types/0_birthday.d.ts.map +1 -1
  749. package/script/types/0_callback_query_answer.d.ts +1 -1
  750. package/script/types/0_callback_query_answer.d.ts.map +1 -1
  751. package/script/types/0_callback_query_question.js +2 -2
  752. package/script/types/0_chat_administrator_rights.d.ts +1 -1
  753. package/script/types/0_chat_administrator_rights.d.ts.map +1 -1
  754. package/script/types/0_chat_member_rights.d.ts +1 -1
  755. package/script/types/0_chat_member_rights.d.ts.map +1 -1
  756. package/script/types/0_contact.d.ts +1 -1
  757. package/script/types/0_contact.d.ts.map +1 -1
  758. package/script/types/0_dice.d.ts +1 -1
  759. package/script/types/0_dice.d.ts.map +1 -1
  760. package/script/types/0_failed_invitation.d.ts +1 -1
  761. package/script/types/0_failed_invitation.d.ts.map +1 -1
  762. package/script/types/0_file_source.d.ts +1 -1
  763. package/script/types/0_file_source.d.ts.map +1 -1
  764. package/script/types/0_invoice.d.ts +1 -1
  765. package/script/types/0_invoice.d.ts.map +1 -1
  766. package/script/types/0_live_stream_channel.d.ts +1 -1
  767. package/script/types/0_live_stream_channel.d.ts.map +1 -1
  768. package/script/types/0_mask_position.d.ts +1 -1
  769. package/script/types/0_mask_position.d.ts.map +1 -1
  770. package/script/types/0_mask_position.js +1 -1
  771. package/script/types/0_message_search_filter.d.ts +1 -1
  772. package/script/types/0_message_search_filter.d.ts.map +1 -1
  773. package/script/types/0_opening_hours.d.ts +1 -1
  774. package/script/types/0_opening_hours.d.ts.map +1 -1
  775. package/script/types/0_reaction.js +5 -5
  776. package/script/types/0_refunded_payment.d.ts +1 -1
  777. package/script/types/0_refunded_payment.d.ts.map +1 -1
  778. package/script/types/0_restriction_reason.d.ts +1 -1
  779. package/script/types/0_restriction_reason.d.ts.map +1 -1
  780. package/script/types/0_self_destruct_option.js +3 -3
  781. package/script/types/0_shipping_address.d.ts +1 -1
  782. package/script/types/0_shipping_address.d.ts.map +1 -1
  783. package/script/types/0_slow_mode_duration.js +2 -2
  784. package/script/types/0_voice.d.ts +1 -1
  785. package/script/types/0_voice.d.ts.map +1 -1
  786. package/script/types/0_voice_transcription.d.ts +1 -1
  787. package/script/types/0_voice_transcription.d.ts.map +1 -1
  788. package/script/types/1_animation.d.ts +1 -1
  789. package/script/types/1_animation.d.ts.map +1 -1
  790. package/script/types/1_audio.d.ts +1 -1
  791. package/script/types/1_audio.d.ts.map +1 -1
  792. package/script/types/1_bot_command_scope.d.ts +2 -2
  793. package/script/types/1_bot_command_scope.d.ts.map +1 -1
  794. package/script/types/1_chat_p.d.ts +12 -2
  795. package/script/types/1_chat_p.d.ts.map +1 -1
  796. package/script/types/1_chat_p.js +7 -2
  797. package/script/types/1_document.d.ts +1 -1
  798. package/script/types/1_document.d.ts.map +1 -1
  799. package/script/types/1_giveaway.d.ts +2 -2
  800. package/script/types/1_giveaway.d.ts.map +1 -1
  801. package/script/types/1_inline_keyboard_button.d.ts +3 -3
  802. package/script/types/1_inline_keyboard_button.d.ts.map +1 -1
  803. package/script/types/1_inline_keyboard_button.js +4 -4
  804. package/script/types/1_inline_query_result_button.d.ts +1 -1
  805. package/script/types/1_inline_query_result_button.d.ts.map +1 -1
  806. package/script/types/1_input_story_content.d.ts +1 -1
  807. package/script/types/1_input_story_content.d.ts.map +1 -1
  808. package/script/types/1_keyboard_button.d.ts +3 -3
  809. package/script/types/1_keyboard_button.d.ts.map +1 -1
  810. package/script/types/1_keyboard_button.js +1 -1
  811. package/script/types/1_message_reaction.d.ts +1 -1
  812. package/script/types/1_message_reaction.d.ts.map +1 -1
  813. package/script/types/1_message_reaction.js +2 -2
  814. package/script/types/1_mini_app_info.d.ts +2 -2
  815. package/script/types/1_mini_app_info.d.ts.map +1 -1
  816. package/script/types/1_network_statistics.d.ts +1 -1
  817. package/script/types/1_network_statistics.d.ts.map +1 -1
  818. package/script/types/1_order_info.d.ts +2 -2
  819. package/script/types/1_order_info.d.ts.map +1 -1
  820. package/script/types/1_photo.d.ts +1 -1
  821. package/script/types/1_photo.d.ts.map +1 -1
  822. package/script/types/1_reaction_count.d.ts +2 -2
  823. package/script/types/1_reaction_count.d.ts.map +1 -1
  824. package/script/types/1_sticker.d.ts +3 -3
  825. package/script/types/1_sticker.d.ts.map +1 -1
  826. package/script/types/1_sticker.js +2 -2
  827. package/script/types/1_story_reaction.d.ts +2 -2
  828. package/script/types/1_story_reaction.d.ts.map +1 -1
  829. package/script/types/1_venue.d.ts +1 -1
  830. package/script/types/1_venue.d.ts.map +1 -1
  831. package/script/types/1_video.d.ts +1 -1
  832. package/script/types/1_video.d.ts.map +1 -1
  833. package/script/types/1_video_note.d.ts +1 -1
  834. package/script/types/1_video_note.d.ts.map +1 -1
  835. package/script/types/2_chat.d.ts +6 -9
  836. package/script/types/2_chat.d.ts.map +1 -1
  837. package/script/types/2_chat.js +10 -15
  838. package/script/types/2_inactive_chat.d.ts +1 -1
  839. package/script/types/2_inactive_chat.d.ts.map +1 -1
  840. package/script/types/2_message_entity.d.ts +139 -0
  841. package/script/types/2_message_entity.d.ts.map +1 -0
  842. package/script/types/2_message_entity.js +188 -0
  843. package/script/types/2_message_interactions.d.ts +1 -1
  844. package/script/types/2_message_interactions.d.ts.map +1 -1
  845. package/script/types/2_message_reaction_count.d.ts +4 -5
  846. package/script/types/2_message_reaction_count.d.ts.map +1 -1
  847. package/script/types/2_message_reaction_count.js +4 -6
  848. package/script/types/2_poll_answer.d.ts +3 -4
  849. package/script/types/2_poll_answer.d.ts.map +1 -1
  850. package/script/types/2_poll_answer.js +4 -5
  851. package/script/types/2_reply_markup.d.ts +3 -3
  852. package/script/types/2_reply_markup.d.ts.map +1 -1
  853. package/script/types/2_sticker_set.d.ts +51 -0
  854. package/script/types/2_sticker_set.d.ts.map +1 -0
  855. package/script/types/2_sticker_set.js +94 -0
  856. package/script/types/2_story_content.d.ts +2 -2
  857. package/script/types/2_story_content.d.ts.map +1 -1
  858. package/script/types/2_story_interactions.d.ts +2 -2
  859. package/script/types/2_story_interactions.d.ts.map +1 -1
  860. package/script/types/2_story_interactive_area.d.ts +6 -6
  861. package/script/types/2_story_interactive_area.d.ts.map +1 -1
  862. package/script/types/2_story_interactive_area.js +2 -2
  863. package/script/types/2_story_privacy.d.ts +46 -0
  864. package/script/types/2_story_privacy.d.ts.map +1 -0
  865. package/script/types/2_story_privacy.js +80 -0
  866. package/script/types/2_successful_payment.d.ts +2 -2
  867. package/script/types/2_successful_payment.d.ts.map +1 -1
  868. package/script/types/2_user.d.ts +65 -0
  869. package/script/types/2_user.d.ts.map +1 -0
  870. package/script/types/2_user.js +77 -0
  871. package/script/types/3_business_connection.d.ts +37 -0
  872. package/script/types/3_business_connection.d.ts.map +1 -0
  873. package/script/types/3_business_connection.js +39 -0
  874. package/script/types/3_chat_member.d.ts +70 -0
  875. package/script/types/3_chat_member.d.ts.map +1 -0
  876. package/script/types/3_chat_member.js +117 -0
  877. package/script/types/3_chat_settings.d.ts +46 -0
  878. package/script/types/3_chat_settings.d.ts.map +1 -0
  879. package/script/types/3_chat_settings.js +54 -0
  880. package/script/types/3_chosen_inline_result.d.ts +38 -0
  881. package/script/types/3_chosen_inline_result.d.ts.map +1 -0
  882. package/script/types/3_chosen_inline_result.js +40 -0
  883. package/script/types/3_forward_header.d.ts +58 -0
  884. package/script/types/3_forward_header.d.ts.map +1 -0
  885. package/script/types/3_forward_header.js +76 -0
  886. package/script/types/3_game.d.ts +40 -0
  887. package/script/types/3_game.d.ts.map +1 -0
  888. package/script/types/3_gift_upgraded_component.d.ts +95 -0
  889. package/script/types/3_gift_upgraded_component.d.ts.map +1 -0
  890. package/script/types/3_gift_upgraded_component.js +91 -0
  891. package/script/types/3_inline_query.d.ts +40 -0
  892. package/script/types/3_inline_query.d.ts.map +1 -0
  893. package/script/types/3_inline_query.js +63 -0
  894. package/script/types/3_input_media.d.ts +122 -0
  895. package/script/types/3_input_media.d.ts.map +1 -0
  896. package/script/types/3_invite_link.d.ts +47 -0
  897. package/script/types/3_invite_link.d.ts.map +1 -0
  898. package/script/types/3_invite_link.js +51 -0
  899. package/script/types/3_message_reactions.d.ts +42 -0
  900. package/script/types/3_message_reactions.d.ts.map +1 -0
  901. package/script/types/3_message_reactions.js +57 -0
  902. package/script/types/3_poll_option.d.ts +34 -0
  903. package/script/types/3_poll_option.d.ts.map +1 -0
  904. package/script/types/3_poll_option.js +32 -0
  905. package/script/types/3_pre_checkout_query.d.ts +34 -0
  906. package/script/types/3_pre_checkout_query.d.ts.map +1 -0
  907. package/script/types/3_pre_checkout_query.js +42 -0
  908. package/script/types/3_reply_quote.d.ts +32 -0
  909. package/script/types/3_reply_quote.d.ts.map +1 -0
  910. package/script/types/3_reply_quote.js +33 -0
  911. package/script/types/3_story.d.ts +8 -9
  912. package/script/types/3_story.d.ts.map +1 -1
  913. package/script/types/3_story.js +8 -9
  914. package/script/types/4_chat_member_updated.d.ts +43 -0
  915. package/script/types/4_chat_member_updated.d.ts.map +1 -0
  916. package/script/types/4_chat_member_updated.js +55 -0
  917. package/script/types/4_gift.d.ts +94 -0
  918. package/script/types/4_gift.d.ts.map +1 -0
  919. package/script/types/4_gift.js +110 -0
  920. package/script/types/4_join_request.d.ts +39 -0
  921. package/script/types/4_join_request.d.ts.map +1 -0
  922. package/script/types/4_join_request.js +66 -0
  923. package/script/types/4_poll.d.ts +55 -0
  924. package/script/types/4_poll.d.ts.map +1 -0
  925. package/script/types/4_poll.js +46 -0
  926. package/script/types/4_reply_to.d.ts +35 -0
  927. package/script/types/4_reply_to.d.ts.map +1 -0
  928. package/script/types/5_claimed_gift.d.ts +44 -0
  929. package/script/types/5_claimed_gift.d.ts.map +1 -0
  930. package/script/types/5_claimed_gift.js +51 -0
  931. package/script/types/5_link_preview.d.ts +188 -0
  932. package/script/types/5_link_preview.d.ts.map +1 -0
  933. package/script/types/5_link_preview.js +221 -0
  934. package/script/types/6_claimed_gifts.d.ts +33 -0
  935. package/script/types/6_claimed_gifts.d.ts.map +1 -0
  936. package/script/types/6_claimed_gifts.js +46 -0
  937. package/script/types/6_message.d.ts +616 -0
  938. package/script/types/6_message.d.ts.map +1 -0
  939. package/script/types/6_message.js +525 -0
  940. package/script/types/6_message_content.d.ts +119 -0
  941. package/script/types/6_message_content.d.ts.map +1 -0
  942. package/script/types/7_callback_query.d.ts +43 -0
  943. package/script/types/7_callback_query.d.ts.map +1 -0
  944. package/script/types/7_callback_query.js +63 -0
  945. package/script/types/7_chat_list_item.d.ts +35 -0
  946. package/script/types/7_chat_list_item.d.ts.map +1 -0
  947. package/script/types/7_chat_list_item.js +94 -0
  948. package/script/types/7_inline_query_result.d.ts +251 -0
  949. package/script/types/7_inline_query_result.d.ts.map +1 -0
  950. package/script/types/7_inline_query_result.js +384 -0
  951. package/script/types/7_saved_chat.d.ts +35 -0
  952. package/script/types/7_saved_chat.d.ts.map +1 -0
  953. package/script/types/7_saved_chat.js +46 -0
  954. package/script/types/7_topic.d.ts +34 -0
  955. package/script/types/7_topic.d.ts.map +1 -0
  956. package/script/types/7_topic.js +64 -0
  957. package/script/types/8_inline_query_answer.d.ts +32 -0
  958. package/script/types/8_inline_query_answer.d.ts.map +1 -0
  959. package/script/types/8_inline_query_answer.js +31 -0
  960. package/script/types/8_saved_chats.d.ts +33 -0
  961. package/script/types/8_saved_chats.d.ts.map +1 -0
  962. package/script/types/8_saved_chats.js +39 -0
  963. package/script/types/8_update.d.ts +528 -0
  964. package/script/types/8_update.d.ts.map +1 -0
  965. package/script/types/_file_id.d.ts +61 -50
  966. package/script/types/_file_id.d.ts.map +1 -1
  967. package/script/types/_file_id.js +155 -136
  968. package/script/types/_getters.d.ts +3 -10
  969. package/script/types/_getters.d.ts.map +1 -1
  970. package/script/utilities/0_bigint.js +5 -5
  971. package/script/utilities/0_buffer.js +3 -3
  972. package/script/utilities/0_env.js +1 -1
  973. package/script/utilities/0_hash.d.ts +2 -2
  974. package/script/utilities/0_hash.d.ts.map +1 -1
  975. package/script/utilities/0_misc.d.ts +1 -0
  976. package/script/utilities/0_misc.d.ts.map +1 -1
  977. package/script/utilities/0_misc.js +18 -3
  978. package/script/utilities/0_part_stream.d.ts +1 -1
  979. package/script/utilities/0_part_stream.d.ts.map +1 -1
  980. package/script/utilities/0_rle.js +1 -1
  981. package/script/utilities/1_auth.js +1 -1
  982. package/script/utilities/1_base64.js +1 -1
  983. package/script/utilities/1_logger.js +2 -2
  984. package/script/utilities/1_math.js +2 -2
  985. package/script/utilities/2_queue.js +1 -1
  986. package/esm/deps/jsr.io/@std/assert/1.0.13/assert.d.ts.map +0 -1
  987. package/esm/deps/jsr.io/@std/assert/1.0.13/equal.d.ts.map +0 -1
  988. package/esm/deps/jsr.io/@std/assert/1.0.13/equals.d.ts.map +0 -1
  989. package/esm/deps/jsr.io/@std/assert/1.0.13/false.d.ts.map +0 -1
  990. package/esm/deps/jsr.io/@std/async/1.0.13/_util.d.ts.map +0 -1
  991. package/esm/deps/jsr.io/@std/async/1.0.13/abortable.d.ts.map +0 -1
  992. package/esm/deps/jsr.io/@std/async/1.0.13/deadline.d.ts.map +0 -1
  993. package/esm/deps/jsr.io/@std/async/1.0.13/debounce.d.ts.map +0 -1
  994. package/esm/deps/jsr.io/@std/async/1.0.13/delay.d.ts.map +0 -1
  995. package/esm/deps/jsr.io/@std/async/1.0.13/delay.js +0 -65
  996. package/esm/deps/jsr.io/@std/async/1.0.13/mod.d.ts.map +0 -1
  997. package/esm/deps/jsr.io/@std/async/1.0.13/mux_async_iterator.d.ts.map +0 -1
  998. package/esm/deps/jsr.io/@std/async/1.0.13/pool.d.ts.map +0 -1
  999. package/esm/deps/jsr.io/@std/async/1.0.13/retry.d.ts.map +0 -1
  1000. package/esm/deps/jsr.io/@std/async/1.0.13/tee.d.ts.map +0 -1
  1001. package/esm/deps/jsr.io/@std/path/1.1.0/_common/assert_path.d.ts.map +0 -1
  1002. package/esm/deps/jsr.io/@std/path/1.1.0/_common/basename.d.ts.map +0 -1
  1003. package/esm/deps/jsr.io/@std/path/1.1.0/_common/constants.d.ts.map +0 -1
  1004. package/esm/deps/jsr.io/@std/path/1.1.0/_common/from_file_url.d.ts.map +0 -1
  1005. package/esm/deps/jsr.io/@std/path/1.1.0/_common/normalize.d.ts.map +0 -1
  1006. package/esm/deps/jsr.io/@std/path/1.1.0/_common/normalize_string.d.ts.map +0 -1
  1007. package/esm/deps/jsr.io/@std/path/1.1.0/_common/strip_trailing_separators.d.ts.map +0 -1
  1008. package/esm/deps/jsr.io/@std/path/1.1.0/_common/to_file_url.d.ts.map +0 -1
  1009. package/esm/deps/jsr.io/@std/path/1.1.0/_os.d.ts +0 -2
  1010. package/esm/deps/jsr.io/@std/path/1.1.0/_os.d.ts.map +0 -1
  1011. package/esm/deps/jsr.io/@std/path/1.1.0/_os.js +0 -9
  1012. package/esm/deps/jsr.io/@std/path/1.1.0/basename.d.ts.map +0 -1
  1013. package/esm/deps/jsr.io/@std/path/1.1.0/basename.js +0 -35
  1014. package/esm/deps/jsr.io/@std/path/1.1.0/extname.d.ts.map +0 -1
  1015. package/esm/deps/jsr.io/@std/path/1.1.0/extname.js +0 -28
  1016. package/esm/deps/jsr.io/@std/path/1.1.0/is_absolute.d.ts.map +0 -1
  1017. package/esm/deps/jsr.io/@std/path/1.1.0/is_absolute.js +0 -28
  1018. package/esm/deps/jsr.io/@std/path/1.1.0/join.d.ts.map +0 -1
  1019. package/esm/deps/jsr.io/@std/path/1.1.0/join.js +0 -29
  1020. package/esm/deps/jsr.io/@std/path/1.1.0/posix/_util.d.ts.map +0 -1
  1021. package/esm/deps/jsr.io/@std/path/1.1.0/posix/basename.d.ts.map +0 -1
  1022. package/esm/deps/jsr.io/@std/path/1.1.0/posix/extname.d.ts.map +0 -1
  1023. package/esm/deps/jsr.io/@std/path/1.1.0/posix/from_file_url.d.ts.map +0 -1
  1024. package/esm/deps/jsr.io/@std/path/1.1.0/posix/is_absolute.d.ts.map +0 -1
  1025. package/esm/deps/jsr.io/@std/path/1.1.0/posix/join.d.ts.map +0 -1
  1026. package/esm/deps/jsr.io/@std/path/1.1.0/posix/normalize.d.ts.map +0 -1
  1027. package/esm/deps/jsr.io/@std/path/1.1.0/posix/to_file_url.d.ts.map +0 -1
  1028. package/esm/deps/jsr.io/@std/path/1.1.0/to_file_url.d.ts.map +0 -1
  1029. package/esm/deps/jsr.io/@std/path/1.1.0/to_file_url.js +0 -28
  1030. package/esm/deps/jsr.io/@std/path/1.1.0/windows/_util.d.ts.map +0 -1
  1031. package/esm/deps/jsr.io/@std/path/1.1.0/windows/basename.d.ts.map +0 -1
  1032. package/esm/deps/jsr.io/@std/path/1.1.0/windows/extname.d.ts.map +0 -1
  1033. package/esm/deps/jsr.io/@std/path/1.1.0/windows/from_file_url.d.ts.map +0 -1
  1034. package/esm/deps/jsr.io/@std/path/1.1.0/windows/is_absolute.d.ts.map +0 -1
  1035. package/esm/deps/jsr.io/@std/path/1.1.0/windows/join.d.ts.map +0 -1
  1036. package/esm/deps/jsr.io/@std/path/1.1.0/windows/normalize.d.ts.map +0 -1
  1037. package/esm/deps/jsr.io/@std/path/1.1.0/windows/to_file_url.d.ts.map +0 -1
  1038. package/esm/deps/jsr.io/@std/streams/1.0.10/to_array_buffer.d.ts.map +0 -1
  1039. package/esm/types/0_message_entity.d.ts +0 -139
  1040. package/esm/types/0_message_entity.d.ts.map +0 -1
  1041. package/esm/types/0_message_entity.js +0 -183
  1042. package/esm/types/1_input_media.d.ts +0 -122
  1043. package/esm/types/1_input_media.d.ts.map +0 -1
  1044. package/esm/types/1_poll_option.d.ts +0 -34
  1045. package/esm/types/1_poll_option.d.ts.map +0 -1
  1046. package/esm/types/1_poll_option.js +0 -29
  1047. package/esm/types/1_reply_quote.d.ts +0 -32
  1048. package/esm/types/1_reply_quote.d.ts.map +0 -1
  1049. package/esm/types/1_reply_quote.js +0 -30
  1050. package/esm/types/1_story_privacy.d.ts +0 -46
  1051. package/esm/types/1_story_privacy.d.ts.map +0 -1
  1052. package/esm/types/1_story_privacy.js +0 -76
  1053. package/esm/types/1_user.d.ts +0 -61
  1054. package/esm/types/1_user.d.ts.map +0 -1
  1055. package/esm/types/1_user.js +0 -49
  1056. package/esm/types/2_business_connection.d.ts +0 -37
  1057. package/esm/types/2_business_connection.d.ts.map +0 -1
  1058. package/esm/types/2_business_connection.js +0 -29
  1059. package/esm/types/2_chat_member.d.ts +0 -68
  1060. package/esm/types/2_chat_member.d.ts.map +0 -1
  1061. package/esm/types/2_chat_member.js +0 -114
  1062. package/esm/types/2_chat_settings.d.ts +0 -46
  1063. package/esm/types/2_chat_settings.d.ts.map +0 -1
  1064. package/esm/types/2_chat_settings.js +0 -51
  1065. package/esm/types/2_chosen_inline_result.d.ts +0 -38
  1066. package/esm/types/2_chosen_inline_result.d.ts.map +0 -1
  1067. package/esm/types/2_chosen_inline_result.js +0 -37
  1068. package/esm/types/2_forward_header.d.ts +0 -59
  1069. package/esm/types/2_forward_header.d.ts.map +0 -1
  1070. package/esm/types/2_forward_header.js +0 -74
  1071. package/esm/types/2_game.d.ts +0 -40
  1072. package/esm/types/2_game.d.ts.map +0 -1
  1073. package/esm/types/2_gift_upgraded_component.d.ts +0 -95
  1074. package/esm/types/2_gift_upgraded_component.d.ts.map +0 -1
  1075. package/esm/types/2_gift_upgraded_component.js +0 -88
  1076. package/esm/types/2_inline_query.d.ts +0 -40
  1077. package/esm/types/2_inline_query.d.ts.map +0 -1
  1078. package/esm/types/2_inline_query.js +0 -60
  1079. package/esm/types/2_invite_link.d.ts +0 -47
  1080. package/esm/types/2_invite_link.d.ts.map +0 -1
  1081. package/esm/types/2_invite_link.js +0 -48
  1082. package/esm/types/2_message_reactions.d.ts +0 -43
  1083. package/esm/types/2_message_reactions.d.ts.map +0 -1
  1084. package/esm/types/2_message_reactions.js +0 -56
  1085. package/esm/types/2_poll.d.ts +0 -55
  1086. package/esm/types/2_poll.d.ts.map +0 -1
  1087. package/esm/types/2_poll.js +0 -43
  1088. package/esm/types/2_pre_checkout_query.d.ts +0 -34
  1089. package/esm/types/2_pre_checkout_query.d.ts.map +0 -1
  1090. package/esm/types/2_pre_checkout_query.js +0 -39
  1091. package/esm/types/2_reply_to.d.ts +0 -35
  1092. package/esm/types/2_reply_to.d.ts.map +0 -1
  1093. package/esm/types/3_chat_member_updated.d.ts +0 -44
  1094. package/esm/types/3_chat_member_updated.d.ts.map +0 -1
  1095. package/esm/types/3_chat_member_updated.js +0 -53
  1096. package/esm/types/3_gift.d.ts +0 -94
  1097. package/esm/types/3_gift.d.ts.map +0 -1
  1098. package/esm/types/3_gift.js +0 -105
  1099. package/esm/types/3_join_request.d.ts +0 -40
  1100. package/esm/types/3_join_request.d.ts.map +0 -1
  1101. package/esm/types/3_join_request.js +0 -63
  1102. package/esm/types/4_claimed_gift.d.ts +0 -45
  1103. package/esm/types/4_claimed_gift.d.ts.map +0 -1
  1104. package/esm/types/4_claimed_gift.js +0 -48
  1105. package/esm/types/4_link_preview.d.ts +0 -188
  1106. package/esm/types/4_link_preview.d.ts.map +0 -1
  1107. package/esm/types/4_link_preview.js +0 -218
  1108. package/esm/types/5_claimed_gifts.d.ts +0 -33
  1109. package/esm/types/5_claimed_gifts.d.ts.map +0 -1
  1110. package/esm/types/5_claimed_gifts.js +0 -43
  1111. package/esm/types/5_message.d.ts +0 -617
  1112. package/esm/types/5_message.d.ts.map +0 -1
  1113. package/esm/types/5_message.js +0 -545
  1114. package/esm/types/5_message_content.d.ts +0 -119
  1115. package/esm/types/5_message_content.d.ts.map +0 -1
  1116. package/esm/types/6_callback_query.d.ts +0 -43
  1117. package/esm/types/6_callback_query.d.ts.map +0 -1
  1118. package/esm/types/6_callback_query.js +0 -59
  1119. package/esm/types/6_chat_list_item.d.ts +0 -36
  1120. package/esm/types/6_chat_list_item.d.ts.map +0 -1
  1121. package/esm/types/6_chat_list_item.js +0 -87
  1122. package/esm/types/6_inline_query_result.d.ts +0 -251
  1123. package/esm/types/6_inline_query_result.d.ts.map +0 -1
  1124. package/esm/types/6_inline_query_result.js +0 -380
  1125. package/esm/types/6_topic.d.ts +0 -34
  1126. package/esm/types/6_topic.d.ts.map +0 -1
  1127. package/esm/types/6_topic.js +0 -61
  1128. package/esm/types/7_inline_query_answer.d.ts +0 -32
  1129. package/esm/types/7_inline_query_answer.d.ts.map +0 -1
  1130. package/esm/types/7_inline_query_answer.js +0 -28
  1131. package/esm/types/7_update.d.ts +0 -509
  1132. package/esm/types/7_update.d.ts.map +0 -1
  1133. package/script/deps/jsr.io/@std/assert/1.0.13/assert.d.ts.map +0 -1
  1134. package/script/deps/jsr.io/@std/assert/1.0.13/equal.d.ts.map +0 -1
  1135. package/script/deps/jsr.io/@std/assert/1.0.13/equals.d.ts.map +0 -1
  1136. package/script/deps/jsr.io/@std/assert/1.0.13/false.d.ts.map +0 -1
  1137. package/script/deps/jsr.io/@std/async/1.0.13/_util.d.ts.map +0 -1
  1138. package/script/deps/jsr.io/@std/async/1.0.13/abortable.d.ts.map +0 -1
  1139. package/script/deps/jsr.io/@std/async/1.0.13/deadline.d.ts.map +0 -1
  1140. package/script/deps/jsr.io/@std/async/1.0.13/debounce.d.ts.map +0 -1
  1141. package/script/deps/jsr.io/@std/async/1.0.13/delay.d.ts.map +0 -1
  1142. package/script/deps/jsr.io/@std/async/1.0.13/delay.js +0 -101
  1143. package/script/deps/jsr.io/@std/async/1.0.13/mod.d.ts.map +0 -1
  1144. package/script/deps/jsr.io/@std/async/1.0.13/mux_async_iterator.d.ts.map +0 -1
  1145. package/script/deps/jsr.io/@std/async/1.0.13/pool.d.ts.map +0 -1
  1146. package/script/deps/jsr.io/@std/async/1.0.13/retry.d.ts.map +0 -1
  1147. package/script/deps/jsr.io/@std/async/1.0.13/tee.d.ts.map +0 -1
  1148. package/script/deps/jsr.io/@std/path/1.1.0/_common/assert_path.d.ts.map +0 -1
  1149. package/script/deps/jsr.io/@std/path/1.1.0/_common/basename.d.ts.map +0 -1
  1150. package/script/deps/jsr.io/@std/path/1.1.0/_common/constants.d.ts.map +0 -1
  1151. package/script/deps/jsr.io/@std/path/1.1.0/_common/from_file_url.d.ts.map +0 -1
  1152. package/script/deps/jsr.io/@std/path/1.1.0/_common/normalize.d.ts.map +0 -1
  1153. package/script/deps/jsr.io/@std/path/1.1.0/_common/normalize_string.d.ts.map +0 -1
  1154. package/script/deps/jsr.io/@std/path/1.1.0/_common/strip_trailing_separators.d.ts.map +0 -1
  1155. package/script/deps/jsr.io/@std/path/1.1.0/_common/to_file_url.d.ts.map +0 -1
  1156. package/script/deps/jsr.io/@std/path/1.1.0/_os.d.ts +0 -2
  1157. package/script/deps/jsr.io/@std/path/1.1.0/_os.d.ts.map +0 -1
  1158. package/script/deps/jsr.io/@std/path/1.1.0/_os.js +0 -45
  1159. package/script/deps/jsr.io/@std/path/1.1.0/basename.d.ts.map +0 -1
  1160. package/script/deps/jsr.io/@std/path/1.1.0/basename.js +0 -38
  1161. package/script/deps/jsr.io/@std/path/1.1.0/extname.d.ts.map +0 -1
  1162. package/script/deps/jsr.io/@std/path/1.1.0/extname.js +0 -31
  1163. package/script/deps/jsr.io/@std/path/1.1.0/is_absolute.d.ts.map +0 -1
  1164. package/script/deps/jsr.io/@std/path/1.1.0/is_absolute.js +0 -31
  1165. package/script/deps/jsr.io/@std/path/1.1.0/join.d.ts.map +0 -1
  1166. package/script/deps/jsr.io/@std/path/1.1.0/join.js +0 -32
  1167. package/script/deps/jsr.io/@std/path/1.1.0/posix/_util.d.ts.map +0 -1
  1168. package/script/deps/jsr.io/@std/path/1.1.0/posix/basename.d.ts.map +0 -1
  1169. package/script/deps/jsr.io/@std/path/1.1.0/posix/extname.d.ts.map +0 -1
  1170. package/script/deps/jsr.io/@std/path/1.1.0/posix/from_file_url.d.ts.map +0 -1
  1171. package/script/deps/jsr.io/@std/path/1.1.0/posix/is_absolute.d.ts.map +0 -1
  1172. package/script/deps/jsr.io/@std/path/1.1.0/posix/join.d.ts.map +0 -1
  1173. package/script/deps/jsr.io/@std/path/1.1.0/posix/normalize.d.ts.map +0 -1
  1174. package/script/deps/jsr.io/@std/path/1.1.0/posix/to_file_url.d.ts.map +0 -1
  1175. package/script/deps/jsr.io/@std/path/1.1.0/to_file_url.d.ts.map +0 -1
  1176. package/script/deps/jsr.io/@std/path/1.1.0/to_file_url.js +0 -31
  1177. package/script/deps/jsr.io/@std/path/1.1.0/windows/_util.d.ts.map +0 -1
  1178. package/script/deps/jsr.io/@std/path/1.1.0/windows/basename.d.ts.map +0 -1
  1179. package/script/deps/jsr.io/@std/path/1.1.0/windows/extname.d.ts.map +0 -1
  1180. package/script/deps/jsr.io/@std/path/1.1.0/windows/from_file_url.d.ts.map +0 -1
  1181. package/script/deps/jsr.io/@std/path/1.1.0/windows/is_absolute.d.ts.map +0 -1
  1182. package/script/deps/jsr.io/@std/path/1.1.0/windows/join.d.ts.map +0 -1
  1183. package/script/deps/jsr.io/@std/path/1.1.0/windows/normalize.d.ts.map +0 -1
  1184. package/script/deps/jsr.io/@std/path/1.1.0/windows/to_file_url.d.ts.map +0 -1
  1185. package/script/deps/jsr.io/@std/streams/1.0.10/to_array_buffer.d.ts.map +0 -1
  1186. package/script/types/0_message_entity.d.ts +0 -139
  1187. package/script/types/0_message_entity.d.ts.map +0 -1
  1188. package/script/types/0_message_entity.js +0 -188
  1189. package/script/types/1_input_media.d.ts +0 -122
  1190. package/script/types/1_input_media.d.ts.map +0 -1
  1191. package/script/types/1_poll_option.d.ts +0 -34
  1192. package/script/types/1_poll_option.d.ts.map +0 -1
  1193. package/script/types/1_poll_option.js +0 -32
  1194. package/script/types/1_reply_quote.d.ts +0 -32
  1195. package/script/types/1_reply_quote.d.ts.map +0 -1
  1196. package/script/types/1_reply_quote.js +0 -33
  1197. package/script/types/1_story_privacy.d.ts +0 -46
  1198. package/script/types/1_story_privacy.d.ts.map +0 -1
  1199. package/script/types/1_story_privacy.js +0 -80
  1200. package/script/types/1_user.d.ts +0 -61
  1201. package/script/types/1_user.d.ts.map +0 -1
  1202. package/script/types/1_user.js +0 -52
  1203. package/script/types/2_business_connection.d.ts +0 -37
  1204. package/script/types/2_business_connection.d.ts.map +0 -1
  1205. package/script/types/2_business_connection.js +0 -32
  1206. package/script/types/2_chat_member.d.ts +0 -68
  1207. package/script/types/2_chat_member.d.ts.map +0 -1
  1208. package/script/types/2_chat_member.js +0 -117
  1209. package/script/types/2_chat_settings.d.ts +0 -46
  1210. package/script/types/2_chat_settings.d.ts.map +0 -1
  1211. package/script/types/2_chat_settings.js +0 -54
  1212. package/script/types/2_chosen_inline_result.d.ts +0 -38
  1213. package/script/types/2_chosen_inline_result.d.ts.map +0 -1
  1214. package/script/types/2_chosen_inline_result.js +0 -40
  1215. package/script/types/2_forward_header.d.ts +0 -59
  1216. package/script/types/2_forward_header.d.ts.map +0 -1
  1217. package/script/types/2_forward_header.js +0 -77
  1218. package/script/types/2_game.d.ts +0 -40
  1219. package/script/types/2_game.d.ts.map +0 -1
  1220. package/script/types/2_gift_upgraded_component.d.ts +0 -95
  1221. package/script/types/2_gift_upgraded_component.d.ts.map +0 -1
  1222. package/script/types/2_gift_upgraded_component.js +0 -91
  1223. package/script/types/2_inline_query.d.ts +0 -40
  1224. package/script/types/2_inline_query.d.ts.map +0 -1
  1225. package/script/types/2_inline_query.js +0 -63
  1226. package/script/types/2_invite_link.d.ts +0 -47
  1227. package/script/types/2_invite_link.d.ts.map +0 -1
  1228. package/script/types/2_invite_link.js +0 -51
  1229. package/script/types/2_message_reactions.d.ts +0 -43
  1230. package/script/types/2_message_reactions.d.ts.map +0 -1
  1231. package/script/types/2_message_reactions.js +0 -59
  1232. package/script/types/2_poll.d.ts +0 -55
  1233. package/script/types/2_poll.d.ts.map +0 -1
  1234. package/script/types/2_poll.js +0 -46
  1235. package/script/types/2_pre_checkout_query.d.ts +0 -34
  1236. package/script/types/2_pre_checkout_query.d.ts.map +0 -1
  1237. package/script/types/2_pre_checkout_query.js +0 -42
  1238. package/script/types/2_reply_to.d.ts +0 -35
  1239. package/script/types/2_reply_to.d.ts.map +0 -1
  1240. package/script/types/3_chat_member_updated.d.ts +0 -44
  1241. package/script/types/3_chat_member_updated.d.ts.map +0 -1
  1242. package/script/types/3_chat_member_updated.js +0 -56
  1243. package/script/types/3_gift.d.ts +0 -94
  1244. package/script/types/3_gift.d.ts.map +0 -1
  1245. package/script/types/3_gift.js +0 -110
  1246. package/script/types/3_join_request.d.ts +0 -40
  1247. package/script/types/3_join_request.d.ts.map +0 -1
  1248. package/script/types/3_join_request.js +0 -67
  1249. package/script/types/4_claimed_gift.d.ts +0 -45
  1250. package/script/types/4_claimed_gift.d.ts.map +0 -1
  1251. package/script/types/4_claimed_gift.js +0 -51
  1252. package/script/types/4_link_preview.d.ts +0 -188
  1253. package/script/types/4_link_preview.d.ts.map +0 -1
  1254. package/script/types/4_link_preview.js +0 -221
  1255. package/script/types/5_claimed_gifts.d.ts +0 -33
  1256. package/script/types/5_claimed_gifts.d.ts.map +0 -1
  1257. package/script/types/5_claimed_gifts.js +0 -46
  1258. package/script/types/5_message.d.ts +0 -617
  1259. package/script/types/5_message.d.ts.map +0 -1
  1260. package/script/types/5_message.js +0 -550
  1261. package/script/types/5_message_content.d.ts +0 -119
  1262. package/script/types/5_message_content.d.ts.map +0 -1
  1263. package/script/types/6_callback_query.d.ts +0 -43
  1264. package/script/types/6_callback_query.d.ts.map +0 -1
  1265. package/script/types/6_callback_query.js +0 -63
  1266. package/script/types/6_chat_list_item.d.ts +0 -36
  1267. package/script/types/6_chat_list_item.d.ts.map +0 -1
  1268. package/script/types/6_chat_list_item.js +0 -94
  1269. package/script/types/6_inline_query_result.d.ts +0 -251
  1270. package/script/types/6_inline_query_result.d.ts.map +0 -1
  1271. package/script/types/6_inline_query_result.js +0 -384
  1272. package/script/types/6_topic.d.ts +0 -34
  1273. package/script/types/6_topic.d.ts.map +0 -1
  1274. package/script/types/6_topic.js +0 -64
  1275. package/script/types/7_inline_query_answer.d.ts +0 -32
  1276. package/script/types/7_inline_query_answer.d.ts.map +0 -1
  1277. package/script/types/7_inline_query_answer.js +0 -31
  1278. package/script/types/7_update.d.ts +0 -509
  1279. package/script/types/7_update.d.ts.map +0 -1
  1280. /package/esm/deps/jsr.io/@std/assert/{1.0.13 → 1.0.14}/assert.d.ts +0 -0
  1281. /package/esm/deps/jsr.io/@std/assert/{1.0.13 → 1.0.14}/assert.js +0 -0
  1282. /package/esm/deps/jsr.io/@std/assert/{1.0.13 → 1.0.14}/equal.d.ts +0 -0
  1283. /package/esm/deps/jsr.io/@std/assert/{1.0.13 → 1.0.14}/equal.js +0 -0
  1284. /package/esm/deps/jsr.io/@std/assert/{1.0.13 → 1.0.14}/equals.d.ts +0 -0
  1285. /package/esm/deps/jsr.io/@std/assert/{1.0.13 → 1.0.14}/equals.js +0 -0
  1286. /package/esm/deps/jsr.io/@std/assert/{1.0.13 → 1.0.14}/false.d.ts +0 -0
  1287. /package/esm/deps/jsr.io/@std/assert/{1.0.13 → 1.0.14}/false.js +0 -0
  1288. /package/esm/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/_util.d.ts +0 -0
  1289. /package/esm/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/_util.js +0 -0
  1290. /package/esm/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/abortable.d.ts +0 -0
  1291. /package/esm/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/abortable.js +0 -0
  1292. /package/esm/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/deadline.d.ts +0 -0
  1293. /package/esm/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/deadline.js +0 -0
  1294. /package/esm/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/debounce.d.ts +0 -0
  1295. /package/esm/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/debounce.js +0 -0
  1296. /package/esm/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/delay.d.ts +0 -0
  1297. /package/esm/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/mod.d.ts +0 -0
  1298. /package/esm/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/mod.js +0 -0
  1299. /package/esm/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/mux_async_iterator.d.ts +0 -0
  1300. /package/esm/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/mux_async_iterator.js +0 -0
  1301. /package/esm/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/pool.d.ts +0 -0
  1302. /package/esm/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/pool.js +0 -0
  1303. /package/esm/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/retry.d.ts +0 -0
  1304. /package/esm/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/retry.js +0 -0
  1305. /package/esm/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/tee.d.ts +0 -0
  1306. /package/esm/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/tee.js +0 -0
  1307. /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/assert_path.d.ts +0 -0
  1308. /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/assert_path.js +0 -0
  1309. /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/basename.d.ts +0 -0
  1310. /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/basename.js +0 -0
  1311. /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/constants.d.ts +0 -0
  1312. /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/constants.js +0 -0
  1313. /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/from_file_url.d.ts +0 -0
  1314. /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/from_file_url.js +0 -0
  1315. /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/normalize.d.ts +0 -0
  1316. /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/normalize.js +0 -0
  1317. /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/normalize_string.d.ts +0 -0
  1318. /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/normalize_string.js +0 -0
  1319. /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/strip_trailing_separators.d.ts +0 -0
  1320. /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/strip_trailing_separators.js +0 -0
  1321. /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/to_file_url.d.ts +0 -0
  1322. /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/to_file_url.js +0 -0
  1323. /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/basename.d.ts +0 -0
  1324. /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/extname.d.ts +0 -0
  1325. /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/is_absolute.d.ts +0 -0
  1326. /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/join.d.ts +0 -0
  1327. /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/_util.d.ts +0 -0
  1328. /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/_util.js +0 -0
  1329. /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/basename.d.ts +0 -0
  1330. /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/basename.js +0 -0
  1331. /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/extname.d.ts +0 -0
  1332. /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/extname.js +0 -0
  1333. /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/from_file_url.d.ts +0 -0
  1334. /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/from_file_url.js +0 -0
  1335. /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/is_absolute.d.ts +0 -0
  1336. /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/is_absolute.js +0 -0
  1337. /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/join.d.ts +0 -0
  1338. /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/join.js +0 -0
  1339. /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/normalize.d.ts +0 -0
  1340. /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/normalize.js +0 -0
  1341. /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/to_file_url.d.ts +0 -0
  1342. /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/to_file_url.js +0 -0
  1343. /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/to_file_url.d.ts +0 -0
  1344. /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/windows/_util.d.ts +0 -0
  1345. /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/windows/_util.js +0 -0
  1346. /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/windows/basename.d.ts +0 -0
  1347. /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/windows/basename.js +0 -0
  1348. /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/windows/extname.d.ts +0 -0
  1349. /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/windows/extname.js +0 -0
  1350. /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/windows/from_file_url.d.ts +0 -0
  1351. /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/windows/from_file_url.js +0 -0
  1352. /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/windows/is_absolute.d.ts +0 -0
  1353. /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/windows/is_absolute.js +0 -0
  1354. /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/windows/join.d.ts +0 -0
  1355. /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/windows/join.js +0 -0
  1356. /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/windows/normalize.d.ts +0 -0
  1357. /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/windows/normalize.js +0 -0
  1358. /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/windows/to_file_url.d.ts +0 -0
  1359. /package/esm/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/windows/to_file_url.js +0 -0
  1360. /package/esm/deps/jsr.io/@std/streams/{1.0.10 → 1.0.11}/to_array_buffer.d.ts +0 -0
  1361. /package/esm/deps/jsr.io/@std/streams/{1.0.10 → 1.0.11}/to_array_buffer.js +0 -0
  1362. /package/esm/types/{2_game.js → 3_game.js} +0 -0
  1363. /package/esm/types/{1_input_media.js → 3_input_media.js} +0 -0
  1364. /package/esm/types/{2_reply_to.js → 4_reply_to.js} +0 -0
  1365. /package/esm/types/{5_message_content.js → 6_message_content.js} +0 -0
  1366. /package/esm/types/{7_update.js → 8_update.js} +0 -0
  1367. /package/script/deps/jsr.io/@std/assert/{1.0.13 → 1.0.14}/assert.d.ts +0 -0
  1368. /package/script/deps/jsr.io/@std/assert/{1.0.13 → 1.0.14}/assert.js +0 -0
  1369. /package/script/deps/jsr.io/@std/assert/{1.0.13 → 1.0.14}/equal.d.ts +0 -0
  1370. /package/script/deps/jsr.io/@std/assert/{1.0.13 → 1.0.14}/equal.js +0 -0
  1371. /package/script/deps/jsr.io/@std/assert/{1.0.13 → 1.0.14}/equals.d.ts +0 -0
  1372. /package/script/deps/jsr.io/@std/assert/{1.0.13 → 1.0.14}/equals.js +0 -0
  1373. /package/script/deps/jsr.io/@std/assert/{1.0.13 → 1.0.14}/false.d.ts +0 -0
  1374. /package/script/deps/jsr.io/@std/assert/{1.0.13 → 1.0.14}/false.js +0 -0
  1375. /package/script/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/_util.d.ts +0 -0
  1376. /package/script/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/_util.js +0 -0
  1377. /package/script/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/abortable.d.ts +0 -0
  1378. /package/script/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/abortable.js +0 -0
  1379. /package/script/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/deadline.d.ts +0 -0
  1380. /package/script/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/deadline.js +0 -0
  1381. /package/script/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/debounce.d.ts +0 -0
  1382. /package/script/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/debounce.js +0 -0
  1383. /package/script/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/delay.d.ts +0 -0
  1384. /package/script/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/mod.d.ts +0 -0
  1385. /package/script/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/mod.js +0 -0
  1386. /package/script/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/mux_async_iterator.d.ts +0 -0
  1387. /package/script/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/mux_async_iterator.js +0 -0
  1388. /package/script/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/pool.d.ts +0 -0
  1389. /package/script/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/pool.js +0 -0
  1390. /package/script/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/retry.d.ts +0 -0
  1391. /package/script/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/retry.js +0 -0
  1392. /package/script/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/tee.d.ts +0 -0
  1393. /package/script/deps/jsr.io/@std/async/{1.0.13 → 1.0.14}/tee.js +0 -0
  1394. /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/assert_path.d.ts +0 -0
  1395. /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/assert_path.js +0 -0
  1396. /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/basename.d.ts +0 -0
  1397. /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/basename.js +0 -0
  1398. /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/constants.d.ts +0 -0
  1399. /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/constants.js +0 -0
  1400. /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/from_file_url.d.ts +0 -0
  1401. /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/from_file_url.js +0 -0
  1402. /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/normalize.d.ts +0 -0
  1403. /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/normalize.js +0 -0
  1404. /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/normalize_string.d.ts +0 -0
  1405. /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/normalize_string.js +0 -0
  1406. /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/strip_trailing_separators.d.ts +0 -0
  1407. /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/strip_trailing_separators.js +0 -0
  1408. /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/to_file_url.d.ts +0 -0
  1409. /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/_common/to_file_url.js +0 -0
  1410. /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/basename.d.ts +0 -0
  1411. /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/extname.d.ts +0 -0
  1412. /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/is_absolute.d.ts +0 -0
  1413. /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/join.d.ts +0 -0
  1414. /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/_util.d.ts +0 -0
  1415. /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/_util.js +0 -0
  1416. /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/basename.d.ts +0 -0
  1417. /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/basename.js +0 -0
  1418. /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/extname.d.ts +0 -0
  1419. /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/extname.js +0 -0
  1420. /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/from_file_url.d.ts +0 -0
  1421. /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/from_file_url.js +0 -0
  1422. /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/is_absolute.d.ts +0 -0
  1423. /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/is_absolute.js +0 -0
  1424. /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/join.d.ts +0 -0
  1425. /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/join.js +0 -0
  1426. /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/normalize.d.ts +0 -0
  1427. /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/normalize.js +0 -0
  1428. /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/to_file_url.d.ts +0 -0
  1429. /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/posix/to_file_url.js +0 -0
  1430. /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/to_file_url.d.ts +0 -0
  1431. /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/windows/_util.d.ts +0 -0
  1432. /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/windows/_util.js +0 -0
  1433. /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/windows/basename.d.ts +0 -0
  1434. /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/windows/basename.js +0 -0
  1435. /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/windows/extname.d.ts +0 -0
  1436. /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/windows/extname.js +0 -0
  1437. /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/windows/from_file_url.d.ts +0 -0
  1438. /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/windows/from_file_url.js +0 -0
  1439. /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/windows/is_absolute.d.ts +0 -0
  1440. /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/windows/is_absolute.js +0 -0
  1441. /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/windows/join.d.ts +0 -0
  1442. /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/windows/join.js +0 -0
  1443. /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/windows/normalize.d.ts +0 -0
  1444. /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/windows/normalize.js +0 -0
  1445. /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/windows/to_file_url.d.ts +0 -0
  1446. /package/script/deps/jsr.io/@std/path/{1.1.0 → 1.1.2}/windows/to_file_url.js +0 -0
  1447. /package/script/deps/jsr.io/@std/streams/{1.0.10 → 1.0.11}/to_array_buffer.d.ts +0 -0
  1448. /package/script/deps/jsr.io/@std/streams/{1.0.10 → 1.0.11}/to_array_buffer.js +0 -0
  1449. /package/script/types/{2_game.js → 3_game.js} +0 -0
  1450. /package/script/types/{1_input_media.js → 3_input_media.js} +0 -0
  1451. /package/script/types/{2_reply_to.js → 4_reply_to.js} +0 -0
  1452. /package/script/types/{5_message_content.js → 6_message_content.js} +0 -0
  1453. /package/script/types/{7_update.js → 8_update.js} +0 -0
@@ -30,6 +30,8 @@ const _3_types_js_1 = require("../3_types.js");
30
30
  const _4_constants_js_1 = require("../4_constants.js");
31
31
  const _4_errors_js_1 = require("../4_errors.js");
32
32
  const _4_errors_js_2 = require("../4_errors.js");
33
+ const _2_telegram_js_1 = require("../tl/2_telegram.js");
34
+ const _0_abortable_loop_js_1 = require("./0_abortable_loop.js");
33
35
  const _0_password_js_1 = require("./0_password.js");
34
36
  const _0_storage_operations_js_1 = require("./0_storage_operations.js");
35
37
  const _0_utilities_js_1 = require("./0_utilities.js");
@@ -66,7 +68,8 @@ exports.restartAuth = Symbol("restartAuth");
66
68
  exports.handleMigrationError = Symbol("handleMigrationError");
67
69
  // global Client ID counter for logs
68
70
  let id = 0;
69
- const getEntity = Symbol();
71
+ const getPeer = Symbol();
72
+ const mustGetPeer = Symbol();
70
73
  /**
71
74
  * An MTKruto client.
72
75
  */
@@ -151,6 +154,7 @@ class Client extends Composer {
151
154
  #L;
152
155
  #LsignIn;
153
156
  #LupdateGapRecoveryLoop;
157
+ #LstorageWriteLoop;
154
158
  #LhandleMigrationError;
155
159
  #Lmin;
156
160
  /**
@@ -190,6 +194,7 @@ class Client extends Composer {
190
194
  const L = this.#L = (0, _1_utilities_js_1.getLogger)("Client").client(id++);
191
195
  this.#LsignIn = L.branch("signIn");
192
196
  this.#LupdateGapRecoveryLoop = L.branch("updateGapRecoveryLoop");
197
+ this.#LstorageWriteLoop = L.branch("storageWriteLoop");
193
198
  this.#LhandleMigrationError = L.branch("[handleMigrationError]");
194
199
  this.#Lmin = L.branch("min");
195
200
  const c = {
@@ -217,7 +222,7 @@ class Client extends Composer {
217
222
  getInputChannel: this.getInputChannel.bind(this),
218
223
  getInputUser: this.getInputUser.bind(this),
219
224
  getInputPeerChatId: this.#getInputPeerChatId.bind(this),
220
- getEntity: this[getEntity].bind(this),
225
+ getPeer: this[mustGetPeer].bind(this),
221
226
  handleUpdate: this.#queueHandleCtxUpdate.bind(this),
222
227
  parseMode: this.#parseMode,
223
228
  outgoingMessages: this.#outgoingMessages,
@@ -316,22 +321,21 @@ class Client extends Composer {
316
321
  return this.#client?.disconnected ?? true;
317
322
  }
318
323
  #constructContext = async (update) => {
319
- const msg = "message" in update ? update.message : "editedMessage" in update ? update.editedMessage : "scheduledMessage" in update ? update.scheduledMessage : "callbackQuery" in update ? update.callbackQuery.message : undefined;
320
- const reactions = "messageInteractions" in update ? update.messageInteractions : undefined;
321
- const mustGetMsg = () => {
322
- if (msg !== undefined) {
323
- return { chatId: msg.chat.id, messageId: msg.id, businessConnectionId: msg.businessConnectionId, senderId: msg.from?.id, userId: msg.from?.id };
324
+ const mustGetMsg = (ctx) => {
325
+ if (ctx.msg !== undefined) {
326
+ return { chatId: ctx.msg.chat.id, messageId: ctx.msg.id, businessConnectionId: ctx.msg.businessConnectionId, senderId: ctx.msg.from?.id, userId: ctx.msg.from?.id };
324
327
  }
325
- else if (reactions !== undefined) {
328
+ const reactions = "messageInteractions" in update ? update.messageInteractions : undefined;
329
+ if (reactions !== undefined) {
326
330
  return { chatId: reactions.chatId, messageId: reactions.messageId };
327
331
  }
328
332
  else {
329
333
  (0, _0_deps_js_1.unreachable)();
330
334
  }
331
335
  };
332
- const mustGetUserId = () => {
333
- if (msg?.from) {
334
- return msg.from.id;
336
+ const mustGetUserId = (ctx) => {
337
+ if (ctx.msg?.from) {
338
+ return ctx.msg.from.id;
335
339
  }
336
340
  else if ("callbackQuery" in update) {
337
341
  return update.callbackQuery.from.id;
@@ -356,9 +360,6 @@ class Client extends Composer {
356
360
  }
357
361
  (0, _0_deps_js_1.unreachable)();
358
362
  };
359
- const chat_ = "messageReactions" in update ? update.messageReactions.chat : "messageReactionCount" in update ? update.messageReactionCount.chat : "chatMember" in update ? update.chatMember.chat : "myChatMember" in update ? update.myChatMember.chat : "joinRequest" in update ? update.joinRequest.chat : "story" in update ? update.story.chat : undefined;
360
- const chat = chat_ ?? msg?.chat;
361
- const from = "callbackQuery" in update ? update.callbackQuery.from : "inlineQuery" in update ? update.inlineQuery.from : "chatMember" in update ? update.chatMember.from : "myChatMember" in update ? update.myChatMember.from : "messageReactions" in update ? update.messageReactions.user : "preCheckoutQuery" in update ? update.preCheckoutQuery.from : "joinRequest" in update ? update.joinRequest.from : "businessConnection" in update ? update.businessConnection.user : "pollAnswer" in update ? update.pollAnswer.from : msg?.from ? msg.from : undefined;
362
363
  const getReplyTo = (quote, chatId, messageId) => {
363
364
  if ("story" in update) {
364
365
  return { chatId: update.story.chat.id, storyId: update.story.id };
@@ -367,350 +368,368 @@ class Client extends Composer {
367
368
  const shouldQuote = quote === undefined ? !isPrivate : quote;
368
369
  return shouldQuote ? { messageId } : undefined;
369
370
  };
370
- const me = "connectionState" in update ? this.#lastGetMe : ("authorizationState" in update && !update.authorizationState.authorized) ? this.#lastGetMe : await this.#getMe();
371
+ if (this.#lastGetMe === null && !("connectionState" in update) && (!("authorizationState" in update) || ("authorizationState" in update && update.authorizationState.authorized))) {
372
+ await this.#getMe();
373
+ }
371
374
  const context = {
372
375
  ...update,
373
376
  client: this,
374
- me: (me == null ? undefined : me),
375
- msg: msg,
376
- chat: chat,
377
- from: from,
378
- get toJSON() {
379
- return () => update;
380
- },
381
- reply: (text, params) => {
382
- const { chatId, messageId, businessConnectionId } = mustGetMsg();
377
+ get me() {
378
+ return this.client.#lastGetMe === null ? undefined : this.client.#lastGetMe;
379
+ },
380
+ get msg() {
381
+ return "message" in update ? update.message : "editedMessage" in update ? update.editedMessage : "scheduledMessage" in update ? update.scheduledMessage : "callbackQuery" in update ? update.callbackQuery.message : undefined;
382
+ },
383
+ get chat() {
384
+ return this.msg?.chat ?? ("messageReactions" in update ? update.messageReactions.chat : "messageReactionCount" in update ? update.messageReactionCount.chat : "chatMember" in update ? update.chatMember.chat : "myChatMember" in update ? update.myChatMember.chat : "joinRequest" in update ? update.joinRequest.chat : "story" in update ? update.story.chat : undefined);
385
+ },
386
+ get from() {
387
+ const from = "callbackQuery" in update ? update.callbackQuery.from : "inlineQuery" in update ? update.inlineQuery.from : "chatMember" in update ? update.chatMember.from : "myChatMember" in update ? update.myChatMember.from : "messageReactions" in update ? update.messageReactions.user : "preCheckoutQuery" in update ? update.preCheckoutQuery.from : "joinRequest" in update ? update.joinRequest.from : "businessConnection" in update ? update.businessConnection.user : "pollAnswer" in update ? update.pollAnswer.from : this.msg?.from;
388
+ return from;
389
+ },
390
+ toJSON() {
391
+ if ("update" in update) {
392
+ return { update: (0, _2_tl_js_1.toJSON)(update.update) };
393
+ }
394
+ else {
395
+ return update;
396
+ }
397
+ },
398
+ reply(text, params) {
399
+ const { chatId, messageId, businessConnectionId } = mustGetMsg(this);
383
400
  const replyTo = getReplyTo(params?.quote, chatId, messageId);
384
- return this.sendMessage(chatId, text, { ...params, replyTo, businessConnectionId });
401
+ return this.client.sendMessage(chatId, text, { ...params, replyTo, businessConnectionId });
385
402
  },
386
- replyPoll: (question, options, params) => {
387
- const { chatId, messageId, businessConnectionId } = mustGetMsg();
403
+ replyPoll(question, options, params) {
404
+ const { chatId, messageId, businessConnectionId } = mustGetMsg(this);
388
405
  const replyTo = getReplyTo(params?.quote, chatId, messageId);
389
- return this.sendPoll(chatId, question, options, { ...params, replyTo, businessConnectionId });
406
+ return this.client.sendPoll(chatId, question, options, { ...params, replyTo, businessConnectionId });
390
407
  },
391
- replyPhoto: (photo, params) => {
392
- const { chatId, messageId, businessConnectionId } = mustGetMsg();
408
+ replyPhoto(photo, params) {
409
+ const { chatId, messageId, businessConnectionId } = mustGetMsg(this);
393
410
  const replyTo = getReplyTo(params?.quote, chatId, messageId);
394
- return this.sendPhoto(chatId, photo, { ...params, replyTo, businessConnectionId });
411
+ return this.client.sendPhoto(chatId, photo, { ...params, replyTo, businessConnectionId });
395
412
  },
396
- replyMediaGroup: (media, params) => {
397
- const { chatId, messageId, businessConnectionId } = mustGetMsg();
413
+ replyMediaGroup(media, params) {
414
+ const { chatId, messageId, businessConnectionId } = mustGetMsg(this);
398
415
  const replyTo = getReplyTo(params?.quote, chatId, messageId);
399
- return this.sendMediaGroup(chatId, media, { ...params, replyTo, businessConnectionId });
416
+ return this.client.sendMediaGroup(chatId, media, { ...params, replyTo, businessConnectionId });
400
417
  },
401
- replyInvoice: (title, description, payload, currency, prices, params) => {
402
- const { chatId, messageId, businessConnectionId } = mustGetMsg();
418
+ replyInvoice(title, description, payload, currency, prices, params) {
419
+ const { chatId, messageId, businessConnectionId } = mustGetMsg(this);
403
420
  const replyTo = getReplyTo(params?.quote, chatId, messageId);
404
- return this.sendInvoice(chatId, title, description, payload, currency, prices, { ...params, replyTo, businessConnectionId });
421
+ return this.client.sendInvoice(chatId, title, description, payload, currency, prices, { ...params, replyTo, businessConnectionId });
405
422
  },
406
- replyDocument: (document, params) => {
407
- const { chatId, messageId, businessConnectionId } = mustGetMsg();
423
+ replyDocument(document, params) {
424
+ const { chatId, messageId, businessConnectionId } = mustGetMsg(this);
408
425
  const replyTo = getReplyTo(params?.quote, chatId, messageId);
409
- return this.sendDocument(chatId, document, { ...params, replyTo, businessConnectionId });
426
+ return this.client.sendDocument(chatId, document, { ...params, replyTo, businessConnectionId });
410
427
  },
411
- replySticker: (sticker, params) => {
412
- const { chatId, messageId, businessConnectionId } = mustGetMsg();
428
+ replySticker(sticker, params) {
429
+ const { chatId, messageId, businessConnectionId } = mustGetMsg(this);
413
430
  const replyTo = getReplyTo(params?.quote, chatId, messageId);
414
- return this.sendSticker(chatId, sticker, { ...params, replyTo, businessConnectionId });
431
+ return this.client.sendSticker(chatId, sticker, { ...params, replyTo, businessConnectionId });
415
432
  },
416
- replyContact: (firstName, number, params) => {
417
- const { chatId, messageId, businessConnectionId } = mustGetMsg();
433
+ replyContact(firstName, number, params) {
434
+ const { chatId, messageId, businessConnectionId } = mustGetMsg(this);
418
435
  const replyTo = getReplyTo(params?.quote, chatId, messageId);
419
- return this.sendContact(chatId, firstName, number, { ...params, replyTo, businessConnectionId });
436
+ return this.client.sendContact(chatId, firstName, number, { ...params, replyTo, businessConnectionId });
420
437
  },
421
- replyLocation: (latitude, longitude, params) => {
422
- const { chatId, messageId, businessConnectionId } = mustGetMsg();
438
+ replyLocation(latitude, longitude, params) {
439
+ const { chatId, messageId, businessConnectionId } = mustGetMsg(this);
423
440
  const replyTo = getReplyTo(params?.quote, chatId, messageId);
424
- return this.sendLocation(chatId, latitude, longitude, { ...params, replyTo, businessConnectionId });
441
+ return this.client.sendLocation(chatId, latitude, longitude, { ...params, replyTo, businessConnectionId });
425
442
  },
426
- replyDice: (params) => {
427
- const { chatId, messageId, businessConnectionId } = mustGetMsg();
443
+ replyDice(params) {
444
+ const { chatId, messageId, businessConnectionId } = mustGetMsg(this);
428
445
  const replyTo = getReplyTo(params?.quote, chatId, messageId);
429
- return this.sendDice(chatId, { ...params, replyTo, businessConnectionId });
446
+ return this.client.sendDice(chatId, { ...params, replyTo, businessConnectionId });
430
447
  },
431
- replyVenue: (latitude, longitude, title, address, params) => {
432
- const { chatId, messageId, businessConnectionId } = mustGetMsg();
448
+ replyVenue(latitude, longitude, title, address, params) {
449
+ const { chatId, messageId, businessConnectionId } = mustGetMsg(this);
433
450
  const replyTo = getReplyTo(params?.quote, chatId, messageId);
434
- return this.sendVenue(chatId, latitude, longitude, title, address, { ...params, replyTo, businessConnectionId });
451
+ return this.client.sendVenue(chatId, latitude, longitude, title, address, { ...params, replyTo, businessConnectionId });
435
452
  },
436
- replyVideo: (video, params) => {
437
- const { chatId, messageId, businessConnectionId } = mustGetMsg();
453
+ replyVideo(video, params) {
454
+ const { chatId, messageId, businessConnectionId } = mustGetMsg(this);
438
455
  const replyTo = getReplyTo(params?.quote, chatId, messageId);
439
- return this.sendVideo(chatId, video, { ...params, replyTo, businessConnectionId });
456
+ return this.client.sendVideo(chatId, video, { ...params, replyTo, businessConnectionId });
440
457
  },
441
- replyAnimation: (document, params) => {
442
- const { chatId, messageId, businessConnectionId } = mustGetMsg();
458
+ replyAnimation(document, params) {
459
+ const { chatId, messageId, businessConnectionId } = mustGetMsg(this);
443
460
  const replyTo = getReplyTo(params?.quote, chatId, messageId);
444
- return this.sendAnimation(chatId, document, { ...params, replyTo, businessConnectionId });
461
+ return this.client.sendAnimation(chatId, document, { ...params, replyTo, businessConnectionId });
445
462
  },
446
- replyVoice: (document, params) => {
447
- const { chatId, messageId, businessConnectionId } = mustGetMsg();
463
+ replyVoice(document, params) {
464
+ const { chatId, messageId, businessConnectionId } = mustGetMsg(this);
448
465
  const replyTo = getReplyTo(params?.quote, chatId, messageId);
449
- return this.sendVoice(chatId, document, { ...params, replyTo, businessConnectionId });
466
+ return this.client.sendVoice(chatId, document, { ...params, replyTo, businessConnectionId });
450
467
  },
451
- replyAudio: (document, params) => {
452
- const { chatId, messageId, businessConnectionId } = mustGetMsg();
468
+ replyAudio(document, params) {
469
+ const { chatId, messageId, businessConnectionId } = mustGetMsg(this);
453
470
  const replyTo = getReplyTo(params?.quote, chatId, messageId);
454
- return this.sendAudio(chatId, document, { ...params, replyTo, businessConnectionId });
471
+ return this.client.sendAudio(chatId, document, { ...params, replyTo, businessConnectionId });
455
472
  },
456
- replyVideoNote: (videoNote, params) => {
457
- const { chatId, messageId, businessConnectionId } = mustGetMsg();
473
+ replyVideoNote(videoNote, params) {
474
+ const { chatId, messageId, businessConnectionId } = mustGetMsg(this);
458
475
  const replyTo = getReplyTo(params?.quote, chatId, messageId);
459
- return this.sendVideoNote(chatId, videoNote, { ...params, replyTo, businessConnectionId });
476
+ return this.client.sendVideoNote(chatId, videoNote, { ...params, replyTo, businessConnectionId });
460
477
  },
461
- delete: () => {
462
- const { chatId, messageId } = mustGetMsg();
463
- return this.deleteMessage(chatId, messageId);
478
+ delete() {
479
+ const { chatId, messageId } = mustGetMsg(this);
480
+ return this.client.deleteMessage(chatId, messageId);
464
481
  },
465
- forward: (to, params) => {
466
- const { chatId, messageId } = mustGetMsg();
467
- return this.forwardMessage(chatId, to, messageId, params);
482
+ forward(to, params) {
483
+ const { chatId, messageId } = mustGetMsg(this);
484
+ return this.client.forwardMessage(chatId, to, messageId, params);
468
485
  },
469
- pin: (params) => {
470
- const { chatId, messageId, businessConnectionId } = mustGetMsg();
471
- return this.pinMessage(chatId, messageId, { ...params, businessConnectionId });
486
+ pin(params) {
487
+ const { chatId, messageId, businessConnectionId } = mustGetMsg(this);
488
+ return this.client.pinMessage(chatId, messageId, { ...params, businessConnectionId });
472
489
  },
473
- unpin: () => {
474
- const { chatId, messageId, businessConnectionId } = mustGetMsg();
475
- return this.unpinMessage(chatId, messageId, { businessConnectionId });
490
+ unpin() {
491
+ const { chatId, messageId, businessConnectionId } = mustGetMsg(this);
492
+ return this.client.unpinMessage(chatId, messageId, { businessConnectionId });
476
493
  },
477
- banSender: (params) => {
478
- const { chatId, senderId } = mustGetMsg();
494
+ banSender(params) {
495
+ const { chatId, senderId } = mustGetMsg(this);
479
496
  if (!senderId) {
480
497
  (0, _0_deps_js_1.unreachable)();
481
498
  }
482
- return this.banChatMember(chatId, senderId, params);
499
+ return this.client.banChatMember(chatId, senderId, params);
483
500
  },
484
- kickSender: () => {
485
- const { chatId, senderId } = mustGetMsg();
501
+ kickSender() {
502
+ const { chatId, senderId } = mustGetMsg(this);
486
503
  if (!senderId) {
487
504
  (0, _0_deps_js_1.unreachable)();
488
505
  }
489
- return this.kickChatMember(chatId, senderId);
506
+ return this.client.kickChatMember(chatId, senderId);
490
507
  },
491
- setSenderRights: (params) => {
492
- const { chatId, senderId } = mustGetMsg();
508
+ setSenderRights(params) {
509
+ const { chatId, senderId } = mustGetMsg(this);
493
510
  if (!senderId) {
494
511
  (0, _0_deps_js_1.unreachable)();
495
512
  }
496
- return this.setChatMemberRights(chatId, senderId, params);
513
+ return this.client.setChatMemberRights(chatId, senderId, params);
497
514
  },
498
- getChatAdministrators: () => {
499
- const { chatId } = mustGetMsg();
500
- return this.getChatAdministrators(chatId);
515
+ getChatAdministrators() {
516
+ const { chatId } = mustGetMsg(this);
517
+ return this.client.getChatAdministrators(chatId);
501
518
  },
502
- react: (reactions, params) => {
503
- const { chatId, messageId } = mustGetMsg();
504
- return this.setReactions(chatId, messageId, reactions, params);
519
+ react(reactions, params) {
520
+ const { chatId, messageId } = mustGetMsg(this);
521
+ return this.client.setReactions(chatId, messageId, reactions, params);
505
522
  },
506
- answerCallbackQuery: (params) => {
523
+ answerCallbackQuery(params) {
507
524
  if (!("callbackQuery" in update)) {
508
525
  (0, _0_deps_js_1.unreachable)();
509
526
  }
510
- return this.answerCallbackQuery(update.callbackQuery.id, params);
527
+ return this.client.answerCallbackQuery(update.callbackQuery.id, params);
511
528
  },
512
- answerInlineQuery: (results, params) => {
529
+ answerInlineQuery(results, params) {
513
530
  if (!("inlineQuery" in update)) {
514
531
  (0, _0_deps_js_1.unreachable)();
515
532
  }
516
- return this.answerInlineQuery(update.inlineQuery.id, results, params);
533
+ return this.client.answerInlineQuery(update.inlineQuery.id, results, params);
517
534
  },
518
- sendChatAction: (chatAction, params) => {
519
- const { chatId } = mustGetMsg();
520
- return this.sendChatAction(chatId, chatAction, params);
535
+ sendChatAction(chatAction, params) {
536
+ const { chatId } = mustGetMsg(this);
537
+ return this.client.sendChatAction(chatId, chatAction, params);
521
538
  },
522
- editInlineMessageText: (text, params) => {
539
+ editInlineMessageText(text, params) {
523
540
  const inlineMessageId = mustGetInlineMsgId();
524
- return this.editInlineMessageText(inlineMessageId, text, params);
541
+ return this.client.editInlineMessageText(inlineMessageId, text, params);
525
542
  },
526
- editInlineMessageMedia: (media, params) => {
543
+ editInlineMessageMedia(media, params) {
527
544
  const inlineMessageId = mustGetInlineMsgId();
528
- return this.editInlineMessageMedia(inlineMessageId, media, params);
545
+ return this.client.editInlineMessageMedia(inlineMessageId, media, params);
529
546
  },
530
- editInlineMessageCaption: (params) => {
547
+ editInlineMessageCaption(params) {
531
548
  const inlineMessageId = mustGetInlineMsgId();
532
- return this.editInlineMessageCaption(inlineMessageId, params);
549
+ return this.client.editInlineMessageCaption(inlineMessageId, params);
533
550
  },
534
- editInlineMessageLiveLocation: (latitude, longitude, params) => {
551
+ editInlineMessageLiveLocation(latitude, longitude, params) {
535
552
  const inlineMessageId = mustGetInlineMsgId();
536
- return this.editInlineMessageLiveLocation(inlineMessageId, latitude, longitude, params);
553
+ return this.client.editInlineMessageLiveLocation(inlineMessageId, latitude, longitude, params);
537
554
  },
538
- editInlineMessageReplyMarkup: (params) => {
555
+ editInlineMessageReplyMarkup(params) {
539
556
  const inlineMessageId = mustGetInlineMsgId();
540
- return this.editInlineMessageReplyMarkup(inlineMessageId, params);
557
+ return this.client.editInlineMessageReplyMarkup(inlineMessageId, params);
541
558
  },
542
- editMessageText: (messageId, text, params) => {
543
- const { chatId } = mustGetMsg();
544
- return this.editMessageText(chatId, messageId, text, params);
559
+ editMessageText(messageId, text, params) {
560
+ const { chatId } = mustGetMsg(this);
561
+ return this.client.editMessageText(chatId, messageId, text, params);
545
562
  },
546
- editMessageCaption: (messageId, params) => {
547
- const { chatId } = mustGetMsg();
548
- return this.editMessageCaption(chatId, messageId, params);
563
+ editMessageCaption(messageId, params) {
564
+ const { chatId } = mustGetMsg(this);
565
+ return this.client.editMessageCaption(chatId, messageId, params);
549
566
  },
550
- editMessageMedia: (messageId, media, params) => {
551
- const { chatId } = mustGetMsg();
552
- return this.editMessageMedia(chatId, messageId, media, params);
567
+ editMessageMedia(messageId, media, params) {
568
+ const { chatId } = mustGetMsg(this);
569
+ return this.client.editMessageMedia(chatId, messageId, media, params);
553
570
  },
554
- editMessageLiveLocation: (messageId, latitude, longitude, params) => {
555
- const { chatId } = mustGetMsg();
556
- return this.editMessageLiveLocation(chatId, messageId, latitude, longitude, params);
571
+ editMessageLiveLocation(messageId, latitude, longitude, params) {
572
+ const { chatId } = mustGetMsg(this);
573
+ return this.client.editMessageLiveLocation(chatId, messageId, latitude, longitude, params);
557
574
  },
558
- editMessageReplyMarkup: (messageId, params) => {
559
- const { chatId } = mustGetMsg();
560
- return this.editMessageReplyMarkup(chatId, messageId, params);
575
+ editMessageReplyMarkup(messageId, params) {
576
+ const { chatId } = mustGetMsg(this);
577
+ return this.client.editMessageReplyMarkup(chatId, messageId, params);
561
578
  },
562
- getMessage: (messageId) => {
563
- const { chatId } = mustGetMsg();
564
- return this.getMessage(chatId, messageId);
579
+ getMessage(messageId) {
580
+ const { chatId } = mustGetMsg(this);
581
+ return this.client.getMessage(chatId, messageId);
565
582
  },
566
- getMessages: (messageIds) => {
567
- const { chatId } = mustGetMsg();
568
- return this.getMessages(chatId, messageIds);
583
+ getMessages(messageIds) {
584
+ const { chatId } = mustGetMsg(this);
585
+ return this.client.getMessages(chatId, messageIds);
569
586
  },
570
- forwardMessage: (to, messageId, params) => {
571
- const { chatId } = mustGetMsg();
572
- return this.forwardMessage(chatId, to, messageId, params);
587
+ forwardMessage(to, messageId, params) {
588
+ const { chatId } = mustGetMsg(this);
589
+ return this.client.forwardMessage(chatId, to, messageId, params);
573
590
  },
574
- forwardMessages: (to, messageIds, params) => {
575
- const { chatId } = mustGetMsg();
576
- return this.forwardMessages(chatId, to, messageIds, params);
591
+ forwardMessages(to, messageIds, params) {
592
+ const { chatId } = mustGetMsg(this);
593
+ return this.client.forwardMessages(chatId, to, messageIds, params);
577
594
  },
578
- deleteMessage: (messageId, params) => {
579
- const { chatId } = mustGetMsg();
580
- return this.deleteMessage(chatId, messageId, params);
595
+ deleteMessage(messageId, params) {
596
+ const { chatId } = mustGetMsg(this);
597
+ return this.client.deleteMessage(chatId, messageId, params);
581
598
  },
582
- deleteMessages: (messageIds, params) => {
583
- const { chatId } = mustGetMsg();
584
- return this.deleteMessages(chatId, messageIds, params);
599
+ deleteMessages(messageIds, params) {
600
+ const { chatId } = mustGetMsg(this);
601
+ return this.client.deleteMessages(chatId, messageIds, params);
585
602
  },
586
- pinMessage: (messageId, params) => {
587
- const { chatId } = mustGetMsg();
588
- return this.pinMessage(chatId, messageId, params);
603
+ pinMessage(messageId, params) {
604
+ const { chatId } = mustGetMsg(this);
605
+ return this.client.pinMessage(chatId, messageId, params);
589
606
  },
590
- unpinMessage: (messageId) => {
591
- const { chatId } = mustGetMsg();
592
- return this.unpinMessage(chatId, messageId);
607
+ unpinMessage(messageId) {
608
+ const { chatId } = mustGetMsg(this);
609
+ return this.client.unpinMessage(chatId, messageId);
593
610
  },
594
- unpinMessages: () => {
595
- const { chatId } = mustGetMsg();
596
- return this.unpinMessages(chatId);
611
+ unpinMessages() {
612
+ const { chatId } = mustGetMsg(this);
613
+ return this.client.unpinMessages(chatId);
597
614
  },
598
- setAvailableReactions: (availableReactions) => {
599
- const { chatId } = mustGetMsg();
600
- return this.setAvailableReactions(chatId, availableReactions);
615
+ setAvailableReactions(availableReactions) {
616
+ const { chatId } = mustGetMsg(this);
617
+ return this.client.setAvailableReactions(chatId, availableReactions);
601
618
  },
602
- addReaction: (messageId, reaction, params) => {
603
- const { chatId } = mustGetMsg();
604
- return this.addReaction(chatId, messageId, reaction, params);
619
+ addReaction(messageId, reaction, params) {
620
+ const { chatId } = mustGetMsg(this);
621
+ return this.client.addReaction(chatId, messageId, reaction, params);
605
622
  },
606
- removeReaction: (messageId, reaction) => {
607
- const { chatId } = mustGetMsg();
608
- return this.removeReaction(chatId, messageId, reaction);
623
+ removeReaction(messageId, reaction) {
624
+ const { chatId } = mustGetMsg(this);
625
+ return this.client.removeReaction(chatId, messageId, reaction);
609
626
  },
610
- setReactions: (messageId, reactions, params) => {
611
- const { chatId } = mustGetMsg();
612
- return this.setReactions(chatId, messageId, reactions, params);
627
+ setReactions(messageId, reactions, params) {
628
+ const { chatId } = mustGetMsg(this);
629
+ return this.client.setReactions(chatId, messageId, reactions, params);
613
630
  },
614
- read: () => {
615
- const { chatId, messageId } = mustGetMsg();
616
- return this.readMessages(chatId, messageId);
631
+ read() {
632
+ const { chatId, messageId } = mustGetMsg(this);
633
+ return this.client.readMessages(chatId, messageId);
617
634
  },
618
- setChatPhoto: (photo, params) => {
619
- const { chatId } = mustGetMsg();
620
- return this.setChatPhoto(chatId, photo, params);
635
+ setChatPhoto(photo, params) {
636
+ const { chatId } = mustGetMsg(this);
637
+ return this.client.setChatPhoto(chatId, photo, params);
621
638
  },
622
- deleteChatPhoto: () => {
623
- const { chatId } = mustGetMsg();
624
- return this.deleteChatPhoto(chatId);
639
+ deleteChatPhoto() {
640
+ const { chatId } = mustGetMsg(this);
641
+ return this.client.deleteChatPhoto(chatId);
625
642
  },
626
- banChatMember: (memberId, params) => {
627
- const { chatId } = mustGetMsg();
628
- return this.banChatMember(chatId, memberId, params);
643
+ banChatMember(memberId, params) {
644
+ const { chatId } = mustGetMsg(this);
645
+ return this.client.banChatMember(chatId, memberId, params);
629
646
  },
630
- unbanChatMember: (memberId) => {
631
- const { chatId } = mustGetMsg();
632
- return this.unbanChatMember(chatId, memberId);
647
+ unbanChatMember(memberId) {
648
+ const { chatId } = mustGetMsg(this);
649
+ return this.client.unbanChatMember(chatId, memberId);
633
650
  },
634
- kickChatMember: (memberId) => {
635
- const { chatId } = mustGetMsg();
636
- return this.kickChatMember(chatId, memberId);
651
+ kickChatMember(memberId) {
652
+ const { chatId } = mustGetMsg(this);
653
+ return this.client.kickChatMember(chatId, memberId);
637
654
  },
638
- setChatMemberRights: (memberId, params) => {
639
- const { chatId } = mustGetMsg();
640
- return this.setChatMemberRights(chatId, memberId, params);
655
+ setChatMemberRights(memberId, params) {
656
+ const { chatId } = mustGetMsg(this);
657
+ return this.client.setChatMemberRights(chatId, memberId, params);
641
658
  },
642
- deleteChatMemberMessages: (userId) => {
643
- const { chatId } = mustGetMsg();
644
- return this.deleteChatMemberMessages(chatId, userId);
659
+ deleteChatMemberMessages(userId) {
660
+ const { chatId } = mustGetMsg(this);
661
+ return this.client.deleteChatMemberMessages(chatId, userId);
645
662
  },
646
- searchMessages: (query, params) => {
647
- const { chatId } = mustGetMsg();
648
- return this.searchMessages(chatId, query, params);
663
+ searchMessages(params) {
664
+ const { chatId } = mustGetMsg(this);
665
+ params ??= {};
666
+ params.chatId = chatId;
667
+ return this.client.searchMessages(params);
649
668
  },
650
- setBoostsRequiredToCircumventRestrictions: (boosts) => {
651
- const { chatId } = mustGetMsg();
652
- return this.setBoostsRequiredToCircumventRestrictions(chatId, boosts);
669
+ setBoostsRequiredToCircumventRestrictions(boosts) {
670
+ const { chatId } = mustGetMsg(this);
671
+ return this.client.setBoostsRequiredToCircumventRestrictions(chatId, boosts);
653
672
  },
654
- createInviteLink: (params) => {
655
- const { chatId } = mustGetMsg();
656
- return this.createInviteLink(chatId, params);
673
+ createInviteLink(params) {
674
+ const { chatId } = mustGetMsg(this);
675
+ return this.client.createInviteLink(chatId, params);
657
676
  },
658
- getCreatedInviteLinks: (params) => {
659
- const { chatId } = mustGetMsg();
660
- return this.getCreatedInviteLinks(chatId, params);
677
+ getCreatedInviteLinks(params) {
678
+ const { chatId } = mustGetMsg(this);
679
+ return this.client.getCreatedInviteLinks(chatId, params);
661
680
  },
662
- leave: () => {
663
- const { chatId } = mustGetMsg();
664
- return this.leaveChat(chatId);
681
+ leave() {
682
+ const { chatId } = mustGetMsg(this);
683
+ return this.client.leaveChat(chatId);
665
684
  },
666
- block: () => {
667
- return this.blockUser(mustGetUserId());
685
+ block() {
686
+ return this.client.blockUser(mustGetUserId(this));
668
687
  },
669
- unblock: () => {
670
- return this.unblockUser(mustGetUserId());
688
+ unblock() {
689
+ return this.client.unblockUser(mustGetUserId(this));
671
690
  },
672
- getChatMember: (userId) => {
673
- const { chatId } = mustGetMsg();
674
- return this.getChatMember(chatId, userId);
691
+ getChatMember(userId) {
692
+ const { chatId } = mustGetMsg(this);
693
+ return this.client.getChatMember(chatId, userId);
675
694
  },
676
- getChatMembers: (params) => {
677
- const { chatId } = mustGetMsg();
678
- return this.getChatMembers(chatId, params);
695
+ getChatMembers(params) {
696
+ const { chatId } = mustGetMsg(this);
697
+ return this.client.getChatMembers(chatId, params);
679
698
  },
680
- setChatStickerSet: (setName) => {
681
- const { chatId } = mustGetMsg();
682
- return this.setChatStickerSet(chatId, setName);
699
+ setChatStickerSet(setName) {
700
+ const { chatId } = mustGetMsg(this);
701
+ return this.client.setChatStickerSet(chatId, setName);
683
702
  },
684
- deleteChatStickerSet: () => {
685
- const { chatId } = mustGetMsg();
686
- return this.deleteChatStickerSet(chatId);
703
+ deleteChatStickerSet() {
704
+ const { chatId } = mustGetMsg(this);
705
+ return this.client.deleteChatStickerSet(chatId);
687
706
  },
688
- getBusinessConnection: () => {
689
- const { businessConnectionId } = mustGetMsg();
707
+ getBusinessConnection() {
708
+ const { businessConnectionId } = mustGetMsg(this);
690
709
  if (!businessConnectionId) {
691
710
  (0, _0_deps_js_1.unreachable)();
692
711
  }
693
- return this.getBusinessConnection(businessConnectionId);
712
+ return this.client.getBusinessConnection(businessConnectionId);
694
713
  },
695
- answerPreCheckoutQuery: (ok, params) => {
714
+ answerPreCheckoutQuery(ok, params) {
696
715
  if (!("preCheckoutQuery" in update)) {
697
716
  (0, _0_deps_js_1.unreachable)();
698
717
  }
699
- return this.answerPreCheckoutQuery(update.preCheckoutQuery.id, ok, params);
718
+ return this.client.answerPreCheckoutQuery(update.preCheckoutQuery.id, ok, params);
700
719
  },
701
- approveJoinRequest: () => {
702
- const { chatId, userId } = mustGetMsg();
720
+ approveJoinRequest() {
721
+ const { chatId, userId } = mustGetMsg(this);
703
722
  if (!userId) {
704
723
  (0, _0_deps_js_1.unreachable)();
705
724
  }
706
- return this.approveJoinRequest(chatId, userId);
725
+ return this.client.approveJoinRequest(chatId, userId);
707
726
  },
708
- declineJoinRequest: () => {
709
- const { chatId, userId } = mustGetMsg();
727
+ declineJoinRequest() {
728
+ const { chatId, userId } = mustGetMsg(this);
710
729
  if (!userId) {
711
730
  (0, _0_deps_js_1.unreachable)();
712
731
  }
713
- return this.declineJoinRequest(chatId, userId);
732
+ return this.client.declineJoinRequest(chatId, userId);
714
733
  },
715
734
  };
716
735
  return (0, _1_utilities_js_1.cleanObject)(context);
@@ -722,7 +741,7 @@ class Client extends Composer {
722
741
  #lastPropagatedConnectionState = null;
723
742
  #stateChangeHandler = ((connected) => {
724
743
  const connectionState = connected ? "ready" : "notConnected";
725
- if (this.#lastPropagatedConnectionState != connectionState) {
744
+ if (this.#lastPropagatedConnectionState !== connectionState) {
726
745
  this.#propagateConnectionState(connectionState);
727
746
  }
728
747
  }).bind(this);
@@ -732,6 +751,7 @@ class Client extends Composer {
732
751
  await this.storage.initialize();
733
752
  if (!this.#guaranteeUpdateDelivery) {
734
753
  await this.storage.deleteUpdates();
754
+ await this.storage.commit(true);
735
755
  }
736
756
  this.#storageInited = true;
737
757
  }
@@ -752,28 +772,39 @@ class Client extends Composer {
752
772
  if (this.#authString && !this.#authStringImported) {
753
773
  await this.importAuthString(this.#authString);
754
774
  }
755
- const [authKey, dc] = await Promise.all([this.storage.getAuthKey(), this.storage.getDc()]);
756
- if (authKey != null && dc != null) {
757
- if (!this.#client || this.#client.dc != dc) {
775
+ const auth = this.storage.auth.mustGet();
776
+ if (auth.authKey !== null && auth.dc !== null) {
777
+ if (!this.#client || this.#client.dc !== auth.dc) {
758
778
  this.#client?.disconnect();
759
- this.#setMainClient(this.#newClient(dc, true, false));
779
+ this.#setMainClient(this.#newClient(auth.dc, true, false));
760
780
  }
761
- await this.#client.setAuthKey(authKey);
762
- if (this.#client.serverSalt == 0n) {
781
+ await this.#client.setAuthKey(auth.authKey);
782
+ if (this.#client.serverSalt === 0n) {
763
783
  this.#client.serverSalt = await this.storage.getServerSalt() ?? 0n;
764
784
  }
765
785
  }
766
786
  else {
767
- const dc = await this.storage.getDc() ?? this.#initialDc;
768
- if (!this.#client || this.#client.dc != dc) {
787
+ const dc = auth.dc ?? this.#initialDc;
788
+ if (!this.#client || this.#client.dc !== dc) {
769
789
  this.#client?.disconnect();
770
790
  this.#setMainClient(this.#newClient(dc, true, false));
771
791
  }
772
792
  }
773
793
  await this.#client.connect();
774
- await Promise.all([this.storage.setAuthKey(this.#client.authKey), this.storage.setDc(this.#client.dc), this.storage.setServerSalt(this.#client.serverSalt)]);
775
- this.#startUpdateGapRecoveryLoop();
776
- this.#startClientDisconnectionLoop();
794
+ await this.storage.auth.update((v) => {
795
+ v.authKey = this.#client.authKey;
796
+ v.dc = this.#client.dc;
797
+ });
798
+ await this.storage.setServerSalt(this.#client.serverSalt);
799
+ this.#updateGapRecoveryLoop.start();
800
+ this.#clientDisconnectionLoop.start();
801
+ if (!this.#messageStorage_.isMemory) {
802
+ this.#storageWriteLoop.start();
803
+ }
804
+ else {
805
+ this.#L.debug("not starting storageWriteLoop");
806
+ }
807
+ await this.storage.commit(true);
777
808
  }
778
809
  finally {
779
810
  unlock();
@@ -785,101 +816,87 @@ class Client extends Composer {
785
816
  newDc += "-test";
786
817
  }
787
818
  this.disconnect();
788
- await this.storage.setDc(newDc);
789
- await this.storage.setAuthKey(null);
819
+ await this.storage.auth.update((v) => {
820
+ v.authKey = null;
821
+ v.dc = newDc;
822
+ });
790
823
  await this.connect();
791
824
  this.#LhandleMigrationError.debug(`migrated to DC${newDc}`);
792
825
  }
793
- disconnect() {
826
+ async disconnect() {
794
827
  this.#disconnectAllClients();
795
- this.#clientDisconnectionLoopAbortController?.abort();
796
- this.#updateGapRecoveryLoopAbortController?.abort();
828
+ this.#clientDisconnectionLoop.abort();
829
+ this.#updateGapRecoveryLoop.abort();
830
+ this.#storageWriteLoop.abort();
797
831
  this.#updateManager.closeAllChats();
832
+ await this.messageStorage.commit(true);
798
833
  }
799
834
  #lastPropagatedAuthorizationState = null;
800
835
  async #propagateAuthorizationState(authorized) {
801
- if (this.#lastPropagatedAuthorizationState != authorized) {
836
+ if (this.#lastPropagatedAuthorizationState !== authorized) {
802
837
  await this.#handleCtxUpdate({ authorizationState: { authorized } });
803
838
  this.#lastPropagatedAuthorizationState = authorized;
804
839
  }
805
840
  }
806
841
  async #getSelfId() {
807
842
  const id = await this.storage.getAccountId();
808
- if (id == null) {
843
+ if (id === null) {
809
844
  throw new Error("Unauthorized");
810
845
  }
811
846
  return id;
812
847
  }
813
848
  async #getIsPremium() {
814
849
  const maybeIsPremium = await this.storage.getIsPremium();
815
- if (maybeIsPremium != null) {
850
+ if (maybeIsPremium !== null) {
816
851
  return maybeIsPremium;
817
852
  }
818
853
  return this.#lastGetMe?.isPremium ?? false;
819
854
  }
820
855
  #lastUpdates = new Date();
821
- #updateGapRecoveryLoopAbortController;
822
- #startUpdateGapRecoveryLoop() {
823
- (0, _1_utilities_js_1.drop)(this.#updateGapRecoveryLoop());
824
- }
825
- async #updateGapRecoveryLoop() {
826
- this.#updateGapRecoveryLoopAbortController?.abort();
827
- const controller = this.#updateGapRecoveryLoopAbortController = new AbortController();
828
- while (this.connected) {
829
- try {
830
- await (0, _0_deps_js_1.delay)(60 * _0_deps_js_1.SECOND, { signal: controller.signal });
831
- if (!this.connected) {
832
- break;
833
- }
834
- controller.signal.throwIfAborted();
835
- if (Date.now() - this.#lastUpdates.getTime() >= 15 * _0_deps_js_1.MINUTE) {
836
- (0, _1_utilities_js_1.drop)(this.#updateManager.recoverUpdateGap("lastUpdates").then(() => {
837
- this.#lastUpdates = new Date();
838
- }));
839
- }
840
- }
841
- catch (err) {
842
- if (err instanceof DOMException && err.name == "AbortError") {
843
- break;
844
- }
845
- else if (!this.connected) {
846
- break;
847
- }
848
- this.#LupdateGapRecoveryLoop.error(err);
849
- }
856
+ #updateGapRecoveryLoop = new _0_abortable_loop_js_1.AbortableLoop(async (signal) => {
857
+ await (0, _0_deps_js_1.delay)(60 * _0_deps_js_1.SECOND, { signal });
858
+ if (!this.connected) {
859
+ this.#updateGapRecoveryLoop.abort();
860
+ return;
850
861
  }
851
- }
852
- #clientDisconnectionLoopAbortController;
853
- #startClientDisconnectionLoop() {
854
- (0, _1_utilities_js_1.drop)(this.#clientDisconnectionLoop());
855
- }
856
- async #clientDisconnectionLoop() {
857
- const controller = this.#clientDisconnectionLoopAbortController = new AbortController();
858
- while (this.connected) {
859
- try {
860
- await (0, _0_deps_js_1.delay)(60 * _0_deps_js_1.SECOND, { signal: controller.signal });
861
- if (!this.connected) {
862
- break;
863
- }
864
- controller.signal.throwIfAborted();
865
- const now = Date.now();
866
- const disconnectAfter = 5 * _0_deps_js_1.MINUTE;
867
- this.#clients.map((client, i) => {
868
- if (i > 0 && !client.disconnected && client.lastRequest && now - client.lastRequest.getTime() >= disconnectAfter) {
869
- client?.disconnect();
870
- }
871
- });
872
- }
873
- catch (err) {
874
- if (err instanceof DOMException && err.name == "AbortError") {
875
- break;
876
- }
877
- else if (!this.connected) {
878
- break;
879
- }
862
+ if (Date.now() - this.#lastUpdates.getTime() >= 15 * _0_deps_js_1.MINUTE) {
863
+ (0, _1_utilities_js_1.drop)(this.#updateManager.recoverUpdateGap("lastUpdates").then(() => {
864
+ this.#lastUpdates = new Date();
865
+ }));
866
+ }
867
+ }, (err) => {
868
+ if (!this.connected) {
869
+ this.#updateGapRecoveryLoop.abort();
870
+ }
871
+ else {
872
+ this.#LupdateGapRecoveryLoop.error(err);
873
+ }
874
+ });
875
+ #clientDisconnectionLoop = new _0_abortable_loop_js_1.AbortableLoop(async (signal) => {
876
+ await (0, _0_deps_js_1.delay)(60 * _0_deps_js_1.SECOND, { signal });
877
+ if (!this.connected) {
878
+ this.#clientDisconnectionLoop.abort();
879
+ return;
880
+ }
881
+ const now = Date.now();
882
+ const disconnectAfter = 5 * _0_deps_js_1.MINUTE;
883
+ for (const [i, client] of this.#clients.entries()) {
884
+ if (i > 0 && !client.disconnected && client.lastRequest && now - client.lastRequest.getTime() >= disconnectAfter) {
885
+ client?.disconnect();
880
886
  }
881
887
  }
882
- }
888
+ }, () => {
889
+ if (!this.connected) {
890
+ this.#clientDisconnectionLoop.abort();
891
+ }
892
+ });
893
+ #storageWriteLoop = new _0_abortable_loop_js_1.AbortableLoop(async (signal) => {
894
+ await (0, _0_deps_js_1.delay)(60 * _0_deps_js_1.SECOND, { signal });
895
+ await this.messageStorage.commit();
896
+ await this.storage.commit();
897
+ }, (err) => {
898
+ this.#LstorageWriteLoop.error(err);
899
+ });
883
900
  /**
884
901
  * Signs in using the provided parameters if not already signed in.
885
902
  * If no parameters are provided, the credentials will be prompted in runtime.
@@ -909,7 +926,7 @@ class Client extends Composer {
909
926
  }
910
927
  if (typeof params === "undefined") {
911
928
  const loginType = (0, _1_utilities_js_1.mustPromptOneOf)("Do you want to login as bot [b] or user [u]?", ["b", "u"]);
912
- if (loginType == "b") {
929
+ if (loginType === "b") {
913
930
  params = { botToken: (0, _1_utilities_js_1.mustPrompt)("Bot token:") };
914
931
  }
915
932
  else {
@@ -921,8 +938,11 @@ class Client extends Composer {
921
938
  while (true) {
922
939
  try {
923
940
  const auth = await this.invoke({ _: "auth.importBotAuthorization", api_id: this.#apiId, api_hash: this.#apiHash, bot_auth_token: params.botToken, flags: 0 });
924
- await this.storage.setAccountId(Number(_2_tl_js_1.Api.as("auth.authorization", auth).user.id));
925
- await this.storage.setAccountType("bot");
941
+ await this.storage.auth.update((v) => {
942
+ v.userId = Number(_2_tl_js_1.Api.as("auth.authorization", auth).user.id);
943
+ v.isBot = true;
944
+ });
945
+ await this.storage.commit(true);
926
946
  break;
927
947
  }
928
948
  catch (err) {
@@ -988,8 +1008,10 @@ class Client extends Composer {
988
1008
  phone_code: code,
989
1009
  phone_code_hash: sentCode.phone_code_hash,
990
1010
  });
991
- await this.storage.setAccountId(Number(_2_tl_js_1.Api.as("auth.authorization", auth).user.id));
992
- await this.storage.setAccountType("user");
1011
+ await this.storage.auth.update((v) => {
1012
+ v.userId = Number(_2_tl_js_1.Api.as("auth.authorization", auth).user.id);
1013
+ v.isBot = false;
1014
+ });
993
1015
  this.#LsignIn.debug("signed in as user");
994
1016
  await this.#propagateAuthorizationState(true);
995
1017
  await this.#updateManager.fetchState("signIn");
@@ -1017,8 +1039,11 @@ class Client extends Composer {
1017
1039
  const password = typeof params.password === "string" ? params.password : await params.password(ap.hint ?? null);
1018
1040
  const input = await (0, _0_password_js_1.checkPassword)(password, ap);
1019
1041
  const auth = await this.invoke({ _: "auth.checkPassword", password: input });
1020
- await this.storage.setAccountId(Number(_2_tl_js_1.Api.as("auth.authorization", auth).user.id));
1021
- await this.storage.setAccountType("user");
1042
+ await this.storage.auth.update((v) => {
1043
+ v.userId = Number(_2_tl_js_1.Api.as("auth.authorization", auth).user.id);
1044
+ v.isBot = false;
1045
+ });
1046
+ await this.storage.commit(true);
1022
1047
  this.#LsignIn.debug("signed in as user");
1023
1048
  await this.#propagateAuthorizationState(true);
1024
1049
  await this.#updateManager.fetchState("signIn");
@@ -1035,7 +1060,7 @@ class Client extends Composer {
1035
1060
  }
1036
1061
  }
1037
1062
  catch (err) {
1038
- if (err == exports.restartAuth) {
1063
+ if (err === exports.restartAuth) {
1039
1064
  continue auth;
1040
1065
  }
1041
1066
  else {
@@ -1086,15 +1111,15 @@ class Client extends Composer {
1086
1111
  }
1087
1112
  #getMainClientMutex = new _1_utilities_js_1.Mutex();
1088
1113
  async #getMainClient(dc) {
1089
- if (dc === undefined || dc == this.#client?.dc) {
1114
+ if (dc === undefined || dc === this.#client?.dc) {
1090
1115
  return this.#client;
1091
1116
  }
1092
- let client = this.#clients.find((v) => v.dc == dc);
1117
+ let client = this.#clients.find((v) => v.dc === dc);
1093
1118
  if (client) {
1094
1119
  return client;
1095
1120
  }
1096
1121
  const unlock = await this.#getMainClientMutex.lock();
1097
- client = this.#clients.find((v) => v.dc == dc);
1122
+ client = this.#clients.find((v) => v.dc === dc);
1098
1123
  if (client) {
1099
1124
  return client;
1100
1125
  }
@@ -1127,7 +1152,7 @@ class Client extends Composer {
1127
1152
  }
1128
1153
  async #getUploadPoolSize() {
1129
1154
  const dc = this.#client.dc;
1130
- return (dc != "2" && dc != "4") || await this.#getIsPremium() ? 8 : 4;
1155
+ return (dc !== "2" && dc !== "4") || await this.#getIsPremium() ? 8 : 4;
1131
1156
  }
1132
1157
  async #getUploadClient() {
1133
1158
  const dc = this.#client.dc;
@@ -1146,19 +1171,21 @@ class Client extends Composer {
1146
1171
  return client;
1147
1172
  }
1148
1173
  async #setupClient(client) {
1149
- const storage = client.dc == this.#client.dc ? this.storage : new _0_storage_operations_js_1.StorageOperations(this.storage.provider.branch(client.dc + (client.cdn ? "_cdn" : "")));
1150
- const [authKey, serverSalt] = await Promise.all([storage.getAuthKey(), storage.getServerSalt()]);
1151
- if (authKey) {
1152
- await client.setAuthKey(authKey);
1174
+ const storage = client.dc === this.#client.dc ? this.storage : new _0_storage_operations_js_1.StorageOperations(this.storage.provider.branch(client.dc + (client.cdn ? "_cdn" : "")));
1175
+ await storage.initialize();
1176
+ const auth = storage.auth.mustGet();
1177
+ const serverSalt = await storage.getServerSalt();
1178
+ if (auth.authKey !== null) {
1179
+ await client.setAuthKey(auth.authKey);
1153
1180
  if (serverSalt) {
1154
1181
  client.serverSalt = serverSalt;
1155
1182
  }
1156
1183
  }
1157
1184
  await client.connect();
1158
- if (!authKey) {
1185
+ if (auth.authKey === null) {
1159
1186
  await this.#importAuthorization(client);
1160
1187
  }
1161
- await storage.setAuthKey(client.authKey);
1188
+ await storage.auth.update((v) => v.authKey = client.authKey);
1162
1189
  if (client.dc !== this.#client.dc) {
1163
1190
  await storage.setServerSalt(client.serverSalt);
1164
1191
  client.handlers.onNewServerSalt = async (serverSalt) => {
@@ -1167,10 +1194,11 @@ class Client extends Composer {
1167
1194
  }
1168
1195
  }
1169
1196
  async #importAuthorization(client) {
1170
- if (this.#client.dc == client.dc && this.#client.cdn == client.cdn) {
1171
- const [authKey, serverSalt] = await Promise.all([this.storage.getAuthKey(), this.storage.getServerSalt()]);
1172
- if (authKey) {
1173
- await client.setAuthKey(authKey);
1197
+ if (this.#client.dc === client.dc && this.#client.cdn === client.cdn) {
1198
+ const auth = this.storage.auth.mustGet();
1199
+ const serverSalt = await this.storage.getServerSalt();
1200
+ if (auth.authKey !== null) {
1201
+ await client.setAuthKey(auth.authKey);
1174
1202
  if (serverSalt) {
1175
1203
  client.serverSalt = serverSalt;
1176
1204
  }
@@ -1236,7 +1264,7 @@ class Client extends Composer {
1236
1264
  this.#handleInvokeError = async (ctx, next) => {
1237
1265
  let result = null;
1238
1266
  return await handle(ctx, async () => {
1239
- if (result != null)
1267
+ if (result !== null)
1240
1268
  return result;
1241
1269
  result = await handler(ctx, next);
1242
1270
  return result;
@@ -1256,23 +1284,17 @@ class Client extends Composer {
1256
1284
  await this.storage.importAuthString(authString);
1257
1285
  this.#authStringImported = true;
1258
1286
  if (!this.#apiId) {
1259
- this.#apiId = await this.storage.getApiId() ?? 0;
1287
+ this.#apiId = this.storage.auth.mustGet().apiId;
1260
1288
  }
1261
1289
  }
1262
1290
  async #getUserAccessHash(userId) {
1263
1291
  const users = await this.invoke({ _: "users.getUsers", id: [{ _: "inputUser", user_id: userId, access_hash: 0n }] });
1264
1292
  const user = _2_tl_js_1.Api.is("user", users[0]) ? users[0] : undefined;
1265
- if (user) {
1266
- await this.messageStorage.setEntity(user);
1267
- }
1268
1293
  return user?.access_hash ?? 0n;
1269
1294
  }
1270
1295
  async #getChannelAccessHash(channelId) {
1271
1296
  const channels = await this.invoke({ _: "channels.getChannels", id: [{ _: "inputChannel", channel_id: channelId, access_hash: 0n }] });
1272
1297
  const channel = _2_tl_js_1.Api.is("channel", channels.chats[0]) ? channels.chats[0] : undefined;
1273
- if (channel) {
1274
- await this.messageStorage.setEntity(channel);
1275
- }
1276
1298
  return channel?.access_hash ?? 0n;
1277
1299
  }
1278
1300
  /**
@@ -1281,11 +1303,11 @@ class Client extends Composer {
1281
1303
  * @param id The identifier of a chat.
1282
1304
  */
1283
1305
  async getInputPeer(id) {
1284
- if (id === "me" || id == await this.#getSelfId()) {
1306
+ if (id === "me" || id === await this.#getSelfId()) {
1285
1307
  return { _: "inputPeerSelf" };
1286
1308
  }
1287
1309
  const inputPeer = await this.#getInputPeerInner(id);
1288
- if (((_2_tl_js_1.Api.is("inputPeerUser", inputPeer) || _2_tl_js_1.Api.is("inputPeerChannel", inputPeer)) && inputPeer.access_hash == 0n) && await this.storage.getAccountType() == "bot") {
1310
+ if (((_2_tl_js_1.Api.is("inputPeerUser", inputPeer) || _2_tl_js_1.Api.is("inputPeerChannel", inputPeer)) && inputPeer.access_hash === 0n) && this.storage.isBot) {
1289
1311
  if ("channel_id" in inputPeer) {
1290
1312
  inputPeer.access_hash = await this.#getChannelAccessHash(inputPeer.channel_id);
1291
1313
  }
@@ -1293,7 +1315,7 @@ class Client extends Composer {
1293
1315
  inputPeer.access_hash = await this.#getUserAccessHash(inputPeer.user_id);
1294
1316
  }
1295
1317
  }
1296
- if ((_2_tl_js_1.Api.is("inputPeerUser", inputPeer) || _2_tl_js_1.Api.is("inputPeerChannel", inputPeer)) && inputPeer.access_hash == 0n) {
1318
+ if ((_2_tl_js_1.Api.is("inputPeerUser", inputPeer) || _2_tl_js_1.Api.is("inputPeerChannel", inputPeer)) && inputPeer.access_hash === 0n) {
1297
1319
  throw new _0_errors_js_1.AccessError(`Cannot access the chat ${id} because there is no access hash for it.`);
1298
1320
  }
1299
1321
  return inputPeer;
@@ -1342,8 +1364,8 @@ class Client extends Composer {
1342
1364
  if (typeof id === "string") {
1343
1365
  id = (0, _0_utilities_js_1.getUsername)(id);
1344
1366
  let resolvedId = 0;
1345
- const maybeUsername = await this.messageStorage.getUsername(id);
1346
- if (maybeUsername != null && Date.now() - maybeUsername[1].getTime() < _4_constants_js_1.USERNAME_TTL) {
1367
+ const maybeUsername = await this.messageStorage.usernames.get([id]);
1368
+ if (maybeUsername !== null && Date.now() - maybeUsername[1].getTime() < _4_constants_js_1.USERNAME_TTL) {
1347
1369
  const [id] = maybeUsername;
1348
1370
  resolvedId = id;
1349
1371
  }
@@ -1362,11 +1384,11 @@ class Client extends Composer {
1362
1384
  }
1363
1385
  }
1364
1386
  const resolvedIdType = _2_tl_js_1.Api.getChatIdPeerType(resolvedId);
1365
- if (resolvedIdType == "user") {
1387
+ if (resolvedIdType === "user") {
1366
1388
  const accessHash = await this.messageStorage.getUserAccessHash(resolvedId);
1367
1389
  peer = { _: "inputPeerUser", user_id: _2_tl_js_1.Api.chatIdToPeerId(resolvedId), access_hash: accessHash ?? 0n };
1368
1390
  }
1369
- else if (resolvedIdType == "channel") {
1391
+ else if (resolvedIdType === "channel") {
1370
1392
  const accessHash = await this.messageStorage.getChannelAccessHash(resolvedId);
1371
1393
  peer = { _: "inputPeerChannel", channel_id: _2_tl_js_1.Api.chatIdToPeerId(resolvedId), access_hash: accessHash ?? 0n };
1372
1394
  }
@@ -1381,7 +1403,7 @@ class Client extends Composer {
1381
1403
  else if (-_4_constants_js_1.MAX_CHAT_ID <= id) {
1382
1404
  peer = { _: "inputPeerChat", chat_id: BigInt(Math.abs(id)) };
1383
1405
  }
1384
- else if (_1_utilities_js_1.ZERO_CHANNEL_ID - _4_constants_js_1.MAX_CHANNEL_ID <= id && id != _1_utilities_js_1.ZERO_CHANNEL_ID) {
1406
+ else if (_1_utilities_js_1.ZERO_CHANNEL_ID - _4_constants_js_1.MAX_CHANNEL_ID <= id && id !== _1_utilities_js_1.ZERO_CHANNEL_ID) {
1385
1407
  const accessHash = await this.messageStorage.getChannelAccessHash(id);
1386
1408
  peer = { _: "inputPeerChannel", channel_id: _2_tl_js_1.Api.chatIdToPeerId(id), access_hash: accessHash ?? 0n };
1387
1409
  }
@@ -1389,23 +1411,24 @@ class Client extends Composer {
1389
1411
  throw new _0_errors_js_1.InputError("The ID is of an format unknown.");
1390
1412
  }
1391
1413
  if (!_2_tl_js_1.Api.is("inputPeerChat", peer) && !peer.access_hash) {
1392
- const chatId = _2_tl_js_1.Api.peerToChatId(peer);
1393
- const minPeerReference = await this.messageStorage.getLastMinPeerReference(chatId);
1394
- if (minPeerReference) {
1395
- const minInputPeer = await this.#getMinInputPeer((0, _0_utilities_js_1.canBeInputChannel)(peer) ? "channel" : "user", { ...minPeerReference, senderId: chatId });
1396
- if (minInputPeer) {
1397
- this.#Lmin.debug("resolved input min peer", minInputPeer);
1398
- peer = minInputPeer;
1399
- }
1400
- }
1414
+ // TODO
1415
+ // const chatId = Api.peerToChatId(peer);
1416
+ // const minPeerReference = await this.messageStorage.getLastMinPeerReference(chatId);
1417
+ // if (minPeerReference) {
1418
+ // const minInputPeer = await this.#getMinInputPeer(canBeInputChannel(peer) ? "channel" : "user", { ...minPeerReference, senderId: chatId });
1419
+ // if (minInputPeer) {
1420
+ // this.#Lmin.debug("resolved input min peer", minInputPeer);
1421
+ // peer = minInputPeer;
1422
+ // }
1423
+ // }
1401
1424
  }
1402
1425
  return peer;
1403
1426
  }
1404
1427
  async #getMinInputPeer(type, reference) {
1405
- const entity = await this.messageStorage.getEntity(reference.chatId);
1406
- if (_2_tl_js_1.Api.isOneOf(["channel", "channelForbidden"], entity) && entity.access_hash) {
1407
- const peer = { _: "inputPeerChannel", channel_id: entity.id, access_hash: entity.access_hash };
1408
- if (type == "user") {
1428
+ const peer_ = await this.messageStorage.peers.get([reference.chatId]);
1429
+ if (peer_ !== null && (peer_[0].type === "channel" || peer_[0].type === "supergroup")) {
1430
+ const peer = { _: "inputPeerChannel", channel_id: BigInt(peer_[0].id), access_hash: peer_[1] };
1431
+ if (type === "user") {
1409
1432
  return { _: "inputPeerUserFromMessage", peer, msg_id: reference.messageId, user_id: _2_tl_js_1.Api.chatIdToPeerId(reference.senderId) };
1410
1433
  }
1411
1434
  else {
@@ -1416,16 +1439,19 @@ class Client extends Composer {
1416
1439
  return null;
1417
1440
  }
1418
1441
  }
1419
- async [getEntity](peer) {
1442
+ async [getPeer](peer) {
1420
1443
  const id = _2_tl_js_1.Api.peerToChatId(peer);
1421
- const entity = await this.messageStorage.getEntity(id);
1422
- if (entity == null && await this.storage.getAccountType() == "bot" && _2_tl_js_1.Api.is("peerUser", peer) || _2_tl_js_1.Api.is("peerChannel", peer)) {
1444
+ const entity = await this.messageStorage.peers.get([id]);
1445
+ if (entity === null && this.storage.isBot && _2_tl_js_1.Api.is("peerUser", peer) || _2_tl_js_1.Api.is("peerChannel", peer)) {
1423
1446
  await this.getInputPeer(id);
1424
1447
  }
1425
1448
  else {
1426
1449
  return entity;
1427
1450
  }
1428
- return await this.messageStorage.getEntity(id);
1451
+ return await this.messageStorage.peers.get([id]);
1452
+ }
1453
+ [mustGetPeer](peer) {
1454
+ return this.messageStorage.peers.mustGet([(0, _2_telegram_js_1.peerToChatId)(peer)]);
1429
1455
  }
1430
1456
  async #handleCtxUpdate(update) {
1431
1457
  if (this.#disableUpdates && !("authorizationState" in update) && !("connectionState" in update)) {
@@ -1445,65 +1471,81 @@ class Client extends Composer {
1445
1471
  });
1446
1472
  }
1447
1473
  async #handleUpdate(update) {
1448
- const promises = new Array();
1474
+ const maybePromises = new Array();
1449
1475
  if (_2_tl_js_1.Api.is("updateUserName", update)) {
1450
- await this.messageStorage.updateUsernames(Number(update.user_id), update.usernames.map((v) => v.username));
1476
+ const value = [Number(update.user_id), new Date()];
1477
+ for (const username_ of update.usernames) {
1478
+ const username = username_.username.toLowerCase();
1479
+ this.messageStorage.usernames.set([username], value);
1480
+ }
1451
1481
  const peer = { ...update, _: "peerUser" };
1452
- const entity = await this[getEntity](peer);
1453
- if (entity != null) {
1454
- entity.usernames = update.usernames;
1455
- entity.first_name = update.first_name;
1456
- entity.last_name = update.last_name;
1457
- await this.messageStorage.setEntity(entity);
1482
+ const peer_ = await this[getPeer](peer);
1483
+ if (peer_ !== null) {
1484
+ const username = update.usernames[0];
1485
+ if (username !== undefined) {
1486
+ peer_[0].username = username.username;
1487
+ const also = update.usernames.filter((v) => v !== username);
1488
+ if (also.length) {
1489
+ peer_[0].also = also.map((v) => v.username);
1490
+ }
1491
+ else {
1492
+ delete peer_[0].also;
1493
+ }
1494
+ }
1495
+ else {
1496
+ delete peer_[0].username;
1497
+ }
1498
+ this.messageStorage.setPeer2(peer_[0], peer_[1]);
1458
1499
  }
1459
1500
  }
1460
1501
  if (this.#messageManager.canHandleUpdate(update)) {
1461
- promises.push(() => this.#messageManager.handleUpdate(update));
1502
+ maybePromises.push(() => this.#messageManager.handleUpdate(update));
1462
1503
  }
1463
1504
  if (this.#chatManager.canHandleUpdate(update)) {
1464
- promises.push(() => this.#chatManager.handleUpdate(update));
1505
+ maybePromises.push(() => this.#chatManager.handleUpdate(update));
1465
1506
  }
1466
1507
  if (this.#pollManager.canHandleUpdate(update)) {
1467
- promises.push(() => this.#pollManager.handleUpdate(update));
1508
+ maybePromises.push(() => this.#pollManager.handleUpdate(update));
1468
1509
  }
1469
1510
  if (this.#videoChatManager.canHandleUpdate(update)) {
1470
- promises.push(() => this.#videoChatManager.handleUpdate(update));
1511
+ maybePromises.push(() => this.#videoChatManager.handleUpdate(update));
1471
1512
  }
1472
1513
  if (this.#callbackQueryManager.canHandleUpdate(update)) {
1473
- promises.push(() => this.#callbackQueryManager.handleUpdate(update));
1514
+ maybePromises.push(() => this.#callbackQueryManager.handleUpdate(update));
1474
1515
  }
1475
1516
  if (this.#inlineQueryManager.canHandleUpdate(update)) {
1476
- promises.push(() => this.#inlineQueryManager.handleUpdate(update));
1517
+ maybePromises.push(() => this.#inlineQueryManager.handleUpdate(update));
1477
1518
  }
1478
1519
  if (this.#linkPreviewManager.canHandleUpdate(update)) {
1479
- promises.push(() => this.#linkPreviewManager.handleUpdate(update));
1520
+ maybePromises.push(() => this.#linkPreviewManager.handleUpdate(update));
1480
1521
  }
1481
1522
  if (this.#reactionManager.canHandleUpdate(update)) {
1482
- promises.push(() => this.#reactionManager.handleUpdate(update));
1523
+ maybePromises.push(() => this.#reactionManager.handleUpdate(update));
1483
1524
  }
1484
1525
  if (this.#chatListManager.canHandleUpdate(update)) {
1485
- promises.push(() => this.#chatListManager.handleUpdate(update));
1526
+ maybePromises.push(() => this.#chatListManager.handleUpdate(update));
1486
1527
  }
1487
1528
  if (this.#storyManager.canHandleUpdate(update)) {
1488
- promises.push(() => this.#storyManager.handleUpdate(update));
1529
+ maybePromises.push(() => this.#storyManager.handleUpdate(update));
1489
1530
  }
1490
1531
  if (this.#businessConnectionManager.canHandleUpdate(update)) {
1491
- promises.push(() => this.#businessConnectionManager.handleUpdate(update));
1532
+ maybePromises.push(() => this.#businessConnectionManager.handleUpdate(update));
1492
1533
  }
1493
1534
  if (this.#storyManager.canHandleUpdate(update)) {
1494
- promises.push(() => this.#storyManager.handleUpdate(update));
1535
+ maybePromises.push(() => this.#storyManager.handleUpdate(update));
1495
1536
  }
1496
1537
  if (this.#paymentManager.canHandleUpdate(update)) {
1497
- promises.push(() => this.#paymentManager.handleUpdate(update));
1538
+ maybePromises.push(() => this.#paymentManager.handleUpdate(update));
1498
1539
  }
1499
1540
  if (this.#translationsManager.canHandleUpdate(update)) {
1500
- promises.push(() => this.#translationsManager.handleUpdate(update));
1541
+ maybePromises.push(() => this.#translationsManager.handleUpdate(update));
1501
1542
  }
1502
1543
  return () => Promise.resolve().then(async () => {
1503
- const updates = new Array();
1504
- for (const promise of promises) {
1544
+ const updates = [{ update }];
1545
+ for (const maybePromise of maybePromises) {
1505
1546
  try {
1506
- const update = await promise();
1547
+ const value = maybePromise();
1548
+ const update = value instanceof Promise ? await value : value;
1507
1549
  if (update) {
1508
1550
  updates.push(update);
1509
1551
  }
@@ -1520,7 +1562,6 @@ class Client extends Composer {
1520
1562
  if ("deletedMessages" in update) {
1521
1563
  for (const { chatId, messageId } of update.deletedMessages) {
1522
1564
  await this.messageStorage.setMessage(chatId, messageId, null);
1523
- await this.#chatListManager.reassignChatLastMessage(chatId);
1524
1565
  }
1525
1566
  }
1526
1567
  }
@@ -1529,7 +1570,7 @@ class Client extends Composer {
1529
1570
  }
1530
1571
  #lastGetMe = null;
1531
1572
  async #getMe() {
1532
- if (this.#lastGetMe != null) {
1573
+ if (this.#lastGetMe !== null) {
1533
1574
  return this.#lastGetMe;
1534
1575
  }
1535
1576
  else {
@@ -1541,7 +1582,7 @@ class Client extends Composer {
1541
1582
  #previouslyConnected = false;
1542
1583
  #lastConnectionState = false;
1543
1584
  #onConnectionStateChange(connected) {
1544
- if (this.#lastConnectionState != connected) {
1585
+ if (this.#lastConnectionState !== connected) {
1545
1586
  if (connected) {
1546
1587
  if (this.#previouslyConnected) {
1547
1588
  (0, _1_utilities_js_1.drop)(this.#updateManager.recoverUpdateGap("reconnect"));
@@ -1561,14 +1602,13 @@ class Client extends Composer {
1561
1602
  * @method ac
1562
1603
  */
1563
1604
  async getMe() {
1564
- let user_ = await this[getEntity]({ _: "peerUser", user_id: BigInt(await this.#getSelfId()) });
1565
- if (user_ == null) {
1605
+ let chatP = (await this[getPeer]({ _: "peerUser", user_id: BigInt(await this.#getSelfId()) }))?.[0] ?? null;
1606
+ if (chatP === null) {
1566
1607
  const users = await this.invoke({ _: "users.getUsers", id: [{ _: "inputUserSelf" }] });
1567
- user_ = _2_tl_js_1.Api.as("user", users[0]);
1568
- await this.messageStorage.setEntity(user_);
1569
- await this.storage.setIsPremium(user_.premium ?? false);
1608
+ chatP = (0, _3_types_js_1.constructChatP)(_2_tl_js_1.Api.as("user", users[0]));
1609
+ await this.storage.setIsPremium(chatP.isPremium);
1570
1610
  }
1571
- const user = (0, _3_types_js_1.constructUser)(user_);
1611
+ const user = (0, _3_types_js_1.constructUser2)(chatP);
1572
1612
  this.#lastGetMe = user;
1573
1613
  return user;
1574
1614
  }
@@ -2187,14 +2227,12 @@ class Client extends Composer {
2187
2227
  await this.#messageManager.sendChatAction(chatId, action, params);
2188
2228
  }
2189
2229
  /**
2190
- * Search the messages of a chat. User-only.
2230
+ * Search for messages. User-only.
2191
2231
  *
2192
2232
  * @method ms
2193
- * @param chatId The identifier of a chat.
2194
- * @param query The message search query.
2195
2233
  */
2196
- async searchMessages(chatId, query, params) {
2197
- return await this.#messageManager.searchMessages(chatId, query, params);
2234
+ async searchMessages(params) {
2235
+ return await this.#messageManager.searchMessages(params);
2198
2236
  }
2199
2237
  /**
2200
2238
  * Mark messages as read. User-only.
@@ -2228,6 +2266,15 @@ class Client extends Composer {
2228
2266
  return await this.#messageManager.transcribeVoice(chatId, messageId);
2229
2267
  }
2230
2268
  /**
2269
+ * Get a sticker set.
2270
+ *
2271
+ * @method ms
2272
+ * @param name The name of the sticker set or its link.
2273
+ */
2274
+ async getStickerSet(name) {
2275
+ return await this.#messageManager.getStickerSet(name);
2276
+ }
2277
+ /*
2231
2278
  * Get the link preview for a message that is about to be sent. User-only.
2232
2279
  *
2233
2280
  * @method ms
@@ -2256,6 +2303,23 @@ class Client extends Composer {
2256
2303
  async getProgressId() {
2257
2304
  return await this.#fileManager.getProgressId();
2258
2305
  }
2306
+ /**
2307
+ * Get messages saved from a specific chat.
2308
+ *
2309
+ * @method ms
2310
+ * @param chatId The identifier of a chat.
2311
+ */
2312
+ async getSavedMessages(chatId, params) {
2313
+ return await this.#messageManager.getSavedMessages(chatId, params);
2314
+ }
2315
+ /**
2316
+ * Get a list of saved chats.
2317
+ *
2318
+ * @method ms
2319
+ */
2320
+ async getSavedChats(params) {
2321
+ return await this.#messageManager.getSavedChats(params);
2322
+ }
2259
2323
  //
2260
2324
  // ========================= POLLS ========================= //
2261
2325
  //
@@ -2787,9 +2851,10 @@ class Client extends Composer {
2787
2851
  * @method ch
2788
2852
  * @param chatId The identifier of the group.
2789
2853
  * @param enabled Whether topics should be enabled in the group.
2854
+ * @param tabs Whether topics should be displayed as tabs.
2790
2855
  */
2791
- async setTopicsEnabled(chatId, enabled) {
2792
- await this.#chatManager.setTopicsEnabled(chatId, enabled);
2856
+ async setTopicsEnabled(chatId, enabled, tabs) {
2857
+ await this.#chatManager.setTopicsEnabled(chatId, enabled, tabs);
2793
2858
  }
2794
2859
  /**
2795
2860
  * Enable or disable automatic anti-spam in a group. User-only.