@mtkruto/node 0.137.0 → 0.139.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 (295) hide show
  1. package/esm/3_types.d.ts +2 -3
  2. package/esm/3_types.d.ts.map +1 -1
  3. package/esm/3_types.js +2 -3
  4. package/esm/client/0_markdown.d.ts.map +1 -1
  5. package/esm/client/0_markdown.js +1 -3
  6. package/esm/client/0_params.d.ts +6 -0
  7. package/esm/client/0_params.d.ts.map +1 -1
  8. package/esm/client/1_client_generic.d.ts +14 -9
  9. package/esm/client/1_client_generic.d.ts.map +1 -1
  10. package/esm/client/1_client_generic.js +1 -3
  11. package/esm/client/1_client_plain.d.ts +2 -6
  12. package/esm/client/1_client_plain.d.ts.map +1 -1
  13. package/esm/client/1_client_plain.js +1 -3
  14. package/esm/client/1_types.d.ts +1 -0
  15. package/esm/client/1_types.d.ts.map +1 -1
  16. package/esm/client/2_bot_info_manager.js +1 -1
  17. package/esm/client/2_business_connection_manager.js +1 -1
  18. package/esm/client/2_file_manager.d.ts.map +1 -1
  19. package/esm/client/2_file_manager.js +2 -0
  20. package/esm/client/2_payment_manager.js +1 -1
  21. package/esm/client/2_reaction_manager.js +4 -4
  22. package/esm/client/2_story_album_manager.d.ts.map +1 -1
  23. package/esm/client/2_story_album_manager.js +1 -2
  24. package/esm/client/2_translations_manager.js +2 -2
  25. package/esm/client/2_update_manager.js +1 -1
  26. package/esm/client/3_account_manager.d.ts +2 -1
  27. package/esm/client/3_account_manager.d.ts.map +1 -1
  28. package/esm/client/3_account_manager.js +11 -4
  29. package/esm/client/3_filters.d.ts +94 -18
  30. package/esm/client/3_filters.d.ts.map +1 -1
  31. package/esm/client/3_message_manager.d.ts.map +1 -1
  32. package/esm/client/3_message_manager.js +16 -19
  33. package/esm/client/3_video_chat_manager.js +1 -1
  34. package/esm/client/4_callback_query_manager.js +1 -1
  35. package/esm/client/4_chat_manager.d.ts.map +1 -1
  36. package/esm/client/4_chat_manager.js +4 -5
  37. package/esm/client/4_context.d.ts +154 -462
  38. package/esm/client/4_context.d.ts.map +1 -1
  39. package/esm/client/4_context.js +220 -505
  40. package/esm/client/4_inline_query_manager.js +3 -3
  41. package/esm/client/4_link_preview_manager.js +1 -1
  42. package/esm/client/4_poll_manager.js +2 -2
  43. package/esm/client/4_story_manager.js +5 -5
  44. package/esm/client/6_client.d.ts +13 -14
  45. package/esm/client/6_client.d.ts.map +1 -1
  46. package/esm/client/6_client.js +26 -14
  47. package/esm/client/6_client_dispatcher.d.ts +14 -9
  48. package/esm/client/6_client_dispatcher.d.ts.map +1 -1
  49. package/esm/client/6_client_dispatcher.js +15 -6
  50. package/esm/session/1_session.d.ts +2 -6
  51. package/esm/session/1_session.d.ts.map +1 -1
  52. package/esm/types/0_bot_token_check_result.d.ts +0 -1
  53. package/esm/types/0_bot_token_check_result.d.ts.map +1 -1
  54. package/esm/types/0_callback_query_question.d.ts +0 -3
  55. package/esm/types/0_callback_query_question.d.ts.map +1 -1
  56. package/esm/types/0_chat_action_type.d.ts +0 -13
  57. package/esm/types/0_chat_action_type.d.ts.map +1 -1
  58. package/esm/types/0_code_check_result.d.ts +0 -3
  59. package/esm/types/0_code_check_result.d.ts.map +1 -1
  60. package/esm/types/0_emoji_status.d.ts +0 -2
  61. package/esm/types/0_emoji_status.d.ts.map +1 -1
  62. package/esm/types/0_gift_component_rarity.d.ts +0 -5
  63. package/esm/types/0_gift_component_rarity.d.ts.map +1 -1
  64. package/esm/types/0_id.d.ts +1 -3
  65. package/esm/types/0_id.d.ts.map +1 -1
  66. package/{script/types/1_inline_query_result_button.d.ts → esm/types/0_inline_query_result_button.d.ts} +3 -4
  67. package/esm/types/0_inline_query_result_button.d.ts.map +1 -0
  68. package/esm/types/0_input_emoji_status.d.ts +0 -2
  69. package/esm/types/0_input_emoji_status.d.ts.map +1 -1
  70. package/esm/types/0_password_check_result.d.ts +0 -2
  71. package/esm/types/0_password_check_result.d.ts.map +1 -1
  72. package/esm/types/0_reaction.d.ts +0 -3
  73. package/esm/types/0_reaction.d.ts.map +1 -1
  74. package/esm/types/0_user_status.d.ts +0 -5
  75. package/esm/types/0_user_status.d.ts.map +1 -1
  76. package/esm/types/0_video_chat.d.ts +0 -3
  77. package/esm/types/0_video_chat.d.ts.map +1 -1
  78. package/esm/types/1_available_reactions.d.ts +0 -3
  79. package/esm/types/1_available_reactions.d.ts.map +1 -1
  80. package/esm/types/1_bot_command_scope.d.ts +0 -7
  81. package/esm/types/1_bot_command_scope.d.ts.map +1 -1
  82. package/esm/types/1_chat_p.d.ts +1 -7
  83. package/esm/types/1_chat_p.d.ts.map +1 -1
  84. package/esm/types/1_inline_keyboard_button.d.ts +25 -42
  85. package/esm/types/1_inline_keyboard_button.d.ts.map +1 -1
  86. package/esm/types/1_inline_keyboard_button.js +57 -64
  87. package/esm/types/1_input_gift.d.ts +0 -3
  88. package/esm/types/1_input_gift.d.ts.map +1 -1
  89. package/esm/types/1_input_story_content.d.ts +2 -2
  90. package/esm/types/1_input_story_content.d.ts.map +1 -1
  91. package/esm/types/1_keyboard_button.d.ts +33 -34
  92. package/esm/types/1_keyboard_button.d.ts.map +1 -1
  93. package/esm/types/1_keyboard_button.js +81 -88
  94. package/esm/types/2_chat.d.ts +1 -3
  95. package/esm/types/2_chat.d.ts.map +1 -1
  96. package/esm/types/2_chat_member.d.ts +6 -24
  97. package/esm/types/2_chat_member.d.ts.map +1 -1
  98. package/esm/types/2_message_entity.d.ts +0 -20
  99. package/esm/types/2_message_entity.d.ts.map +1 -1
  100. package/esm/types/{0_mini_app_button_info.js → 2_profile_photo_list.d.ts} +10 -2
  101. package/esm/types/2_profile_photo_list.d.ts.map +1 -0
  102. package/esm/types/{0_keyboard_button_poll_type.d.ts → 2_profile_photo_list.js} +6 -5
  103. package/esm/types/2_reply_markup.d.ts +4 -12
  104. package/esm/types/2_reply_markup.d.ts.map +1 -1
  105. package/esm/types/2_reply_markup.js +13 -17
  106. package/esm/types/2_star_transaction_peer.d.ts +0 -8
  107. package/esm/types/2_star_transaction_peer.d.ts.map +1 -1
  108. package/esm/types/2_story_album_icon.d.ts +0 -2
  109. package/esm/types/2_story_album_icon.d.ts.map +1 -1
  110. package/esm/types/2_story_content.d.ts +3 -4
  111. package/esm/types/2_story_content.d.ts.map +1 -1
  112. package/esm/types/2_story_content.js +3 -3
  113. package/esm/types/2_story_privacy.d.ts +6 -7
  114. package/esm/types/2_story_privacy.d.ts.map +1 -1
  115. package/esm/types/2_story_privacy.js +23 -20
  116. package/esm/types/3_checklist_item.d.ts +2 -8
  117. package/esm/types/3_checklist_item.d.ts.map +1 -1
  118. package/esm/types/3_forward_header.d.ts +0 -5
  119. package/esm/types/3_forward_header.d.ts.map +1 -1
  120. package/esm/types/3_gift_upgraded_component.d.ts +0 -4
  121. package/esm/types/3_gift_upgraded_component.d.ts.map +1 -1
  122. package/esm/types/3_input_media.d.ts +10 -20
  123. package/esm/types/3_input_media.d.ts.map +1 -1
  124. package/esm/types/4_gift.d.ts +0 -2
  125. package/esm/types/4_gift.d.ts.map +1 -1
  126. package/esm/types/4_reply_to.d.ts +6 -14
  127. package/esm/types/4_reply_to.d.ts.map +1 -1
  128. package/esm/types/5_link_preview.d.ts +2 -18
  129. package/esm/types/5_link_preview.d.ts.map +1 -1
  130. package/esm/types/6_message.d.ts +90 -179
  131. package/esm/types/6_message.d.ts.map +1 -1
  132. package/esm/types/6_message.js +104 -120
  133. package/esm/types/6_message_content.d.ts +0 -5
  134. package/esm/types/6_message_content.d.ts.map +1 -1
  135. package/esm/types/7_inline_query_result.d.ts +10 -47
  136. package/esm/types/7_inline_query_result.d.ts.map +1 -1
  137. package/esm/types/7_inline_query_result.js +219 -152
  138. package/esm/types/8_update.d.ts +58 -105
  139. package/esm/types/8_update.d.ts.map +1 -1
  140. package/esm/utilities/0_int.d.ts +1 -3
  141. package/esm/utilities/0_int.d.ts.map +1 -1
  142. package/package.json +1 -1
  143. package/script/3_types.d.ts +2 -3
  144. package/script/3_types.d.ts.map +1 -1
  145. package/script/3_types.js +2 -3
  146. package/script/client/0_markdown.d.ts.map +1 -1
  147. package/script/client/0_markdown.js +1 -3
  148. package/script/client/0_params.d.ts +6 -0
  149. package/script/client/0_params.d.ts.map +1 -1
  150. package/script/client/1_client_generic.d.ts +14 -9
  151. package/script/client/1_client_generic.d.ts.map +1 -1
  152. package/script/client/1_client_generic.js +1 -3
  153. package/script/client/1_client_plain.d.ts +2 -6
  154. package/script/client/1_client_plain.d.ts.map +1 -1
  155. package/script/client/1_client_plain.js +1 -3
  156. package/script/client/1_types.d.ts +1 -0
  157. package/script/client/1_types.d.ts.map +1 -1
  158. package/script/client/2_bot_info_manager.js +1 -1
  159. package/script/client/2_business_connection_manager.js +1 -1
  160. package/script/client/2_file_manager.d.ts.map +1 -1
  161. package/script/client/2_file_manager.js +2 -0
  162. package/script/client/2_payment_manager.js +1 -1
  163. package/script/client/2_reaction_manager.js +4 -4
  164. package/script/client/2_story_album_manager.d.ts.map +1 -1
  165. package/script/client/2_story_album_manager.js +1 -2
  166. package/script/client/2_translations_manager.js +2 -2
  167. package/script/client/2_update_manager.js +1 -1
  168. package/script/client/3_account_manager.d.ts +2 -1
  169. package/script/client/3_account_manager.d.ts.map +1 -1
  170. package/script/client/3_account_manager.js +9 -2
  171. package/script/client/3_filters.d.ts +94 -18
  172. package/script/client/3_filters.d.ts.map +1 -1
  173. package/script/client/3_message_manager.d.ts.map +1 -1
  174. package/script/client/3_message_manager.js +15 -18
  175. package/script/client/3_video_chat_manager.js +1 -1
  176. package/script/client/4_callback_query_manager.js +1 -1
  177. package/script/client/4_chat_manager.d.ts.map +1 -1
  178. package/script/client/4_chat_manager.js +4 -5
  179. package/script/client/4_context.d.ts +154 -462
  180. package/script/client/4_context.d.ts.map +1 -1
  181. package/script/client/4_context.js +220 -505
  182. package/script/client/4_inline_query_manager.js +3 -3
  183. package/script/client/4_link_preview_manager.js +1 -1
  184. package/script/client/4_poll_manager.js +2 -2
  185. package/script/client/4_story_manager.js +5 -5
  186. package/script/client/6_client.d.ts +13 -14
  187. package/script/client/6_client.d.ts.map +1 -1
  188. package/script/client/6_client.js +25 -13
  189. package/script/client/6_client_dispatcher.d.ts +14 -9
  190. package/script/client/6_client_dispatcher.d.ts.map +1 -1
  191. package/script/client/6_client_dispatcher.js +15 -6
  192. package/script/session/1_session.d.ts +2 -6
  193. package/script/session/1_session.d.ts.map +1 -1
  194. package/script/types/0_bot_token_check_result.d.ts +0 -1
  195. package/script/types/0_bot_token_check_result.d.ts.map +1 -1
  196. package/script/types/0_callback_query_question.d.ts +0 -3
  197. package/script/types/0_callback_query_question.d.ts.map +1 -1
  198. package/script/types/0_chat_action_type.d.ts +0 -13
  199. package/script/types/0_chat_action_type.d.ts.map +1 -1
  200. package/script/types/0_code_check_result.d.ts +0 -3
  201. package/script/types/0_code_check_result.d.ts.map +1 -1
  202. package/script/types/0_emoji_status.d.ts +0 -2
  203. package/script/types/0_emoji_status.d.ts.map +1 -1
  204. package/script/types/0_gift_component_rarity.d.ts +0 -5
  205. package/script/types/0_gift_component_rarity.d.ts.map +1 -1
  206. package/script/types/0_id.d.ts +1 -3
  207. package/script/types/0_id.d.ts.map +1 -1
  208. package/{esm/types/1_inline_query_result_button.d.ts → script/types/0_inline_query_result_button.d.ts} +3 -4
  209. package/script/types/0_inline_query_result_button.d.ts.map +1 -0
  210. package/script/types/0_input_emoji_status.d.ts +0 -2
  211. package/script/types/0_input_emoji_status.d.ts.map +1 -1
  212. package/script/types/0_password_check_result.d.ts +0 -2
  213. package/script/types/0_password_check_result.d.ts.map +1 -1
  214. package/script/types/0_reaction.d.ts +0 -3
  215. package/script/types/0_reaction.d.ts.map +1 -1
  216. package/script/types/0_user_status.d.ts +0 -5
  217. package/script/types/0_user_status.d.ts.map +1 -1
  218. package/script/types/0_video_chat.d.ts +0 -3
  219. package/script/types/0_video_chat.d.ts.map +1 -1
  220. package/script/types/1_available_reactions.d.ts +0 -3
  221. package/script/types/1_available_reactions.d.ts.map +1 -1
  222. package/script/types/1_bot_command_scope.d.ts +0 -7
  223. package/script/types/1_bot_command_scope.d.ts.map +1 -1
  224. package/script/types/1_chat_p.d.ts +1 -7
  225. package/script/types/1_chat_p.d.ts.map +1 -1
  226. package/script/types/1_inline_keyboard_button.d.ts +25 -42
  227. package/script/types/1_inline_keyboard_button.d.ts.map +1 -1
  228. package/script/types/1_inline_keyboard_button.js +57 -64
  229. package/script/types/1_input_gift.d.ts +0 -3
  230. package/script/types/1_input_gift.d.ts.map +1 -1
  231. package/script/types/1_input_story_content.d.ts +2 -2
  232. package/script/types/1_input_story_content.d.ts.map +1 -1
  233. package/script/types/1_keyboard_button.d.ts +33 -34
  234. package/script/types/1_keyboard_button.d.ts.map +1 -1
  235. package/script/types/1_keyboard_button.js +81 -88
  236. package/script/types/2_chat.d.ts +1 -3
  237. package/script/types/2_chat.d.ts.map +1 -1
  238. package/script/types/2_chat_member.d.ts +6 -24
  239. package/script/types/2_chat_member.d.ts.map +1 -1
  240. package/script/types/2_message_entity.d.ts +0 -20
  241. package/script/types/2_message_entity.d.ts.map +1 -1
  242. package/script/types/{0_keyboard_button_poll_type.d.ts → 2_profile_photo_list.d.ts} +10 -5
  243. package/script/types/2_profile_photo_list.d.ts.map +1 -0
  244. package/script/types/{0_mini_app_button_info.js → 2_profile_photo_list.js} +7 -3
  245. package/script/types/2_reply_markup.d.ts +4 -12
  246. package/script/types/2_reply_markup.d.ts.map +1 -1
  247. package/script/types/2_reply_markup.js +13 -17
  248. package/script/types/2_star_transaction_peer.d.ts +0 -8
  249. package/script/types/2_star_transaction_peer.d.ts.map +1 -1
  250. package/script/types/2_story_album_icon.d.ts +0 -2
  251. package/script/types/2_story_album_icon.d.ts.map +1 -1
  252. package/script/types/2_story_content.d.ts +3 -4
  253. package/script/types/2_story_content.d.ts.map +1 -1
  254. package/script/types/2_story_content.js +3 -3
  255. package/script/types/2_story_privacy.d.ts +6 -7
  256. package/script/types/2_story_privacy.d.ts.map +1 -1
  257. package/script/types/2_story_privacy.js +23 -20
  258. package/script/types/3_checklist_item.d.ts +2 -8
  259. package/script/types/3_checklist_item.d.ts.map +1 -1
  260. package/script/types/3_forward_header.d.ts +0 -5
  261. package/script/types/3_forward_header.d.ts.map +1 -1
  262. package/script/types/3_gift_upgraded_component.d.ts +0 -4
  263. package/script/types/3_gift_upgraded_component.d.ts.map +1 -1
  264. package/script/types/3_input_media.d.ts +10 -20
  265. package/script/types/3_input_media.d.ts.map +1 -1
  266. package/script/types/4_gift.d.ts +0 -2
  267. package/script/types/4_gift.d.ts.map +1 -1
  268. package/script/types/4_reply_to.d.ts +6 -14
  269. package/script/types/4_reply_to.d.ts.map +1 -1
  270. package/script/types/5_link_preview.d.ts +2 -18
  271. package/script/types/5_link_preview.d.ts.map +1 -1
  272. package/script/types/6_message.d.ts +90 -179
  273. package/script/types/6_message.d.ts.map +1 -1
  274. package/script/types/6_message.js +105 -121
  275. package/script/types/6_message_content.d.ts +0 -5
  276. package/script/types/6_message_content.d.ts.map +1 -1
  277. package/script/types/7_inline_query_result.d.ts +10 -47
  278. package/script/types/7_inline_query_result.d.ts.map +1 -1
  279. package/script/types/7_inline_query_result.js +219 -152
  280. package/script/types/8_update.d.ts +58 -105
  281. package/script/types/8_update.d.ts.map +1 -1
  282. package/script/utilities/0_int.d.ts +1 -3
  283. package/script/utilities/0_int.d.ts.map +1 -1
  284. package/esm/types/0_keyboard_button_poll_type.d.ts.map +0 -1
  285. package/esm/types/0_mini_app_button_info.d.ts +0 -26
  286. package/esm/types/0_mini_app_button_info.d.ts.map +0 -1
  287. package/esm/types/1_inline_query_result_button.d.ts.map +0 -1
  288. package/esm/types/1_inline_query_result_button.js +0 -20
  289. package/script/types/0_keyboard_button_poll_type.d.ts.map +0 -1
  290. package/script/types/0_mini_app_button_info.d.ts +0 -26
  291. package/script/types/0_mini_app_button_info.d.ts.map +0 -1
  292. package/script/types/1_inline_query_result_button.d.ts.map +0 -1
  293. package/script/types/1_inline_query_result_button.js +0 -21
  294. /package/esm/types/{0_keyboard_button_poll_type.js → 0_inline_query_result_button.js} +0 -0
  295. /package/script/types/{0_keyboard_button_poll_type.js → 0_inline_query_result_button.js} +0 -0
@@ -228,66 +228,89 @@ class Context {
228
228
  (0, _0_deps_js_1.unreachable)();
229
229
  }
230
230
  #getReplyTo = (isQuoted, chatId, messageId) => {
231
- if ("story" in this.update) {
232
- return { replyTo: { chatId: this.update.story.chat.id, storyId: this.update.story.id } };
231
+ if (this.update.type === "story") {
232
+ return { replyTo: { type: "story", chatId: this.update.story.chat.id, storyId: this.update.story.id } };
233
233
  }
234
234
  let messageThreadId = undefined;
235
- if ("message" in this.update) {
236
- messageThreadId = this.update.message.threadId;
237
- }
238
- else if ("editedMessage" in this.update) {
239
- messageThreadId = this.update.editedMessage.threadId;
240
- }
241
- else if ("scheduledMessage" in this.update) {
242
- messageThreadId = this.update.scheduledMessage.threadId;
235
+ switch (this.update.type) {
236
+ case "message":
237
+ messageThreadId = this.update.message.threadId;
238
+ break;
239
+ case "editedMessage":
240
+ messageThreadId = this.update.editedMessage.threadId;
241
+ break;
242
+ case "scheduledMessage":
243
+ messageThreadId = this.update.scheduledMessage.threadId;
244
+ break;
243
245
  }
244
246
  const isPrivate = chatId > 0;
245
247
  const shouldQuote = isQuoted === undefined ? !isPrivate : isQuoted;
246
- return { messageThreadId, replyTo: shouldQuote ? { messageId } : undefined };
248
+ return { messageThreadId, replyTo: shouldQuote ? { type: "message", messageId } : undefined };
247
249
  };
248
250
  get chat() {
249
251
  if (this.msg !== undefined) {
250
252
  return this.msg.chat;
251
253
  }
252
- return "messageReactions" in this.update
253
- //
254
- ? this.update.messageReactions.chat
255
- : "messageReactionCount" in this.update
256
- ? this.update.messageReactionCount.chat
257
- : "chatMember" in this.update
258
- ? this.update.chatMember.chat
259
- : "myChatMember" in this.update
260
- ? this.update.myChatMember.chat
261
- : "joinRequest" in this.update
262
- ? this.update.joinRequest.chat
263
- : "story" in this.update
264
- ? this.update.story.chat
265
- : "newChat" in this.update
266
- ? this.update.newChat.chat
267
- : "editedChat" in this.update
268
- ? this.update.editedChat.chat
269
- : undefined;
254
+ switch (this.update.type) {
255
+ case "messageReactions":
256
+ return this.update.messageReactions.chat;
257
+ case "messageReactionCount":
258
+ return this.update.messageReactionCount.chat;
259
+ case "chatMember":
260
+ return this.update.chatMember.chat;
261
+ case "myChatMember":
262
+ return this.update.myChatMember.chat;
263
+ case "joinRequest":
264
+ return this.update.joinRequest.chat;
265
+ case "story":
266
+ return this.update.story.chat;
267
+ case "newChat":
268
+ return this.update.newChat.chat;
269
+ case "editedChat":
270
+ return this.update.editedChat.chat;
271
+ }
272
+ return undefined;
270
273
  }
271
274
  get chatId() {
272
275
  if (this.chat !== undefined) {
273
276
  return this.chat.id;
274
277
  }
275
- return "deletedStory" in this.update
276
- //
277
- ? this.update.deletedStory.chatId
278
- : "messageInteractions" in this.update
279
- ? this.update.messageInteractions.chatId
280
- : "deletedChat" in this.update
281
- ? this.update.deletedChat.chatId
282
- : "botCommands" in this.update
283
- ? this.update.botCommands.chatId
284
- : "chatAction" in this.update
285
- ? this.update.chatAction.chatId
286
- : undefined;
278
+ switch (this.update.type) {
279
+ case "deletedStory":
280
+ return this.update.deletedStory.chatId;
281
+ case "messageInteractions":
282
+ return this.update.messageInteractions.chatId;
283
+ case "deletedChat":
284
+ return this.update.deletedChat.chatId;
285
+ case "botCommands":
286
+ return this.update.botCommands.chatId;
287
+ case "chatAction":
288
+ return this.update.chatAction.chatId;
289
+ }
290
+ return undefined;
287
291
  }
288
292
  get from() {
289
- const from = "callbackQuery" in this.update ? this.update.callbackQuery.from : "inlineQuery" in this.update ? this.update.inlineQuery.from : "chatMember" in this.update ? this.update.chatMember.from : "myChatMember" in this.update ? this.update.myChatMember.from : "messageReactions" in this.update ? this.update.messageReactions.user : "preCheckoutQuery" in this.update ? this.update.preCheckoutQuery.from : "joinRequest" in this.update ? this.update.joinRequest.from : "businessConnection" in this.update ? this.update.businessConnection.user : "pollAnswer" in this.update ? this.update.pollAnswer.from : this.msg?.from;
290
- return from;
293
+ switch (this.update.type) {
294
+ case "callbackQuery":
295
+ return this.update.callbackQuery.from;
296
+ case "inlineQuery":
297
+ return this.update.inlineQuery.from;
298
+ case "chatMember":
299
+ return this.update.chatMember.from;
300
+ case "myChatMember":
301
+ return this.update.myChatMember.from;
302
+ case "messageReactions":
303
+ return this.update.messageReactions.user;
304
+ case "preCheckoutQuery":
305
+ return this.update.preCheckoutQuery.from;
306
+ case "joinRequest":
307
+ return this.update.joinRequest.from;
308
+ case "businessConnection":
309
+ return this.update.businessConnection.user;
310
+ case "pollAnswer":
311
+ return this.update.pollAnswer.from;
312
+ }
313
+ return this.msg?.from;
291
314
  }
292
315
  hasFilterQuery(filter) {
293
316
  return Context.has.filterQuery(filter)(this);
@@ -320,85 +343,63 @@ class Context {
320
343
  return this.update;
321
344
  }
322
345
  }
323
- /**
324
- * Context-aware alias for {@link Client.addContact}.
325
- */
346
+ /** Context-aware alias for {@link Client.addContact}. */
326
347
  async addAsContact(firstName, params) {
327
348
  const chatId = this.#mustGetChatId();
328
349
  return await this.client.addContact(chatId, firstName, params);
329
350
  }
330
- /**
331
- * Context-aware alias for {@link Client.addChatMember}.
332
- */
351
+ /** Context-aware alias for {@link Client.addChatMember}. */
333
352
  async addMember(userId, params) {
334
353
  const chatId = this.#mustGetChatId();
335
354
  return await this.client.addChatMember(chatId, userId, params);
336
355
  }
337
- /**
338
- * Context-aware alias for {@link Client.addChatMembers}.
339
- */
356
+ /** Context-aware alias for {@link Client.addChatMembers}. */
340
357
  async addMembers(userIds) {
341
358
  const chatId = this.#mustGetChatId();
342
359
  return await this.client.addChatMembers(chatId, userIds);
343
360
  }
344
- /**
345
- * Context-aware alias for {@link Client.addReaction}.
346
- */
361
+ /** Context-aware alias for {@link Client.addReaction}. */
347
362
  async addReaction(messageId, reaction, params) {
348
363
  const chatId = this.#mustGetChatId();
349
364
  return await this.client.addReaction(chatId, messageId, reaction, params);
350
365
  }
351
- /**
352
- * Context-aware alias for {@link Client.addStoriesToHighlights}.
353
- */
366
+ /** Context-aware alias for {@link Client.addStoriesToHighlights}. */
354
367
  async addStoriesToHighlights(storyIds) {
355
368
  const chatId = this.#mustGetChatId();
356
369
  return await this.client.addStoriesToHighlights(chatId, storyIds);
357
370
  }
358
- /**
359
- * Context-aware alias for {@link Client.addStoryToHighlights}.
360
- */
371
+ /** Context-aware alias for {@link Client.addStoryToHighlights}. */
361
372
  async addStoryToHighlights(storyId) {
362
373
  const chatId = this.#mustGetChatId();
363
374
  return await this.client.addStoryToHighlights(chatId, storyId);
364
375
  }
365
- /**
366
- * Context-aware alias for {@link Client.addToChecklist}.
367
- */
376
+ /** Context-aware alias for {@link Client.addToChecklist}. */
368
377
  async addToChecklist(messageId, items) {
369
378
  const chatId = this.#mustGetChatId();
370
379
  return await this.client.addToChecklist(chatId, messageId, items);
371
380
  }
372
- /**
373
- * Context-aware alias for {@link Client.answerCallbackQuery}.
374
- */
381
+ /** Context-aware alias for {@link Client.answerCallbackQuery}. */
375
382
  async answerCallbackQuery(params) {
376
383
  if (!("callbackQuery" in this.update)) {
377
384
  (0, _0_deps_js_1.unreachable)();
378
385
  }
379
386
  return await this.client.answerCallbackQuery(this.update.callbackQuery.id, params);
380
387
  }
381
- /**
382
- * Context-aware alias for {@link Client.answerInlineQuery}.
383
- */
388
+ /** Context-aware alias for {@link Client.answerInlineQuery}. */
384
389
  async answerInlineQuery(results, params) {
385
390
  if (!("inlineQuery" in this.update)) {
386
391
  (0, _0_deps_js_1.unreachable)();
387
392
  }
388
393
  return await this.client.answerInlineQuery(this.update.inlineQuery.id, results, params);
389
394
  }
390
- /**
391
- * Context-aware alias for {@link Client.answerPreCheckoutQuery}.
392
- */
395
+ /** Context-aware alias for {@link Client.answerPreCheckoutQuery}. */
393
396
  async answerPreCheckoutQuery(ok, params) {
394
397
  if (!("preCheckoutQuery" in this.update)) {
395
398
  (0, _0_deps_js_1.unreachable)();
396
399
  }
397
400
  return await this.client.answerPreCheckoutQuery(this.update.preCheckoutQuery.id, ok, params);
398
401
  }
399
- /**
400
- * Context-aware alias for {@link Client.approveJoinRequest}.
401
- */
402
+ /** Context-aware alias for {@link Client.approveJoinRequest}. */
402
403
  async approveJoinRequest() {
403
404
  const { chatId, userId } = this.#mustGetMsg();
404
405
  if (!userId) {
@@ -406,30 +407,22 @@ class Context {
406
407
  }
407
408
  return await this.client.approveJoinRequest(chatId, userId);
408
409
  }
409
- /**
410
- * Context-aware alias for {@link Client.approveJoinRequests}.
411
- */
410
+ /** Context-aware alias for {@link Client.approveJoinRequests}. */
412
411
  async approveJoinRequests(params) {
413
412
  const chatId = this.#mustGetChatId();
414
413
  return await this.client.approveJoinRequests(chatId, params);
415
414
  }
416
- /**
417
- * Context-aware alias for {@link Client.archiveChat}.
418
- */
415
+ /** Context-aware alias for {@link Client.archiveChat}. */
419
416
  async archive() {
420
417
  const chatId = this.#mustGetChatId();
421
418
  return await this.client.archiveChat(chatId);
422
419
  }
423
- /**
424
- * Context-aware alias for {@link Client.banChatMember}.
425
- */
420
+ /** Context-aware alias for {@link Client.banChatMember}. */
426
421
  async banChatMember(memberId, params) {
427
422
  const chatId = this.#mustGetChatId();
428
423
  return await this.client.banChatMember(chatId, memberId, params);
429
424
  }
430
- /**
431
- * Context-aware alias for {@link Client.banChatMember}.
432
- */
425
+ /** Context-aware alias for {@link Client.banChatMember}. */
433
426
  async banSender(params) {
434
427
  const { chatId, senderId } = this.#mustGetMsg();
435
428
  if (!senderId) {
@@ -437,64 +430,46 @@ class Context {
437
430
  }
438
431
  return await this.client.banChatMember(chatId, senderId, params);
439
432
  }
440
- /**
441
- * Context-aware alias for {@link Client.blockUser}.
442
- */
433
+ /** Context-aware alias for {@link Client.blockUser}. */
443
434
  async blockUser() {
444
435
  return await this.client.blockUser(this.#mustGetUserId());
445
436
  }
446
- /**
447
- * Context-aware alias for {@link Client.checkChecklistItem}.
448
- */
437
+ /** Context-aware alias for {@link Client.checkChecklistItem}. */
449
438
  async checkChecklistItem(messageId, item) {
450
439
  const chatId = this.#mustGetChatId();
451
440
  return await this.client.checkChecklistItem(chatId, messageId, item);
452
441
  }
453
- /**
454
- * Context-aware alias for {@link Client.checkChecklistItems}.
455
- */
442
+ /** Context-aware alias for {@link Client.checkChecklistItems}. */
456
443
  async checkChecklistItems(messageId, items) {
457
444
  const chatId = this.#mustGetChatId();
458
445
  return await this.client.checkChecklistItems(chatId, messageId, items);
459
446
  }
460
- /**
461
- * Context-aware alias for {@link Client.closeChat}.
462
- */
447
+ /** Context-aware alias for {@link Client.closeChat}. */
463
448
  async close() {
464
449
  const chatId = this.#mustGetChatId();
465
450
  return await this.client.closeChat(chatId);
466
451
  }
467
- /**
468
- * Context-aware alias for {@link Client.closeTopic}.
469
- */
452
+ /** Context-aware alias for {@link Client.closeTopic}. */
470
453
  async closeTopic(topicId) {
471
454
  const chatId = this.#mustGetChatId();
472
455
  return await this.client.closeTopic(chatId, topicId);
473
456
  }
474
- /**
475
- * Context-aware alias for {@link Client.createInviteLink}.
476
- */
457
+ /** Context-aware alias for {@link Client.createInviteLink}. */
477
458
  async createInviteLink(params) {
478
459
  const chatId = this.#mustGetChatId();
479
460
  return await this.client.createInviteLink(chatId, params);
480
461
  }
481
- /**
482
- * Context-aware alias for {@link Client.createStory}.
483
- */
462
+ /** Context-aware alias for {@link Client.createStory}. */
484
463
  async createStory(content, params) {
485
464
  const chatId = this.#mustGetChatId();
486
465
  return await this.client.createStory(chatId, content, params);
487
466
  }
488
- /**
489
- * Context-aware alias for {@link Client.createTopic}.
490
- */
467
+ /** Context-aware alias for {@link Client.createTopic}. */
491
468
  async createTopic(title, params) {
492
469
  const chatId = this.#mustGetChatId();
493
470
  return await this.client.createTopic(chatId, title, params);
494
471
  }
495
- /**
496
- * Context-aware alias for {@link Client.declineJoinRequest}.
497
- */
472
+ /** Context-aware alias for {@link Client.declineJoinRequest}. */
498
473
  async declineJoinRequest() {
499
474
  const { chatId, userId } = this.#mustGetMsg();
500
475
  if (!userId) {
@@ -502,282 +477,202 @@ class Context {
502
477
  }
503
478
  return await this.client.declineJoinRequest(chatId, userId);
504
479
  }
505
- /**
506
- * Context-aware alias for {@link Client.declineJoinRequests}.
507
- */
480
+ /** Context-aware alias for {@link Client.declineJoinRequests}. */
508
481
  async declineJoinRequests(params) {
509
482
  const chatId = this.#mustGetChatId();
510
483
  return await this.client.declineJoinRequests(chatId, params);
511
484
  }
512
- /**
513
- * Context-aware alias for {@link Client.deleteChatPhoto}.
514
- */
485
+ /** Context-aware alias for {@link Client.deleteChatPhoto}. */
515
486
  async deleteChatPhoto() {
516
487
  const chatId = this.#mustGetChatId();
517
488
  return await this.client.deleteChatPhoto(chatId);
518
489
  }
519
- /**
520
- * Context-aware alias for {@link Client.deleteMessage}.
521
- */
490
+ /** Context-aware alias for {@link Client.deleteMessage}. */
522
491
  async delete() {
523
492
  const { chatId, messageId } = this.#mustGetMsg();
524
493
  return await this.client.deleteMessage(chatId, messageId);
525
494
  }
526
- /**
527
- * Context-aware alias for {@link Client.deleteChat}.
528
- */
495
+ /** Context-aware alias for {@link Client.deleteChat}. */
529
496
  async deleteChat() {
530
497
  const chatId = this.#mustGetChatId();
531
498
  return await this.client.deleteChat(chatId);
532
499
  }
533
- /**
534
- * Context-aware alias for {@link Client.deleteChatMemberMessages}.
535
- */
500
+ /** Context-aware alias for {@link Client.deleteChatMemberMessages}. */
536
501
  async deleteChatMemberMessages(userId) {
537
502
  const chatId = this.#mustGetChatId();
538
503
  return await this.client.deleteChatMemberMessages(chatId, userId);
539
504
  }
540
- /**
541
- * Context-aware alias for {@link Client.deleteChatStickerSet}.
542
- */
505
+ /** Context-aware alias for {@link Client.deleteChatStickerSet}. */
543
506
  async deleteChatStickerSet() {
544
507
  const chatId = this.#mustGetChatId();
545
508
  return await this.client.deleteChatStickerSet(chatId);
546
509
  }
547
- /**
548
- * Context-aware alias for {@link Client.deleteMessage}.
549
- */
510
+ /** Context-aware alias for {@link Client.deleteMessage}. */
550
511
  async deleteMessage(messageId, params) {
551
512
  const chatId = this.#mustGetChatId();
552
513
  return await this.client.deleteMessage(chatId, messageId, params);
553
514
  }
554
- /**
555
- * Context-aware alias for {@link Client.deleteMessages}.
556
- */
515
+ /** Context-aware alias for {@link Client.deleteMessages}. */
557
516
  async deleteMessages(messageIds, params) {
558
517
  const chatId = this.#mustGetChatId();
559
518
  return await this.client.deleteMessages(chatId, messageIds, params);
560
519
  }
561
- /**
562
- * Context-aware alias for {@link Client.deleteScheduledMessage}.
563
- */
520
+ /** Context-aware alias for {@link Client.deleteScheduledMessage}. */
564
521
  async deleteScheduledMessage(messageId) {
565
522
  const chatId = this.#mustGetChatId();
566
523
  return await this.client.deleteScheduledMessage(chatId, messageId);
567
524
  }
568
- /**
569
- * Context-aware alias for {@link Client.deleteScheduledMessages}.
570
- */
525
+ /** Context-aware alias for {@link Client.deleteScheduledMessages}. */
571
526
  async deleteScheduledMessages(messageIds) {
572
527
  const chatId = this.#mustGetChatId();
573
528
  return await this.client.deleteScheduledMessages(chatId, messageIds);
574
529
  }
575
- /**
576
- * Context-aware alias for {@link Client.deleteStories}.
577
- */
530
+ /** Context-aware alias for {@link Client.deleteStories}. */
578
531
  async deleteStories(storyIds) {
579
532
  const chatId = this.#mustGetChatId();
580
533
  return await this.client.deleteStories(chatId, storyIds);
581
534
  }
582
- /**
583
- * Context-aware alias for {@link Client.deleteStory}.
584
- */
535
+ /** Context-aware alias for {@link Client.deleteStory}. */
585
536
  async deleteStory(storyId) {
586
537
  const chatId = this.#mustGetChatId();
587
538
  return await this.client.deleteStory(chatId, storyId);
588
539
  }
589
- /**
590
- * Context-aware alias for {@link Client.disableAntispam}.
591
- */
540
+ /** Context-aware alias for {@link Client.disableAntispam}. */
592
541
  async disableAntispam() {
593
542
  const chatId = this.#mustGetChatId();
594
543
  return await this.client.disableAntispam(chatId);
595
544
  }
596
- /**
597
- * Context-aware alias for {@link Client.disableBusinessBots}.
598
- */
545
+ /** Context-aware alias for {@link Client.disableBusinessBots}. */
599
546
  async disableBusinessBots() {
600
547
  const chatId = this.#mustGetChatId();
601
548
  return await this.client.disableBusinessBots(chatId);
602
549
  }
603
- /**
604
- * Context-aware alias for {@link Client.disableJoinRequests}.
605
- */
550
+ /** Context-aware alias for {@link Client.disableJoinRequests}. */
606
551
  async disableJoinRequests() {
607
552
  const chatId = this.#mustGetChatId();
608
553
  return await this.client.disableJoinRequests(chatId);
609
554
  }
610
- /**
611
- * Context-aware alias for {@link Client.disableSharing}.
612
- */
555
+ /** Context-aware alias for {@link Client.disableSharing}. */
613
556
  async disableSharing() {
614
557
  const chatId = this.#mustGetChatId();
615
558
  return await this.client.disableSharing(chatId);
616
559
  }
617
- /**
618
- * Context-aware alias for {@link Client.disableSignatures}.
619
- */
560
+ /** Context-aware alias for {@link Client.disableSignatures}. */
620
561
  async disableSignatures() {
621
562
  const chatId = this.#mustGetChatId();
622
563
  return await this.client.disableSignatures(chatId);
623
564
  }
624
- /**
625
- * Context-aware alias for {@link Client.disableSlowMode}.
626
- */
565
+ /** Context-aware alias for {@link Client.disableSlowMode}. */
627
566
  async disableSlowMode() {
628
567
  const chatId = this.#mustGetChatId();
629
568
  return await this.client.disableSlowMode(chatId);
630
569
  }
631
- /**
632
- * Context-aware alias for {@link Client.disableTopics}.
633
- */
570
+ /** Context-aware alias for {@link Client.disableTopics}. */
634
571
  async disableTopics() {
635
572
  const chatId = this.#mustGetChatId();
636
573
  return await this.client.disableTopics(chatId);
637
574
  }
638
- /**
639
- * Context-aware alias for {@link Client.editInlineMessageCaption}.
640
- */
575
+ /** Context-aware alias for {@link Client.editInlineMessageCaption}. */
641
576
  async editInlineMessageCaption(params) {
642
577
  const inlineMessageId = this.#mustGetInlineMsgId();
643
578
  return await this.client.editInlineMessageCaption(inlineMessageId, params);
644
579
  }
645
- /**
646
- * Context-aware alias for {@link Client.editInlineMessageLiveLocation}.
647
- */
580
+ /** Context-aware alias for {@link Client.editInlineMessageLiveLocation}. */
648
581
  async editInlineMessageLiveLocation(latitude, longitude, params) {
649
582
  const inlineMessageId = this.#mustGetInlineMsgId();
650
583
  return await this.client.editInlineMessageLiveLocation(inlineMessageId, latitude, longitude, params);
651
584
  }
652
- /**
653
- * Context-aware alias for {@link Client.editInlineMessageMedia}.
654
- */
585
+ /** Context-aware alias for {@link Client.editInlineMessageMedia}. */
655
586
  async editInlineMessageMedia(media, params) {
656
587
  const inlineMessageId = this.#mustGetInlineMsgId();
657
588
  return await this.client.editInlineMessageMedia(inlineMessageId, media, params);
658
589
  }
659
- /**
660
- * Context-aware alias for {@link Client.editInlineMessageReplyMarkup}.
661
- */
590
+ /** Context-aware alias for {@link Client.editInlineMessageReplyMarkup}. */
662
591
  async editInlineMessageReplyMarkup(params) {
663
592
  const inlineMessageId = this.#mustGetInlineMsgId();
664
593
  return await this.client.editInlineMessageReplyMarkup(inlineMessageId, params);
665
594
  }
666
- /**
667
- * Context-aware alias for {@link Client.editInlineMessageText}.
668
- */
595
+ /** Context-aware alias for {@link Client.editInlineMessageText}. */
669
596
  async editInlineMessageText(text, params) {
670
597
  const inlineMessageId = this.#mustGetInlineMsgId();
671
598
  return await this.client.editInlineMessageText(inlineMessageId, text, params);
672
599
  }
673
- /**
674
- * Context-aware alias for {@link Client.editMessageCaption}.
675
- */
600
+ /** Context-aware alias for {@link Client.editMessageCaption}. */
676
601
  async editMessageCaption(messageId, params) {
677
602
  const chatId = this.#mustGetChatId();
678
603
  return await this.client.editMessageCaption(chatId, messageId, params);
679
604
  }
680
- /**
681
- * Context-aware alias for {@link Client.editMessageLiveLocation}.
682
- */
605
+ /** Context-aware alias for {@link Client.editMessageLiveLocation}. */
683
606
  async editMessageLiveLocation(messageId, latitude, longitude, params) {
684
607
  const chatId = this.#mustGetChatId();
685
608
  return await this.client.editMessageLiveLocation(chatId, messageId, latitude, longitude, params);
686
609
  }
687
- /**
688
- * Context-aware alias for {@link Client.editMessageMedia}.
689
- */
610
+ /** Context-aware alias for {@link Client.editMessageMedia}. */
690
611
  async editMessageMedia(messageId, media, params) {
691
612
  const chatId = this.#mustGetChatId();
692
613
  return await this.client.editMessageMedia(chatId, messageId, media, params);
693
614
  }
694
- /**
695
- * Context-aware alias for {@link Client.editMessageReplyMarkup}.
696
- */
615
+ /** Context-aware alias for {@link Client.editMessageReplyMarkup}. */
697
616
  async editMessageReplyMarkup(messageId, params) {
698
617
  const chatId = this.#mustGetChatId();
699
618
  return await this.client.editMessageReplyMarkup(chatId, messageId, params);
700
619
  }
701
- /**
702
- * Context-aware alias for {@link Client.editMessageText}.
703
- */
620
+ /** Context-aware alias for {@link Client.editMessageText}. */
704
621
  async editMessageText(messageId, text, params) {
705
622
  const chatId = this.#mustGetChatId();
706
623
  return await this.client.editMessageText(chatId, messageId, text, params);
707
624
  }
708
- /**
709
- * Context-aware alias for {@link Client.editTopic}.
710
- */
625
+ /** Context-aware alias for {@link Client.editTopic}. */
711
626
  async editTopic(topicId, title, params) {
712
627
  const chatId = this.#mustGetChatId();
713
628
  return await this.client.editTopic(chatId, topicId, title, params);
714
629
  }
715
- /**
716
- * Context-aware alias for {@link Client.enableAntispam}.
717
- */
630
+ /** Context-aware alias for {@link Client.enableAntispam}. */
718
631
  async enableAntispam() {
719
632
  const chatId = this.#mustGetChatId();
720
633
  return await this.client.enableAntispam(chatId);
721
634
  }
722
- /**
723
- * Context-aware alias for {@link Client.enableBusinessBots}.
724
- */
635
+ /** Context-aware alias for {@link Client.enableBusinessBots}. */
725
636
  async enableBusinessBots() {
726
637
  const chatId = this.#mustGetChatId();
727
638
  return await this.client.enableBusinessBots(chatId);
728
639
  }
729
- /**
730
- * Context-aware alias for {@link Client.enableJoinRequests}.
731
- */
640
+ /** Context-aware alias for {@link Client.enableJoinRequests}. */
732
641
  async enableJoinRequests() {
733
642
  const chatId = this.#mustGetChatId();
734
643
  return await this.client.enableJoinRequests(chatId);
735
644
  }
736
- /**
737
- * Context-aware alias for {@link Client.enableSharing}.
738
- */
645
+ /** Context-aware alias for {@link Client.enableSharing}. */
739
646
  async enableSharing() {
740
647
  const chatId = this.#mustGetChatId();
741
648
  return await this.client.enableSharing(chatId);
742
649
  }
743
- /**
744
- * Context-aware alias for {@link Client.enableSignatures}.
745
- */
650
+ /** Context-aware alias for {@link Client.enableSignatures}. */
746
651
  async enableSignatures(params) {
747
652
  const chatId = this.#mustGetChatId();
748
653
  return await this.client.enableSignatures(chatId, params);
749
654
  }
750
- /**
751
- * Context-aware alias for {@link Client.enableTopics}.
752
- */
655
+ /** Context-aware alias for {@link Client.enableTopics}. */
753
656
  async enableTopics(isShownAsTabs) {
754
657
  const chatId = this.#mustGetChatId();
755
658
  return await this.client.enableTopics(chatId, isShownAsTabs);
756
659
  }
757
- /**
758
- * Context-aware alias for {@link Client.forwardMessage}.
759
- */
660
+ /** Context-aware alias for {@link Client.forwardMessage}. */
760
661
  async forward(to, params) {
761
662
  const { chatId, messageId } = this.#mustGetMsg();
762
663
  return await this.client.forwardMessage(chatId, to, messageId, params);
763
664
  }
764
- /**
765
- * Context-aware alias for {@link Client.forwardMessage}.
766
- */
665
+ /** Context-aware alias for {@link Client.forwardMessage}. */
767
666
  async forwardMessage(to, messageId, params) {
768
667
  const chatId = this.#mustGetChatId();
769
668
  return await this.client.forwardMessage(chatId, to, messageId, params);
770
669
  }
771
- /**
772
- * Context-aware alias for {@link Client.forwardMessages}.
773
- */
670
+ /** Context-aware alias for {@link Client.forwardMessages}. */
774
671
  async forwardMessages(to, messageIds, params) {
775
672
  const chatId = this.#mustGetChatId();
776
673
  return await this.client.forwardMessages(chatId, to, messageIds, params);
777
674
  }
778
- /**
779
- * Context-aware alias for {@link Client.getBusinessConnection}.
780
- */
675
+ /** Context-aware alias for {@link Client.getBusinessConnection}. */
781
676
  async getBusinessConnection() {
782
677
  const { businessConnectionId } = this.#mustGetMsg();
783
678
  if (!businessConnectionId) {
@@ -785,163 +680,117 @@ class Context {
785
680
  }
786
681
  return await this.client.getBusinessConnection(businessConnectionId);
787
682
  }
788
- /**
789
- * Context-aware alias for {@link Client.getChat}.
790
- */
683
+ /** Context-aware alias for {@link Client.getChat}. */
791
684
  async getChat() {
792
685
  const chatId = this.#mustGetChatId();
793
686
  return await this.client.getChat(chatId);
794
687
  }
795
- /**
796
- * Context-aware alias for {@link Client.getChatAdministrators}.
797
- */
688
+ /** Context-aware alias for {@link Client.getChatAdministrators}. */
798
689
  async getChatAdministrators() {
799
690
  const chatId = this.#mustGetChatId();
800
691
  return await this.client.getChatAdministrators(chatId);
801
692
  }
802
- /**
803
- * Context-aware alias for {@link Client.getChatMember}.
804
- */
693
+ /** Context-aware alias for {@link Client.getChatMember}. */
805
694
  async getChatMember(userId) {
806
695
  const chatId = this.#mustGetChatId();
807
696
  return await this.client.getChatMember(chatId, userId);
808
697
  }
809
- /**
810
- * Context-aware alias for {@link Client.getChatMembers}.
811
- */
698
+ /** Context-aware alias for {@link Client.getChatMembers}. */
812
699
  async getChatMembers(params) {
813
700
  const chatId = this.#mustGetChatId();
814
701
  return await this.client.getChatMembers(chatId, params);
815
702
  }
816
- /**
817
- * Context-aware alias for {@link Client.getChatSettings}.
818
- */
703
+ /** Context-aware alias for {@link Client.getChatSettings}. */
819
704
  async getChatSettings() {
820
705
  const chatId = this.#mustGetChatId();
821
706
  return await this.client.getChatSettings(chatId);
822
707
  }
823
- /**
824
- * Context-aware alias for {@link Client.getClaimedGifts}.
825
- */
708
+ /** Context-aware alias for {@link Client.getClaimedGifts}. */
826
709
  async getClaimedGifts(params) {
827
710
  const chatId = this.#mustGetChatId();
828
711
  return await this.client.getClaimedGifts(chatId, params);
829
712
  }
830
- /**
831
- * Context-aware alias for {@link Client.getChatSettings}.
832
- */
713
+ /** Context-aware alias for {@link Client.getChatSettings}. */
833
714
  async getCommonChats() {
834
715
  const chatId = this.#mustGetChatId();
835
716
  return await this.client.getCommonChats(chatId);
836
717
  }
837
- /**
838
- * Context-aware alias for {@link Client.getCreatedInviteLinks}.
839
- */
718
+ /** Context-aware alias for {@link Client.getCreatedInviteLinks}. */
840
719
  async getCreatedInviteLinks(params) {
841
720
  const chatId = this.#mustGetChatId();
842
721
  return await this.client.getCreatedInviteLinks(chatId, params);
843
722
  }
844
- /**
845
- * Context-aware alias for {@link Client.getHistory}.
846
- */
723
+ /** Context-aware alias for {@link Client.getHistory}. */
847
724
  async getHistory(params) {
848
725
  const chatId = this.#mustGetChatId();
849
726
  return await this.client.getHistory(chatId, params);
850
727
  }
851
- /**
852
- * Context-aware alias for {@link Client.getJoinRequests}.
853
- */
728
+ /** Context-aware alias for {@link Client.getJoinRequests}. */
854
729
  async getJoinRequests(params) {
855
730
  const chatId = this.#mustGetChatId();
856
731
  return await this.client.getJoinRequests(chatId, params);
857
732
  }
858
- /**
859
- * Context-aware alias for {@link Client.getMessage}.
860
- */
733
+ /** Context-aware alias for {@link Client.getMessage}. */
861
734
  async getMessage(messageId) {
862
735
  const chatId = this.#mustGetChatId();
863
736
  return await this.client.getMessage(chatId, messageId);
864
737
  }
865
- /**
866
- * Context-aware alias for {@link Client.getMessageReactions}.
867
- */
738
+ /** Context-aware alias for {@link Client.getMessageReactions}. */
868
739
  async getMessageReactions(messageId) {
869
740
  const chatId = this.#mustGetChatId();
870
741
  return await this.client.getMessageReactions(chatId, messageId);
871
742
  }
872
- /**
873
- * Context-aware alias for {@link Client.getMessages}.
874
- */
743
+ /** Context-aware alias for {@link Client.getMessages}. */
875
744
  async getMessages(messageIds) {
876
745
  const chatId = this.#mustGetChatId();
877
746
  return await this.client.getMessages(chatId, messageIds);
878
747
  }
879
- /**
880
- * Context-aware alias for {@link Client.getSavedMessages}.
881
- */
748
+ /** Context-aware alias for {@link Client.getSavedMessages}. */
882
749
  async getSavedMessages(params) {
883
750
  const chatId = this.#mustGetChatId();
884
751
  return await this.client.getSavedMessages(chatId, params);
885
752
  }
886
- /**
887
- * Context-aware alias for {@link Client.getSimilarBots}.
888
- */
753
+ /** Context-aware alias for {@link Client.getSimilarBots}. */
889
754
  async getSimilarBots() {
890
755
  const chatId = this.#mustGetChatId();
891
756
  return await this.client.getSimilarBots(chatId);
892
757
  }
893
- /**
894
- * Context-aware alias for {@link Client.getSimilarChannels}.
895
- */
758
+ /** Context-aware alias for {@link Client.getSimilarChannels}. */
896
759
  async getSimilarChannels() {
897
760
  const chatId = this.#mustGetChatId();
898
761
  return await this.client.getSimilarChannels(chatId);
899
762
  }
900
- /**
901
- * Context-aware alias for {@link Client.getStories}.
902
- */
763
+ /** Context-aware alias for {@link Client.getStories}. */
903
764
  async getStories(storyIds) {
904
765
  const chatId = this.#mustGetChatId();
905
766
  return await this.client.getStories(chatId, storyIds);
906
767
  }
907
- /**
908
- * Context-aware alias for {@link Client.getStory}.
909
- */
768
+ /** Context-aware alias for {@link Client.getStory}. */
910
769
  async getStory(storyId) {
911
770
  const chatId = this.#mustGetChatId();
912
771
  return await this.client.getStory(chatId, storyId);
913
772
  }
914
- /**
915
- * Context-aware alias for {@link Client.sendGift}.
916
- */
773
+ /** Context-aware alias for {@link Client.sendGift}. */
917
774
  async gift(giftId, params) {
918
775
  const chatId = this.#mustGetChatId();
919
776
  return await this.client.sendGift(chatId, giftId, params);
920
777
  }
921
- /**
922
- * Context-aware alias for {@link Client.hideGeneralTopic}.
923
- */
778
+ /** Context-aware alias for {@link Client.hideGeneralTopic}. */
924
779
  async hideGeneralTopic() {
925
780
  const chatId = this.#mustGetChatId();
926
781
  return await this.client.hideGeneralTopic(chatId);
927
782
  }
928
- /**
929
- * Context-aware alias for {@link Client.hideMemberList}.
930
- */
783
+ /** Context-aware alias for {@link Client.hideMemberList}. */
931
784
  async hideMemberList() {
932
785
  const chatId = this.#mustGetChatId();
933
786
  return await this.client.hideMemberList(chatId);
934
787
  }
935
- /**
936
- * Context-aware alias for {@link Client.kickChatMember}.
937
- */
788
+ /** Context-aware alias for {@link Client.kickChatMember}. */
938
789
  async kickChatMember(memberId) {
939
790
  const chatId = this.#mustGetChatId();
940
791
  return await this.client.kickChatMember(chatId, memberId);
941
792
  }
942
- /**
943
- * Context-aware alias for {@link Client.kickChatMember}.
944
- */
793
+ /** Context-aware alias for {@link Client.kickChatMember}. */
945
794
  async kickSender() {
946
795
  const { chatId, senderId } = this.#mustGetMsg();
947
796
  if (!senderId) {
@@ -949,351 +798,257 @@ class Context {
949
798
  }
950
799
  return await this.client.kickChatMember(chatId, senderId);
951
800
  }
952
- /**
953
- * Context-aware alias for {@link Client.leaveChat}.
954
- */
801
+ /** Context-aware alias for {@link Client.leaveChat}. */
955
802
  async leaveChat() {
956
803
  const chatId = this.#mustGetChatId();
957
804
  return await this.client.leaveChat(chatId);
958
805
  }
959
- /**
960
- * Context-aware alias for {@link Client.openChat}.
961
- */
806
+ /** Context-aware alias for {@link Client.openChat}. */
962
807
  async open() {
963
808
  const chatId = this.#mustGetChatId();
964
809
  return await this.client.openChat(chatId);
965
810
  }
966
- /**
967
- * Context-aware alias for {@link Client.pauseBusinessBotConnection}.
968
- */
811
+ /** Context-aware alias for {@link Client.pauseBusinessBotConnection}. */
969
812
  async pauseBusinessBotConnection() {
970
813
  const chatId = this.#mustGetChatId();
971
814
  return await this.client.pauseBusinessBotConnection(chatId);
972
815
  }
973
- /**
974
- * Context-aware alias for {@link Client.pinMessage}.
975
- */
816
+ /** Context-aware alias for {@link Client.pinMessage}. */
976
817
  async pin(params) {
977
818
  const { chatId, messageId, businessConnectionId } = this.#mustGetMsg();
978
819
  return await this.client.pinMessage(chatId, messageId, { ...params, businessConnectionId });
979
820
  }
980
- /**
981
- * Context-aware alias for {@link Client.pinMessage}.
982
- */
821
+ /** Context-aware alias for {@link Client.pinMessage}. */
983
822
  async pinMessage(messageId, params) {
984
823
  const chatId = this.#mustGetChatId();
985
824
  return await this.client.pinMessage(chatId, messageId, params);
986
825
  }
987
- /**
988
- * Context-aware alias for {@link Client.pinTopic}.
989
- */
826
+ /** Context-aware alias for {@link Client.pinTopic}. */
990
827
  async pinTopic(topicId) {
991
828
  const chatId = this.#mustGetChatId();
992
829
  return await this.client.pinTopic(chatId, topicId);
993
830
  }
994
- /**
995
- * Context-aware alias for {@link Client.promoteChatMember}.
996
- */
831
+ /** Context-aware alias for {@link Client.promoteChatMember}. */
997
832
  async promoteChatMember(userId, params) {
998
833
  const chatId = this.#mustGetChatId();
999
834
  return await this.client.promoteChatMember(chatId, userId, params);
1000
835
  }
1001
- /**
1002
- * Context-aware alias for {@link Client.setReactions}.
1003
- */
836
+ /** Context-aware alias for {@link Client.setReactions}. */
1004
837
  async react(reactions, params) {
1005
838
  const { chatId, messageId } = this.#mustGetMsg();
1006
839
  return await this.client.setReactions(chatId, messageId, reactions, params);
1007
840
  }
1008
- /**
1009
- * Context-aware alias for {@link Client.readMessages}.
1010
- */
841
+ /** Context-aware alias for {@link Client.readMessages}. */
1011
842
  async read() {
1012
843
  const { chatId, messageId } = this.#mustGetMsg();
1013
844
  return await this.client.readMessages(chatId, messageId);
1014
845
  }
1015
- /**
1016
- * Context-aware alias for {@link Client.refundStarPayment}.
1017
- */
846
+ /** Context-aware alias for {@link Client.refundStarPayment}. */
1018
847
  async refundStarPayment(telegramPaymentChargeId) {
1019
848
  const chatId = this.#mustGetChatId();
1020
849
  return await this.client.refundStarPayment(chatId, telegramPaymentChargeId);
1021
850
  }
1022
- /**
1023
- * Context-aware alias for {@link Client.deleteContact}.
1024
- */
851
+ /** Context-aware alias for {@link Client.deleteContact}. */
1025
852
  async removeAsContact() {
1026
853
  const chatId = this.#mustGetChatId();
1027
854
  return await this.client.deleteContact(chatId);
1028
855
  }
1029
- /**
1030
- * Context-aware alias for {@link Client.removeReaction}.
1031
- */
856
+ /** Context-aware alias for {@link Client.removeReaction}. */
1032
857
  async removeReaction(messageId, reaction) {
1033
858
  const chatId = this.#mustGetChatId();
1034
859
  return await this.client.removeReaction(chatId, messageId, reaction);
1035
860
  }
1036
- /**
1037
- * Context-aware alias for {@link Client.removeStoriesFromHighlights}.
1038
- */
861
+ /** Context-aware alias for {@link Client.removeStoriesFromHighlights}. */
1039
862
  async removeStoriesFromHighlights(storyIds) {
1040
863
  const chatId = this.#mustGetChatId();
1041
864
  return await this.client.removeStoriesFromHighlights(chatId, storyIds);
1042
865
  }
1043
- /**
1044
- * Context-aware alias for {@link Client.removeStoryFromHighlights}.
1045
- */
866
+ /** Context-aware alias for {@link Client.removeStoryFromHighlights}. */
1046
867
  async removeStoryFromHighlights(storyId) {
1047
868
  const chatId = this.#mustGetChatId();
1048
869
  return await this.client.removeStoryFromHighlights(chatId, storyId);
1049
870
  }
1050
- /**
1051
- * Context-aware alias for {@link Client.reopenTopic}.
1052
- */
871
+ /** Context-aware alias for {@link Client.reopenTopic}. */
1053
872
  async reopenTopic(topicId) {
1054
873
  const chatId = this.#mustGetChatId();
1055
874
  return await this.client.reopenTopic(chatId, topicId);
1056
875
  }
1057
- /**
1058
- * Context-aware alias for {@link Client.sendMessage}.
1059
- */
876
+ /** Context-aware alias for {@link Client.sendMessage}. */
1060
877
  async reply(text, params) {
1061
878
  const { chatId, messageId, businessConnectionId } = this.#mustGetMsg();
1062
879
  const replyTo = this.#getReplyTo(params?.isQuoted, chatId, messageId);
1063
880
  return await this.client.sendMessage(chatId, text, { ...params, ...replyTo, businessConnectionId });
1064
881
  }
1065
- /**
1066
- * Context-aware alias for {@link Client.sendAnimation}.
1067
- */
882
+ /** Context-aware alias for {@link Client.sendAnimation}. */
1068
883
  async replyAnimation(animation, params) {
1069
884
  const { chatId, messageId, businessConnectionId } = this.#mustGetMsg();
1070
885
  const replyTo = this.#getReplyTo(params?.isQuoted, chatId, messageId);
1071
886
  return await this.client.sendAnimation(chatId, animation, { ...params, ...replyTo, businessConnectionId });
1072
887
  }
1073
- /**
1074
- * Context-aware alias for {@link Client.sendAudio}.
1075
- */
888
+ /** Context-aware alias for {@link Client.sendAudio}. */
1076
889
  async replyAudio(audio, params) {
1077
890
  const { chatId, messageId, businessConnectionId } = this.#mustGetMsg();
1078
891
  const replyTo = this.#getReplyTo(params?.isQuoted, chatId, messageId);
1079
892
  return await this.client.sendAudio(chatId, audio, { ...params, ...replyTo, businessConnectionId });
1080
893
  }
1081
- /**
1082
- * Context-aware alias for {@link Client.sendChecklist}.
1083
- */
894
+ /** Context-aware alias for {@link Client.sendChecklist}. */
1084
895
  async replyChecklist(title, items, params) {
1085
896
  const { chatId, messageId, businessConnectionId } = this.#mustGetMsg();
1086
897
  const replyTo = this.#getReplyTo(params?.isQuoted, chatId, messageId);
1087
898
  return await this.client.sendChecklist(chatId, title, items, { ...params, ...replyTo, businessConnectionId });
1088
899
  }
1089
- /**
1090
- * Context-aware alias for {@link Client.sendContact}.
1091
- */
900
+ /** Context-aware alias for {@link Client.sendContact}. */
1092
901
  async replyContact(firstName, number, params) {
1093
902
  const { chatId, messageId, businessConnectionId } = this.#mustGetMsg();
1094
903
  const replyTo = this.#getReplyTo(params?.isQuoted, chatId, messageId);
1095
904
  return await this.client.sendContact(chatId, firstName, number, { ...params, ...replyTo, businessConnectionId });
1096
905
  }
1097
- /**
1098
- * Context-aware alias for {@link Client.sendDice}.
1099
- */
906
+ /** Context-aware alias for {@link Client.sendDice}. */
1100
907
  async replyDice(params) {
1101
908
  const { chatId, messageId, businessConnectionId } = this.#mustGetMsg();
1102
909
  const replyTo = this.#getReplyTo(params?.isQuoted, chatId, messageId);
1103
910
  return await this.client.sendDice(chatId, { ...params, ...replyTo, businessConnectionId });
1104
911
  }
1105
- /**
1106
- * Context-aware alias for {@link Client.sendDocument}.
1107
- */
912
+ /** Context-aware alias for {@link Client.sendDocument}. */
1108
913
  async replyDocument(document, params) {
1109
914
  const { chatId, messageId, businessConnectionId } = this.#mustGetMsg();
1110
915
  const replyTo = this.#getReplyTo(params?.isQuoted, chatId, messageId);
1111
916
  return await this.client.sendDocument(chatId, document, { ...params, ...replyTo, businessConnectionId });
1112
917
  }
1113
- /**
1114
- * Context-aware alias for {@link Client.sendMessageDraft}.
1115
- */
918
+ /** Context-aware alias for {@link Client.sendMessageDraft}. */
1116
919
  async replyDraft(draftId, text, params) {
1117
920
  const { chatId, messageId } = this.#mustGetMsg();
1118
921
  const replyTo = this.#getReplyTo(params?.isQuoted, chatId, messageId);
1119
922
  return await this.client.sendMessageDraft(chatId, draftId, text, { ...params, ...replyTo });
1120
923
  }
1121
- /**
1122
- * Context-aware alias for {@link Client.sendInvoice}.
1123
- */
924
+ /** Context-aware alias for {@link Client.sendInvoice}. */
1124
925
  async replyInvoice(title, description, payload, currency, prices, params) {
1125
926
  const { chatId, messageId, businessConnectionId } = this.#mustGetMsg();
1126
927
  const replyTo = this.#getReplyTo(params?.isQuoted, chatId, messageId);
1127
928
  return await this.client.sendInvoice(chatId, title, description, payload, currency, prices, { ...params, ...replyTo, businessConnectionId });
1128
929
  }
1129
- /**
1130
- * Context-aware alias for {@link Client.sendLocation}.
1131
- */
930
+ /** Context-aware alias for {@link Client.sendLocation}. */
1132
931
  async replyLocation(latitude, longitude, params) {
1133
932
  const { chatId, messageId, businessConnectionId } = this.#mustGetMsg();
1134
933
  const replyTo = this.#getReplyTo(params?.isQuoted, chatId, messageId);
1135
934
  return await this.client.sendLocation(chatId, latitude, longitude, { ...params, ...replyTo, businessConnectionId });
1136
935
  }
1137
- /**
1138
- * Context-aware alias for {@link Client.sendMediaGroup}.
1139
- */
936
+ /** Context-aware alias for {@link Client.sendMediaGroup}. */
1140
937
  async replyMediaGroup(media, params) {
1141
938
  const { chatId, messageId, businessConnectionId } = this.#mustGetMsg();
1142
939
  const replyTo = this.#getReplyTo(params?.isQuoted, chatId, messageId);
1143
940
  return await this.client.sendMediaGroup(chatId, media, { ...params, ...replyTo, businessConnectionId });
1144
941
  }
1145
- /**
1146
- * Context-aware alias for {@link Client.sendPhoto}.
1147
- */
942
+ /** Context-aware alias for {@link Client.sendPhoto}. */
1148
943
  async replyPhoto(photo, params) {
1149
944
  const { chatId, messageId, businessConnectionId } = this.#mustGetMsg();
1150
945
  const replyTo = this.#getReplyTo(params?.isQuoted, chatId, messageId);
1151
946
  return await this.client.sendPhoto(chatId, photo, { ...params, ...replyTo, businessConnectionId });
1152
947
  }
1153
- /**
1154
- * Context-aware alias for {@link Client.sendPoll}.
1155
- */
948
+ /** Context-aware alias for {@link Client.sendPoll}. */
1156
949
  async replyPoll(question, options, params) {
1157
950
  const { chatId, messageId, businessConnectionId } = this.#mustGetMsg();
1158
951
  const replyTo = this.#getReplyTo(params?.isQuoted, chatId, messageId);
1159
952
  return await this.client.sendPoll(chatId, question, options, { ...params, ...replyTo, businessConnectionId });
1160
953
  }
1161
- /**
1162
- * Context-aware alias for {@link Client.sendSticker}.
1163
- */
954
+ /** Context-aware alias for {@link Client.sendSticker}. */
1164
955
  async replySticker(sticker, params) {
1165
956
  const { chatId, messageId, businessConnectionId } = this.#mustGetMsg();
1166
957
  const replyTo = this.#getReplyTo(params?.isQuoted, chatId, messageId);
1167
958
  return await this.client.sendSticker(chatId, sticker, { ...params, ...replyTo, businessConnectionId });
1168
959
  }
1169
- /**
1170
- * Context-aware alias for {@link Client.sendVenue}.
1171
- */
960
+ /** Context-aware alias for {@link Client.sendVenue}. */
1172
961
  async replyVenue(latitude, longitude, title, address, params) {
1173
962
  const { chatId, messageId, businessConnectionId } = this.#mustGetMsg();
1174
963
  const replyTo = this.#getReplyTo(params?.isQuoted, chatId, messageId);
1175
964
  return await this.client.sendVenue(chatId, latitude, longitude, title, address, { ...params, ...replyTo, businessConnectionId });
1176
965
  }
1177
- /**
1178
- * Context-aware alias for {@link Client.sendVideo}.
1179
- */
966
+ /** Context-aware alias for {@link Client.sendVideo}. */
1180
967
  async replyVideo(video, params) {
1181
968
  const { chatId, messageId, businessConnectionId } = this.#mustGetMsg();
1182
969
  const replyTo = this.#getReplyTo(params?.isQuoted, chatId, messageId);
1183
970
  return await this.client.sendVideo(chatId, video, { ...params, ...replyTo, businessConnectionId });
1184
971
  }
1185
- /**
1186
- * Context-aware alias for {@link Client.sendVideoNote}.
1187
- */
972
+ /** Context-aware alias for {@link Client.sendVideoNote}. */
1188
973
  async replyVideoNote(videoNote, params) {
1189
974
  const { chatId, messageId, businessConnectionId } = this.#mustGetMsg();
1190
975
  const replyTo = this.#getReplyTo(params?.isQuoted, chatId, messageId);
1191
976
  return await this.client.sendVideoNote(chatId, videoNote, { ...params, ...replyTo, businessConnectionId });
1192
977
  }
1193
- /**
1194
- * Context-aware alias for {@link Client.sendVoice}.
1195
- */
978
+ /** Context-aware alias for {@link Client.sendVoice}. */
1196
979
  async replyVoice(voice, params) {
1197
980
  const { chatId, messageId, businessConnectionId } = this.#mustGetMsg();
1198
981
  const replyTo = this.#getReplyTo(params?.isQuoted, chatId, messageId);
1199
982
  return await this.client.sendVoice(chatId, voice, { ...params, ...replyTo, businessConnectionId });
1200
983
  }
1201
- /**
1202
- * Context-aware alias for {@link Client.resumeBusinessBotConnection}.
1203
- */
984
+ /** Context-aware alias for {@link Client.resumeBusinessBotConnection}. */
1204
985
  async resumeBusinessBotConnection() {
1205
986
  const chatId = this.#mustGetChatId();
1206
987
  return await this.client.resumeBusinessBotConnection(chatId);
1207
988
  }
1208
- /**
1209
- * Context-aware alias for {@link Client.scheduleVideoChat}.
1210
- */
989
+ /** Context-aware alias for {@link Client.scheduleVideoChat}. */
1211
990
  async scheduleVideoChat(startAt, params) {
1212
991
  const chatId = this.#mustGetChatId();
1213
992
  return await this.client.scheduleVideoChat(chatId, startAt, params);
1214
993
  }
1215
- /**
1216
- * Context-aware alias for {@link Client.searchMessages}.
1217
- */
994
+ /** Context-aware alias for {@link Client.searchMessages}. */
1218
995
  async searchMessages(params) {
1219
996
  const chatId = this.#mustGetChatId();
1220
997
  params ??= {};
1221
998
  params.chatId = chatId;
1222
999
  return await this.client.searchMessages(params);
1223
1000
  }
1224
- /**
1225
- * Context-aware alias for {@link Client.sendChatAction}.
1226
- */
1001
+ /** Context-aware alias for {@link Client.sendChatAction}. */
1227
1002
  async sendChatAction(action, params) {
1228
1003
  const chatId = this.#mustGetChatId();
1229
1004
  return await this.client.sendChatAction(chatId, action, params);
1230
1005
  }
1231
- /**
1232
- * Context-aware alias for {@link Client.sendScheduledMessage}.
1233
- */
1006
+ /** Context-aware alias for {@link Client.sendScheduledMessage}. */
1234
1007
  async sendScheduledMessage(messageId) {
1235
1008
  const chatId = this.#mustGetChatId();
1236
1009
  return await this.client.sendScheduledMessage(chatId, messageId);
1237
1010
  }
1238
- /**
1239
- * Context-aware alias for {@link Client.setAvailableReactions}.
1240
- */
1011
+ /** Context-aware alias for {@link Client.setAvailableReactions}. */
1241
1012
  async setAvailableReactions(availableReactions) {
1242
1013
  const chatId = this.#mustGetChatId();
1243
1014
  return await this.client.setAvailableReactions(chatId, availableReactions);
1244
1015
  }
1245
- /**
1246
- * Context-aware alias for {@link Client.setBoostsRequiredToCircumventRestrictions}.
1247
- */
1016
+ /** Context-aware alias for {@link Client.setBoostsRequiredToCircumventRestrictions}. */
1248
1017
  async setBoostsRequiredToCircumventRestrictions(boosts) {
1249
1018
  const chatId = this.#mustGetChatId();
1250
1019
  return await this.client.setBoostsRequiredToCircumventRestrictions(chatId, boosts);
1251
1020
  }
1252
- /**
1253
- * Context-aware alias for {@link Client.setChatDescription}.
1254
- */
1021
+ /** Context-aware alias for {@link Client.setChatDescription}. */
1255
1022
  async setChatDescription(description) {
1256
1023
  const chatId = this.#mustGetChatId();
1257
1024
  return await this.client.setChatDescription(chatId, description);
1258
1025
  }
1259
- /**
1260
- * Context-aware alias for {@link Client.setChatMemberRights}.
1261
- */
1026
+ /** Context-aware alias for {@link Client.setChatMemberRights}. */
1262
1027
  async setChatMemberRights(memberId, params) {
1263
1028
  const chatId = this.#mustGetChatId();
1264
1029
  return await this.client.setChatMemberRights(chatId, memberId, params);
1265
1030
  }
1266
- /**
1267
- * Context-aware alias for {@link Client.setChatPhoto}.
1268
- */
1031
+ /** Context-aware alias for {@link Client.setChatPhoto}. */
1269
1032
  async setChatPhoto(photo, params) {
1270
1033
  const chatId = this.#mustGetChatId();
1271
1034
  return await this.client.setChatPhoto(chatId, photo, params);
1272
1035
  }
1273
- /**
1274
- * Context-aware alias for {@link Client.setChatStickerSet}.
1275
- */
1036
+ /** Context-aware alias for {@link Client.setChatStickerSet}. */
1276
1037
  async setChatStickerSet(setName) {
1277
1038
  const chatId = this.#mustGetChatId();
1278
1039
  return await this.client.setChatStickerSet(chatId, setName);
1279
1040
  }
1280
- /**
1281
- * Context-aware alias for {@link Client.setChatTitle}.
1282
- */
1041
+ /** Context-aware alias for {@link Client.setChatTitle}. */
1283
1042
  async setChatTitle(title) {
1284
1043
  const chatId = this.#mustGetChatId();
1285
1044
  return await this.client.setChatTitle(chatId, title);
1286
1045
  }
1287
- /**
1288
- * Context-aware alias for {@link Client.setDiscussionChat}.
1289
- */
1046
+ /** Context-aware alias for {@link Client.setDiscussionChat}. */
1290
1047
  async setDiscussionChat(discussionChatId) {
1291
1048
  const chatId = this.#mustGetChatId();
1292
1049
  return await this.client.setDiscussionChat(chatId, discussionChatId);
1293
1050
  }
1294
- /**
1295
- * Context-aware alias for {@link Client.setChatMemberTag}.
1296
- */
1051
+ /** Context-aware alias for {@link Client.setChatMemberTag}. */
1297
1052
  async setMemberTag(params) {
1298
1053
  const { chatId, userId } = this.#mustGetMsg();
1299
1054
  if (!userId) {
@@ -1301,23 +1056,17 @@ class Context {
1301
1056
  }
1302
1057
  return await this.client.setChatMemberTag(chatId, userId, params);
1303
1058
  }
1304
- /**
1305
- * Context-aware alias for {@link Client.setMessageTtl}.
1306
- */
1059
+ /** Context-aware alias for {@link Client.setMessageTtl}. */
1307
1060
  async setMessageTtl(messageTtl) {
1308
1061
  const chatId = this.#mustGetChatId();
1309
1062
  return await this.client.setMessageTtl(chatId, messageTtl);
1310
1063
  }
1311
- /**
1312
- * Context-aware alias for {@link Client.setReactions}.
1313
- */
1064
+ /** Context-aware alias for {@link Client.setReactions}. */
1314
1065
  async setReactions(messageId, reactions, params) {
1315
1066
  const chatId = this.#mustGetChatId();
1316
1067
  return await this.client.setReactions(chatId, messageId, reactions, params);
1317
1068
  }
1318
- /**
1319
- * Context-aware alias for {@link Client.setChatMemberRights}.
1320
- */
1069
+ /** Context-aware alias for {@link Client.setChatMemberRights}. */
1321
1070
  async setSenderRights(params) {
1322
1071
  const { chatId, senderId } = this.#mustGetMsg();
1323
1072
  if (!senderId) {
@@ -1325,120 +1074,86 @@ class Context {
1325
1074
  }
1326
1075
  return await this.client.setChatMemberRights(chatId, senderId, params);
1327
1076
  }
1328
- /**
1329
- * Context-aware alias for {@link Client.setSlowMode}.
1330
- */
1077
+ /** Context-aware alias for {@link Client.setSlowMode}. */
1331
1078
  async setSlowMode(duration) {
1332
1079
  const chatId = this.#mustGetChatId();
1333
1080
  return await this.client.setSlowMode(chatId, duration);
1334
1081
  }
1335
- /**
1336
- * Context-aware alias for {@link Client.showGeneralTopic}.
1337
- */
1082
+ /** Context-aware alias for {@link Client.showGeneralTopic}. */
1338
1083
  async showGeneralTopic() {
1339
1084
  const chatId = this.#mustGetChatId();
1340
1085
  return await this.client.showGeneralTopic(chatId);
1341
1086
  }
1342
- /**
1343
- * Context-aware alias for {@link Client.showMemberList}.
1344
- */
1087
+ /** Context-aware alias for {@link Client.showMemberList}. */
1345
1088
  async showMemberList() {
1346
1089
  const chatId = this.#mustGetChatId();
1347
1090
  return await this.client.showMemberList(chatId);
1348
1091
  }
1349
- /**
1350
- * Context-aware alias for {@link Client.startVideoChat}.
1351
- */
1092
+ /** Context-aware alias for {@link Client.startVideoChat}. */
1352
1093
  async startVideoChat(params) {
1353
1094
  const chatId = this.#mustGetChatId();
1354
1095
  return await this.client.startVideoChat(chatId, params);
1355
1096
  }
1356
- /**
1357
- * Context-aware alias for {@link Client.stopPoll}.
1358
- */
1097
+ /** Context-aware alias for {@link Client.stopPoll}. */
1359
1098
  async stopPoll(messageId, params) {
1360
1099
  const chatId = this.#mustGetChatId();
1361
1100
  return await this.client.stopPoll(chatId, messageId, params);
1362
1101
  }
1363
- /**
1364
- * Context-aware alias for {@link Client.transcribeVoice}.
1365
- */
1102
+ /** Context-aware alias for {@link Client.transcribeVoice}. */
1366
1103
  async transcribeVoice(messageId) {
1367
1104
  const chatId = this.#mustGetChatId();
1368
1105
  return await this.client.transcribeVoice(chatId, messageId);
1369
1106
  }
1370
- /**
1371
- * Context-aware alias for {@link Client.transferChatOwnership}.
1372
- */
1107
+ /** Context-aware alias for {@link Client.transferChatOwnership}. */
1373
1108
  async transferOwnership(userId, password) {
1374
1109
  const chatId = this.#mustGetChatId();
1375
1110
  return await this.client.transferChatOwnership(chatId, userId, password);
1376
1111
  }
1377
- /**
1378
- * Context-aware alias for {@link Client.unarchiveChat}.
1379
- */
1112
+ /** Context-aware alias for {@link Client.unarchiveChat}. */
1380
1113
  async unarchive() {
1381
1114
  const chatId = this.#mustGetChatId();
1382
1115
  return await this.client.unarchiveChat(chatId);
1383
1116
  }
1384
- /**
1385
- * Context-aware alias for {@link Client.unbanChatMember}.
1386
- */
1117
+ /** Context-aware alias for {@link Client.unbanChatMember}. */
1387
1118
  async unbanChatMember(memberId) {
1388
1119
  const chatId = this.#mustGetChatId();
1389
1120
  return await this.client.unbanChatMember(chatId, memberId);
1390
1121
  }
1391
- /**
1392
- * Context-aware alias for {@link Client.unblockUser}.
1393
- */
1122
+ /** Context-aware alias for {@link Client.unblockUser}. */
1394
1123
  async unblockUser() {
1395
1124
  return await this.client.unblockUser(this.#mustGetUserId());
1396
1125
  }
1397
- /**
1398
- * Context-aware alias for {@link Client.uncheckChecklistItem}.
1399
- */
1126
+ /** Context-aware alias for {@link Client.uncheckChecklistItem}. */
1400
1127
  async uncheckChecklistItem(messageId, item) {
1401
1128
  const chatId = this.#mustGetChatId();
1402
1129
  return await this.client.uncheckChecklistItem(chatId, messageId, item);
1403
1130
  }
1404
- /**
1405
- * Context-aware alias for {@link Client.uncheckChecklistItems}.
1406
- */
1131
+ /** Context-aware alias for {@link Client.uncheckChecklistItems}. */
1407
1132
  async uncheckChecklistItems(messageId, items) {
1408
1133
  const chatId = this.#mustGetChatId();
1409
1134
  return await this.client.uncheckChecklistItems(chatId, messageId, items);
1410
1135
  }
1411
- /**
1412
- * Context-aware alias for {@link Client.unpinMessage}.
1413
- */
1136
+ /** Context-aware alias for {@link Client.unpinMessage}. */
1414
1137
  async unpin() {
1415
1138
  const { chatId, messageId, businessConnectionId } = this.#mustGetMsg();
1416
1139
  return await this.client.unpinMessage(chatId, messageId, { businessConnectionId });
1417
1140
  }
1418
- /**
1419
- * Context-aware alias for {@link Client.unpinMessage}.
1420
- */
1141
+ /** Context-aware alias for {@link Client.unpinMessage}. */
1421
1142
  async unpinMessage(messageId) {
1422
1143
  const chatId = this.#mustGetChatId();
1423
1144
  return await this.client.unpinMessage(chatId, messageId);
1424
1145
  }
1425
- /**
1426
- * Context-aware alias for {@link Client.unpinMessages}.
1427
- */
1146
+ /** Context-aware alias for {@link Client.unpinMessages}. */
1428
1147
  async unpinMessages() {
1429
1148
  const chatId = this.#mustGetChatId();
1430
1149
  return await this.client.unpinMessages(chatId);
1431
1150
  }
1432
- /**
1433
- * Context-aware alias for {@link Client.unpinTopic}.
1434
- */
1151
+ /** Context-aware alias for {@link Client.unpinTopic}. */
1435
1152
  async unpinTopic(topicId) {
1436
1153
  const chatId = this.#mustGetChatId();
1437
1154
  return await this.client.unpinTopic(chatId, topicId);
1438
1155
  }
1439
- /**
1440
- * Context-aware alias for {@link Client.updateChecklist}.
1441
- */
1156
+ /** Context-aware alias for {@link Client.updateChecklist}. */
1442
1157
  async updateChecklist(messageId, params) {
1443
1158
  const chatId = this.#mustGetChatId();
1444
1159
  return await this.client.updateChecklist(chatId, messageId, params);