@mtkruto/node 0.66.8 → 0.67.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (251) hide show
  1. package/esm/3_types.d.ts +3 -1
  2. package/esm/3_types.d.ts.map +1 -1
  3. package/esm/3_types.js +3 -1
  4. package/esm/client/0_params.d.ts +27 -8
  5. package/esm/client/0_params.d.ts.map +1 -1
  6. package/esm/client/2_account_manager.d.ts.map +1 -1
  7. package/esm/client/2_account_manager.js +2 -3
  8. package/esm/client/2_update_manager.d.ts.map +1 -1
  9. package/esm/client/2_update_manager.js +8 -12
  10. package/esm/client/3_message_manager.d.ts +2 -1
  11. package/esm/client/3_message_manager.d.ts.map +1 -1
  12. package/esm/client/3_message_manager.js +43 -12
  13. package/esm/client/3_video_chat_manager.d.ts +1 -1
  14. package/esm/client/3_video_chat_manager.d.ts.map +1 -1
  15. package/esm/client/3_video_chat_manager.js +2 -2
  16. package/esm/client/4_callback_query_manager.d.ts +1 -1
  17. package/esm/client/4_callback_query_manager.d.ts.map +1 -1
  18. package/esm/client/4_callback_query_manager.js +2 -2
  19. package/esm/client/4_chat_list_manager.js +6 -6
  20. package/esm/client/4_chat_manager.d.ts.map +1 -1
  21. package/esm/client/4_chat_manager.js +5 -6
  22. package/esm/client/4_inline_query_manager.d.ts +1 -1
  23. package/esm/client/4_inline_query_manager.js +2 -2
  24. package/esm/client/5_client.d.ts +125 -115
  25. package/esm/client/5_client.d.ts.map +1 -1
  26. package/esm/client/5_client.js +129 -117
  27. package/esm/deps/jsr.io/@std/assert/1.0.13/equals.js +4 -4
  28. package/{script/deps/jsr.io/@std/internal/1.0.8 → esm/deps/jsr.io/@std/internal/1.0.9}/build_message.d.ts.map +1 -1
  29. package/esm/deps/jsr.io/@std/internal/{1.0.8 → 1.0.9}/diff.d.ts.map +1 -1
  30. package/esm/deps/jsr.io/@std/internal/{1.0.8 → 1.0.9}/diff_str.d.ts.map +1 -1
  31. package/esm/deps/jsr.io/@std/internal/{1.0.8 → 1.0.9}/format.d.ts.map +1 -1
  32. package/esm/deps/jsr.io/@std/internal/{1.0.8 → 1.0.9}/styles.d.ts.map +1 -1
  33. package/esm/deps/jsr.io/@std/internal/{1.0.8 → 1.0.9}/types.d.ts.map +1 -1
  34. package/esm/types/0_chat_member_rights.d.ts +1 -1
  35. package/esm/types/0_chat_member_rights.d.ts.map +1 -1
  36. package/esm/types/0_chat_member_rights.js +3 -3
  37. package/esm/types/0_giveaway_parameters.d.ts +1 -1
  38. package/esm/types/0_giveaway_parameters.d.ts.map +1 -1
  39. package/esm/types/0_giveaway_parameters.js +1 -2
  40. package/esm/types/{0_mini_app_info.d.ts → 0_mini_app_button_info.d.ts} +3 -4
  41. package/esm/types/0_mini_app_button_info.d.ts.map +1 -0
  42. package/esm/types/{0_mini_app_info.js → 0_mini_app_button_info.js} +1 -1
  43. package/esm/types/0_mini_app_mode.d.ts +22 -0
  44. package/esm/types/0_mini_app_mode.d.ts.map +1 -0
  45. package/esm/types/0_mini_app_mode.js +20 -0
  46. package/esm/types/0_video_chat.d.ts +1 -1
  47. package/esm/types/0_video_chat.d.ts.map +1 -1
  48. package/esm/types/0_video_chat.js +1 -2
  49. package/esm/types/1_inline_query_result_button.d.ts +2 -2
  50. package/esm/types/1_inline_query_result_button.d.ts.map +1 -1
  51. package/esm/types/1_keyboard_button.d.ts +2 -2
  52. package/esm/types/1_keyboard_button.d.ts.map +1 -1
  53. package/esm/types/1_mini_app_info.d.ts +32 -0
  54. package/esm/types/1_mini_app_info.d.ts.map +1 -0
  55. package/esm/types/1_mini_app_info.js +27 -0
  56. package/esm/types/2_business_connection.d.ts +1 -1
  57. package/esm/types/2_business_connection.d.ts.map +1 -1
  58. package/esm/types/2_business_connection.js +1 -2
  59. package/esm/types/2_chat_member.d.ts +3 -3
  60. package/esm/types/2_chat_member.d.ts.map +1 -1
  61. package/esm/types/2_chat_member.js +6 -6
  62. package/esm/types/2_chat_settings.d.ts +3 -3
  63. package/esm/types/2_chat_settings.d.ts.map +1 -1
  64. package/esm/types/2_chat_settings.js +4 -4
  65. package/esm/types/2_forward_header.d.ts +1 -1
  66. package/esm/types/2_forward_header.d.ts.map +1 -1
  67. package/esm/types/2_forward_header.js +6 -6
  68. package/esm/types/2_gift_upgraded_component.d.ts +1 -1
  69. package/esm/types/2_gift_upgraded_component.d.ts.map +1 -1
  70. package/esm/types/2_gift_upgraded_component.js +2 -2
  71. package/esm/types/2_inactive_chat.d.ts +1 -1
  72. package/esm/types/2_inactive_chat.d.ts.map +1 -1
  73. package/esm/types/2_inactive_chat.js +1 -2
  74. package/esm/types/2_inline_keyboard_button.d.ts +2 -2
  75. package/esm/types/2_inline_keyboard_button.d.ts.map +1 -1
  76. package/esm/types/2_inline_keyboard_button.js +2 -2
  77. package/esm/types/2_invite_link.d.ts +1 -1
  78. package/esm/types/2_invite_link.d.ts.map +1 -1
  79. package/esm/types/2_invite_link.js +2 -2
  80. package/esm/types/2_message_reaction_count.d.ts +1 -1
  81. package/esm/types/2_message_reaction_count.d.ts.map +1 -1
  82. package/esm/types/2_message_reaction_count.js +1 -2
  83. package/esm/types/2_message_reactions.d.ts +1 -1
  84. package/esm/types/2_message_reactions.d.ts.map +1 -1
  85. package/esm/types/2_message_reactions.js +2 -2
  86. package/esm/types/2_poll.d.ts +1 -1
  87. package/esm/types/2_poll.d.ts.map +1 -1
  88. package/esm/types/2_poll.js +1 -1
  89. package/esm/types/3_chat_member_updated.d.ts +1 -1
  90. package/esm/types/3_chat_member_updated.d.ts.map +1 -1
  91. package/esm/types/3_chat_member_updated.js +2 -2
  92. package/esm/types/3_gift.d.ts +2 -2
  93. package/esm/types/3_gift.d.ts.map +1 -1
  94. package/esm/types/3_gift.js +3 -3
  95. package/esm/types/3_join_request.d.ts +1 -1
  96. package/esm/types/3_join_request.d.ts.map +1 -1
  97. package/esm/types/3_join_request.js +3 -3
  98. package/esm/types/3_story.d.ts +1 -1
  99. package/esm/types/3_story.d.ts.map +1 -1
  100. package/esm/types/3_story.js +2 -2
  101. package/esm/types/4_claimed_gift.d.ts +1 -1
  102. package/esm/types/4_claimed_gift.d.ts.map +1 -1
  103. package/esm/types/4_claimed_gift.js +2 -2
  104. package/esm/types/4_link_preview.d.ts +1 -1
  105. package/esm/types/4_link_preview.d.ts.map +1 -1
  106. package/esm/types/4_link_preview.js +2 -2
  107. package/esm/types/5_message.d.ts +3 -3
  108. package/esm/types/5_message.d.ts.map +1 -1
  109. package/esm/types/5_message.js +6 -6
  110. package/esm/types/6_chat_list_item.js +1 -1
  111. package/esm/types/6_topic.d.ts +1 -1
  112. package/esm/types/6_topic.d.ts.map +1 -1
  113. package/package.json +1 -1
  114. package/script/3_types.d.ts +3 -1
  115. package/script/3_types.d.ts.map +1 -1
  116. package/script/3_types.js +3 -1
  117. package/script/client/0_params.d.ts +27 -8
  118. package/script/client/0_params.d.ts.map +1 -1
  119. package/script/client/2_account_manager.d.ts.map +1 -1
  120. package/script/client/2_account_manager.js +2 -3
  121. package/script/client/2_update_manager.d.ts.map +1 -1
  122. package/script/client/2_update_manager.js +8 -12
  123. package/script/client/3_message_manager.d.ts +2 -1
  124. package/script/client/3_message_manager.d.ts.map +1 -1
  125. package/script/client/3_message_manager.js +41 -10
  126. package/script/client/3_video_chat_manager.d.ts +1 -1
  127. package/script/client/3_video_chat_manager.d.ts.map +1 -1
  128. package/script/client/3_video_chat_manager.js +1 -1
  129. package/script/client/4_callback_query_manager.d.ts +1 -1
  130. package/script/client/4_callback_query_manager.d.ts.map +1 -1
  131. package/script/client/4_callback_query_manager.js +2 -2
  132. package/script/client/4_chat_list_manager.js +5 -5
  133. package/script/client/4_chat_manager.d.ts.map +1 -1
  134. package/script/client/4_chat_manager.js +5 -6
  135. package/script/client/4_inline_query_manager.d.ts +1 -1
  136. package/script/client/4_inline_query_manager.js +2 -2
  137. package/script/client/5_client.d.ts +125 -115
  138. package/script/client/5_client.d.ts.map +1 -1
  139. package/script/client/5_client.js +129 -117
  140. package/script/deps/jsr.io/@std/assert/1.0.13/equals.js +4 -4
  141. package/{esm/deps/jsr.io/@std/internal/1.0.8 → script/deps/jsr.io/@std/internal/1.0.9}/build_message.d.ts.map +1 -1
  142. package/script/deps/jsr.io/@std/internal/{1.0.8 → 1.0.9}/diff.d.ts.map +1 -1
  143. package/script/deps/jsr.io/@std/internal/{1.0.8 → 1.0.9}/diff_str.d.ts.map +1 -1
  144. package/script/deps/jsr.io/@std/internal/{1.0.8 → 1.0.9}/format.d.ts.map +1 -1
  145. package/script/deps/jsr.io/@std/internal/{1.0.8 → 1.0.9}/styles.d.ts.map +1 -1
  146. package/script/deps/jsr.io/@std/internal/{1.0.8 → 1.0.9}/types.d.ts.map +1 -1
  147. package/script/types/0_chat_member_rights.d.ts +1 -1
  148. package/script/types/0_chat_member_rights.d.ts.map +1 -1
  149. package/script/types/0_chat_member_rights.js +2 -2
  150. package/script/types/0_giveaway_parameters.d.ts +1 -1
  151. package/script/types/0_giveaway_parameters.d.ts.map +1 -1
  152. package/script/types/0_giveaway_parameters.js +1 -2
  153. package/script/types/{0_mini_app_info.d.ts → 0_mini_app_button_info.d.ts} +3 -4
  154. package/script/types/0_mini_app_button_info.d.ts.map +1 -0
  155. package/script/types/{0_mini_app_info.js → 0_mini_app_button_info.js} +2 -2
  156. package/script/types/0_mini_app_mode.d.ts +22 -0
  157. package/script/types/0_mini_app_mode.d.ts.map +1 -0
  158. package/script/types/0_mini_app_mode.js +21 -0
  159. package/script/types/0_video_chat.d.ts +1 -1
  160. package/script/types/0_video_chat.d.ts.map +1 -1
  161. package/script/types/0_video_chat.js +1 -2
  162. package/script/types/1_inline_query_result_button.d.ts +2 -2
  163. package/script/types/1_inline_query_result_button.d.ts.map +1 -1
  164. package/script/types/1_keyboard_button.d.ts +2 -2
  165. package/script/types/1_keyboard_button.d.ts.map +1 -1
  166. package/script/types/1_mini_app_info.d.ts +32 -0
  167. package/script/types/1_mini_app_info.d.ts.map +1 -0
  168. package/script/types/1_mini_app_info.js +30 -0
  169. package/script/types/2_business_connection.d.ts +1 -1
  170. package/script/types/2_business_connection.d.ts.map +1 -1
  171. package/script/types/2_business_connection.js +1 -2
  172. package/script/types/2_chat_member.d.ts +3 -3
  173. package/script/types/2_chat_member.d.ts.map +1 -1
  174. package/script/types/2_chat_member.js +5 -5
  175. package/script/types/2_chat_settings.d.ts +3 -3
  176. package/script/types/2_chat_settings.d.ts.map +1 -1
  177. package/script/types/2_chat_settings.js +3 -3
  178. package/script/types/2_forward_header.d.ts +1 -1
  179. package/script/types/2_forward_header.d.ts.map +1 -1
  180. package/script/types/2_forward_header.js +5 -5
  181. package/script/types/2_gift_upgraded_component.d.ts +1 -1
  182. package/script/types/2_gift_upgraded_component.d.ts.map +1 -1
  183. package/script/types/2_gift_upgraded_component.js +1 -1
  184. package/script/types/2_inactive_chat.d.ts +1 -1
  185. package/script/types/2_inactive_chat.d.ts.map +1 -1
  186. package/script/types/2_inactive_chat.js +1 -2
  187. package/script/types/2_inline_keyboard_button.d.ts +2 -2
  188. package/script/types/2_inline_keyboard_button.d.ts.map +1 -1
  189. package/script/types/2_inline_keyboard_button.js +2 -2
  190. package/script/types/2_invite_link.d.ts +1 -1
  191. package/script/types/2_invite_link.d.ts.map +1 -1
  192. package/script/types/2_invite_link.js +1 -1
  193. package/script/types/2_message_reaction_count.d.ts +1 -1
  194. package/script/types/2_message_reaction_count.d.ts.map +1 -1
  195. package/script/types/2_message_reaction_count.js +1 -2
  196. package/script/types/2_message_reactions.d.ts +1 -1
  197. package/script/types/2_message_reactions.d.ts.map +1 -1
  198. package/script/types/2_message_reactions.js +1 -1
  199. package/script/types/2_poll.d.ts +1 -1
  200. package/script/types/2_poll.d.ts.map +1 -1
  201. package/script/types/2_poll.js +1 -1
  202. package/script/types/3_chat_member_updated.d.ts +1 -1
  203. package/script/types/3_chat_member_updated.d.ts.map +1 -1
  204. package/script/types/3_chat_member_updated.js +1 -1
  205. package/script/types/3_gift.d.ts +2 -2
  206. package/script/types/3_gift.d.ts.map +1 -1
  207. package/script/types/3_gift.js +2 -2
  208. package/script/types/3_join_request.d.ts +1 -1
  209. package/script/types/3_join_request.d.ts.map +1 -1
  210. package/script/types/3_join_request.js +2 -2
  211. package/script/types/3_story.d.ts +1 -1
  212. package/script/types/3_story.d.ts.map +1 -1
  213. package/script/types/3_story.js +1 -1
  214. package/script/types/4_claimed_gift.d.ts +1 -1
  215. package/script/types/4_claimed_gift.d.ts.map +1 -1
  216. package/script/types/4_claimed_gift.js +1 -1
  217. package/script/types/4_link_preview.d.ts +1 -1
  218. package/script/types/4_link_preview.d.ts.map +1 -1
  219. package/script/types/4_link_preview.js +1 -1
  220. package/script/types/5_message.d.ts +3 -3
  221. package/script/types/5_message.d.ts.map +1 -1
  222. package/script/types/5_message.js +5 -5
  223. package/script/types/6_chat_list_item.js +1 -1
  224. package/script/types/6_topic.d.ts +1 -1
  225. package/script/types/6_topic.d.ts.map +1 -1
  226. package/esm/types/0_mini_app_info.d.ts.map +0 -1
  227. package/script/types/0_mini_app_info.d.ts.map +0 -1
  228. /package/esm/deps/jsr.io/@std/internal/{1.0.8 → 1.0.9}/build_message.d.ts +0 -0
  229. /package/esm/deps/jsr.io/@std/internal/{1.0.8 → 1.0.9}/build_message.js +0 -0
  230. /package/esm/deps/jsr.io/@std/internal/{1.0.8 → 1.0.9}/diff.d.ts +0 -0
  231. /package/esm/deps/jsr.io/@std/internal/{1.0.8 → 1.0.9}/diff.js +0 -0
  232. /package/esm/deps/jsr.io/@std/internal/{1.0.8 → 1.0.9}/diff_str.d.ts +0 -0
  233. /package/esm/deps/jsr.io/@std/internal/{1.0.8 → 1.0.9}/diff_str.js +0 -0
  234. /package/esm/deps/jsr.io/@std/internal/{1.0.8 → 1.0.9}/format.d.ts +0 -0
  235. /package/esm/deps/jsr.io/@std/internal/{1.0.8 → 1.0.9}/format.js +0 -0
  236. /package/esm/deps/jsr.io/@std/internal/{1.0.8 → 1.0.9}/styles.d.ts +0 -0
  237. /package/esm/deps/jsr.io/@std/internal/{1.0.8 → 1.0.9}/styles.js +0 -0
  238. /package/esm/deps/jsr.io/@std/internal/{1.0.8 → 1.0.9}/types.d.ts +0 -0
  239. /package/esm/deps/jsr.io/@std/internal/{1.0.8 → 1.0.9}/types.js +0 -0
  240. /package/script/deps/jsr.io/@std/internal/{1.0.8 → 1.0.9}/build_message.d.ts +0 -0
  241. /package/script/deps/jsr.io/@std/internal/{1.0.8 → 1.0.9}/build_message.js +0 -0
  242. /package/script/deps/jsr.io/@std/internal/{1.0.8 → 1.0.9}/diff.d.ts +0 -0
  243. /package/script/deps/jsr.io/@std/internal/{1.0.8 → 1.0.9}/diff.js +0 -0
  244. /package/script/deps/jsr.io/@std/internal/{1.0.8 → 1.0.9}/diff_str.d.ts +0 -0
  245. /package/script/deps/jsr.io/@std/internal/{1.0.8 → 1.0.9}/diff_str.js +0 -0
  246. /package/script/deps/jsr.io/@std/internal/{1.0.8 → 1.0.9}/format.d.ts +0 -0
  247. /package/script/deps/jsr.io/@std/internal/{1.0.8 → 1.0.9}/format.js +0 -0
  248. /package/script/deps/jsr.io/@std/internal/{1.0.8 → 1.0.9}/styles.d.ts +0 -0
  249. /package/script/deps/jsr.io/@std/internal/{1.0.8 → 1.0.9}/styles.js +0 -0
  250. /package/script/deps/jsr.io/@std/internal/{1.0.8 → 1.0.9}/types.d.ts +0 -0
  251. /package/script/deps/jsr.io/@std/internal/{1.0.8 → 1.0.9}/types.js +0 -0
@@ -1077,14 +1077,14 @@ export class Client extends Composer {
1077
1077
  /**
1078
1078
  * Get a chat's inputPeer. Useful when calling API functions directly.
1079
1079
  *
1080
- * @param id The identifier of the chat.
1080
+ * @param id The identifier of a chat.
1081
1081
  */
1082
1082
  async getInputPeer(id) {
1083
1083
  if (id === "me" || id == await __classPrivateFieldGet(this, _Client_instances, "m", _Client_getSelfId).call(this)) {
1084
1084
  return { _: "inputPeerSelf" };
1085
1085
  }
1086
1086
  const inputPeer = await __classPrivateFieldGet(this, _Client_instances, "m", _Client_getInputPeerInner).call(this, id);
1087
- if (((Api.is("inputPeerUser", inputPeer) || Api.is("inputPeerChannel", inputPeer)) && inputPeer.access_hash == 0n) && await this.storage.getAccountType() == "bot") {
1087
+ if (((Api.is("inputPeerUser", inputPeer) || Api.is("inputPeerChannel", inputPeer)) && inputPeer.access_hash == 0n) && await this.storage.getAccountType() == "user") {
1088
1088
  if ("channel_id" in inputPeer) {
1089
1089
  inputPeer.access_hash = await __classPrivateFieldGet(this, _Client_instances, "m", _Client_getChannelAccessHash).call(this, inputPeer.channel_id);
1090
1090
  }
@@ -1344,14 +1344,14 @@ export class Client extends Composer {
1344
1344
  }
1345
1345
  }, _Client_getUserAccessHash = async function _Client_getUserAccessHash(userId) {
1346
1346
  const users = await this.invoke({ _: "users.getUsers", id: [{ _: "inputUser", user_id: userId, access_hash: 0n }] });
1347
- const user = Api.as("user", users[0]);
1347
+ const user = Api.is("user", users[0]) ? users[0] : undefined;
1348
1348
  if (user) {
1349
1349
  await this.messageStorage.setEntity(user);
1350
1350
  }
1351
1351
  return user?.access_hash ?? 0n;
1352
1352
  }, _Client_getChannelAccessHash = async function _Client_getChannelAccessHash(channelId) {
1353
1353
  const channels = await this.invoke({ _: "channels.getChannels", id: [{ _: "inputChannel", channel_id: channelId, access_hash: 0n }] });
1354
- const channel = Api.as("channel", channels.chats[0]);
1354
+ const channel = Api.is("channel", channels.chats[0]) ? channels.chats[0] : undefined;
1355
1355
  if (channel) {
1356
1356
  await this.messageStorage.setEntity(channel);
1357
1357
  }
@@ -1613,7 +1613,7 @@ export class Client extends Composer {
1613
1613
  * Send a text message.
1614
1614
  *
1615
1615
  * @method ms
1616
- * @param chatId The chat to send the message to.
1616
+ * @param chatId The identifier of a chat to send the message to.
1617
1617
  * @param text The message's text.
1618
1618
  * @returns The sent text message.
1619
1619
  */
@@ -1624,7 +1624,7 @@ export class Client extends Composer {
1624
1624
  * Send a photo.
1625
1625
  *
1626
1626
  * @method ms
1627
- * @param chatId The chat to send the photo to.
1627
+ * @param chatId The identifier of a chat to send the photo to.
1628
1628
  * @param photo The photo to send.
1629
1629
  * @returns The sent photo.
1630
1630
  */
@@ -1635,7 +1635,7 @@ export class Client extends Composer {
1635
1635
  * Send a document.
1636
1636
  *
1637
1637
  * @method ms
1638
- * @param chatId The chat to send the document to.
1638
+ * @param chatId The identifier of a chat to send the document to.
1639
1639
  * @param document The document to send.
1640
1640
  * @returns The sent document.
1641
1641
  */
@@ -1646,7 +1646,7 @@ export class Client extends Composer {
1646
1646
  * Send a sticker.
1647
1647
  *
1648
1648
  * @method ms
1649
- * @param chatId The chat to send the sticker to.
1649
+ * @param chatId The identifier of a chat to send the sticker to.
1650
1650
  * @param document The sticker to send.
1651
1651
  * @returns The sent sticker.
1652
1652
  */
@@ -1657,7 +1657,7 @@ export class Client extends Composer {
1657
1657
  * Send a video.
1658
1658
  *
1659
1659
  * @method ms
1660
- * @param chatId The chat to send the video to.
1660
+ * @param chatId The identifier of a chat to send the video to.
1661
1661
  * @param video The video to send.
1662
1662
  * @returns The sent video.
1663
1663
  */
@@ -1668,7 +1668,7 @@ export class Client extends Composer {
1668
1668
  * Send an animation.
1669
1669
  *
1670
1670
  * @method ms
1671
- * @param chatId The chat to send the animation to.
1671
+ * @param chatId The identifier of a chat to send the animation to.
1672
1672
  * @param animation The animation to send.
1673
1673
  * @returns The sent animation.
1674
1674
  */
@@ -1679,7 +1679,7 @@ export class Client extends Composer {
1679
1679
  * Send a voice message.
1680
1680
  *
1681
1681
  * @method ms
1682
- * @param chatId The chat to send the voice message to.
1682
+ * @param chatId The identifier of a chat to send the voice message to.
1683
1683
  * @param voice The voice to send.
1684
1684
  * @returns The sent voice message.
1685
1685
  */
@@ -1690,7 +1690,7 @@ export class Client extends Composer {
1690
1690
  * Send an audio file.
1691
1691
  *
1692
1692
  * @method ms
1693
- * @param chatId The chat to send the audio file to.
1693
+ * @param chatId The identifier of a chat to send the audio file to.
1694
1694
  * @param audio The audio to send.
1695
1695
  * @returns The sent audio filr.
1696
1696
  */
@@ -1701,7 +1701,7 @@ export class Client extends Composer {
1701
1701
  * Send a media group.
1702
1702
  *
1703
1703
  * @method ms
1704
- * @param chatId The chat to send the media group to.
1704
+ * @param chatId The identifier of a chat to send the media group to.
1705
1705
  * @param media The media to include in the media group. Animations are not allowed. All of them must be of the same media type, but an exception is that photos and videos can be mixed.
1706
1706
  * @returns The sent messages.
1707
1707
  */
@@ -1712,7 +1712,7 @@ export class Client extends Composer {
1712
1712
  * Send a video note.
1713
1713
  *
1714
1714
  * @method ms
1715
- * @param chatId The chat to send the video note to.
1715
+ * @param chatId The identifier of a chat to send the video note to.
1716
1716
  * @param videoNote The video note to send.
1717
1717
  * @returns The sent video note.
1718
1718
  */
@@ -1723,7 +1723,7 @@ export class Client extends Composer {
1723
1723
  * Send a location.
1724
1724
  *
1725
1725
  * @method ms
1726
- * @param chatId The chat to send the location to.
1726
+ * @param chatId The identifier of a chat to send the location to.
1727
1727
  * @param latitude The location's latitude.
1728
1728
  * @param longitude The location's longitude.
1729
1729
  * @returns The sent location.
@@ -1735,7 +1735,7 @@ export class Client extends Composer {
1735
1735
  * Send a contact.
1736
1736
  *
1737
1737
  * @method ms
1738
- * @param chatId The chat to send the contact to.
1738
+ * @param chatId The identifier of a chat to send the contact to.
1739
1739
  * @param firstName The contact's first name.
1740
1740
  * @param number The contact's phone number.
1741
1741
  * @returns The sent contact.
@@ -1747,7 +1747,7 @@ export class Client extends Composer {
1747
1747
  * Send a dice.
1748
1748
  *
1749
1749
  * @method ms
1750
- * @param chatId The chat to send the dice to.
1750
+ * @param chatId The identifier of a chat to send the dice to.
1751
1751
  * @returns The sent dice.
1752
1752
  */
1753
1753
  async sendDice(chatId, params) {
@@ -1757,7 +1757,7 @@ export class Client extends Composer {
1757
1757
  * Send a venue.
1758
1758
  *
1759
1759
  * @method ms
1760
- * @param chatId The chat to send the venue to.
1760
+ * @param chatId The identifier of a chat to send the venue to.
1761
1761
  * @param latitude The latitude of the venue.
1762
1762
  * @param longitude The longitude of the venue.
1763
1763
  * @param title The title of the venue.
@@ -1771,7 +1771,7 @@ export class Client extends Composer {
1771
1771
  * Send a poll.
1772
1772
  *
1773
1773
  * @method ms
1774
- * @param chatId The chat to send the poll to.
1774
+ * @param chatId The identifier of a chat to send the poll to.
1775
1775
  * @param question The poll's question.
1776
1776
  * @param options The poll's options.
1777
1777
  * @returns The sent poll.
@@ -1783,7 +1783,7 @@ export class Client extends Composer {
1783
1783
  * Send an invoice. Bot-only.
1784
1784
  *
1785
1785
  * @method ms
1786
- * @param chatId The chat to send the invoice to.
1786
+ * @param chatId The identifier of a chat to send the invoice to.
1787
1787
  * @param title The invoice's title.
1788
1788
  * @param description The invoice's description.
1789
1789
  * @param payload The invoice's payload.
@@ -1798,8 +1798,8 @@ export class Client extends Composer {
1798
1798
  * Edit a message's text.
1799
1799
  *
1800
1800
  * @method ms
1801
- * @param chatId The identifier of the chat that contains the message.
1802
- * @param messageId The message's identifier.
1801
+ * @param chatId The identifier of the chat which the message belongs to.
1802
+ * @param messageId The identifier of the message.
1803
1803
  * @param text The new text of the message.
1804
1804
  * @returns The edited text message.
1805
1805
  */
@@ -1810,8 +1810,8 @@ export class Client extends Composer {
1810
1810
  * Edit a message's caption.
1811
1811
  *
1812
1812
  * @method ms
1813
- * @param chatId The identifier of the chat that contains the message.
1814
- * @param messageId The message's identifier.
1813
+ * @param chatId The identifier of the chat which the message belongs to.
1814
+ * @param messageId The identifier of the message.
1815
1815
  * @param text The new caption of the message.
1816
1816
  * @returns The edited message.
1817
1817
  */
@@ -1822,8 +1822,8 @@ export class Client extends Composer {
1822
1822
  * Edit a message's media.
1823
1823
  *
1824
1824
  * @method ms
1825
- * @param chatId The identifier of the chat that contains the message.
1826
- * @param messageId The message's identifier.
1825
+ * @param chatId The identifier of the chat which the message belongs to.
1826
+ * @param messageId The identifier of the message.
1827
1827
  * @param media The new media of the message.
1828
1828
  * @returns The edited message.
1829
1829
  */
@@ -1834,7 +1834,7 @@ export class Client extends Composer {
1834
1834
  * Edit an inline message's media.
1835
1835
  *
1836
1836
  * @method ms
1837
- * @param inlineMessageId The inline message's identifier.
1837
+ * @param inlineMessageId The identifier of the inline message.
1838
1838
  * @param media The new media of the message.
1839
1839
  */
1840
1840
  async editInlineMessageMedia(inlineMessageId, media, params) {
@@ -1844,7 +1844,7 @@ export class Client extends Composer {
1844
1844
  * Edit an inline message's text. Bot-only.
1845
1845
  *
1846
1846
  * @method ms
1847
- * @param inlineMessageId The inline message's identifier.
1847
+ * @param inlineMessageId The identifier of the inline message.
1848
1848
  * @param text The new text of the message.
1849
1849
  */
1850
1850
  async editInlineMessageText(inlineMessageId, text, params) {
@@ -1854,7 +1854,7 @@ export class Client extends Composer {
1854
1854
  * Edit an inline message's caption. Bot-only.
1855
1855
  *
1856
1856
  * @method ms
1857
- * @param inlineMessageId The inline message's identifier.
1857
+ * @param inlineMessageId The identifier of the inline message.
1858
1858
  */
1859
1859
  async editInlineMessageCaption(inlineMessageId, params) {
1860
1860
  await __classPrivateFieldGet(this, _Client_messageManager, "f").editInlineMessageCaption(inlineMessageId, params);
@@ -1863,8 +1863,8 @@ export class Client extends Composer {
1863
1863
  * Edit a message's reply markup.
1864
1864
  *
1865
1865
  * @method ms
1866
- * @param chatId The identifier of the chat that contains the message.
1867
- * @param messageId The message's identifier.
1866
+ * @param chatId The identifier of the chat which the message belongs to.
1867
+ * @param messageId The identifier of the message.
1868
1868
  * @returns The edited message.
1869
1869
  */
1870
1870
  async editMessageReplyMarkup(chatId, messageId, params) {
@@ -1874,7 +1874,7 @@ export class Client extends Composer {
1874
1874
  * Edit an inline message's reply markup. Bot-only.
1875
1875
  *
1876
1876
  * @method ms
1877
- * @param inlineMessageId The inline message's identifier.
1877
+ * @param inlineMessageId The identifier of the inline message.
1878
1878
  */
1879
1879
  async editInlineMessageReplyMarkup(inlineMessageId, params) {
1880
1880
  await __classPrivateFieldGet(this, _Client_messageManager, "f").editInlineMessageReplyMarkup(inlineMessageId, params);
@@ -1883,8 +1883,8 @@ export class Client extends Composer {
1883
1883
  * Edit a message's live location.
1884
1884
  *
1885
1885
  * @method ms
1886
- * @param chatId The identifier of the chat that contains the messages.
1887
- * @param messageId The message's identifier.
1886
+ * @param chatId The identifier of the chat which the message belongs to.
1887
+ * @param messageId The identifier of the message.
1888
1888
  * @param latitude The new latitude.
1889
1889
  * @param longitude The new longitude.
1890
1890
  * @returns The edited location message.
@@ -1896,7 +1896,7 @@ export class Client extends Composer {
1896
1896
  * Edit an inline message's live location. Bot-only.
1897
1897
  *
1898
1898
  * @method ms
1899
- * @param inlineMessageId The inline message's identifier.
1899
+ * @param inlineMessageId The identifier of the inline message.
1900
1900
  * @param latitude The new latitude.
1901
1901
  * @param longitude The new longitude.
1902
1902
  * @returns The edited location message.
@@ -1908,7 +1908,7 @@ export class Client extends Composer {
1908
1908
  * Retrieve multiple messages.
1909
1909
  *
1910
1910
  * @method ms
1911
- * @param chatId The identifier of the chat to retrieve the messages from.
1911
+ * @param chatId The identifier of a chat to retrieve the messages from.
1912
1912
  * @param messageIds The identifiers of the messages to retrieve.
1913
1913
  * @example ```ts
1914
1914
  * const message = await client.getMessages("@MTKruto", [210, 212]);
@@ -1923,7 +1923,7 @@ export class Client extends Composer {
1923
1923
  * Retrieve a single message.
1924
1924
  *
1925
1925
  * @method ms
1926
- * @param chatId The identifier of the chat to retrieve the message from.
1926
+ * @param chatId The identifier of a chat.
1927
1927
  * @param messageId The identifier of the message to retrieve.
1928
1928
  * @example ```ts
1929
1929
  * const message = await client.getMessage("@MTKruto", 212);
@@ -1951,7 +1951,7 @@ export class Client extends Composer {
1951
1951
  * Delete multiple messages.
1952
1952
  *
1953
1953
  * @method ms
1954
- * @param chatId The identifier of the chat that contains the messages.
1954
+ * @param chatId The identifier of the chat which the message belongs to.
1955
1955
  * @param messageIds The identifiers of the messages to delete.
1956
1956
  */
1957
1957
  async deleteMessages(chatId, messageIds, params) {
@@ -1961,7 +1961,7 @@ export class Client extends Composer {
1961
1961
  * Delete a single message.
1962
1962
  *
1963
1963
  * @method ms
1964
- * @param chatId The identifier of the chat that contains the message.
1964
+ * @param chatId The identifier of the chat which the message belongs to.
1965
1965
  * @param messageId The identifier of the message to delete.
1966
1966
  */
1967
1967
  async deleteMessage(chatId, messageId, params) {
@@ -1971,7 +1971,7 @@ export class Client extends Composer {
1971
1971
  * Delete all messages sent by a specific member of a chat. User-only.
1972
1972
  *
1973
1973
  * @method ms
1974
- * @param chatId The identifier of the chat. Must be a supergroup.
1974
+ * @param chatId The identifier of a chat. Must be a supergroup.
1975
1975
  * @param memberId The identifier of the member.
1976
1976
  */
1977
1977
  async deleteChatMemberMessages(chatId, memberId) {
@@ -1981,7 +1981,7 @@ export class Client extends Composer {
1981
1981
  * Delete multiple scheduled messages.
1982
1982
  *
1983
1983
  * @method ms
1984
- * @param chatId The identifier of the chat that contains the scheduled messages.
1984
+ * @param chatId The identifier of a chat.
1985
1985
  * @param messageIds The identifiers of the scheduled messages to delete.
1986
1986
  */
1987
1987
  async deleteScheduledMessages(chatId, messageIds) {
@@ -1991,7 +1991,7 @@ export class Client extends Composer {
1991
1991
  * Delete a scheduled message.
1992
1992
  *
1993
1993
  * @method ms
1994
- * @param chatId The identifier of the chat that contains the scheduled message.
1994
+ * @param chatId The identifier of a chat.
1995
1995
  * @param messageId The identifier of the scheduled message to delete.
1996
1996
  */
1997
1997
  async deleteScheduledMessage(chatId, messageId) {
@@ -2001,7 +2001,7 @@ export class Client extends Composer {
2001
2001
  * Send multiple scheduled messages before their schedule.
2002
2002
  *
2003
2003
  * @method ms
2004
- * @param chatId The identifier of the chat that contains the scheduled messages.
2004
+ * @param chatId The identifier of a chat.
2005
2005
  * @param messageIds The identifiers of the scheduled messages to send.
2006
2006
  */
2007
2007
  async sendScheduledMessages(chatId, messageIds) {
@@ -2011,7 +2011,7 @@ export class Client extends Composer {
2011
2011
  * Send a scheduled message before its schedule.
2012
2012
  *
2013
2013
  * @method ms
2014
- * @param chatId The identifier of the chat that contains the scheduled message.
2014
+ * @param chatId The identifier of a chat.
2015
2015
  * @param messageId The identifier of the scheduled message to send.
2016
2016
  */
2017
2017
  async sendScheduledMessage(chatId, messageId) {
@@ -2021,8 +2021,8 @@ export class Client extends Composer {
2021
2021
  * Pin a message in a chat.
2022
2022
  *
2023
2023
  * @method ms
2024
- * @param chatId The identifier of the chat that contains the message.
2025
- * @param messageId The message's identifier.
2024
+ * @param chatId The identifier of a chat.
2025
+ * @param messageId The identifier of the message.
2026
2026
  */
2027
2027
  async pinMessage(chatId, messageId, params) {
2028
2028
  await __classPrivateFieldGet(this, _Client_messageManager, "f").pinMessage(chatId, messageId, params);
@@ -2031,8 +2031,8 @@ export class Client extends Composer {
2031
2031
  * Unpin a pinned message.
2032
2032
  *
2033
2033
  * @method ms
2034
- * @param chatId The identifier of the chat that contains the message.
2035
- * @param messageId The message's identifier.
2034
+ * @param chatId The identifier of a chat.
2035
+ * @param messageId The identifier of the message.
2036
2036
  */
2037
2037
  async unpinMessage(chatId, messageId, params) {
2038
2038
  await __classPrivateFieldGet(this, _Client_messageManager, "f").unpinMessage(chatId, messageId, params);
@@ -2041,7 +2041,7 @@ export class Client extends Composer {
2041
2041
  * Unpin all pinned messages.
2042
2042
  *
2043
2043
  * @method ms
2044
- * @param chatId The identifier of the chat.
2044
+ * @param chatId The identifier of a chat.
2045
2045
  */
2046
2046
  async unpinMessages(chatId) {
2047
2047
  await __classPrivateFieldGet(this, _Client_messageManager, "f").unpinMessages(chatId);
@@ -2050,8 +2050,8 @@ export class Client extends Composer {
2050
2050
  * Forward multiple messages.
2051
2051
  *
2052
2052
  * @method ms
2053
- * @param from The identifier of the chat to forward the messages from.
2054
- * @param to The identifier of the chat to forward the messages to.
2053
+ * @param from The identifier of a chat to forward the messages from.
2054
+ * @param to The identifier of a chat to forward the messages to.
2055
2055
  * @param messageIds The identifiers of the messages to forward.
2056
2056
  * @returns The forwarded messages.
2057
2057
  */
@@ -2062,8 +2062,8 @@ export class Client extends Composer {
2062
2062
  * Forward a single message.
2063
2063
  *
2064
2064
  * @method ms
2065
- * @param from The identifier of the chat to forward the message from.
2066
- * @param to The identifier of the chat to forward the message to.
2065
+ * @param from The identifier of a chat to forward the message from.
2066
+ * @param to The identifier of a chat to forward the message to.
2067
2067
  * @param messageId The identifier of the message to forward.
2068
2068
  * @returns The forwarded message.
2069
2069
  */
@@ -2085,7 +2085,7 @@ export class Client extends Composer {
2085
2085
  * Send a chat action.
2086
2086
  *
2087
2087
  * @method ms
2088
- * @param chatId The chat to send the chat action to.
2088
+ * @param chatId The identifier of a chat to send the chat action to.
2089
2089
  * @param action The chat action.
2090
2090
  * @param messageThreadId The thread to send the chat action to.
2091
2091
  */
@@ -2096,7 +2096,7 @@ export class Client extends Composer {
2096
2096
  * Search the messages of a chat. User-only.
2097
2097
  *
2098
2098
  * @method ms
2099
- * @param chatId The identifier of the chat to search the messages in.
2099
+ * @param chatId The identifier of a chat.
2100
2100
  * @param query The message search query.
2101
2101
  */
2102
2102
  async searchMessages(chatId, query, params) {
@@ -2106,8 +2106,8 @@ export class Client extends Composer {
2106
2106
  * Mark messages as read. User-only.
2107
2107
  *
2108
2108
  * @method ms
2109
- * @param chatId The identifier of the chat that includes the messages.
2110
- * @param untilMessageId The identifier of a message that will be marked as read, along with any other unread messages before it.
2109
+ * @param chatId The identifier of the chat which the messages belong to.
2110
+ * @param untilMessageId The identifier of the message that will be marked as read, along with any other unread messages before it.
2111
2111
  */
2112
2112
  async readMessages(chatId, untilMessageId) {
2113
2113
  await __classPrivateFieldGet(this, _Client_messageManager, "f").readMessages(chatId, untilMessageId);
@@ -2126,7 +2126,7 @@ export class Client extends Composer {
2126
2126
  * Transcribe a voice message. User-only.
2127
2127
  *
2128
2128
  * @method ms
2129
- * @param chatId The identifier of the chat that includes the message.
2129
+ * @param chatId The identifier of the chat which the message belongs to.
2130
2130
  * @param messageId The identifier of the message.
2131
2131
  * @cache
2132
2132
  */
@@ -2142,6 +2142,17 @@ export class Client extends Composer {
2142
2142
  async getLinkPreview(text, params) {
2143
2143
  return await __classPrivateFieldGet(this, _Client_linkPreviewManager, "f").getLinkPreview(text, params);
2144
2144
  }
2145
+ /**
2146
+ * Open a mini app. User-only.
2147
+ *
2148
+ * @method ms
2149
+ * @param botId The identifier of a bot with the mini app.
2150
+ * @param chatId The identifier of the chat from which the mini app is opened.
2151
+ * @cache
2152
+ */
2153
+ async openMiniApp(botId, chatId, params) {
2154
+ return await __classPrivateFieldGet(this, _Client_messageManager, "f").openMiniApp(botId, chatId, params);
2155
+ }
2145
2156
  //
2146
2157
  // ========================= POLLS ========================= //
2147
2158
  //
@@ -2222,7 +2233,7 @@ export class Client extends Composer {
2222
2233
  * Get chat history. User-only.
2223
2234
  *
2224
2235
  * @method ch
2225
- * @param chatId The identifier of the chat to get its history.
2236
+ * @param chatId The identifier of a chat.
2226
2237
  */
2227
2238
  async getHistory(chatId, params) {
2228
2239
  return await __classPrivateFieldGet(this, _Client_messageManager, "f").getHistory(chatId, params);
@@ -2231,7 +2242,7 @@ export class Client extends Composer {
2231
2242
  * Set a chat's available reactions. User-only.
2232
2243
  *
2233
2244
  * @method ch
2234
- * @param chatId The identifier of the chat.
2245
+ * @param chatId The identifier of a chat.
2235
2246
  * @param availableReactions The new available reactions.
2236
2247
  */
2237
2248
  async setAvailableReactions(chatId, availableReactions) {
@@ -2241,7 +2252,7 @@ export class Client extends Composer {
2241
2252
  * Set a chat's photo.
2242
2253
  *
2243
2254
  * @method ch
2244
- * @param chatId The identifier of the chat.
2255
+ * @param chatId The identifier of a chat.
2245
2256
  * @param photo A photo to set as the chat's photo.
2246
2257
  */
2247
2258
  async setChatPhoto(chatId, photo, params) {
@@ -2251,7 +2262,7 @@ export class Client extends Composer {
2251
2262
  * Delete a chat's photo.
2252
2263
  *
2253
2264
  * @method ch
2254
- * @param chatId The identifier of the chat.
2265
+ * @param chatId The identifier of a chat.
2255
2266
  */
2256
2267
  async deleteChatPhoto(chatId) {
2257
2268
  await __classPrivateFieldGet(this, _Client_chatManager, "f").deleteChatPhoto(chatId);
@@ -2260,7 +2271,7 @@ export class Client extends Composer {
2260
2271
  * Ban a member from a chat.
2261
2272
  *
2262
2273
  * @method ch
2263
- * @param chatId The identifier of the chat.
2274
+ * @param chatId The identifier of a chat.
2264
2275
  * @param memberId The identifier of the member.
2265
2276
  */
2266
2277
  async banChatMember(chatId, memberId, params) {
@@ -2270,7 +2281,7 @@ export class Client extends Composer {
2270
2281
  * Unban a member from a chat.
2271
2282
  *
2272
2283
  * @method ch
2273
- * @param chatId The identifier of the chat. Must be a supergroup.
2284
+ * @param chatId The identifier of a chat. Must be a supergroup.
2274
2285
  * @param memberId The identifier of the member.
2275
2286
  */
2276
2287
  async unbanChatMember(chatId, memberId) {
@@ -2280,7 +2291,7 @@ export class Client extends Composer {
2280
2291
  * Kick a member from a chat. Same as a banChatMember call followed by unbanChatMember.
2281
2292
  *
2282
2293
  * @method ch
2283
- * @param chatId The identifier of the chat. Must be a supergroup.
2294
+ * @param chatId The identifier of a chat. Must be a supergroup.
2284
2295
  * @param memberId The identifier of the member.
2285
2296
  */
2286
2297
  async kickChatMember(chatId, memberId) {
@@ -2291,8 +2302,8 @@ export class Client extends Composer {
2291
2302
  * Set the rights of a chat member.
2292
2303
  *
2293
2304
  * @method ch
2294
- * @param chatId The identifier of the chat. Must be a supergroup.
2295
- * @param memberId The identifier of a member.
2305
+ * @param chatId The identifier of a chat. Must be a supergroup.
2306
+ * @param memberId The identifier of the member.
2296
2307
  */
2297
2308
  async setChatMemberRights(chatId, memberId, params) {
2298
2309
  await __classPrivateFieldGet(this, _Client_chatManager, "f").setChatMemberRights(chatId, memberId, params);
@@ -2301,7 +2312,7 @@ export class Client extends Composer {
2301
2312
  * Get the administrators of a chat.
2302
2313
  *
2303
2314
  * @method ch
2304
- * @param chatId The identifier of the chat.
2315
+ * @param chatId The identifier of a chat.
2305
2316
  * @returns The chat's administrators.
2306
2317
  */
2307
2318
  async getChatAdministrators(chatId) {
@@ -2311,7 +2322,7 @@ export class Client extends Composer {
2311
2322
  * Enable join requests in a chat. User-only.
2312
2323
  *
2313
2324
  * @method ch
2314
- * @param chatId The identifier of the chat. Must be a channel or a supergroup.
2325
+ * @param chatId The identifier of a chat. Must be a channel or a supergroup.
2315
2326
  */
2316
2327
  async enableJoinRequests(chatId) {
2317
2328
  await __classPrivateFieldGet(this, _Client_chatManager, "f").enableJoinRequests(chatId);
@@ -2320,7 +2331,7 @@ export class Client extends Composer {
2320
2331
  * Disable join requests in a chat. User-only.
2321
2332
  *
2322
2333
  * @method ch
2323
- * @param chatId The identifier of the chat. Must be a channel or a supergroup.
2334
+ * @param chatId The identifier of a chat. Must be a channel or a supergroup.
2324
2335
  */
2325
2336
  async disableJoinRequests(chatId) {
2326
2337
  await __classPrivateFieldGet(this, _Client_chatManager, "f").disableJoinRequests(chatId);
@@ -2338,7 +2349,7 @@ export class Client extends Composer {
2338
2349
  * Get the invite links created for a chat. User-only.
2339
2350
  *
2340
2351
  * @method ch
2341
- * @param chatId The identifier of the chat.
2352
+ * @param chatId The identifier of a chat.
2342
2353
  * @returns The invite links created for the chat. This might be a subset of the results if they were less than `limit`. The parameters `afterDate` and `afterInviteLink` can be used for pagination.
2343
2354
  */
2344
2355
  async getCreatedInviteLinks(chatId, params) {
@@ -2348,7 +2359,7 @@ export class Client extends Composer {
2348
2359
  * Join a chat. User-only.
2349
2360
  *
2350
2361
  * @method ch
2351
- * @param chatId The identifier of the chat to join.
2362
+ * @param chatId The identifier of a chat.
2352
2363
  */
2353
2364
  async joinChat(chatId) {
2354
2365
  await __classPrivateFieldGet(this, _Client_chatManager, "f").joinChat(chatId);
@@ -2357,7 +2368,7 @@ export class Client extends Composer {
2357
2368
  * Leave a chat.
2358
2369
  *
2359
2370
  * @method ch
2360
- * @param chatId The identifier of the chat to leave.
2371
+ * @param chatId The identifier of a chat.
2361
2372
  */
2362
2373
  async leaveChat(chatId) {
2363
2374
  await __classPrivateFieldGet(this, _Client_chatManager, "f").leaveChat(chatId);
@@ -2366,7 +2377,7 @@ export class Client extends Composer {
2366
2377
  * Get information on a user's chat membership.
2367
2378
  *
2368
2379
  * @method ch
2369
- * @param chatId The identifier of a chat that includes the user.
2380
+ * @param chatId The identifier of a chat.
2370
2381
  * @param userId The identifier of the user.
2371
2382
  */
2372
2383
  async getChatMember(chatId, userId) {
@@ -2376,7 +2387,7 @@ export class Client extends Composer {
2376
2387
  * Get the members of a chat.
2377
2388
  *
2378
2389
  * @method ch
2379
- * @param chatId The chat to get its members.
2390
+ * @param chatId The identifier of a chat.
2380
2391
  */
2381
2392
  async getChatMembers(chatId, params) {
2382
2393
  return await __classPrivateFieldGet(this, _Client_chatListManager, "f").getChatMembers(chatId, params);
@@ -2385,7 +2396,7 @@ export class Client extends Composer {
2385
2396
  * Set a chat's sticker set.
2386
2397
  *
2387
2398
  * @method ch
2388
- * @param chatId The identifier of the chat. Must be a supergroup.
2399
+ * @param chatId The identifier of a chat. Must be a supergroup.
2389
2400
  * @param setName The name of the set.
2390
2401
  */
2391
2402
  async setChatStickerSet(chatId, setName) {
@@ -2395,7 +2406,7 @@ export class Client extends Composer {
2395
2406
  * Delete a chat's sticker set.
2396
2407
  *
2397
2408
  * @method ch
2398
- * @param chatId The identifier of the chat. Must be a supergroup.
2409
+ * @param chatId The identifier of a chat. Must be a supergroup.
2399
2410
  */
2400
2411
  async deleteChatStickerSet(chatId) {
2401
2412
  await __classPrivateFieldGet(this, _Client_messageManager, "f").deleteChatStickerSet(chatId);
@@ -2404,7 +2415,7 @@ export class Client extends Composer {
2404
2415
  * Set the number of boosts required to circument a chat's default restrictions. User-only.
2405
2416
  *
2406
2417
  * @method ch
2407
- * @param chatId The identifier of the chat.
2418
+ * @param chatId The identifier of a chat.
2408
2419
  * @param boosts The number of boosts required to circumvent its restrictions.
2409
2420
  */
2410
2421
  async setBoostsRequiredToCircumventRestrictions(chatId, boosts) {
@@ -2414,7 +2425,7 @@ export class Client extends Composer {
2414
2425
  * Create an invite link.
2415
2426
  *
2416
2427
  * @method ch
2417
- * @param chatId The identifier of the chat to create the invite link for.
2428
+ * @param chatId The identifier of a chat to create the invite link for.
2418
2429
  * @returns The newly created invite link.
2419
2430
  */
2420
2431
  async createInviteLink(chatId, params) {
@@ -2424,7 +2435,7 @@ export class Client extends Composer {
2424
2435
  * Approve a join request.
2425
2436
  *
2426
2437
  * @method ch
2427
- * @param chatId The identifier of the chat that contains the join request.
2438
+ * @param chatId The identifier of a chat with the join request.
2428
2439
  * @param userId The user who made the join request.
2429
2440
  */
2430
2441
  async approveJoinRequest(chatId, userId) {
@@ -2434,7 +2445,7 @@ export class Client extends Composer {
2434
2445
  * Decline a join request.
2435
2446
  *
2436
2447
  * @method ch
2437
- * @param chatId The identifier of the chat that contains the join request.
2448
+ * @param chatId The identifier of a chat with the join request.
2438
2449
  * @param userId The user who made the join request.
2439
2450
  */
2440
2451
  async declineJoinRequest(chatId, userId) {
@@ -2444,7 +2455,7 @@ export class Client extends Composer {
2444
2455
  * Approve all join requests. User-only.
2445
2456
  *
2446
2457
  * @method ch
2447
- * @param chatId The identifier of the chat that contains the join requests.
2458
+ * @param chatId The identifier of a chat with the join requests.
2448
2459
  */
2449
2460
  async approveJoinRequests(chatId, params) {
2450
2461
  await __classPrivateFieldGet(this, _Client_chatManager, "f").approveJoinRequests(chatId, params);
@@ -2453,7 +2464,7 @@ export class Client extends Composer {
2453
2464
  * Decline all join requests. User-only.
2454
2465
  *
2455
2466
  * @method ch
2456
- * @param chatId The identifier of the chat that contains the join requests.
2467
+ * @param chatId The identifier of a chat with the join requests.
2457
2468
  */
2458
2469
  async declineJoinRequests(chatId, params) {
2459
2470
  await __classPrivateFieldGet(this, _Client_chatManager, "f").declineJoinRequests(chatId, params);
@@ -2462,7 +2473,7 @@ export class Client extends Composer {
2462
2473
  * Get pending join requests in a chat. User-only.
2463
2474
  *
2464
2475
  * @method ch
2465
- * @param chatId The identifier of the chat that contains the join requests.
2476
+ * @param chatId The identifier of a chat with the join requests.
2466
2477
  */
2467
2478
  async getJoinRequests(chatId, params) {
2468
2479
  return await __classPrivateFieldGet(this, _Client_chatManager, "f").getJoinRequests(chatId, params);
@@ -2471,7 +2482,7 @@ export class Client extends Composer {
2471
2482
  * Add a single user to a chat.
2472
2483
  *
2473
2484
  * @method ch
2474
- * @param chatId The identifier of the chat to add the user to.
2485
+ * @param chatId The identifier of a chat to add the user to.
2475
2486
  * @param userId The identifier of the user to add to the chat.
2476
2487
  * @returns An array of FailedInvitation that has at most a length of 1. If empty, it means that the user was added.
2477
2488
  */
@@ -2492,7 +2503,7 @@ export class Client extends Composer {
2492
2503
  * Open a chat.
2493
2504
  *
2494
2505
  * @method ch
2495
- * @param chatId The chat to open.
2506
+ * @param chatId The identifier of a chat to open.
2496
2507
  */
2497
2508
  async openChat(chatId) {
2498
2509
  await __classPrivateFieldGet(this, _Client_updateManager, "f").openChat(chatId);
@@ -2501,7 +2512,7 @@ export class Client extends Composer {
2501
2512
  * Close a chat previously opened by openChat.
2502
2513
  *
2503
2514
  * @method ch
2504
- * @param chatId The chat to close.
2515
+ * @param chatId The identifier of a chat to close.
2505
2516
  */
2506
2517
  async closeChat(chatId) {
2507
2518
  await __classPrivateFieldGet(this, _Client_updateManager, "f").closeChat(chatId);
@@ -2540,7 +2551,7 @@ export class Client extends Composer {
2540
2551
  * Set the time to live of the messages of a chat. User-only.
2541
2552
  *
2542
2553
  * @method ch
2543
- * @param chatId The identifier of the chat.
2554
+ * @param chatId The identifier of a chat.
2544
2555
  * @param messageTtl The time to live of the messages in seconds.
2545
2556
  */
2546
2557
  async setMessageTtl(chatId, messageTtl) {
@@ -2559,7 +2570,7 @@ export class Client extends Composer {
2559
2570
  * Archive a single chat. User-only.
2560
2571
  *
2561
2572
  * @method ch
2562
- * @param chatId The identifier of the chat to archive.
2573
+ * @param chatId The identifier of a chat.
2563
2574
  */
2564
2575
  async archiveChat(chatId) {
2565
2576
  await __classPrivateFieldGet(this, _Client_chatListManager, "f").archiveChat(chatId);
@@ -2577,7 +2588,7 @@ export class Client extends Composer {
2577
2588
  * Unarchive a single chat. User-only.
2578
2589
  *
2579
2590
  * @method ch
2580
- * @param chatId The identifier of the chat to unarchive.
2591
+ * @param chatId The identifier of a chat.
2581
2592
  */
2582
2593
  async unarchiveChat(chatId) {
2583
2594
  await __classPrivateFieldGet(this, _Client_chatListManager, "f").unarchiveChat(chatId);
@@ -2595,7 +2606,7 @@ export class Client extends Composer {
2595
2606
  * Get the settings of a chat. User-only.
2596
2607
  *
2597
2608
  * @method ch
2598
- * @param chatId The identifier of the chat to get the settings for.
2609
+ * @param chatId The identifier of a chat.
2599
2610
  */
2600
2611
  async getChatSettings(chatId) {
2601
2612
  return await __classPrivateFieldGet(this, _Client_chatListManager, "f").getChatSettings(chatId);
@@ -2661,7 +2672,7 @@ export class Client extends Composer {
2661
2672
  * Hide or show the member list of a group to non-admins. User-only.
2662
2673
  *
2663
2674
  * @method ch
2664
- * @param chatId The identifier of a group.
2675
+ * @param chatId The identifier of the group.
2665
2676
  * @param visible Whether the member list of the group should be visible.
2666
2677
  */
2667
2678
  async setMemberListVisibility(chatId, visible) {
@@ -2671,7 +2682,7 @@ export class Client extends Composer {
2671
2682
  * Enable or disable topics in a group. User-only.
2672
2683
  *
2673
2684
  * @method ch
2674
- * @param chatId The identifier of a group.
2685
+ * @param chatId The identifier of the group.
2675
2686
  * @param enabled Whether topics should be enabled in the group.
2676
2687
  */
2677
2688
  async setTopicsEnabled(chatId, enabled) {
@@ -2681,7 +2692,7 @@ export class Client extends Composer {
2681
2692
  * Enable or disable automatic anti-spam in a group. User-only.
2682
2693
  *
2683
2694
  * @method ch
2684
- * @param chatId The identifier of a group.
2695
+ * @param chatId The identifier of the group.
2685
2696
  * @param enabled Whether automatic anti-spam should be enabled in the group.
2686
2697
  */
2687
2698
  async setAntispamEnabled(chatId, enabled) {
@@ -2691,7 +2702,7 @@ export class Client extends Composer {
2691
2702
  * Enable or disable post signatures in a channel. User-only.
2692
2703
  *
2693
2704
  * @method ch
2694
- * @param chatId The identifier of a channel.
2705
+ * @param chatId The identifier of the channel.
2695
2706
  * @param enabled Whether post signatures should be enabled in the channel.
2696
2707
  */
2697
2708
  async setSignaturesEnabled(chatId, enabled, params) {
@@ -2701,7 +2712,7 @@ export class Client extends Composer {
2701
2712
  * Delete a chat. User-only.
2702
2713
  *
2703
2714
  * @method ch
2704
- * @param chatId The identifier of the chat to delete.
2715
+ * @param chatId The identifier of a chat.
2705
2716
  */
2706
2717
  async deleteChat(chatId) {
2707
2718
  await __classPrivateFieldGet(this, _Client_chatManager, "f").deleteChat(chatId);
@@ -2719,7 +2730,7 @@ export class Client extends Composer {
2719
2730
  *
2720
2731
  * @method ch
2721
2732
  * @param chatId The identifier of a channel.
2722
- * @param discussionChatId The identifier of the chat to use as discussion for the channel.
2733
+ * @param discussionChatId The identifier of a chat to use as discussion for the channel.
2723
2734
  */
2724
2735
  async setDiscussionChat(chatId, discussionChatId) {
2725
2736
  await __classPrivateFieldGet(this, _Client_chatManager, "f").setDiscussionChat(chatId, discussionChatId);
@@ -2823,14 +2834,14 @@ export class Client extends Composer {
2823
2834
  * Send a callback query. User-only.
2824
2835
  *
2825
2836
  * @method cq
2826
- * @param chatId The chat that includes the messsage.
2827
- * @param messageId The message that includes at a button responsible for the callback query question.
2837
+ * @param botId The identifier of the bot to send the callback query to.
2838
+ * @param messageId The identifier of the message that includes at a button responsible for the callback query question.
2828
2839
  * @param question The callback query's question.
2829
2840
  * @returns The bot's answer to the callback query.
2830
2841
  * @cache
2831
2842
  */
2832
- async sendCallbackQuery(chatId, messageId, question) {
2833
- return await __classPrivateFieldGet(this, _Client_callbackQueryManager, "f").sendCallbackQuery(chatId, messageId, question);
2843
+ async sendCallbackQuery(botId, messageId, question) {
2844
+ return await __classPrivateFieldGet(this, _Client_callbackQueryManager, "f").sendCallbackQuery(botId, messageId, question);
2834
2845
  }
2835
2846
  /**
2836
2847
  * Answer a callback query. Bot-only.
@@ -2848,19 +2859,19 @@ export class Client extends Composer {
2848
2859
  * Send an inline query. User-only.
2849
2860
  *
2850
2861
  * @method iq
2851
- * @param userId The ID of the bot to send the inline query to.
2852
- * @param chatId The ID of the chat from which the inline query is sent.
2862
+ * @param botId The identifier of a bot to send the inline query to.
2863
+ * @param chatId The identifier of the chat from which the inline query is sent.
2853
2864
  * @returns The bot's answer to the inline query.
2854
2865
  * @cache
2855
2866
  */
2856
- async sendInlineQuery(userId, chatId, params) {
2857
- return await __classPrivateFieldGet(this, _Client_inlineQueryManager, "f").sendInlineQuery(userId, chatId, params);
2867
+ async sendInlineQuery(botId, chatId, params) {
2868
+ return await __classPrivateFieldGet(this, _Client_inlineQueryManager, "f").sendInlineQuery(botId, chatId, params);
2858
2869
  }
2859
2870
  /**
2860
2871
  * Answer an inline query. Bot-only.
2861
2872
  *
2862
2873
  * @method iq
2863
- * @param id The ID of the inline query to answer.
2874
+ * @param id The identifier of the inline query to answer.
2864
2875
  * @param results The results to answer with.
2865
2876
  */
2866
2877
  async answerInlineQuery(id, results, params) {
@@ -2991,8 +3002,9 @@ export class Client extends Composer {
2991
3002
  * Retrieve multiple stories. User-only.
2992
3003
  *
2993
3004
  * @method st
2994
- * @param chatId The identifier of the chat to retrieve the stories from.
3005
+ * @param chatId The identifier of a chat.
2995
3006
  * @param storyIds The identifiers of the stories to retrieve.
3007
+ * @returns The retrieved stories.
2996
3008
  */
2997
3009
  async getStories(chatId, storyIds) {
2998
3010
  if (!storyIds.length) {
@@ -3004,7 +3016,7 @@ export class Client extends Composer {
3004
3016
  * Retrieve a single story. User-only.
3005
3017
  *
3006
3018
  * @method st
3007
- * @param chatId The identifier of the chat to retrieve the story from.
3019
+ * @param chatId The identifier of a chat.
3008
3020
  * @param storyId The identifier of the story to retrieve.
3009
3021
  * @returns The retrieved story.
3010
3022
  */
@@ -3015,7 +3027,7 @@ export class Client extends Composer {
3015
3027
  * Delete multiple stories. User-only.
3016
3028
  *
3017
3029
  * @method st
3018
- * @param chatId The identifier of the chat to delete the stories from.
3030
+ * @param chatId The identifier of a chat.
3019
3031
  * @param storyIds The identifiers of the stories to delete.
3020
3032
  */
3021
3033
  async deleteStories(chatId, storyIds) {
@@ -3025,7 +3037,7 @@ export class Client extends Composer {
3025
3037
  * Delete a single story. User-only.
3026
3038
  *
3027
3039
  * @method st
3028
- * @param chatId The identifier of the chat to delete the story from.
3040
+ * @param chatId The identifier of a chat.
3029
3041
  * @param storyId The identifier of the story to delete.
3030
3042
  */
3031
3043
  async deleteStory(chatId, storyId) {
@@ -3035,7 +3047,7 @@ export class Client extends Composer {
3035
3047
  * Add multiple stories to highlights. User-only.
3036
3048
  *
3037
3049
  * @method st
3038
- * @param chatId The identifier of the chat that has the stories.
3050
+ * @param chatId The identifier of a chat.
3039
3051
  * @param storyIds The identifiers of the stories to add to highlights.
3040
3052
  */
3041
3053
  async addStoriesToHighlights(chatId, storyIds) {
@@ -3045,7 +3057,7 @@ export class Client extends Composer {
3045
3057
  * Add a single story to highlights. User-only.
3046
3058
  *
3047
3059
  * @method st
3048
- * @param chatId The identifier of the chat that has the story.
3060
+ * @param chatId The identifier of a chat.
3049
3061
  * @param storyId The identifier of the story to add to highlights.
3050
3062
  */
3051
3063
  async addStoryToHighlights(chatId, storyId) {
@@ -3055,7 +3067,7 @@ export class Client extends Composer {
3055
3067
  * Remove multiple stories from highlights. User-only.
3056
3068
  *
3057
3069
  * @method st
3058
- * @param chatId The identifier of the chat that has the stories.
3070
+ * @param chatId The identifier of a chat.
3059
3071
  * @param storyIds The identifiers of the stories to remove from highlights.
3060
3072
  */
3061
3073
  async removeStoriesFromHighlights(chatId, storyIds) {
@@ -3065,7 +3077,7 @@ export class Client extends Composer {
3065
3077
  * Remove a single story from highlights. User-only.
3066
3078
  *
3067
3079
  * @method st
3068
- * @param chatId The identifier of the chat that has the story.
3080
+ * @param chatId The identifier of a chat.
3069
3081
  * @param storyId The identifier of the story to remove from highlights.
3070
3082
  */
3071
3083
  async removeStoryFromHighlights(chatId, storyId) {
@@ -3107,7 +3119,7 @@ export class Client extends Composer {
3107
3119
  * Start a video chat. User-only.
3108
3120
  *
3109
3121
  * @method vc
3110
- * @param chatId The chat to start the video chat in.
3122
+ * @param chatId The identifier of a chat to start the video chat in.
3111
3123
  * @returns The started video chat.
3112
3124
  */
3113
3125
  async startVideoChat(chatId, params) {
@@ -3117,7 +3129,7 @@ export class Client extends Composer {
3117
3129
  * Schedule a video chat. User-only.
3118
3130
  *
3119
3131
  * @method vc
3120
- * @param chatId The chat to schedule the video chat in.
3132
+ * @param chatId The identifier of a chat to schedule the video chat in.
3121
3133
  * @param startAt A point in time within the future in which the video chat will be started.
3122
3134
  * @returns The scheduled video chat.
3123
3135
  */
@@ -3240,7 +3252,7 @@ export class Client extends Composer {
3240
3252
  * Add a contact. User-only.
3241
3253
  *
3242
3254
  * @method co
3243
- * @param userId The identifier of a user to add as contact.
3255
+ * @param userId The identifier of the user to add as contact.
3244
3256
  */
3245
3257
  async addContact(userId, params) {
3246
3258
  await __classPrivateFieldGet(this, _Client_accountManager, "f").addContact(userId, params);