@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
@@ -1,8 +1,7 @@
1
- import { cleanObject, UNREACHABLE } from "../1_utilities.js";
1
+ import { cleanObject, getColorFromPeerId, UNREACHABLE } from "../1_utilities.js";
2
2
  import { types } from "../2_tl.js";
3
3
  import { ZERO_CHANNEL_ID } from "../4_constants.js";
4
4
  import { constructChatPhoto } from "./0_chat_photo.js";
5
- import { getColorFromColorId, getColorFromPeerId } from "./0_color.js";
6
5
  import { constructRestrictionReason } from "./0_restriction_reason.js";
7
6
  export function constructChat(chat) {
8
7
  if (chat instanceof types.User) {
@@ -11,7 +10,7 @@ export function constructChat(chat) {
11
10
  type: "private",
12
11
  isBot: chat.bot || false,
13
12
  id,
14
- color: chat.color !== undefined ? getColorFromColorId(chat.color) : getColorFromPeerId(id),
13
+ color: chat.color !== undefined ? chat.color : getColorFromPeerId(id),
15
14
  firstName: chat.firstName || "",
16
15
  lastName: chat.lastName,
17
16
  isScam: chat.scam || false,
@@ -49,7 +48,7 @@ export function constructChat(chat) {
49
48
  if (chat.megagroup) {
50
49
  chat_ = {
51
50
  id,
52
- color: chat.color !== undefined ? getColorFromColorId(chat.color) : getColorFromPeerId(id),
51
+ color: chat.color !== undefined ? chat.color : getColorFromPeerId(id),
53
52
  type: "supergroup",
54
53
  title,
55
54
  isScam,
@@ -63,7 +62,7 @@ export function constructChat(chat) {
63
62
  const id = ZERO_CHANNEL_ID + -Number(chat.id);
64
63
  chat_ = {
65
64
  id,
66
- color: chat.color !== undefined ? getColorFromColorId(chat.color) : getColorFromPeerId(id),
65
+ color: chat.color !== undefined ? chat.color : getColorFromPeerId(id),
67
66
  type: "channel",
68
67
  title,
69
68
  isScam,
@@ -1,12 +1,11 @@
1
1
  import { types } from "../2_tl.js";
2
2
  import { ChatPhoto } from "./0_chat_photo.js";
3
- import { Color } from "./0_color.js";
4
3
  /** This object represents a Telegram user or bot. */
5
4
  export interface User {
6
5
  /** Unique identifier for this user or bot */
7
6
  id: number;
8
- /** A color that can be displayed instead of the user's photo. */
9
- color: Color;
7
+ /** Identifier of color that can be displayed instead of the user's photo. */
8
+ color: number;
10
9
  /** True, if this user is a bot */
11
10
  isBot: boolean;
12
11
  /** User's or bot's first name */
@@ -1,12 +1,11 @@
1
- import { cleanObject } from "../1_utilities.js";
1
+ import { cleanObject, getColorFromPeerId } from "../1_utilities.js";
2
2
  import { types } from "../2_tl.js";
3
3
  import { constructChatPhoto } from "./0_chat_photo.js";
4
- import { getColorFromColorId, getColorFromPeerId } from "./0_color.js";
5
4
  export function constructUser(user_) {
6
5
  const id = Number(user_.id);
7
6
  const user = {
8
7
  id,
9
- color: user_.color !== undefined ? getColorFromColorId(user_.color) : getColorFromPeerId(id),
8
+ color: user_.color !== undefined ? user_.color : getColorFromPeerId(id),
10
9
  isBot: user_.bot || false,
11
10
  firstName: user_.firstName || "",
12
11
  lastName: user_.lastName,
@@ -158,11 +158,13 @@ export async function inlineQueryResultToTlObject(result_, parseText, usernameRe
158
158
  replyMarkup,
159
159
  });
160
160
  const title = "title" in result_ ? result_.title : undefined;
161
+ const description = "description" in result_ ? result_.description : undefined;
161
162
  if (document != null) {
162
163
  return new types.InputBotInlineResult({
163
164
  id,
164
165
  type,
165
166
  title,
167
+ description,
166
168
  thumb: thumb == null ? undefined : thumb,
167
169
  content: document,
168
170
  sendMessage: new types.InputBotInlineMessageMediaAuto({
@@ -178,6 +180,7 @@ export async function inlineQueryResultToTlObject(result_, parseText, usernameRe
178
180
  id,
179
181
  type,
180
182
  title,
183
+ description,
181
184
  document: new types.InputDocument({
182
185
  id: fileId.params.mediaId,
183
186
  accessHash: fileId.params.accessHash,
@@ -191,6 +194,7 @@ export async function inlineQueryResultToTlObject(result_, parseText, usernameRe
191
194
  id,
192
195
  type,
193
196
  title,
197
+ description,
194
198
  sendMessage: new types.InputBotInlineMessageMediaGeo({
195
199
  geoPoint: new types.InputGeoPoint({
196
200
  lat: result_.latitude,
@@ -209,6 +213,7 @@ export async function inlineQueryResultToTlObject(result_, parseText, usernameRe
209
213
  id,
210
214
  type,
211
215
  title,
216
+ description,
212
217
  sendMessage: new types.InputBotInlineMessageGame({
213
218
  replyMarkup,
214
219
  }),
@@ -223,6 +228,7 @@ export async function inlineQueryResultToTlObject(result_, parseText, usernameRe
223
228
  id,
224
229
  type,
225
230
  title,
231
+ description,
226
232
  sendMessage: new types.InputBotInlineMessageText({
227
233
  message,
228
234
  entities,
@@ -239,6 +245,7 @@ export async function inlineQueryResultToTlObject(result_, parseText, usernameRe
239
245
  id,
240
246
  type,
241
247
  title,
248
+ description,
242
249
  sendMessage: new types.InputBotInlineMessageMediaVenue({
243
250
  geoPoint: new types.InputGeoPoint({ long: result_.longitude, lat: result_.latitude }),
244
251
  address: result_.address,
@@ -0,0 +1,3 @@
1
+ export type ColorName = "red" | "orange" | "violet" | "green" | "cyan" | "blue" | "pink" | "combination 1" | "combination 2" | "combination 3" | "combination 4" | "combination 5" | "combination 6" | "combination 7" | "combination 8" | "combination 9" | "combination 10" | "combination 11" | "combination 12" | "combination 13" | "combination 14";
2
+ export declare function getColorFromPeerId(id: number): number;
3
+ export declare function getColorName(id: number): ColorName;
@@ -0,0 +1,55 @@
1
+ export function getColorFromPeerId(id) {
2
+ id = Number(String(id).replaceAll("-100", "-"));
3
+ if (id < 0) {
4
+ id = -id;
5
+ }
6
+ return Math.floor(id % 7);
7
+ }
8
+ export function getColorName(id) {
9
+ switch (id) {
10
+ case 0:
11
+ return "red";
12
+ case 1:
13
+ return "orange";
14
+ case 2:
15
+ return "violet";
16
+ case 3:
17
+ return "green";
18
+ case 4:
19
+ return "cyan";
20
+ case 5:
21
+ return "blue";
22
+ case 6:
23
+ return "pink";
24
+ case 7:
25
+ return "combination 1";
26
+ case 8:
27
+ return "combination 2";
28
+ case 9:
29
+ return "combination 3";
30
+ case 10:
31
+ return "combination 4";
32
+ case 11:
33
+ return "combination 5";
34
+ case 12:
35
+ return "combination 6";
36
+ case 13:
37
+ return "combination 7";
38
+ case 14:
39
+ return "combination 8";
40
+ case 15:
41
+ return "combination 9";
42
+ case 16:
43
+ return "combination 10";
44
+ case 17:
45
+ return "combination 11";
46
+ case 18:
47
+ return "combination 12";
48
+ case 19:
49
+ return "combination 13";
50
+ case 20:
51
+ return "combination 14";
52
+ default:
53
+ return "blue";
54
+ }
55
+ }
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "module": "./esm/mod.js",
3
3
  "main": "./script/mod.js",
4
4
  "name": "@mtkruto/node",
5
- "version": "0.1.112",
5
+ "version": "0.1.114",
6
6
  "description": "MTKruto for Node.js",
7
7
  "author": "Roj <rojvv@icloud.com>",
8
8
  "license": "LGPL-3.0-or-later",
@@ -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/script/0_deps.js CHANGED
@@ -10,12 +10,28 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
10
10
  if (k2 === undefined) k2 = k;
11
11
  o[k2] = m[k];
12
12
  }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
13
18
  var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
19
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
20
  };
21
+ var __importStar = (this && this.__importStar) || function (mod) {
22
+ if (mod && mod.__esModule) return mod;
23
+ var result = {};
24
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
+ __setModuleDefault(result, mod);
26
+ return result;
27
+ };
16
28
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.encodeBase64 = exports.decodeBase64 = exports.debug = exports.Parser = exports.Mutex = exports.gzip = exports.gunzip = exports.initTgCrypto = exports.ige256Encrypt = exports.ige256Decrypt = exports.factorize = exports.ctr256 = void 0;
18
- __exportStar(require("./deps/deno.land/std@0.204.0/assert/mod.js"), exports);
29
+ exports.debug = exports.Parser = exports.Mutex = exports.gzip = exports.gunzip = exports.initTgCrypto = exports.ige256Encrypt = exports.ige256Decrypt = exports.factorize = exports.ctr256 = exports.encodeBase64 = exports.decodeBase64 = exports.path = void 0;
30
+ __exportStar(require("./deps/deno.land/std@0.207.0/assert/mod.js"), exports);
31
+ exports.path = __importStar(require("./deps/deno.land/std@0.207.0/path/mod.js"));
32
+ var base64_js_1 = require("./deps/deno.land/std@0.207.0/encoding/base64.js");
33
+ Object.defineProperty(exports, "decodeBase64", { enumerable: true, get: function () { return base64_js_1.decodeBase64; } });
34
+ Object.defineProperty(exports, "encodeBase64", { enumerable: true, get: function () { return base64_js_1.encodeBase64; } });
19
35
  var mod_js_1 = require("./deps/deno.land/x/tgcrypto@0.3.3/mod.js");
20
36
  Object.defineProperty(exports, "ctr256", { enumerable: true, get: function () { return mod_js_1.ctr256; } });
21
37
  Object.defineProperty(exports, "factorize", { enumerable: true, get: function () { return mod_js_1.factorize; } });
@@ -32,6 +48,3 @@ Object.defineProperty(exports, "Parser", { enumerable: true, get: function () {
32
48
  const mod_js_3 = require("./deps/raw.githubusercontent.com/MTKruto/debug/main/mod.js");
33
49
  const debug = (v) => (0, mod_js_3.debug)(v);
34
50
  exports.debug = debug;
35
- var base64_js_1 = require("./deps/deno.land/std@0.204.0/encoding/base64.js");
36
- Object.defineProperty(exports, "decodeBase64", { enumerable: true, get: function () { return base64_js_1.decodeBase64; } });
37
- Object.defineProperty(exports, "encodeBase64", { enumerable: true, get: function () { return base64_js_1.encodeBase64; } });
@@ -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";
@@ -17,6 +17,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./utilities/0_base64.js"), exports);
18
18
  __exportStar(require("./utilities/0_bigint.js"), exports);
19
19
  __exportStar(require("./utilities/0_buffer.js"), exports);
20
+ __exportStar(require("./utilities/0_color.js"), exports);
20
21
  __exportStar(require("./utilities/0_control.js"), exports);
21
22
  __exportStar(require("./utilities/0_crypto.js"), exports);
22
23
  __exportStar(require("./utilities/0_hash.js"), exports);
@@ -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/script/3_types.js CHANGED
@@ -20,7 +20,6 @@ __exportStar(require("./types/0_chat_action.js"), exports);
20
20
  __exportStar(require("./types/0_chat_administrator_rights.js"), exports);
21
21
  __exportStar(require("./types/0_chat_id.js"), exports);
22
22
  __exportStar(require("./types/0_chat_photo.js"), exports);
23
- __exportStar(require("./types/0_color.js"), exports);
24
23
  __exportStar(require("./types/0_contact.js"), exports);
25
24
  __exportStar(require("./types/0_dice.js"), exports);
26
25
  __exportStar(require("./types/0__file_id.js"), exports);
@@ -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 = "";
@@ -80,7 +80,7 @@ exports.PUBLIC_KEYS = Object.freeze([
80
80
  exports.VECTOR_CONSTRUCTOR = 0x1CB5C415;
81
81
  exports.INITIAL_DC = "2";
82
82
  exports.LAYER = 166;
83
- exports.APP_VERSION = "MTKruto 0.1.112";
83
+ exports.APP_VERSION = "MTKruto 0.1.114";
84
84
  // @ts-ignore: lib
85
85
  exports.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;
86
86
  exports.LANG_CODE = typeof navigator === "undefined" ? "en" : navigator.language.split("-")[0];
@@ -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";
@@ -16,4 +16,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./client/2_client_plain.js"), exports);
18
18
  __exportStar(require("./client/3_types.js"), exports);
19
- __exportStar(require("./client/4_client.js"), exports);
19
+ __exportStar(require("./client/5_client.js"), exports);
20
+ __exportStar(require("./client/6_composer.js"), exports);
@@ -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,6 +1,32 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
2
25
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isChannelPtsUpdate = exports.isPtsUpdate = exports.resolve = void 0;
26
+ exports.isHttpUrl = exports.getFileContents = exports.isChannelPtsUpdate = exports.isPtsUpdate = exports.resolve = void 0;
27
+ const dntShim = __importStar(require("../_dnt.shims.js"));
28
+ const _0_deps_js_1 = require("../0_deps.js");
29
+ const _1_utilities_js_1 = require("../1_utilities.js");
4
30
  const _2_tl_js_1 = require("../2_tl.js");
5
31
  const resolve = () => Promise.resolve();
6
32
  exports.resolve = resolve;
@@ -27,3 +53,55 @@ function isChannelPtsUpdate(v) {
27
53
  v instanceof _2_tl_js_1.types.UpdateDeleteChannelMessages;
28
54
  }
29
55
  exports.isChannelPtsUpdate = isChannelPtsUpdate;
56
+ async function getFileContents(source, fileName = "") {
57
+ fileName = fileName.trim() || "file";
58
+ let contents;
59
+ if (source instanceof Uint8Array) {
60
+ contents = source;
61
+ }
62
+ else {
63
+ let url;
64
+ try {
65
+ url = new URL(source).toString();
66
+ }
67
+ catch {
68
+ if (typeof source === "string") {
69
+ let path_;
70
+ if (_0_deps_js_1.path.isAbsolute(source)) {
71
+ path_ = source;
72
+ }
73
+ else {
74
+ // @ts-ignore: lib
75
+ path_ = _0_deps_js_1.path.join(dntShim.Deno.cwd(), source);
76
+ }
77
+ url = _0_deps_js_1.path.toFileUrl(path_).toString();
78
+ fileName = _0_deps_js_1.path.basename(path_);
79
+ }
80
+ else {
81
+ (0, _1_utilities_js_1.UNREACHABLE)();
82
+ }
83
+ }
84
+ const res = await fetch(url);
85
+ if (fileName == "file") {
86
+ const contentType = res.headers.get("content-type");
87
+ if (contentType?.includes("image/png")) {
88
+ fileName += ".png";
89
+ }
90
+ else if (contentType?.includes("image/jpeg")) {
91
+ fileName += ".jpg";
92
+ }
93
+ }
94
+ contents = await res.arrayBuffer().then((v) => new Uint8Array(v));
95
+ }
96
+ return [contents, fileName];
97
+ }
98
+ exports.getFileContents = getFileContents;
99
+ function isHttpUrl(string) {
100
+ try {
101
+ return new URL(string).protocol.startsWith("http");
102
+ }
103
+ catch {
104
+ return false;
105
+ }
106
+ }
107
+ exports.isHttpUrl = isHttpUrl;
@@ -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,5 +1,2 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.skip = void 0;
4
- const skip = (__, _) => _();
5
- exports.skip = skip;
@@ -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,88 @@
1
+ "use strict";
2
+ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
3
+ if (kind === "m") throw new TypeError("Private method is not writable");
4
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
5
+ 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");
6
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
7
+ };
8
+ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
9
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
10
+ 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");
11
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
12
+ };
13
+ var _Composer_handle;
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.Composer = exports.skip = exports.concat = exports.flatten = void 0;
16
+ function flatten(mw) {
17
+ return typeof mw === "function" ? mw : (ctx, next) => mw.middleware()(ctx, next);
18
+ }
19
+ exports.flatten = flatten;
20
+ function concat(left, right) {
21
+ return async (ctx, next) => {
22
+ let called = false;
23
+ await left(ctx, async () => {
24
+ if (called) {
25
+ return;
26
+ }
27
+ else {
28
+ called = true;
29
+ await right(ctx, next);
30
+ }
31
+ });
32
+ };
33
+ }
34
+ exports.concat = concat;
35
+ const skip = (_ctx, next) => next();
36
+ exports.skip = skip;
37
+ class Composer {
38
+ constructor(...middleware) {
39
+ _Composer_handle.set(this, void 0);
40
+ __classPrivateFieldSet(this, _Composer_handle, middleware.length == 0 ? exports.skip : middleware.map(flatten).reduce(concat), "f");
41
+ }
42
+ middleware() {
43
+ return __classPrivateFieldGet(this, _Composer_handle, "f");
44
+ }
45
+ use(...middleware) {
46
+ const composer = new Composer(...middleware);
47
+ __classPrivateFieldSet(this, _Composer_handle, concat(__classPrivateFieldGet(this, _Composer_handle, "f"), flatten(composer)), "f");
48
+ return composer;
49
+ }
50
+ branch(predicate, trueHandler_, falseHandler_) {
51
+ const trueHandler = flatten(trueHandler_);
52
+ const falseHandler = flatten(falseHandler_);
53
+ return this.use(async (upd, next) => {
54
+ if (await predicate(upd)) {
55
+ await trueHandler(upd, next);
56
+ }
57
+ else {
58
+ await falseHandler(upd, next);
59
+ }
60
+ });
61
+ }
62
+ filter(predicate, ...middleware) {
63
+ return this.branch(predicate, middleware.length == 0 ? exports.skip : middleware.map(flatten).reduce(concat), exports.skip);
64
+ }
65
+ on(filter, ...middleawre) {
66
+ const type = typeof filter === "string" ? filter : filter[0];
67
+ const keys = Array.isArray(filter) ? filter.slice(1) : [];
68
+ return this.filter((ctx) => {
69
+ if (type in ctx) {
70
+ if (keys.length > 0) {
71
+ for (const key of keys) {
72
+ // deno-lint-ignore ban-ts-comment
73
+ // @ts-ignore
74
+ if (!(key in ctx[type])) {
75
+ return false;
76
+ }
77
+ }
78
+ }
79
+ return true;
80
+ }
81
+ else {
82
+ return false;
83
+ }
84
+ }, ...middleawre);
85
+ }
86
+ }
87
+ exports.Composer = Composer;
88
+ _Composer_handle = new WeakMap();