@mtkruto/node 0.1.112 → 0.1.114

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 (513) hide show
  1. package/esm/0_deps.d.ts +3 -2
  2. package/esm/0_deps.js +3 -2
  3. package/esm/1_utilities.d.ts +1 -0
  4. package/esm/1_utilities.js +1 -0
  5. package/esm/3_types.d.ts +0 -1
  6. package/esm/3_types.js +0 -1
  7. package/esm/4_constants.d.ts +1 -1
  8. package/esm/4_constants.js +1 -1
  9. package/esm/5_client.d.ts +2 -1
  10. package/esm/5_client.js +2 -1
  11. package/esm/client/0_utilities.d.ts +6 -0
  12. package/esm/client/0_utilities.js +53 -0
  13. package/esm/client/3_types.d.ts +76 -8
  14. package/esm/client/3_types.js +1 -1
  15. package/esm/client/4_composer.d.ts +22 -0
  16. package/esm/client/4_composer.js +81 -0
  17. package/esm/client/{4_client.d.ts → 5_client.d.ts} +87 -12
  18. package/esm/client/{4_client.js → 5_client.js} +367 -107
  19. package/esm/client/6_composer.d.ts +4 -0
  20. package/esm/client/6_composer.js +3 -0
  21. package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/encoding/base64.d.ts +2 -2
  22. package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/encoding/base64.js +2 -2
  23. package/{script/deps/deno.land/std@0.204.0 → esm/deps/deno.land/std@0.207.0}/fmt/colors.d.ts +1 -1
  24. package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/fmt/colors.js +1 -1
  25. package/esm/deps/deno.land/std@0.207.0/path/_common/assert_path.d.ts +1 -0
  26. package/esm/deps/deno.land/std@0.207.0/path/_common/assert_path.js +7 -0
  27. package/esm/deps/deno.land/std@0.207.0/path/_common/basename.d.ts +3 -0
  28. package/esm/deps/deno.land/std@0.207.0/path/_common/basename.js +40 -0
  29. package/esm/deps/deno.land/std@0.207.0/path/_common/common.d.ts +1 -0
  30. package/esm/deps/deno.land/std@0.207.0/path/_common/common.js +23 -0
  31. package/esm/deps/deno.land/std@0.207.0/path/_common/constants.d.ts +39 -0
  32. package/esm/deps/deno.land/std@0.207.0/path/_common/constants.js +46 -0
  33. package/esm/deps/deno.land/std@0.207.0/path/_common/dirname.d.ts +1 -0
  34. package/esm/deps/deno.land/std@0.207.0/path/_common/dirname.js +8 -0
  35. package/esm/deps/deno.land/std@0.207.0/path/_common/format.d.ts +3 -0
  36. package/esm/deps/deno.land/std@0.207.0/path/_common/format.js +19 -0
  37. package/esm/deps/deno.land/std@0.207.0/path/_common/from_file_url.d.ts +1 -0
  38. package/esm/deps/deno.land/std@0.207.0/path/_common/from_file_url.js +9 -0
  39. package/esm/deps/deno.land/std@0.207.0/path/_common/glob_to_reg_exp.d.ts +27 -0
  40. package/esm/deps/deno.land/std@0.207.0/path/_common/glob_to_reg_exp.js +235 -0
  41. package/esm/deps/deno.land/std@0.207.0/path/_common/normalize.d.ts +1 -0
  42. package/esm/deps/deno.land/std@0.207.0/path/_common/normalize.js +8 -0
  43. package/esm/deps/deno.land/std@0.207.0/path/_common/normalize_string.d.ts +1 -0
  44. package/esm/deps/deno.land/std@0.207.0/path/_common/normalize_string.js +77 -0
  45. package/esm/deps/deno.land/std@0.207.0/path/_common/relative.d.ts +1 -0
  46. package/esm/deps/deno.land/std@0.207.0/path/_common/relative.js +9 -0
  47. package/esm/deps/deno.land/std@0.207.0/path/_common/strip_trailing_separators.d.ts +1 -0
  48. package/esm/deps/deno.land/std@0.207.0/path/_common/strip_trailing_separators.js +19 -0
  49. package/esm/deps/deno.land/std@0.207.0/path/_common/to_file_url.d.ts +1 -0
  50. package/esm/deps/deno.land/std@0.207.0/path/_common/to_file_url.js +15 -0
  51. package/esm/deps/deno.land/std@0.207.0/path/_interface.d.ts +26 -0
  52. package/esm/deps/deno.land/std@0.207.0/path/_interface.js +3 -0
  53. package/esm/deps/deno.land/std@0.207.0/path/_os.d.ts +3 -0
  54. package/esm/deps/deno.land/std@0.207.0/path/_os.js +18 -0
  55. package/esm/deps/deno.land/std@0.207.0/path/basename.d.ts +8 -0
  56. package/esm/deps/deno.land/std@0.207.0/path/basename.js +17 -0
  57. package/esm/deps/deno.land/std@0.207.0/path/common.d.ts +13 -0
  58. package/esm/deps/deno.land/std@0.207.0/path/common.js +19 -0
  59. package/esm/deps/deno.land/std@0.207.0/path/dirname.d.ts +5 -0
  60. package/esm/deps/deno.land/std@0.207.0/path/dirname.js +12 -0
  61. package/esm/deps/deno.land/std@0.207.0/path/extname.d.ts +6 -0
  62. package/esm/deps/deno.land/std@0.207.0/path/extname.js +13 -0
  63. package/esm/deps/deno.land/std@0.207.0/path/format.d.ts +6 -0
  64. package/esm/deps/deno.land/std@0.207.0/path/format.js +12 -0
  65. package/esm/deps/deno.land/std@0.207.0/path/from_file_url.d.ts +17 -0
  66. package/esm/deps/deno.land/std@0.207.0/path/from_file_url.js +24 -0
  67. package/esm/deps/deno.land/std@0.207.0/path/glob_to_regexp.d.ts +61 -0
  68. package/esm/deps/deno.land/std@0.207.0/path/glob_to_regexp.js +65 -0
  69. package/esm/deps/deno.land/std@0.207.0/path/is_absolute.d.ts +5 -0
  70. package/esm/deps/deno.land/std@0.207.0/path/is_absolute.js +12 -0
  71. package/esm/deps/deno.land/std@0.207.0/path/is_glob.d.ts +2 -0
  72. package/esm/deps/deno.land/std@0.207.0/path/is_glob.js +28 -0
  73. package/esm/deps/deno.land/std@0.207.0/path/join.d.ts +5 -0
  74. package/esm/deps/deno.land/std@0.207.0/path/join.js +12 -0
  75. package/esm/deps/deno.land/std@0.207.0/path/join_globs.d.ts +3 -0
  76. package/esm/deps/deno.land/std@0.207.0/path/join_globs.js +11 -0
  77. package/esm/deps/deno.land/std@0.207.0/path/mod.d.ts +28 -0
  78. package/esm/deps/deno.land/std@0.207.0/path/mod.js +63 -0
  79. package/esm/deps/deno.land/std@0.207.0/path/normalize.d.ts +7 -0
  80. package/esm/deps/deno.land/std@0.207.0/path/normalize.js +14 -0
  81. package/esm/deps/deno.land/std@0.207.0/path/normalize_glob.d.ts +3 -0
  82. package/esm/deps/deno.land/std@0.207.0/path/normalize_glob.js +11 -0
  83. package/esm/deps/deno.land/std@0.207.0/path/parse.d.ts +6 -0
  84. package/esm/deps/deno.land/std@0.207.0/path/parse.js +12 -0
  85. package/esm/deps/deno.land/std@0.207.0/path/posix/_util.d.ts +1 -0
  86. package/esm/deps/deno.land/std@0.207.0/path/posix/_util.js +8 -0
  87. package/esm/deps/deno.land/std@0.207.0/path/posix/basename.d.ts +8 -0
  88. package/esm/deps/deno.land/std@0.207.0/path/posix/basename.js +18 -0
  89. package/esm/deps/deno.land/std@0.207.0/path/posix/common.d.ts +13 -0
  90. package/esm/deps/deno.land/std@0.207.0/path/posix/common.js +19 -0
  91. package/esm/deps/deno.land/std@0.207.0/path/posix/dirname.d.ts +5 -0
  92. package/esm/deps/deno.land/std@0.207.0/path/posix/dirname.js +36 -0
  93. package/esm/deps/deno.land/std@0.207.0/path/posix/extname.d.ts +6 -0
  94. package/esm/deps/deno.land/std@0.207.0/path/posix/extname.js +59 -0
  95. package/esm/deps/deno.land/std@0.207.0/path/posix/format.d.ts +6 -0
  96. package/esm/deps/deno.land/std@0.207.0/path/posix/format.js +11 -0
  97. package/esm/deps/deno.land/std@0.207.0/path/posix/from_file_url.d.ts +11 -0
  98. package/esm/deps/deno.land/std@0.207.0/path/posix/from_file_url.js +17 -0
  99. package/esm/deps/deno.land/std@0.207.0/path/posix/glob_to_regexp.d.ts +57 -0
  100. package/esm/deps/deno.land/std@0.207.0/path/posix/glob_to_regexp.js +69 -0
  101. package/esm/deps/deno.land/std@0.207.0/path/posix/is_absolute.d.ts +5 -0
  102. package/esm/deps/deno.land/std@0.207.0/path/posix/is_absolute.js +12 -0
  103. package/esm/deps/deno.land/std@0.207.0/path/posix/is_glob.d.ts +1 -0
  104. package/esm/deps/deno.land/std@0.207.0/path/posix/is_glob.js +3 -0
  105. package/esm/deps/deno.land/std@0.207.0/path/posix/join.d.ts +5 -0
  106. package/esm/deps/deno.land/std@0.207.0/path/posix/join.js +26 -0
  107. package/esm/deps/deno.land/std@0.207.0/path/posix/join_globs.d.ts +3 -0
  108. package/esm/deps/deno.land/std@0.207.0/path/posix/join_globs.js +26 -0
  109. package/esm/deps/deno.land/std@0.207.0/path/posix/mod.d.ts +40 -0
  110. package/esm/deps/deno.land/std@0.207.0/path/posix/mod.js +44 -0
  111. package/esm/deps/deno.land/std@0.207.0/path/posix/normalize.d.ts +7 -0
  112. package/esm/deps/deno.land/std@0.207.0/path/posix/normalize.js +25 -0
  113. package/esm/deps/deno.land/std@0.207.0/path/posix/normalize_glob.d.ts +3 -0
  114. package/esm/deps/deno.land/std@0.207.0/path/posix/normalize_glob.js +16 -0
  115. package/esm/deps/deno.land/std@0.207.0/path/posix/parse.d.ts +6 -0
  116. package/esm/deps/deno.land/std@0.207.0/path/posix/parse.js +98 -0
  117. package/esm/deps/deno.land/std@0.207.0/path/posix/relative.d.ts +7 -0
  118. package/esm/deps/deno.land/std@0.207.0/path/posix/relative.js +94 -0
  119. package/esm/deps/deno.land/std@0.207.0/path/posix/resolve.d.ts +5 -0
  120. package/esm/deps/deno.land/std@0.207.0/path/posix/resolve.js +48 -0
  121. package/esm/deps/deno.land/std@0.207.0/path/posix/separator.d.ts +2 -0
  122. package/esm/deps/deno.land/std@0.207.0/path/posix/separator.js +4 -0
  123. package/esm/deps/deno.land/std@0.207.0/path/posix/to_file_url.d.ts +11 -0
  124. package/esm/deps/deno.land/std@0.207.0/path/posix/to_file_url.js +22 -0
  125. package/esm/deps/deno.land/std@0.207.0/path/posix/to_namespaced_path.d.ts +5 -0
  126. package/esm/deps/deno.land/std@0.207.0/path/posix/to_namespaced_path.js +10 -0
  127. package/esm/deps/deno.land/std@0.207.0/path/relative.d.ts +12 -0
  128. package/esm/deps/deno.land/std@0.207.0/path/relative.js +19 -0
  129. package/esm/deps/deno.land/std@0.207.0/path/resolve.d.ts +5 -0
  130. package/esm/deps/deno.land/std@0.207.0/path/resolve.js +14 -0
  131. package/esm/deps/deno.land/std@0.207.0/path/separator.d.ts +2 -0
  132. package/esm/deps/deno.land/std@0.207.0/path/separator.js +5 -0
  133. package/esm/deps/deno.land/std@0.207.0/path/to_file_url.d.ts +17 -0
  134. package/esm/deps/deno.land/std@0.207.0/path/to_file_url.js +24 -0
  135. package/esm/deps/deno.land/std@0.207.0/path/to_namespaced_path.d.ts +5 -0
  136. package/esm/deps/deno.land/std@0.207.0/path/to_namespaced_path.js +14 -0
  137. package/esm/deps/deno.land/std@0.207.0/path/windows/_util.d.ts +3 -0
  138. package/esm/deps/deno.land/std@0.207.0/path/windows/_util.js +15 -0
  139. package/esm/deps/deno.land/std@0.207.0/path/windows/basename.d.ts +8 -0
  140. package/esm/deps/deno.land/std@0.207.0/path/windows/basename.js +30 -0
  141. package/esm/deps/deno.land/std@0.207.0/path/windows/common.d.ts +13 -0
  142. package/esm/deps/deno.land/std@0.207.0/path/windows/common.js +19 -0
  143. package/esm/deps/deno.land/std@0.207.0/path/windows/dirname.d.ts +5 -0
  144. package/esm/deps/deno.land/std@0.207.0/path/windows/dirname.js +98 -0
  145. package/esm/deps/deno.land/std@0.207.0/path/windows/extname.d.ts +6 -0
  146. package/esm/deps/deno.land/std@0.207.0/path/windows/extname.js +68 -0
  147. package/esm/deps/deno.land/std@0.207.0/path/windows/format.d.ts +6 -0
  148. package/esm/deps/deno.land/std@0.207.0/path/windows/format.js +11 -0
  149. package/esm/deps/deno.land/std@0.207.0/path/windows/from_file_url.d.ts +13 -0
  150. package/esm/deps/deno.land/std@0.207.0/path/windows/from_file_url.js +26 -0
  151. package/esm/deps/deno.land/std@0.207.0/path/windows/glob_to_regexp.d.ts +57 -0
  152. package/esm/deps/deno.land/std@0.207.0/path/windows/glob_to_regexp.js +69 -0
  153. package/esm/deps/deno.land/std@0.207.0/path/windows/is_absolute.d.ts +5 -0
  154. package/esm/deps/deno.land/std@0.207.0/path/windows/is_absolute.js +27 -0
  155. package/esm/deps/deno.land/std@0.207.0/path/windows/is_glob.d.ts +1 -0
  156. package/esm/deps/deno.land/std@0.207.0/path/windows/is_glob.js +3 -0
  157. package/esm/deps/deno.land/std@0.207.0/path/windows/join.d.ts +5 -0
  158. package/esm/deps/deno.land/std@0.207.0/path/windows/join.js +72 -0
  159. package/esm/deps/deno.land/std@0.207.0/path/windows/join_globs.d.ts +3 -0
  160. package/esm/deps/deno.land/std@0.207.0/path/windows/join_globs.js +26 -0
  161. package/esm/deps/deno.land/std@0.207.0/path/windows/mod.d.ts +40 -0
  162. package/esm/deps/deno.land/std@0.207.0/path/windows/mod.js +44 -0
  163. package/esm/deps/deno.land/std@0.207.0/path/windows/normalize.d.ts +7 -0
  164. package/esm/deps/deno.land/std@0.207.0/path/windows/normalize.js +130 -0
  165. package/esm/deps/deno.land/std@0.207.0/path/windows/normalize_glob.d.ts +3 -0
  166. package/esm/deps/deno.land/std@0.207.0/path/windows/normalize_glob.js +16 -0
  167. package/esm/deps/deno.land/std@0.207.0/path/windows/parse.d.ts +6 -0
  168. package/esm/deps/deno.land/std@0.207.0/path/windows/parse.js +159 -0
  169. package/esm/deps/deno.land/std@0.207.0/path/windows/relative.d.ts +12 -0
  170. package/esm/deps/deno.land/std@0.207.0/path/windows/relative.js +121 -0
  171. package/esm/deps/deno.land/std@0.207.0/path/windows/resolve.d.ts +5 -0
  172. package/esm/deps/deno.land/std@0.207.0/path/windows/resolve.js +143 -0
  173. package/esm/deps/deno.land/std@0.207.0/path/windows/separator.d.ts +2 -0
  174. package/esm/deps/deno.land/std@0.207.0/path/windows/separator.js +4 -0
  175. package/esm/deps/deno.land/std@0.207.0/path/windows/to_file_url.d.ts +13 -0
  176. package/esm/deps/deno.land/std@0.207.0/path/windows/to_file_url.js +31 -0
  177. package/esm/deps/deno.land/std@0.207.0/path/windows/to_namespaced_path.d.ts +5 -0
  178. package/esm/deps/deno.land/std@0.207.0/path/windows/to_namespaced_path.js +38 -0
  179. package/esm/mod.d.ts +1 -1
  180. package/esm/mod.js +1 -1
  181. package/esm/tl/0_tl_raw_reader.d.ts +1 -0
  182. package/esm/tl/0_tl_raw_reader.js +3 -0
  183. package/esm/tl/3_deserialize.js +7 -2
  184. package/esm/types/1_chat.d.ts +2 -3
  185. package/esm/types/1_chat.js +4 -5
  186. package/esm/types/1_user.d.ts +2 -3
  187. package/esm/types/1_user.js +2 -3
  188. package/esm/types/5_inline_query_result.js +7 -0
  189. package/esm/utilities/0_color.d.ts +3 -0
  190. package/esm/utilities/0_color.js +55 -0
  191. package/package.json +1 -1
  192. package/script/0_deps.d.ts +3 -2
  193. package/script/0_deps.js +18 -5
  194. package/script/1_utilities.d.ts +1 -0
  195. package/script/1_utilities.js +1 -0
  196. package/script/3_types.d.ts +0 -1
  197. package/script/3_types.js +0 -1
  198. package/script/4_constants.d.ts +1 -1
  199. package/script/4_constants.js +1 -1
  200. package/script/5_client.d.ts +2 -1
  201. package/script/5_client.js +2 -1
  202. package/script/client/0_utilities.d.ts +6 -0
  203. package/script/client/0_utilities.js +79 -1
  204. package/script/client/3_types.d.ts +76 -8
  205. package/script/client/3_types.js +0 -3
  206. package/script/client/4_composer.d.ts +22 -0
  207. package/script/client/4_composer.js +88 -0
  208. package/script/client/{4_client.d.ts → 5_client.d.ts} +87 -12
  209. package/script/client/{4_client.js → 5_client.js} +369 -108
  210. package/script/client/6_composer.d.ts +4 -0
  211. package/script/client/6_composer.js +7 -0
  212. package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/encoding/base64.d.ts +2 -2
  213. package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/encoding/base64.js +2 -2
  214. package/{esm/deps/deno.land/std@0.204.0 → script/deps/deno.land/std@0.207.0}/fmt/colors.d.ts +1 -1
  215. package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/fmt/colors.js +1 -1
  216. package/script/deps/deno.land/std@0.207.0/path/_common/assert_path.d.ts +1 -0
  217. package/script/deps/deno.land/std@0.207.0/path/_common/assert_path.js +11 -0
  218. package/script/deps/deno.land/std@0.207.0/path/_common/basename.d.ts +3 -0
  219. package/script/deps/deno.land/std@0.207.0/path/_common/basename.js +46 -0
  220. package/script/deps/deno.land/std@0.207.0/path/_common/common.d.ts +1 -0
  221. package/script/deps/deno.land/std@0.207.0/path/_common/common.js +27 -0
  222. package/script/deps/deno.land/std@0.207.0/path/_common/constants.d.ts +39 -0
  223. package/script/deps/deno.land/std@0.207.0/path/_common/constants.js +49 -0
  224. package/script/deps/deno.land/std@0.207.0/path/_common/dirname.d.ts +1 -0
  225. package/script/deps/deno.land/std@0.207.0/path/_common/dirname.js +12 -0
  226. package/script/deps/deno.land/std@0.207.0/path/_common/format.d.ts +3 -0
  227. package/script/deps/deno.land/std@0.207.0/path/_common/format.js +24 -0
  228. package/script/deps/deno.land/std@0.207.0/path/_common/from_file_url.d.ts +1 -0
  229. package/script/deps/deno.land/std@0.207.0/path/_common/from_file_url.js +13 -0
  230. package/script/deps/deno.land/std@0.207.0/path/_common/glob_to_reg_exp.d.ts +27 -0
  231. package/script/deps/deno.land/std@0.207.0/path/_common/glob_to_reg_exp.js +239 -0
  232. package/script/deps/deno.land/std@0.207.0/path/_common/normalize.d.ts +1 -0
  233. package/script/deps/deno.land/std@0.207.0/path/_common/normalize.js +12 -0
  234. package/script/deps/deno.land/std@0.207.0/path/_common/normalize_string.d.ts +1 -0
  235. package/script/deps/deno.land/std@0.207.0/path/_common/normalize_string.js +81 -0
  236. package/script/deps/deno.land/std@0.207.0/path/_common/relative.d.ts +1 -0
  237. package/script/deps/deno.land/std@0.207.0/path/_common/relative.js +13 -0
  238. package/script/deps/deno.land/std@0.207.0/path/_common/strip_trailing_separators.d.ts +1 -0
  239. package/script/deps/deno.land/std@0.207.0/path/_common/strip_trailing_separators.js +23 -0
  240. package/script/deps/deno.land/std@0.207.0/path/_common/to_file_url.d.ts +1 -0
  241. package/script/deps/deno.land/std@0.207.0/path/_common/to_file_url.js +19 -0
  242. package/script/deps/deno.land/std@0.207.0/path/_interface.d.ts +26 -0
  243. package/script/deps/deno.land/std@0.207.0/path/_interface.js +4 -0
  244. package/script/deps/deno.land/std@0.207.0/path/_os.d.ts +3 -0
  245. package/script/deps/deno.land/std@0.207.0/path/_os.js +44 -0
  246. package/script/deps/deno.land/std@0.207.0/path/basename.d.ts +8 -0
  247. package/script/deps/deno.land/std@0.207.0/path/basename.js +21 -0
  248. package/script/deps/deno.land/std@0.207.0/path/common.d.ts +13 -0
  249. package/script/deps/deno.land/std@0.207.0/path/common.js +23 -0
  250. package/script/deps/deno.land/std@0.207.0/path/dirname.d.ts +5 -0
  251. package/script/deps/deno.land/std@0.207.0/path/dirname.js +16 -0
  252. package/script/deps/deno.land/std@0.207.0/path/extname.d.ts +6 -0
  253. package/script/deps/deno.land/std@0.207.0/path/extname.js +17 -0
  254. package/script/deps/deno.land/std@0.207.0/path/format.d.ts +6 -0
  255. package/script/deps/deno.land/std@0.207.0/path/format.js +16 -0
  256. package/script/deps/deno.land/std@0.207.0/path/from_file_url.d.ts +17 -0
  257. package/script/deps/deno.land/std@0.207.0/path/from_file_url.js +28 -0
  258. package/script/deps/deno.land/std@0.207.0/path/glob_to_regexp.d.ts +61 -0
  259. package/script/deps/deno.land/std@0.207.0/path/glob_to_regexp.js +69 -0
  260. package/script/deps/deno.land/std@0.207.0/path/is_absolute.d.ts +5 -0
  261. package/script/deps/deno.land/std@0.207.0/path/is_absolute.js +16 -0
  262. package/script/deps/deno.land/std@0.207.0/path/is_glob.d.ts +2 -0
  263. package/script/deps/deno.land/std@0.207.0/path/is_glob.js +32 -0
  264. package/script/deps/deno.land/std@0.207.0/path/join.d.ts +5 -0
  265. package/script/deps/deno.land/std@0.207.0/path/join.js +16 -0
  266. package/script/deps/deno.land/std@0.207.0/path/join_globs.d.ts +3 -0
  267. package/script/deps/deno.land/std@0.207.0/path/join_globs.js +15 -0
  268. package/script/deps/deno.land/std@0.207.0/path/mod.d.ts +28 -0
  269. package/script/deps/deno.land/std@0.207.0/path/mod.js +92 -0
  270. package/script/deps/deno.land/std@0.207.0/path/normalize.d.ts +7 -0
  271. package/script/deps/deno.land/std@0.207.0/path/normalize.js +18 -0
  272. package/script/deps/deno.land/std@0.207.0/path/normalize_glob.d.ts +3 -0
  273. package/script/deps/deno.land/std@0.207.0/path/normalize_glob.js +15 -0
  274. package/script/deps/deno.land/std@0.207.0/path/parse.d.ts +6 -0
  275. package/script/deps/deno.land/std@0.207.0/path/parse.js +16 -0
  276. package/script/deps/deno.land/std@0.207.0/path/posix/_util.d.ts +1 -0
  277. package/script/deps/deno.land/std@0.207.0/path/posix/_util.js +12 -0
  278. package/script/deps/deno.land/std@0.207.0/path/posix/basename.d.ts +8 -0
  279. package/script/deps/deno.land/std@0.207.0/path/posix/basename.js +22 -0
  280. package/script/deps/deno.land/std@0.207.0/path/posix/common.d.ts +13 -0
  281. package/script/deps/deno.land/std@0.207.0/path/posix/common.js +23 -0
  282. package/script/deps/deno.land/std@0.207.0/path/posix/dirname.d.ts +5 -0
  283. package/script/deps/deno.land/std@0.207.0/path/posix/dirname.js +40 -0
  284. package/script/deps/deno.land/std@0.207.0/path/posix/extname.d.ts +6 -0
  285. package/script/deps/deno.land/std@0.207.0/path/posix/extname.js +63 -0
  286. package/script/deps/deno.land/std@0.207.0/path/posix/format.d.ts +6 -0
  287. package/script/deps/deno.land/std@0.207.0/path/posix/format.js +15 -0
  288. package/script/deps/deno.land/std@0.207.0/path/posix/from_file_url.d.ts +11 -0
  289. package/script/deps/deno.land/std@0.207.0/path/posix/from_file_url.js +21 -0
  290. package/script/deps/deno.land/std@0.207.0/path/posix/glob_to_regexp.d.ts +57 -0
  291. package/script/deps/deno.land/std@0.207.0/path/posix/glob_to_regexp.js +73 -0
  292. package/script/deps/deno.land/std@0.207.0/path/posix/is_absolute.d.ts +5 -0
  293. package/script/deps/deno.land/std@0.207.0/path/posix/is_absolute.js +16 -0
  294. package/script/deps/deno.land/std@0.207.0/path/posix/is_glob.d.ts +1 -0
  295. package/script/deps/deno.land/std@0.207.0/path/posix/is_glob.js +7 -0
  296. package/script/deps/deno.land/std@0.207.0/path/posix/join.d.ts +5 -0
  297. package/script/deps/deno.land/std@0.207.0/path/posix/join.js +30 -0
  298. package/script/deps/deno.land/std@0.207.0/path/posix/join_globs.d.ts +3 -0
  299. package/script/deps/deno.land/std@0.207.0/path/posix/join_globs.js +30 -0
  300. package/script/deps/deno.land/std@0.207.0/path/posix/mod.d.ts +40 -0
  301. package/script/deps/deno.land/std@0.207.0/path/posix/mod.js +61 -0
  302. package/script/deps/deno.land/std@0.207.0/path/posix/normalize.d.ts +7 -0
  303. package/script/deps/deno.land/std@0.207.0/path/posix/normalize.js +29 -0
  304. package/script/deps/deno.land/std@0.207.0/path/posix/normalize_glob.d.ts +3 -0
  305. package/script/deps/deno.land/std@0.207.0/path/posix/normalize_glob.js +20 -0
  306. package/script/deps/deno.land/std@0.207.0/path/posix/parse.d.ts +6 -0
  307. package/script/deps/deno.land/std@0.207.0/path/posix/parse.js +102 -0
  308. package/script/deps/deno.land/std@0.207.0/path/posix/relative.d.ts +7 -0
  309. package/script/deps/deno.land/std@0.207.0/path/posix/relative.js +98 -0
  310. package/script/deps/deno.land/std@0.207.0/path/posix/resolve.d.ts +5 -0
  311. package/script/deps/deno.land/std@0.207.0/path/posix/resolve.js +75 -0
  312. package/script/deps/deno.land/std@0.207.0/path/posix/separator.d.ts +2 -0
  313. package/script/deps/deno.land/std@0.207.0/path/posix/separator.js +7 -0
  314. package/script/deps/deno.land/std@0.207.0/path/posix/to_file_url.d.ts +11 -0
  315. package/script/deps/deno.land/std@0.207.0/path/posix/to_file_url.js +26 -0
  316. package/script/deps/deno.land/std@0.207.0/path/posix/to_namespaced_path.d.ts +5 -0
  317. package/script/deps/deno.land/std@0.207.0/path/posix/to_namespaced_path.js +14 -0
  318. package/script/deps/deno.land/std@0.207.0/path/relative.d.ts +12 -0
  319. package/script/deps/deno.land/std@0.207.0/path/relative.js +23 -0
  320. package/script/deps/deno.land/std@0.207.0/path/resolve.d.ts +5 -0
  321. package/script/deps/deno.land/std@0.207.0/path/resolve.js +18 -0
  322. package/script/deps/deno.land/std@0.207.0/path/separator.d.ts +2 -0
  323. package/script/deps/deno.land/std@0.207.0/path/separator.js +8 -0
  324. package/script/deps/deno.land/std@0.207.0/path/to_file_url.d.ts +17 -0
  325. package/script/deps/deno.land/std@0.207.0/path/to_file_url.js +28 -0
  326. package/script/deps/deno.land/std@0.207.0/path/to_namespaced_path.d.ts +5 -0
  327. package/script/deps/deno.land/std@0.207.0/path/to_namespaced_path.js +18 -0
  328. package/script/deps/deno.land/std@0.207.0/path/windows/_util.d.ts +3 -0
  329. package/script/deps/deno.land/std@0.207.0/path/windows/_util.js +21 -0
  330. package/script/deps/deno.land/std@0.207.0/path/windows/basename.d.ts +8 -0
  331. package/script/deps/deno.land/std@0.207.0/path/windows/basename.js +34 -0
  332. package/script/deps/deno.land/std@0.207.0/path/windows/common.d.ts +13 -0
  333. package/script/deps/deno.land/std@0.207.0/path/windows/common.js +23 -0
  334. package/script/deps/deno.land/std@0.207.0/path/windows/dirname.d.ts +5 -0
  335. package/script/deps/deno.land/std@0.207.0/path/windows/dirname.js +102 -0
  336. package/script/deps/deno.land/std@0.207.0/path/windows/extname.d.ts +6 -0
  337. package/script/deps/deno.land/std@0.207.0/path/windows/extname.js +72 -0
  338. package/script/deps/deno.land/std@0.207.0/path/windows/format.d.ts +6 -0
  339. package/script/deps/deno.land/std@0.207.0/path/windows/format.js +15 -0
  340. package/script/deps/deno.land/std@0.207.0/path/windows/from_file_url.d.ts +13 -0
  341. package/script/deps/deno.land/std@0.207.0/path/windows/from_file_url.js +30 -0
  342. package/script/deps/deno.land/std@0.207.0/path/windows/glob_to_regexp.d.ts +57 -0
  343. package/script/deps/deno.land/std@0.207.0/path/windows/glob_to_regexp.js +73 -0
  344. package/script/deps/deno.land/std@0.207.0/path/windows/is_absolute.d.ts +5 -0
  345. package/script/deps/deno.land/std@0.207.0/path/windows/is_absolute.js +31 -0
  346. package/script/deps/deno.land/std@0.207.0/path/windows/is_glob.d.ts +1 -0
  347. package/script/deps/deno.land/std@0.207.0/path/windows/is_glob.js +7 -0
  348. package/script/deps/deno.land/std@0.207.0/path/windows/join.d.ts +5 -0
  349. package/script/deps/deno.land/std@0.207.0/path/windows/join.js +76 -0
  350. package/script/deps/deno.land/std@0.207.0/path/windows/join_globs.d.ts +3 -0
  351. package/script/deps/deno.land/std@0.207.0/path/windows/join_globs.js +30 -0
  352. package/script/deps/deno.land/std@0.207.0/path/windows/mod.d.ts +40 -0
  353. package/script/deps/deno.land/std@0.207.0/path/windows/mod.js +61 -0
  354. package/script/deps/deno.land/std@0.207.0/path/windows/normalize.d.ts +7 -0
  355. package/script/deps/deno.land/std@0.207.0/path/windows/normalize.js +134 -0
  356. package/script/deps/deno.land/std@0.207.0/path/windows/normalize_glob.d.ts +3 -0
  357. package/script/deps/deno.land/std@0.207.0/path/windows/normalize_glob.js +20 -0
  358. package/script/deps/deno.land/std@0.207.0/path/windows/parse.d.ts +6 -0
  359. package/script/deps/deno.land/std@0.207.0/path/windows/parse.js +163 -0
  360. package/script/deps/deno.land/std@0.207.0/path/windows/relative.d.ts +12 -0
  361. package/script/deps/deno.land/std@0.207.0/path/windows/relative.js +125 -0
  362. package/script/deps/deno.land/std@0.207.0/path/windows/resolve.d.ts +5 -0
  363. package/script/deps/deno.land/std@0.207.0/path/windows/resolve.js +170 -0
  364. package/script/deps/deno.land/std@0.207.0/path/windows/separator.d.ts +2 -0
  365. package/script/deps/deno.land/std@0.207.0/path/windows/separator.js +7 -0
  366. package/script/deps/deno.land/std@0.207.0/path/windows/to_file_url.d.ts +13 -0
  367. package/script/deps/deno.land/std@0.207.0/path/windows/to_file_url.js +35 -0
  368. package/script/deps/deno.land/std@0.207.0/path/windows/to_namespaced_path.d.ts +5 -0
  369. package/script/deps/deno.land/std@0.207.0/path/windows/to_namespaced_path.js +42 -0
  370. package/script/mod.d.ts +1 -1
  371. package/script/mod.js +3 -1
  372. package/script/tl/0_tl_raw_reader.d.ts +1 -0
  373. package/script/tl/0_tl_raw_reader.js +3 -0
  374. package/script/tl/3_deserialize.js +7 -2
  375. package/script/types/1_chat.d.ts +2 -3
  376. package/script/types/1_chat.js +4 -5
  377. package/script/types/1_user.d.ts +2 -3
  378. package/script/types/1_user.js +1 -2
  379. package/script/types/5_inline_query_result.js +7 -0
  380. package/script/utilities/0_color.d.ts +3 -0
  381. package/script/utilities/0_color.js +60 -0
  382. package/esm/types/0_color.d.ts +0 -3
  383. package/esm/types/0_color.js +0 -36
  384. package/script/types/0_color.d.ts +0 -3
  385. package/script/types/0_color.js +0 -41
  386. /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/_constants.d.ts +0 -0
  387. /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/_constants.js +0 -0
  388. /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/_diff.d.ts +0 -0
  389. /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/_diff.js +0 -0
  390. /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/_format.d.ts +0 -0
  391. /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/_format.js +0 -0
  392. /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert.d.ts +0 -0
  393. /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert.js +0 -0
  394. /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_almost_equals.d.ts +0 -0
  395. /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_almost_equals.js +0 -0
  396. /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_array_includes.d.ts +0 -0
  397. /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_array_includes.js +0 -0
  398. /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_equals.d.ts +0 -0
  399. /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_equals.js +0 -0
  400. /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_exists.d.ts +0 -0
  401. /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_exists.js +0 -0
  402. /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_false.d.ts +0 -0
  403. /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_false.js +0 -0
  404. /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_greater.d.ts +0 -0
  405. /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_greater.js +0 -0
  406. /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_greater_or_equal.d.ts +0 -0
  407. /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_greater_or_equal.js +0 -0
  408. /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_instance_of.d.ts +0 -0
  409. /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_instance_of.js +0 -0
  410. /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_is_error.d.ts +0 -0
  411. /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_is_error.js +0 -0
  412. /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_less.d.ts +0 -0
  413. /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_less.js +0 -0
  414. /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_less_or_equal.d.ts +0 -0
  415. /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_less_or_equal.js +0 -0
  416. /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_match.d.ts +0 -0
  417. /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_match.js +0 -0
  418. /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_not_equals.d.ts +0 -0
  419. /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_not_equals.js +0 -0
  420. /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_not_instance_of.d.ts +0 -0
  421. /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_not_instance_of.js +0 -0
  422. /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_not_match.d.ts +0 -0
  423. /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_not_match.js +0 -0
  424. /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_not_strict_equals.d.ts +0 -0
  425. /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_not_strict_equals.js +0 -0
  426. /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_object_match.d.ts +0 -0
  427. /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_object_match.js +0 -0
  428. /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_rejects.d.ts +0 -0
  429. /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_rejects.js +0 -0
  430. /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_strict_equals.d.ts +0 -0
  431. /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_strict_equals.js +0 -0
  432. /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_string_includes.d.ts +0 -0
  433. /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_string_includes.js +0 -0
  434. /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_throws.d.ts +0 -0
  435. /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_throws.js +0 -0
  436. /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assertion_error.d.ts +0 -0
  437. /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assertion_error.js +0 -0
  438. /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/equal.d.ts +0 -0
  439. /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/equal.js +0 -0
  440. /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/fail.d.ts +0 -0
  441. /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/fail.js +0 -0
  442. /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/mod.d.ts +0 -0
  443. /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/mod.js +0 -0
  444. /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/unimplemented.d.ts +0 -0
  445. /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/unimplemented.js +0 -0
  446. /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/unreachable.d.ts +0 -0
  447. /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/unreachable.js +0 -0
  448. /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/encoding/_util.d.ts +0 -0
  449. /package/esm/deps/deno.land/{std@0.204.0 → std@0.207.0}/encoding/_util.js +0 -0
  450. /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/_constants.d.ts +0 -0
  451. /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/_constants.js +0 -0
  452. /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/_diff.d.ts +0 -0
  453. /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/_diff.js +0 -0
  454. /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/_format.d.ts +0 -0
  455. /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/_format.js +0 -0
  456. /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert.d.ts +0 -0
  457. /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert.js +0 -0
  458. /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_almost_equals.d.ts +0 -0
  459. /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_almost_equals.js +0 -0
  460. /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_array_includes.d.ts +0 -0
  461. /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_array_includes.js +0 -0
  462. /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_equals.d.ts +0 -0
  463. /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_equals.js +0 -0
  464. /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_exists.d.ts +0 -0
  465. /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_exists.js +0 -0
  466. /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_false.d.ts +0 -0
  467. /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_false.js +0 -0
  468. /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_greater.d.ts +0 -0
  469. /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_greater.js +0 -0
  470. /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_greater_or_equal.d.ts +0 -0
  471. /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_greater_or_equal.js +0 -0
  472. /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_instance_of.d.ts +0 -0
  473. /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_instance_of.js +0 -0
  474. /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_is_error.d.ts +0 -0
  475. /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_is_error.js +0 -0
  476. /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_less.d.ts +0 -0
  477. /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_less.js +0 -0
  478. /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_less_or_equal.d.ts +0 -0
  479. /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_less_or_equal.js +0 -0
  480. /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_match.d.ts +0 -0
  481. /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_match.js +0 -0
  482. /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_not_equals.d.ts +0 -0
  483. /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_not_equals.js +0 -0
  484. /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_not_instance_of.d.ts +0 -0
  485. /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_not_instance_of.js +0 -0
  486. /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_not_match.d.ts +0 -0
  487. /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_not_match.js +0 -0
  488. /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_not_strict_equals.d.ts +0 -0
  489. /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_not_strict_equals.js +0 -0
  490. /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_object_match.d.ts +0 -0
  491. /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_object_match.js +0 -0
  492. /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_rejects.d.ts +0 -0
  493. /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_rejects.js +0 -0
  494. /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_strict_equals.d.ts +0 -0
  495. /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_strict_equals.js +0 -0
  496. /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_string_includes.d.ts +0 -0
  497. /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_string_includes.js +0 -0
  498. /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_throws.d.ts +0 -0
  499. /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assert_throws.js +0 -0
  500. /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assertion_error.d.ts +0 -0
  501. /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/assertion_error.js +0 -0
  502. /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/equal.d.ts +0 -0
  503. /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/equal.js +0 -0
  504. /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/fail.d.ts +0 -0
  505. /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/fail.js +0 -0
  506. /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/mod.d.ts +0 -0
  507. /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/mod.js +0 -0
  508. /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/unimplemented.d.ts +0 -0
  509. /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/unimplemented.js +0 -0
  510. /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/unreachable.d.ts +0 -0
  511. /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/assert/unreachable.js +0 -0
  512. /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/encoding/_util.d.ts +0 -0
  513. /package/script/deps/deno.land/{std@0.204.0 → std@0.207.0}/encoding/_util.js +0 -0
package/esm/0_deps.d.ts CHANGED
@@ -1,8 +1,9 @@
1
- export * from "./deps/deno.land/std@0.204.0/assert/mod.js";
1
+ export * from "./deps/deno.land/std@0.207.0/assert/mod.js";
2
+ export * as path from "./deps/deno.land/std@0.207.0/path/mod.js";
3
+ export { decodeBase64, encodeBase64 } from "./deps/deno.land/std@0.207.0/encoding/base64.js";
2
4
  export { ctr256, factorize, ige256Decrypt, ige256Encrypt, init as initTgCrypto } from "./deps/deno.land/x/tgcrypto@0.3.3/mod.js";
3
5
  export { gunzip, gzip } from "./deps/raw.githubusercontent.com/MTKruto/compress/main/gzip/gzip.js";
4
6
  export { Mutex, type MutexInterface } from "async-mutex";
5
7
  export { Parser } from "./deps/deno.land/x/html_parser@v0.1.3/src/mod.js";
6
8
  import { debug as debug_ } from "./deps/raw.githubusercontent.com/MTKruto/debug/main/mod.js";
7
9
  export declare const debug: typeof debug_;
8
- export { decodeBase64, encodeBase64 } from "./deps/deno.land/std@0.204.0/encoding/base64.js";
package/esm/0_deps.js CHANGED
@@ -1,8 +1,9 @@
1
- export * from "./deps/deno.land/std@0.204.0/assert/mod.js";
1
+ export * from "./deps/deno.land/std@0.207.0/assert/mod.js";
2
+ export * as path from "./deps/deno.land/std@0.207.0/path/mod.js";
3
+ export { decodeBase64, encodeBase64 } from "./deps/deno.land/std@0.207.0/encoding/base64.js";
2
4
  export { ctr256, factorize, ige256Decrypt, ige256Encrypt, init as initTgCrypto } from "./deps/deno.land/x/tgcrypto@0.3.3/mod.js";
3
5
  export { gunzip, gzip } from "./deps/raw.githubusercontent.com/MTKruto/compress/main/gzip/gzip.js";
4
6
  export { Mutex } from "async-mutex";
5
7
  export { Parser } from "./deps/deno.land/x/html_parser@v0.1.3/src/mod.js";
6
8
  import { debug as debug_ } from "./deps/raw.githubusercontent.com/MTKruto/debug/main/mod.js";
7
9
  export const debug = (v) => debug_(v);
8
- export { decodeBase64, encodeBase64 } from "./deps/deno.land/std@0.204.0/encoding/base64.js";
@@ -1,6 +1,7 @@
1
1
  export * from "./utilities/0_base64.js";
2
2
  export * from "./utilities/0_bigint.js";
3
3
  export * from "./utilities/0_buffer.js";
4
+ export * from "./utilities/0_color.js";
4
5
  export * from "./utilities/0_control.js";
5
6
  export * from "./utilities/0_crypto.js";
6
7
  export * from "./utilities/0_hash.js";
@@ -1,6 +1,7 @@
1
1
  export * from "./utilities/0_base64.js";
2
2
  export * from "./utilities/0_bigint.js";
3
3
  export * from "./utilities/0_buffer.js";
4
+ export * from "./utilities/0_color.js";
4
5
  export * from "./utilities/0_control.js";
5
6
  export * from "./utilities/0_crypto.js";
6
7
  export * from "./utilities/0_hash.js";
package/esm/3_types.d.ts CHANGED
@@ -4,7 +4,6 @@ export * from "./types/0_chat_action.js";
4
4
  export * from "./types/0_chat_administrator_rights.js";
5
5
  export * from "./types/0_chat_id.js";
6
6
  export * from "./types/0_chat_photo.js";
7
- export * from "./types/0_color.js";
8
7
  export * from "./types/0_contact.js";
9
8
  export * from "./types/0_dice.js";
10
9
  export * from "./types/0__file_id.js";
package/esm/3_types.js CHANGED
@@ -4,7 +4,6 @@ export * from "./types/0_chat_action.js";
4
4
  export * from "./types/0_chat_administrator_rights.js";
5
5
  export * from "./types/0_chat_id.js";
6
6
  export * from "./types/0_chat_photo.js";
7
- export * from "./types/0_color.js";
8
7
  export * from "./types/0_contact.js";
9
8
  export * from "./types/0_dice.js";
10
9
  export * from "./types/0__file_id.js";
@@ -5,7 +5,7 @@ export declare const PUBLIC_KEYS: PublicKeys;
5
5
  export declare const VECTOR_CONSTRUCTOR = 481674261;
6
6
  export declare const INITIAL_DC: DC;
7
7
  export declare const LAYER = 166;
8
- export declare const APP_VERSION = "MTKruto 0.1.112";
8
+ export declare const APP_VERSION = "MTKruto 0.1.114";
9
9
  export declare const DEVICE_MODEL: string;
10
10
  export declare const LANG_CODE: string;
11
11
  export declare const LANG_PACK = "";
@@ -54,7 +54,7 @@ export const PUBLIC_KEYS = Object.freeze([
54
54
  export const VECTOR_CONSTRUCTOR = 0x1CB5C415;
55
55
  export const INITIAL_DC = "2";
56
56
  export const LAYER = 166;
57
- export const APP_VERSION = "MTKruto 0.1.112";
57
+ export const APP_VERSION = "MTKruto 0.1.114";
58
58
  // @ts-ignore: lib
59
59
  export const DEVICE_MODEL = typeof dntShim.Deno === "undefined" ? typeof navigator === "undefined" ? typeof process === "undefined" ? "Unknown" : process.platform + "-" + process.arch : navigator.userAgent.split(" ")[0] : dntShim.Deno.build.os + "-" + dntShim.Deno.build.arch;
60
60
  export const LANG_CODE = typeof navigator === "undefined" ? "en" : navigator.language.split("-")[0];
package/esm/5_client.d.ts CHANGED
@@ -1,3 +1,4 @@
1
1
  export * from "./client/2_client_plain.js";
2
2
  export * from "./client/3_types.js";
3
- export * from "./client/4_client.js";
3
+ export * from "./client/5_client.js";
4
+ export * from "./client/6_composer.js";
package/esm/5_client.js CHANGED
@@ -1,3 +1,4 @@
1
1
  export * from "./client/2_client_plain.js";
2
2
  export * from "./client/3_types.js";
3
- export * from "./client/4_client.js";
3
+ export * from "./client/5_client.js";
4
+ export * from "./client/6_composer.js";
@@ -3,3 +3,9 @@ export declare const resolve: () => Promise<void>;
3
3
  export type With<T, K extends keyof T> = T & Required<Pick<T, K>>;
4
4
  export declare function isPtsUpdate(v: types.TypeUpdate | types.TypeUpdates): v is types.UpdateShortMessage | types.UpdateShortChatMessage | types.UpdateShortSentMessage | types.UpdateNewMessage | types.UpdateDeleteMessages | types.UpdateReadHistoryInbox | types.UpdateReadHistoryOutbox | types.UpdatePinnedChannelMessages | types.UpdatePinnedMessages | types.UpdateFolderPeers | types.UpdateChannelWebPage | types.UpdateEditMessage | types.UpdateReadMessagesContents | types.UpdateWebPage;
5
5
  export declare function isChannelPtsUpdate(v: types.TypeUpdate | types.TypeUpdates): v is types.UpdateNewChannelMessage | types.UpdateEditChannelMessage | types.UpdateDeleteChannelMessages;
6
+ /**
7
+ * Source to a file. Can be a file ID, file path, URL, or `Uint8Array`.
8
+ */
9
+ export type FileSource = string | URL | Uint8Array;
10
+ export declare function getFileContents(source: FileSource, fileName?: string): Promise<readonly [Uint8Array, string]>;
11
+ export declare function isHttpUrl(string: string): boolean;
@@ -1,3 +1,6 @@
1
+ import * as dntShim from "../_dnt.shims.js";
2
+ import { path } from "../0_deps.js";
3
+ import { UNREACHABLE } from "../1_utilities.js";
1
4
  import { types } from "../2_tl.js";
2
5
  export const resolve = () => Promise.resolve();
3
6
  export function isPtsUpdate(v) {
@@ -21,3 +24,53 @@ export function isChannelPtsUpdate(v) {
21
24
  v instanceof types.UpdateEditChannelMessage ||
22
25
  v instanceof types.UpdateDeleteChannelMessages;
23
26
  }
27
+ export async function getFileContents(source, fileName = "") {
28
+ fileName = fileName.trim() || "file";
29
+ let contents;
30
+ if (source instanceof Uint8Array) {
31
+ contents = source;
32
+ }
33
+ else {
34
+ let url;
35
+ try {
36
+ url = new URL(source).toString();
37
+ }
38
+ catch {
39
+ if (typeof source === "string") {
40
+ let path_;
41
+ if (path.isAbsolute(source)) {
42
+ path_ = source;
43
+ }
44
+ else {
45
+ // @ts-ignore: lib
46
+ path_ = path.join(dntShim.Deno.cwd(), source);
47
+ }
48
+ url = path.toFileUrl(path_).toString();
49
+ fileName = path.basename(path_);
50
+ }
51
+ else {
52
+ UNREACHABLE();
53
+ }
54
+ }
55
+ const res = await fetch(url);
56
+ if (fileName == "file") {
57
+ const contentType = res.headers.get("content-type");
58
+ if (contentType?.includes("image/png")) {
59
+ fileName += ".png";
60
+ }
61
+ else if (contentType?.includes("image/jpeg")) {
62
+ fileName += ".jpg";
63
+ }
64
+ }
65
+ contents = await res.arrayBuffer().then((v) => new Uint8Array(v));
66
+ }
67
+ return [contents, fileName];
68
+ }
69
+ export function isHttpUrl(string) {
70
+ try {
71
+ return new URL(string).protocol.startsWith("http");
72
+ }
73
+ catch {
74
+ return false;
75
+ }
76
+ }
@@ -37,7 +37,10 @@ export interface ClientParams extends ClientPlainParams {
37
37
  * Whether to automatically call `start` with no parameters in the first `invoke` call. Defaults to `true`.
38
38
  */
39
39
  autoStart?: boolean;
40
- errorHandler?: (err: unknown, function_: types.Type | functions.Function<unknown>, n: number) => MaybePromise<boolean>;
40
+ /**
41
+ * Whether to use default handlers. Defaults to `true`.
42
+ */
43
+ defaultHandlers?: boolean;
41
44
  }
42
45
  export interface AnswerCallbackQueryParams {
43
46
  /** A text to be shown to the user. */
@@ -54,7 +57,7 @@ export interface AuthorizeUserParams<S = string> {
54
57
  code: S | (() => MaybePromise<S>);
55
58
  password: S | ((hint: string | null) => MaybePromise<S>);
56
59
  }
57
- export interface SendMessagesParams {
60
+ export interface SendMessageParams {
58
61
  /**
59
62
  * The parse mode to use. If not provided, the default parse mode will be used.
60
63
  */
@@ -223,10 +226,68 @@ export interface SetMyCommandsParams {
223
226
  scope?: BotCommandScope;
224
227
  }
225
228
  export type GetMyCommandsParams = SetMyCommandsParams;
229
+ export interface DeleteMessagesParams {
230
+ /** Whether to delete the messages only for this side. */
231
+ onlyForMe?: boolean;
232
+ }
233
+ export interface DeleteMessageParams {
234
+ /** Whether to delete the message only for this side. */
235
+ onlyForMe?: boolean;
236
+ }
237
+ export interface SendPhotoParams {
238
+ /** The file name to assign. */
239
+ fileName?: string;
240
+ /** Size of each upload chunk in bytes. */
241
+ chunkSize?: number;
242
+ /** Upload abort signal. */
243
+ signal?: AbortSignal | null;
244
+ /** The caption of the photo. */
245
+ caption?: string;
246
+ /**
247
+ * The caption's entities.
248
+ */
249
+ captionEntities?: MessageEntity[];
250
+ /**
251
+ * The parse mode to use for the caption. If not provided, the default parse mode will be used.
252
+ */
253
+ parseMode?: ParseMode;
254
+ /**
255
+ * Whether to mark the photo as a spoiler.
256
+ */
257
+ hasSpoiler?: boolean;
258
+ /**
259
+ * Whether to send the message in a silent way without making a sound on the recipients' clients.
260
+ */
261
+ disableNotification?: boolean;
262
+ /**
263
+ * Whether to protect the contents of the message from copying and forwarding.
264
+ */
265
+ protectContent?: boolean;
266
+ /**
267
+ * The identifier of a message to reply to.
268
+ */
269
+ replyToMessageId?: number;
270
+ /**
271
+ * The identifier of a thread to send the message to.
272
+ */
273
+ messageThreadId?: number;
274
+ /**
275
+ * The identifier of the chat to send the message on behalf of. User-only.
276
+ */
277
+ sendAs?: ChatID;
278
+ /**
279
+ * The reply markup of the message. Bot-only.
280
+ */
281
+ replyMarkup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
282
+ }
226
283
  export type ConnectionState = "notConnected" | "updating" | "ready";
227
284
  export type AuthorizationState = {
228
285
  authorized: boolean;
229
286
  };
287
+ export interface ReplyParams {
288
+ /** Whether to quote the message that is to be replied. Enabled by default for non-private chats. */
289
+ quote?: boolean;
290
+ }
230
291
  export type FilterableUpdates = "message" | "editedMessage" | "callbackQuery";
231
292
  export interface Update {
232
293
  message?: Message;
@@ -237,11 +298,18 @@ export interface Update {
237
298
  callbackQuery?: CallbackQuery;
238
299
  inlineQuery?: InlineQuery;
239
300
  }
240
- export type NextFn = () => Promise<void>;
241
- export interface Handler<U extends Partial<Update> = Partial<Update>> {
242
- (update: U, next: NextFn): MaybePromise<void>;
301
+ export type NextFn<T = void> = () => Promise<T>;
302
+ export interface Handler<C> {
303
+ (ctx: C, next: NextFn): MaybePromise<void>;
304
+ }
305
+ export interface InvokeErrorHandler<C> {
306
+ (ctx: {
307
+ client: C;
308
+ error: unknown;
309
+ function: types.Type | functions.Function<unknown>;
310
+ n: number;
311
+ }, next: NextFn<boolean>): MaybePromise<boolean>;
243
312
  }
244
- export type FilterUpdate<U extends Update, T extends keyof U, F extends keyof NonNullable<U[T]>> = With<U, T> & Pick<{
245
- [P in T]-?: With<NonNullable<U[T]>, F>;
313
+ export type FilterUpdate<U extends Update, T extends keyof U, F extends (keyof NonNullable<U[T]>) | null> = With<U, T> & Pick<{
314
+ [P in T]-?: F extends keyof NonNullable<U[T]> ? With<NonNullable<U[T]>, F> : NonNullable<U[T]>;
246
315
  }, T>;
247
- export declare const skip: Handler;
@@ -1 +1 @@
1
- export const skip = (__, _) => _();
1
+ export {};
@@ -0,0 +1,22 @@
1
+ import { FilterableUpdates, FilterUpdate, Update } from "./3_types.js";
2
+ type MaybePromise<T> = T | Promise<T>;
3
+ export type NextFunction = () => Promise<void>;
4
+ export type MiddlewareFn<C extends Update = Update> = (ctx: C, next: NextFunction) => MaybePromise<unknown>;
5
+ export interface MiddlewareObj<C extends Update = Update> {
6
+ middleware: () => MiddlewareFn<C>;
7
+ }
8
+ export type Middleware<C extends Update = Update> = MiddlewareFn<C> | MiddlewareObj<C>;
9
+ export declare function flatten<C extends Update = Update>(mw: Middleware<C>): MiddlewareFn<C>;
10
+ export declare function concat<C extends Update = Update>(left: MiddlewareFn<C>, right: MiddlewareFn<C>): MiddlewareFn<C>;
11
+ export declare const skip: MiddlewareFn;
12
+ export declare class Composer<C extends Update> implements MiddlewareObj<C> {
13
+ #private;
14
+ constructor(...middleware: Middleware<C>[]);
15
+ middleware(): MiddlewareFn<C>;
16
+ use(...middleware: Middleware<C>[]): Composer<C>;
17
+ branch(predicate: (ctx: C) => MaybePromise<boolean>, trueHandler_: Middleware<C>, falseHandler_: Middleware<C>): Composer<C>;
18
+ filter<D extends C>(predicate: (ctx: C) => ctx is D, ...middleware: Middleware<D>[]): Composer<D>;
19
+ filter(predicate: (ctx: C) => MaybePromise<boolean>, ...middleware: Middleware<C>[]): Composer<C>;
20
+ on<T extends keyof Update, F extends keyof NonNullable<Update[T]>>(filter: T extends FilterableUpdates ? T | [T, F, ...F[]] : T, ...middleawre: Middleware<FilterUpdate<C, T, F>>[]): Composer<FilterUpdate<C, T, F>>;
21
+ }
22
+ export {};
@@ -0,0 +1,81 @@
1
+ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
2
+ if (kind === "m") throw new TypeError("Private method is not writable");
3
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
4
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
5
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
6
+ };
7
+ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
8
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
9
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
10
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
11
+ };
12
+ var _Composer_handle;
13
+ export function flatten(mw) {
14
+ return typeof mw === "function" ? mw : (ctx, next) => mw.middleware()(ctx, next);
15
+ }
16
+ export function concat(left, right) {
17
+ return async (ctx, next) => {
18
+ let called = false;
19
+ await left(ctx, async () => {
20
+ if (called) {
21
+ return;
22
+ }
23
+ else {
24
+ called = true;
25
+ await right(ctx, next);
26
+ }
27
+ });
28
+ };
29
+ }
30
+ export const skip = (_ctx, next) => next();
31
+ export class Composer {
32
+ constructor(...middleware) {
33
+ _Composer_handle.set(this, void 0);
34
+ __classPrivateFieldSet(this, _Composer_handle, middleware.length == 0 ? skip : middleware.map(flatten).reduce(concat), "f");
35
+ }
36
+ middleware() {
37
+ return __classPrivateFieldGet(this, _Composer_handle, "f");
38
+ }
39
+ use(...middleware) {
40
+ const composer = new Composer(...middleware);
41
+ __classPrivateFieldSet(this, _Composer_handle, concat(__classPrivateFieldGet(this, _Composer_handle, "f"), flatten(composer)), "f");
42
+ return composer;
43
+ }
44
+ branch(predicate, trueHandler_, falseHandler_) {
45
+ const trueHandler = flatten(trueHandler_);
46
+ const falseHandler = flatten(falseHandler_);
47
+ return this.use(async (upd, next) => {
48
+ if (await predicate(upd)) {
49
+ await trueHandler(upd, next);
50
+ }
51
+ else {
52
+ await falseHandler(upd, next);
53
+ }
54
+ });
55
+ }
56
+ filter(predicate, ...middleware) {
57
+ return this.branch(predicate, middleware.length == 0 ? skip : middleware.map(flatten).reduce(concat), skip);
58
+ }
59
+ on(filter, ...middleawre) {
60
+ const type = typeof filter === "string" ? filter : filter[0];
61
+ const keys = Array.isArray(filter) ? filter.slice(1) : [];
62
+ return this.filter((ctx) => {
63
+ if (type in ctx) {
64
+ if (keys.length > 0) {
65
+ for (const key of keys) {
66
+ // deno-lint-ignore ban-ts-comment
67
+ // @ts-ignore
68
+ if (!(key in ctx[type])) {
69
+ return false;
70
+ }
71
+ }
72
+ }
73
+ return true;
74
+ }
75
+ else {
76
+ return false;
77
+ }
78
+ }, ...middleawre);
79
+ }
80
+ }
81
+ _Composer_handle = new WeakMap();
@@ -2,19 +2,66 @@ import { MaybePromise } from "../1_utilities.js";
2
2
  import { functions, ReadObject, types } from "../2_tl.js";
3
3
  import { Storage } from "../3_storage.js";
4
4
  import { DC } from "../3_transport.js";
5
- import { BotCommand, ChatAction, ChatID, InlineQueryResult, Message, ParseMode, User } from "../3_types.js";
5
+ import { BotCommand, CallbackQuery, ChatAction, ChatID, InlineQuery, InlineQueryResult, Message, ParseMode, User } from "../3_types.js";
6
6
  import { Migrate } from "../4_errors.js";
7
- import { With } from "./0_utilities.js";
7
+ import { FileSource, With } from "./0_utilities.js";
8
8
  import { ClientAbstract } from "./1_client_abstract.js";
9
- import { AnswerCallbackQueryParams, AnswerInlineQueryParams, AuthorizeUserParams, ClientParams, DownloadParams, EditMessageParams, FilterableUpdates, FilterUpdate, ForwardMessagesParams, GetMyCommandsParams, Handler, SendMessagesParams, SendPollParams, SetMyCommandsParams, Update, UploadParams } from "./3_types.js";
9
+ import { AnswerCallbackQueryParams, AnswerInlineQueryParams, AuthorizeUserParams, ClientParams, DeleteMessageParams, DeleteMessagesParams, DownloadParams, EditMessageParams, FilterableUpdates, FilterUpdate, ForwardMessagesParams, GetMyCommandsParams, InvokeErrorHandler, ReplyParams, SendMessageParams, SendPhotoParams, SendPollParams, SetMyCommandsParams, Update, UploadParams } from "./3_types.js";
10
+ import { Composer, Middleware } from "./4_composer.js";
10
11
  declare const getEntity: unique symbol;
11
12
  declare const getStickerSetName: unique symbol;
12
13
  export declare const handleMigrationError: unique symbol;
13
14
  declare const getMessageWithReply: unique symbol;
15
+ export interface Context extends Update {
16
+ /** The client that received the update. */
17
+ client: Client;
18
+ /** Resolves to `ctx.message ?? ctx.editedMessage ?? ctx.callbackQuery?.message`. */
19
+ msg: undefined extends this["message"] ? undefined extends this["editedMessage"] ? undefined extends this["callbackQuery"] ? never : this["callbackQuery"] extends With<CallbackQuery, "message"> ? this["callbackQuery"]["message"] : this["callbackQuery"] extends With<CallbackQuery, "inlineMessageId"> ? never : (Message | undefined) : this["editedMessage"] : this["message"];
20
+ /** Resolves to `effectiveMessage?.chat`. */
21
+ chat: this["msg"] extends never ? never : this["msg"]["chat"];
22
+ /** Resolves to `(ctx.message ?? ctx.editedMessage)?.from ?? ctx.callbackQuery?.from ?? ctx.inlineQuery?.from`. */
23
+ from: this["message"] extends Message ? this["message"]["from"] : this["editedMessage"] extends Message ? this["editedMessage"]["from"] : this["callbackQuery"] extends CallbackQuery ? this["callbackQuery"]["from"] : this["inlineQuery"] extends InlineQuery ? this["inlineQuery"]["from"] : never;
24
+ /** Resolves to `effectiveMessage?.senderChat`. */
25
+ senderChat: this["msg"] extends never ? never : this["msg"]["senderChat"];
26
+ /** Reply the received message with a text message. */
27
+ reply: (text: string, params?: Omit<SendMessageParams, "replyToMessageId"> & ReplyParams) => Promise<With<Message, "text">>;
28
+ /** Reply the received message with a poll. */
29
+ replyPoll: (question: string, options: [string, string, ...string[]], params?: Omit<SendPollParams, "replyToMessageId"> & ReplyParams) => Promise<With<Message, "poll">>;
30
+ /** Reply the received message with a photo. */
31
+ replyPhoto: (photo: FileSource, params?: Omit<SendPhotoParams, "replyToMessageId"> & ReplyParams) => Promise<With<Message, "photo">>;
32
+ /** Delete the received message. */
33
+ delete: () => Promise<void>;
34
+ /** Forward the received message. */
35
+ forward: (to: ChatID, params?: ForwardMessagesParams) => Promise<this["msg"]>;
36
+ /** Send a chat action to the chat which the message was received from. */
37
+ sendChatAction: (action: ChatAction, params?: {
38
+ messageThreadId?: number;
39
+ }) => Promise<void>;
40
+ /** Edit a message in the chat which the message was received from. */
41
+ editMessageText: (messageId: number, text: string, params?: EditMessageParams) => Promise<With<Message, "text">>;
42
+ /** Answer the received callback query. */
43
+ answerCallbackQuery: (params?: AnswerCallbackQueryParams) => Promise<void>;
44
+ /** Answer the received inline query. */
45
+ answerInlineQuery: (results: InlineQueryResult[], params?: AnswerInlineQueryParams) => Promise<void>;
46
+ /** Retrieve a single message of the chat which the message was received from. */
47
+ getMessage: (messageId: number) => Promise<Omit<Message, "replyToMessage"> | null>;
48
+ /** Retrieve multiple messages of the chat which the message was received from. */
49
+ getMessages: (messageIds: number[]) => Promise<Omit<Message, "replyToMessage">[]>;
50
+ /** Forward a message of the chat which the message was received from. */
51
+ forwardMessage: (to: ChatID, messageId: number, params?: ForwardMessagesParams) => Promise<Message>;
52
+ /** Forward multiple messages of the chat which the message was received from. */
53
+ forwardMessages: (to: ChatID, messageIds: number[], params?: ForwardMessagesParams) => Promise<Message[]>;
54
+ /** Delete a message in the chat which the message was received from. */
55
+ deleteMessage: (messageId: number, params?: DeleteMessagesParams) => Promise<void>;
56
+ /** Delete multiple messages in the chat which the message was received from. */
57
+ deleteMessages: (messageIds: number[], params?: DeleteMessagesParams) => Promise<void>;
58
+ toJSON: () => Update;
59
+ }
60
+ export declare function skipInvoke<C extends Context>(): InvokeErrorHandler<Client<C>>;
14
61
  export declare const restartAuth: unique symbol;
15
62
  export declare class ConnectionError extends Error {
16
63
  }
17
- export declare class Client extends ClientAbstract {
64
+ export declare class Client<C extends Context = Context> extends ClientAbstract {
18
65
  #private;
19
66
  readonly apiId: number | null;
20
67
  readonly apiHash: string | null;
@@ -78,8 +125,12 @@ export declare class Client extends ClientAbstract {
78
125
  *
79
126
  * @param function_ The function to invoke.
80
127
  */
81
- invoke<T extends (functions.Function<unknown> | types.Type) = functions.Function<unknown>>(function_: T): Promise<T extends functions.Function<unknown> ? T["__R"] : void>;
82
- invoke<T extends (functions.Function<unknown> | types.Type) = functions.Function<unknown>>(function_: T, noWait: true): Promise<void>;
128
+ invoke: {
129
+ <T extends types.Type | functions.Function<unknown> = functions.Function<unknown>>(function_: T): Promise<T extends functions.Function<unknown> ? T["__R"] : void>;
130
+ <T_1 extends types.Type | functions.Function<unknown> = functions.Function<unknown>>(function_: T_1, noWait: true): Promise<void>;
131
+ } & {
132
+ use: (handler: InvokeErrorHandler<Client<C>>) => void;
133
+ };
83
134
  /**
84
135
  * Alias for `invoke` with its second parameter being `true`.
85
136
  */
@@ -99,7 +150,7 @@ export declare class Client extends ClientAbstract {
99
150
  * @param text The message's text.
100
151
  * @returns The sent text message.
101
152
  */
102
- sendMessage(chatId: ChatID, text: string, params?: SendMessagesParams): Promise<With<Message, "text">>;
153
+ sendMessage(chatId: ChatID, text: string, params?: SendMessageParams): Promise<With<Message, "text">>;
103
154
  /**
104
155
  * Edit a message's text.
105
156
  *
@@ -229,11 +280,11 @@ export declare class Client extends ClientAbstract {
229
280
  * @param results The results to answer with.
230
281
  */
231
282
  answerInlineQuery(id: string, results: InlineQueryResult[], params?: AnswerInlineQueryParams): Promise<void>;
232
- use(handler: Handler): void;
233
- branch(predicate: (upd: Update) => MaybePromise<boolean>, trueHandler: Handler, falseHandler: Handler): void;
234
- filter<D extends Update>(predicate: (update: Update) => update is D, handler: Handler<D>): void;
235
- filter(predicate: (update: Update) => MaybePromise<boolean>, handler: Handler): void;
236
- on<T extends keyof Update, F extends keyof NonNullable<Update[T]>>(filter: T extends FilterableUpdates ? T | [T, F, ...F[]] : T, handler: Handler<FilterUpdate<Update, T, F>>): void;
283
+ use(...middleware: Middleware<C>[]): Composer<C>;
284
+ branch(predicate: (ctx: C) => MaybePromise<boolean>, trueHandler_: Middleware<C>, falseHandler_: Middleware<C>): Composer<C>;
285
+ filter<D extends C>(predicate: (ctx: C) => ctx is D, ...middleware: Middleware<D>[]): void;
286
+ filter(predicate: (ctx: C) => MaybePromise<boolean>, ...middleware: Middleware<C>[]): void;
287
+ on<T extends keyof Update, F extends keyof NonNullable<Update[T]>>(filter: T extends FilterableUpdates ? T | [T, F, ...F[]] : T, ...middleawre: Middleware<FilterUpdate<C, T, F>>[]): void;
237
288
  /**
238
289
  * Set the bot's description in the given language. Bot-only.
239
290
  *
@@ -285,5 +336,29 @@ export declare class Client extends ClientAbstract {
285
336
  getMyShortDescription(params?: {
286
337
  languageCode?: string;
287
338
  }): Promise<string>;
339
+ /**
340
+ * Delete multiple messages.
341
+ *
342
+ * @method
343
+ * @param chatId The chat that contains the messages.
344
+ * @param messageIds The identifier of the messages to delete.
345
+ */
346
+ deleteMessages(chatId: ChatID, messageIds: number[], params?: DeleteMessagesParams): Promise<void>;
347
+ /**
348
+ * Delete a single message.
349
+ *
350
+ * @method
351
+ * @param chatId The chat that contains the message.
352
+ * @param messageId The identifier of the message to delete.
353
+ */
354
+ deleteMessage(chatId: ChatID, messageId: number, params?: DeleteMessageParams): Promise<void>;
355
+ /**
356
+ * Send a photo.
357
+ *
358
+ * @method
359
+ * @param chatId The chat to send the photo to.
360
+ * @param photo The photo to send.
361
+ */
362
+ sendPhoto(chatId: ChatID, photo: FileSource, params?: SendPhotoParams): Promise<With<Message, "photo">>;
288
363
  }
289
364
  export {};