@mtkruto/node 0.1.138 → 0.1.140

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 (287) hide show
  1. package/esm/3_types.d.ts +10 -36
  2. package/esm/3_types.js +10 -36
  3. package/esm/4_constants.d.ts +1 -1
  4. package/esm/4_constants.js +1 -1
  5. package/esm/5_client.d.ts +1 -1
  6. package/esm/5_client.js +1 -1
  7. package/esm/_dnt.polyfills.d.ts +6 -0
  8. package/esm/client/0_filters.d.ts +60 -0
  9. package/esm/client/0_filters.js +27 -0
  10. package/esm/client/0_message.js +2 -2
  11. package/esm/client/{3_params.d.ts → 0_params.d.ts} +30 -33
  12. package/esm/client/0_types.d.ts +39 -0
  13. package/esm/client/0_types.js +2 -0
  14. package/esm/client/0_utilities.d.ts +1 -47
  15. package/esm/client/0_utilities.js +0 -27
  16. package/esm/client/1_composer.d.ts +1 -1
  17. package/esm/client/1_composer.js +1 -1
  18. package/esm/client/1_file_manager.d.ts +10 -0
  19. package/esm/client/1_file_manager.js +241 -0
  20. package/esm/client/1_update_manager.d.ts +18 -0
  21. package/esm/client/1_update_manager.js +553 -0
  22. package/esm/client/2_message_manager.d.ts +40 -0
  23. package/esm/client/2_message_manager.js +621 -0
  24. package/esm/client/3_chat_list_manager.d.ts +21 -0
  25. package/esm/client/3_chat_list_manager.js +353 -0
  26. package/esm/client/3_reaction_manager.d.ts +16 -0
  27. package/esm/client/3_reaction_manager.js +61 -0
  28. package/esm/client/4_client.d.ts +187 -60
  29. package/esm/client/4_client.js +492 -1699
  30. package/esm/connection/1_connection_web_socket.js +6 -6
  31. package/esm/deps/raw.githubusercontent.com/MTKruto/debug/main/deps.d.ts +1 -1
  32. package/esm/deps/raw.githubusercontent.com/MTKruto/debug/main/deps.js +1 -1
  33. package/esm/deps/raw.githubusercontent.com/MTKruto/object-inspect/main/index.d.ts +1 -0
  34. package/esm/deps/raw.githubusercontent.com/MTKruto/object-inspect/main/index.js +524 -0
  35. package/esm/mod.d.ts +1 -0
  36. package/esm/mod.js +1 -0
  37. package/esm/storage/0_storage.d.ts +5 -3
  38. package/esm/storage/0_storage.js +14 -4
  39. package/esm/tl/1_tl_object.d.ts +1 -0
  40. package/esm/tl/1_tl_object.js +24 -0
  41. package/esm/types/0_bot_command.d.ts +1 -0
  42. package/esm/types/0_chat_member_rights.d.ts +37 -0
  43. package/esm/types/0_chat_photo.d.ts +4 -4
  44. package/esm/types/0_file_source.d.ts +5 -0
  45. package/esm/types/0_giveaway_parameters.js +2 -1
  46. package/esm/types/0_id.d.ts +4 -0
  47. package/esm/types/0_message_entity.d.ts +20 -20
  48. package/esm/types/1__getters.d.ts +2 -2
  49. package/esm/types/1_animation.d.ts +1 -1
  50. package/esm/types/1_bot_command_scope.d.ts +5 -4
  51. package/esm/types/1_chat_p.d.ts +5 -6
  52. package/esm/types/1_document.d.ts +1 -0
  53. package/esm/types/1_input_message_content.d.ts +88 -0
  54. package/esm/types/1_photo.d.ts +1 -1
  55. package/esm/types/1_sticker.d.ts +1 -1
  56. package/esm/types/1_user.d.ts +1 -1
  57. package/esm/types/1_video.d.ts +1 -1
  58. package/esm/types/1_video_note.d.ts +1 -1
  59. package/esm/types/2_inline_keyboard_button.d.ts +10 -10
  60. package/esm/types/2_message_reaction_count.d.ts +3 -0
  61. package/esm/types/2_message_reaction_count.js +17 -1
  62. package/esm/types/2_message_reactions.d.ts +15 -0
  63. package/esm/types/2_message_reactions.js +37 -0
  64. package/esm/types/3_reply_markup.d.ts +42 -0
  65. package/esm/types/3_reply_markup.js +117 -0
  66. package/esm/types/4_inline_query_result.d.ts +193 -0
  67. package/esm/types/{5_inline_query_result.js → 4_inline_query_result.js} +2 -2
  68. package/esm/types/4_message.d.ts +36 -39
  69. package/esm/types/4_message.js +7 -24
  70. package/esm/types/5_callback_query.d.ts +2 -1
  71. package/esm/types/5_chat.d.ts +8 -5
  72. package/esm/types/6_update.d.ts +12 -2
  73. package/esm/utilities/0_buffer.js +9 -6
  74. package/esm/utilities/0_object.d.ts +1 -1
  75. package/esm/utilities/0_object.js +1 -6
  76. package/esm/utilities/1_misc.d.ts +2 -0
  77. package/esm/utilities/1_misc.js +6 -0
  78. package/package.json +1 -2
  79. package/script/3_types.d.ts +10 -36
  80. package/script/3_types.js +10 -36
  81. package/script/4_constants.d.ts +1 -1
  82. package/script/4_constants.js +1 -1
  83. package/script/5_client.d.ts +1 -1
  84. package/script/5_client.js +1 -1
  85. package/script/_dnt.polyfills.d.ts +6 -0
  86. package/script/client/0_filters.d.ts +60 -0
  87. package/script/client/0_filters.js +31 -0
  88. package/script/client/0_message.js +1 -1
  89. package/script/client/{3_params.d.ts → 0_params.d.ts} +30 -33
  90. package/script/client/0_types.d.ts +39 -0
  91. package/script/client/0_types.js +6 -0
  92. package/script/client/0_utilities.d.ts +1 -47
  93. package/script/client/0_utilities.js +1 -29
  94. package/script/client/1_composer.d.ts +1 -1
  95. package/script/client/1_composer.js +2 -2
  96. package/script/client/1_file_manager.d.ts +10 -0
  97. package/script/client/1_file_manager.js +245 -0
  98. package/script/client/1_update_manager.d.ts +18 -0
  99. package/script/client/1_update_manager.js +557 -0
  100. package/script/client/2_message_manager.d.ts +40 -0
  101. package/script/client/2_message_manager.js +625 -0
  102. package/script/client/3_chat_list_manager.d.ts +21 -0
  103. package/script/client/3_chat_list_manager.js +357 -0
  104. package/script/client/3_reaction_manager.d.ts +16 -0
  105. package/script/client/3_reaction_manager.js +65 -0
  106. package/script/client/4_client.d.ts +187 -60
  107. package/script/client/4_client.js +491 -1699
  108. package/script/connection/1_connection_web_socket.js +5 -5
  109. package/script/deps/raw.githubusercontent.com/MTKruto/debug/main/deps.d.ts +1 -1
  110. package/script/deps/raw.githubusercontent.com/MTKruto/debug/main/deps.js +2 -2
  111. package/script/deps/raw.githubusercontent.com/MTKruto/object-inspect/main/index.d.ts +1 -0
  112. package/script/deps/raw.githubusercontent.com/MTKruto/object-inspect/main/index.js +550 -0
  113. package/script/mod.d.ts +1 -0
  114. package/script/mod.js +1 -0
  115. package/script/storage/0_storage.d.ts +5 -3
  116. package/script/storage/0_storage.js +14 -4
  117. package/script/tl/1_tl_object.d.ts +1 -0
  118. package/script/tl/1_tl_object.js +24 -0
  119. package/script/types/0_bot_command.d.ts +1 -0
  120. package/script/types/0_chat_member_rights.d.ts +37 -0
  121. package/script/types/0_chat_photo.d.ts +4 -4
  122. package/script/types/0_file_source.d.ts +5 -0
  123. package/script/types/0_giveaway_parameters.js +2 -1
  124. package/script/types/0_id.d.ts +4 -0
  125. package/script/types/0_message_entity.d.ts +20 -20
  126. package/script/types/1__getters.d.ts +2 -2
  127. package/script/types/1_animation.d.ts +1 -1
  128. package/script/types/1_bot_command_scope.d.ts +5 -4
  129. package/script/types/1_chat_p.d.ts +5 -6
  130. package/script/types/1_document.d.ts +1 -0
  131. package/script/types/1_input_message_content.d.ts +88 -0
  132. package/script/types/1_photo.d.ts +1 -1
  133. package/script/types/1_sticker.d.ts +1 -1
  134. package/script/types/1_user.d.ts +1 -1
  135. package/script/types/1_video.d.ts +1 -1
  136. package/script/types/1_video_note.d.ts +1 -1
  137. package/script/types/2_inline_keyboard_button.d.ts +10 -10
  138. package/script/types/2_message_reaction_count.d.ts +3 -0
  139. package/script/types/2_message_reaction_count.js +19 -0
  140. package/script/types/2_message_reactions.d.ts +15 -0
  141. package/script/types/2_message_reactions.js +41 -0
  142. package/script/types/3_reply_markup.d.ts +42 -0
  143. package/script/types/3_reply_markup.js +122 -0
  144. package/script/types/4_inline_query_result.d.ts +193 -0
  145. package/script/types/{5_inline_query_result.js → 4_inline_query_result.js} +3 -3
  146. package/script/types/4_message.d.ts +36 -39
  147. package/script/types/4_message.js +6 -23
  148. package/script/types/5_callback_query.d.ts +2 -1
  149. package/script/types/5_chat.d.ts +8 -5
  150. package/script/types/6_update.d.ts +12 -2
  151. package/script/utilities/0_buffer.js +9 -6
  152. package/script/utilities/0_object.d.ts +1 -1
  153. package/script/utilities/0_object.js +1 -6
  154. package/script/utilities/1_misc.d.ts +2 -0
  155. package/script/utilities/1_misc.js +9 -1
  156. package/esm/types/0_chat_id.d.ts +0 -4
  157. package/esm/types/0_force_reply.d.ts +0 -12
  158. package/esm/types/0_force_reply.js +0 -17
  159. package/esm/types/0_input_contact_message_content.d.ts +0 -11
  160. package/esm/types/0_input_location_message_content.d.ts +0 -15
  161. package/esm/types/0_input_venue_message_content.d.ts +0 -19
  162. package/esm/types/0_reply_keyboard_remove.d.ts +0 -10
  163. package/esm/types/0_reply_keyboard_remove.js +0 -8
  164. package/esm/types/1_input_invoice_message_content.d.ts +0 -23
  165. package/esm/types/1_input_text_message_content.d.ts +0 -8
  166. package/esm/types/1_input_text_message_content.js +0 -1
  167. package/esm/types/2_input_message_content.d.ts +0 -6
  168. package/esm/types/2_input_message_content.js +0 -1
  169. package/esm/types/2_reply_keyboard_markup.d.ts +0 -12
  170. package/esm/types/2_reply_keyboard_markup.js +0 -37
  171. package/esm/types/3_inline_keyboard_markup.d.ts +0 -8
  172. package/esm/types/3_inline_keyboard_markup.js +0 -24
  173. package/esm/types/4_inline_query_result_article.d.ts +0 -15
  174. package/esm/types/4_inline_query_result_article.js +0 -1
  175. package/esm/types/4_inline_query_result_audio.d.ts +0 -17
  176. package/esm/types/4_inline_query_result_audio.js +0 -1
  177. package/esm/types/4_inline_query_result_cached_audio.d.ts +0 -14
  178. package/esm/types/4_inline_query_result_cached_audio.js +0 -1
  179. package/esm/types/4_inline_query_result_cached_document.d.ts +0 -15
  180. package/esm/types/4_inline_query_result_cached_document.js +0 -1
  181. package/esm/types/4_inline_query_result_cached_gif.d.ts +0 -15
  182. package/esm/types/4_inline_query_result_cached_gif.js +0 -1
  183. package/esm/types/4_inline_query_result_cached_mpeg4_gif.d.ts +0 -15
  184. package/esm/types/4_inline_query_result_cached_mpeg4_gif.js +0 -1
  185. package/esm/types/4_inline_query_result_cached_photo.d.ts +0 -16
  186. package/esm/types/4_inline_query_result_cached_photo.js +0 -1
  187. package/esm/types/4_inline_query_result_cached_sticker.d.ts +0 -9
  188. package/esm/types/4_inline_query_result_cached_sticker.js +0 -1
  189. package/esm/types/4_inline_query_result_cached_video.d.ts +0 -16
  190. package/esm/types/4_inline_query_result_cached_video.js +0 -1
  191. package/esm/types/4_inline_query_result_cached_voice.d.ts +0 -15
  192. package/esm/types/4_inline_query_result_cached_voice.js +0 -1
  193. package/esm/types/4_inline_query_result_contact.d.ts +0 -15
  194. package/esm/types/4_inline_query_result_contact.js +0 -1
  195. package/esm/types/4_inline_query_result_document.d.ts +0 -18
  196. package/esm/types/4_inline_query_result_document.js +0 -1
  197. package/esm/types/4_inline_query_result_game.d.ts +0 -7
  198. package/esm/types/4_inline_query_result_game.js +0 -1
  199. package/esm/types/4_inline_query_result_gif.d.ts +0 -20
  200. package/esm/types/4_inline_query_result_gif.js +0 -1
  201. package/esm/types/4_inline_query_result_location.d.ts +0 -18
  202. package/esm/types/4_inline_query_result_location.js +0 -1
  203. package/esm/types/4_inline_query_result_mpeg4_gif.d.ts +0 -20
  204. package/esm/types/4_inline_query_result_mpeg4_gif.js +0 -1
  205. package/esm/types/4_inline_query_result_photo.d.ts +0 -19
  206. package/esm/types/4_inline_query_result_photo.js +0 -1
  207. package/esm/types/4_inline_query_result_venue.d.ts +0 -19
  208. package/esm/types/4_inline_query_result_venue.js +0 -1
  209. package/esm/types/4_inline_query_result_video.d.ts +0 -21
  210. package/esm/types/4_inline_query_result_video.js +0 -1
  211. package/esm/types/4_inline_query_result_voice.d.ts +0 -16
  212. package/esm/types/4_inline_query_result_voice.js +0 -1
  213. package/esm/types/4_reply_markup.d.ts +0 -7
  214. package/esm/types/4_reply_markup.js +0 -22
  215. package/esm/types/5_inline_query_result.d.ts +0 -28
  216. package/script/types/0_chat_id.d.ts +0 -4
  217. package/script/types/0_force_reply.d.ts +0 -12
  218. package/script/types/0_force_reply.js +0 -22
  219. package/script/types/0_input_contact_message_content.d.ts +0 -11
  220. package/script/types/0_input_location_message_content.d.ts +0 -15
  221. package/script/types/0_input_venue_message_content.d.ts +0 -19
  222. package/script/types/0_reply_keyboard_remove.d.ts +0 -10
  223. package/script/types/0_reply_keyboard_remove.js +0 -13
  224. package/script/types/1_input_invoice_message_content.d.ts +0 -23
  225. package/script/types/1_input_text_message_content.d.ts +0 -8
  226. package/script/types/1_input_text_message_content.js +0 -2
  227. package/script/types/2_input_message_content.d.ts +0 -6
  228. package/script/types/2_input_message_content.js +0 -2
  229. package/script/types/2_reply_keyboard_markup.d.ts +0 -12
  230. package/script/types/2_reply_keyboard_markup.js +0 -42
  231. package/script/types/3_inline_keyboard_markup.d.ts +0 -8
  232. package/script/types/3_inline_keyboard_markup.js +0 -29
  233. package/script/types/4_inline_query_result_article.d.ts +0 -15
  234. package/script/types/4_inline_query_result_article.js +0 -2
  235. package/script/types/4_inline_query_result_audio.d.ts +0 -17
  236. package/script/types/4_inline_query_result_audio.js +0 -2
  237. package/script/types/4_inline_query_result_cached_audio.d.ts +0 -14
  238. package/script/types/4_inline_query_result_cached_audio.js +0 -2
  239. package/script/types/4_inline_query_result_cached_document.d.ts +0 -15
  240. package/script/types/4_inline_query_result_cached_document.js +0 -2
  241. package/script/types/4_inline_query_result_cached_gif.d.ts +0 -15
  242. package/script/types/4_inline_query_result_cached_gif.js +0 -2
  243. package/script/types/4_inline_query_result_cached_mpeg4_gif.d.ts +0 -15
  244. package/script/types/4_inline_query_result_cached_mpeg4_gif.js +0 -2
  245. package/script/types/4_inline_query_result_cached_photo.d.ts +0 -16
  246. package/script/types/4_inline_query_result_cached_photo.js +0 -2
  247. package/script/types/4_inline_query_result_cached_sticker.d.ts +0 -9
  248. package/script/types/4_inline_query_result_cached_sticker.js +0 -2
  249. package/script/types/4_inline_query_result_cached_video.d.ts +0 -16
  250. package/script/types/4_inline_query_result_cached_video.js +0 -2
  251. package/script/types/4_inline_query_result_cached_voice.d.ts +0 -15
  252. package/script/types/4_inline_query_result_cached_voice.js +0 -2
  253. package/script/types/4_inline_query_result_contact.d.ts +0 -15
  254. package/script/types/4_inline_query_result_contact.js +0 -2
  255. package/script/types/4_inline_query_result_document.d.ts +0 -18
  256. package/script/types/4_inline_query_result_document.js +0 -2
  257. package/script/types/4_inline_query_result_game.d.ts +0 -7
  258. package/script/types/4_inline_query_result_game.js +0 -2
  259. package/script/types/4_inline_query_result_gif.d.ts +0 -20
  260. package/script/types/4_inline_query_result_gif.js +0 -2
  261. package/script/types/4_inline_query_result_location.d.ts +0 -18
  262. package/script/types/4_inline_query_result_location.js +0 -2
  263. package/script/types/4_inline_query_result_mpeg4_gif.d.ts +0 -20
  264. package/script/types/4_inline_query_result_mpeg4_gif.js +0 -2
  265. package/script/types/4_inline_query_result_photo.d.ts +0 -19
  266. package/script/types/4_inline_query_result_photo.js +0 -2
  267. package/script/types/4_inline_query_result_venue.d.ts +0 -19
  268. package/script/types/4_inline_query_result_venue.js +0 -2
  269. package/script/types/4_inline_query_result_video.d.ts +0 -21
  270. package/script/types/4_inline_query_result_video.js +0 -2
  271. package/script/types/4_inline_query_result_voice.d.ts +0 -16
  272. package/script/types/4_inline_query_result_voice.js +0 -2
  273. package/script/types/4_reply_markup.d.ts +0 -7
  274. package/script/types/4_reply_markup.js +0 -26
  275. package/script/types/5_inline_query_result.d.ts +0 -28
  276. /package/esm/{client/3_params.js → _dnt.polyfills.js} +0 -0
  277. /package/esm/{types/0_chat_id.js → client/0_params.js} +0 -0
  278. /package/esm/types/{0_input_contact_message_content.js → 0_chat_member_rights.js} +0 -0
  279. /package/esm/types/{0_input_location_message_content.js → 0_file_source.js} +0 -0
  280. /package/esm/types/{0_input_venue_message_content.js → 0_id.js} +0 -0
  281. /package/esm/types/{1_input_invoice_message_content.js → 1_input_message_content.js} +0 -0
  282. /package/script/{client/3_params.js → _dnt.polyfills.js} +0 -0
  283. /package/script/{types/0_chat_id.js → client/0_params.js} +0 -0
  284. /package/script/types/{0_input_contact_message_content.js → 0_chat_member_rights.js} +0 -0
  285. /package/script/types/{0_input_location_message_content.js → 0_file_source.js} +0 -0
  286. /package/script/types/{0_input_venue_message_content.js → 0_id.js} +0 -0
  287. /package/script/types/{1_input_invoice_message_content.js → 1_input_message_content.js} +0 -0
@@ -1,13 +1,15 @@
1
1
  import { MaybePromise } from "../1_utilities.js";
2
- import { functions, ReadObject, types } from "../2_tl.js";
2
+ import { functions, types } from "../2_tl.js";
3
3
  import { Storage } from "../3_storage.js";
4
4
  import { DC } from "../3_transport.js";
5
- import { BotCommand, Chat, ChatAction, ChatID, ChatP, Document, InlineQueryResult, Message, MessageAnimation, MessageAudio, MessageContact, MessageDice, MessageDocument, MessageLocation, MessagePhoto, MessagePoll, MessageText, MessageVenue, MessageVideo, MessageVideoNote, MessageVoice, NetworkStatistics, ParseMode, Reaction, Update, UpdateIntersection, User } from "../3_types.js";
5
+ import { BotCommand, Chat, ChatAction, ChatP, Document, FileSource, ID, InlineQueryResult, Message, MessageAnimation, MessageAudio, MessageContact, MessageDice, MessageDocument, MessageLocation, MessagePhoto, MessagePoll, MessageText, MessageVenue, MessageVideo, MessageVideoNote, MessageVoice, NetworkStatistics, ParseMode, Reaction, Update, UpdateIntersection, User } from "../3_types.js";
6
6
  import { Migrate } from "../4_errors.js";
7
7
  import { ClientAbstract } from "./0_client_abstract.js";
8
- import { FileSource, FilterQuery, WithFilter } from "./0_utilities.js";
8
+ import { FilterQuery, WithFilter } from "./0_filters.js";
9
+ import { AddReactionParams, AnswerCallbackQueryParams, AnswerInlineQueryParams, AuthorizeUserParams, BanChatMemberParams, DeleteMessageParams, DeleteMessagesParams, DownloadParams, EditMessageParams, EditMessageReplyMarkupParams, ForwardMessagesParams, GetChatsParams, GetHistoryParams, GetMyCommandsParams, PinMessageParams, ReplyParams, SendAnimationParams, SendAudioParams, SendContactParams, SendDiceParams, SendDocumentParams, SendLocationParams, SendMessageParams, SendPhotoParams, SendPollParams, SendVenueParams, SendVideoNoteParams, SendVideoParams, SendVoiceParams, SetChatMemberRightsParams, SetChatPhotoParams, SetMyCommandsParams, SetReactionsParams, UploadParams } from "./0_params.js";
10
+ import { Api } from "./0_types.js";
9
11
  import { Composer, Middleware } from "./1_composer.js";
10
- import { AddReactionParams, AnswerCallbackQueryParams, AnswerInlineQueryParams, AuthorizeUserParams, ClientParams, DeleteMessageParams, DeleteMessagesParams, DownloadParams, EditMessageParams, ForwardMessagesParams, GetChatsParams, GetHistoryParams, GetMyCommandsParams, ReplyParams, SendAnimationParams, SendAudioParams, SendContactParams, SendDiceParams, SendDocumentParams, SendLocationParams, SendMessageParams, SendPhotoParams, SendPollParams, SendVenueParams, SendVideoNoteParams, SendVideoParams, SendVoiceParams, SetMyCommandsParams, SetReactionsParams, UploadParams } from "./3_params.js";
12
+ import { ClientPlainParams } from "./2_client_plain.js";
11
13
  export type NextFn<T = void> = () => Promise<T>;
12
14
  export interface InvokeErrorHandler<C> {
13
15
  (ctx: {
@@ -18,22 +20,7 @@ export interface InvokeErrorHandler<C> {
18
20
  }, next: NextFn<boolean>): MaybePromise<boolean>;
19
21
  }
20
22
  declare const getEntity: unique symbol;
21
- declare const getStickerSetName: unique symbol;
22
23
  export declare const handleMigrationError: unique symbol;
23
- declare const getMessageWithReply: unique symbol;
24
- type Functions = typeof functions;
25
- type Keys = keyof Functions;
26
- type AnyFunc = (...args: any) => any;
27
- type Promisify<T extends AnyFunc> = (...args: Parameters<T>) => Promise<ReturnType<T>>;
28
- export type Api = {
29
- [K in Keys]: Functions[K] extends {
30
- __F: AnyFunc;
31
- } ? Promisify<Functions[K]["__F"]> : {
32
- [K_ in keyof Functions[K]]: Functions[K][K_] extends {
33
- __F: AnyFunc;
34
- } ? Promisify<Functions[K][K_]["__F"]> : Functions[K][K_];
35
- };
36
- };
37
24
  export interface Context {
38
25
  /** The client that received the update. */
39
26
  client: Client;
@@ -76,7 +63,17 @@ export interface Context {
76
63
  /** Delete the received message. */
77
64
  delete: () => Promise<void>;
78
65
  /** Forward the received message. */
79
- forward: (to: ChatID, params?: ForwardMessagesParams) => Promise<this["msg"]>;
66
+ forward: (to: ID, params?: ForwardMessagesParams) => Promise<this["msg"]>;
67
+ /** Pin the received message. */
68
+ pin: (params?: PinMessageParams) => Promise<void>;
69
+ /** Unpin the received message. */
70
+ unpin: (params?: PinMessageParams) => Promise<void>;
71
+ /** Ban the sender of the received message. */
72
+ banSender: (params?: BanChatMemberParams) => Promise<void>;
73
+ /** Kick the sender of the received message. */
74
+ kickSender: () => Promise<void>;
75
+ /** Set the rights of the received message. */
76
+ setSenderRights: (params?: SetChatMemberRightsParams) => Promise<void>;
80
77
  /** Change the reactions made to the received message. */
81
78
  react: (reactions: Reaction[], params?: SetReactionsParams) => Promise<void>;
82
79
  /** Send a chat action to the chat which the message was received from. */
@@ -85,6 +82,8 @@ export interface Context {
85
82
  }) => Promise<void>;
86
83
  /** Edit a message in the chat which the message was received from. */
87
84
  editMessageText: (messageId: number, text: string, params?: EditMessageParams) => Promise<MessageText>;
85
+ /** Edit the reply markup of a message in the chat which the message was received from. */
86
+ editMessageReplyMarkup: (messageId: number, params?: EditMessageReplyMarkupParams) => Promise<Message>;
88
87
  /** Answer the received callback query. */
89
88
  answerCallbackQuery: (params?: AnswerCallbackQueryParams) => Promise<void>;
90
89
  /** Answer the received inline query. */
@@ -94,13 +93,19 @@ export interface Context {
94
93
  /** Retrieve multiple messages of the chat which the message was received from. */
95
94
  getMessages: (messageIds: number[]) => Promise<Message[]>;
96
95
  /** Forward a message of the chat which the message was received from. */
97
- forwardMessage: (to: ChatID, messageId: number, params?: ForwardMessagesParams) => Promise<Message>;
96
+ forwardMessage: (to: ID, messageId: number, params?: ForwardMessagesParams) => Promise<Message>;
98
97
  /** Forward multiple messages of the chat which the message was received from. */
99
- forwardMessages: (to: ChatID, messageIds: number[], params?: ForwardMessagesParams) => Promise<Message[]>;
98
+ forwardMessages: (to: ID, messageIds: number[], params?: ForwardMessagesParams) => Promise<Message[]>;
100
99
  /** Delete a message in the chat which the message was received from. */
101
100
  deleteMessage: (messageId: number, params?: DeleteMessagesParams) => Promise<void>;
102
101
  /** Delete multiple messages in the chat which the message was received from. */
103
102
  deleteMessages: (messageIds: number[], params?: DeleteMessagesParams) => Promise<void>;
103
+ /** Pin a message in the chat which the message was received from. */
104
+ pinMessage: (messageId: number, params?: PinMessageParams) => Promise<void>;
105
+ /** Unpin a message in the chat which the message was received from. */
106
+ unpinMessage: (messageId: number) => Promise<void>;
107
+ /** Unpin the pinned messages in the chat which the message was received from. */
108
+ unpinMessages: (messageId: number) => Promise<void>;
104
109
  /** Set the available reactions of the chat which the message was received from. */
105
110
  setAvailableReactions: (availableReactions: "none" | "all" | Reaction[]) => Promise<void>;
106
111
  /** Add a reaction to a message of the chat which the message was received from. */
@@ -109,18 +114,54 @@ export interface Context {
109
114
  removeReaction: (messageId: number, reaction: Reaction) => Promise<void>;
110
115
  /** Change the reactions made to a message of the chat which the message was received from. */
111
116
  setReactions: (messageId: number, reactions: Reaction[], params?: SetReactionsParams) => Promise<void>;
117
+ /** Set the photo of the chat which the message was received from. */
118
+ setChatPhoto: (photo: FileSource, params?: SetChatPhotoParams) => Promise<void>;
119
+ /** Delete the photo of the chat which the message was received from. */
120
+ deleteChatPhoto: () => Promise<void>;
121
+ /** Ban a member from the chat which the message was received from. */
122
+ banChatMember: (memberId: ID, params?: BanChatMemberParams) => Promise<void>;
123
+ /** Unban a member from the chat which the message was received from. */
124
+ unbanChatMember: (memberId: ID) => Promise<void>;
125
+ /** Kick a member from the chat which the message was received from. */
126
+ kickChatMember: (memberId: ID) => Promise<void>;
127
+ /** Set the rights of a member of the chat which the message was received from. */
128
+ setChatMemberRights: (memberId: ID, params?: SetChatMemberRightsParams) => Promise<void>;
129
+ deleteChatMemberMessages: (userId: ID) => Promise<void>;
112
130
  toJSON: () => Update;
113
131
  }
114
132
  export declare function skipInvoke<C extends Context>(): InvokeErrorHandler<Client<C>>;
115
133
  export declare const restartAuth: unique symbol;
116
- export declare class ConnectionError extends Error {
134
+ export interface ClientParams extends ClientPlainParams {
135
+ /** A parse mode to use when the `parseMode` parameter is not specified when sending or editing messages. Defauls to `ParseMode.None`. */
136
+ parseMode?: ParseMode;
137
+ /** The app_version parameter to be passed to initConnection when calling `authorize`. It is recommended that this parameter is changed if users are authorized. Defaults to "MTKruto" followed by this version of MTKruto. */
138
+ appVersion?: string;
139
+ /** The device_version parameter to be passed to initConnection when calling `authorize`. The default varies by the current runtime. */
140
+ deviceModel?: string;
141
+ /** The lang_code parameter to be passed to initConnection when calling `authorize`. Defaults to the runtime's language or `"en"`. */
142
+ langCode?: string;
143
+ /** The lang_pack parameter to be passed to initConnection when calling `authorize`. Defaults to an empty string. */
144
+ langPack?: string;
145
+ /** The system_lang_cde parameter to be passed to initConnection when calling `authorize`. Defaults to the runtime's language or `"en"`. */
146
+ systemLangCode?: string;
147
+ /** The system_version parameter to be passed to initConnection when calling `authorize`. The default varies by the current runtime. */
148
+ systemVersion?: string;
149
+ /** Whether to automatically call `start` with no parameters in the first `invoke` call. Defaults to `true`. */
150
+ autoStart?: boolean;
151
+ /** Whether to use default handlers. Defaults to `true`. */
152
+ defaultHandlers?: boolean;
153
+ /** Whether to ignore outgoing messages. Defaults to `true` for bots, and `false` for users. */
154
+ ignoreOutgoing?: boolean;
155
+ /** Default command prefixes. Defaults to `"/"` for bots and `"\"` for users. This option must be set separately for nested composers. */
156
+ prefixes?: string | string[];
157
+ /** Whether to guarantee that order-sensitive updates are delivered at least once before delivering next ones. Useful mainly for clients providing a user interface à la Telegram Desktop. Defaults to `false`. */
158
+ guaranteeUpdateDelivery?: boolean;
117
159
  }
118
160
  export declare class Client<C extends Context = Context> extends ClientAbstract {
119
161
  #private;
120
162
  readonly apiId: number | null;
121
163
  readonly apiHash: string | null;
122
164
  readonly storage: Storage;
123
- readonly parseMode: ParseMode;
124
165
  readonly appVersion: string;
125
166
  readonly deviceModel: string;
126
167
  readonly langCode: string;
@@ -190,13 +231,11 @@ export declare class Client<C extends Context = Context> extends ClientAbstract
190
231
  * Alias for `invoke` with its second parameter being `true`.
191
232
  */
192
233
  send<T extends (functions.Function<unknown> | types.Type) = functions.Function<unknown>>(function_: T): Promise<void>;
193
- getUserAccessHash(userId: bigint): Promise<bigint>;
194
- getInputPeer(id: ChatID): Promise<import("../tl/2_types.js").InputPeerChat_ | import("../tl/2_types.js").InputPeerUser_ | import("../tl/2_types.js").InputPeerChannel_>;
234
+ getInputPeer(id: ID): Promise<import("../tl/2_types.js").InputPeerChat_ | import("../tl/2_types.js").InputPeerUser_ | import("../tl/2_types.js").InputPeerChannel_>;
195
235
  private [getEntity];
196
236
  private [getEntity];
197
237
  private [getEntity];
198
238
  private [getEntity];
199
- processResult(result: ReadObject): Promise<void>;
200
239
  /**
201
240
  * Send a text message.
202
241
  *
@@ -205,17 +244,26 @@ export declare class Client<C extends Context = Context> extends ClientAbstract
205
244
  * @param text The message's text.
206
245
  * @returns The sent text message.
207
246
  */
208
- sendMessage(chatId: ChatID, text: string, params?: SendMessageParams): Promise<MessageText>;
247
+ sendMessage(chatId: ID, text: string, params?: SendMessageParams): Promise<MessageText>;
209
248
  /**
210
249
  * Edit a message's text.
211
250
  *
212
251
  * @method
213
- * @param chatId The chat where the message is.
214
- * @param messageId The ID of the message.
252
+ * @param chatId The identifier of the chat that contains the messages.
253
+ * @param messageId The message's identifier.
215
254
  * @param text The new text of the message.
216
255
  * @returns The edited text message.
217
256
  */
218
- editMessageText(chatId: ChatID, messageId: number, text: string, params?: EditMessageParams): Promise<MessageText>;
257
+ editMessageText(chatId: ID, messageId: number, text: string, params?: EditMessageParams): Promise<MessageText>;
258
+ /**
259
+ * Edit a message's reply markup.
260
+ *
261
+ * @method
262
+ * @param chatId The identifier of the chat that contains the messages.
263
+ * @param messageId The message's identifier.
264
+ * @returns The edited message.
265
+ */
266
+ editMessageReplyMarkup(chatId: ID, messageId: number, params?: EditMessageReplyMarkupParams): Promise<Message>;
219
267
  /**
220
268
  * Retrieve multiple messages.
221
269
  *
@@ -227,8 +275,7 @@ export declare class Client<C extends Context = Context> extends ClientAbstract
227
275
  * ```
228
276
  * @returns The retrieved messages.
229
277
  */
230
- getMessages(chatId: ChatID, messageIds: number[]): Promise<Message[]>;
231
- private [getMessageWithReply];
278
+ getMessages(chatId: ID, messageIds: number[]): Promise<Message[]>;
232
279
  /**
233
280
  * Retrieve a single message.
234
281
  *
@@ -240,7 +287,7 @@ export declare class Client<C extends Context = Context> extends ClientAbstract
240
287
  * ```
241
288
  * @returns The retrieved message.
242
289
  */
243
- getMessage(chatId: ChatID, messageId: number): Promise<Message | null>;
290
+ getMessage(chatId: ID, messageId: number): Promise<Message | null>;
244
291
  /**
245
292
  * Download a file.
246
293
  *
@@ -254,7 +301,6 @@ export declare class Client<C extends Context = Context> extends ClientAbstract
254
301
  * @returns A generator yielding the contents of the file.
255
302
  */
256
303
  download(fileId: string, params?: DownloadParams): AsyncGenerator<Uint8Array, void, unknown>;
257
- private [getStickerSetName];
258
304
  /**
259
305
  * Forward multiple messages.
260
306
  *
@@ -264,7 +310,7 @@ export declare class Client<C extends Context = Context> extends ClientAbstract
264
310
  * @param messageIds The identifiers of the messages to forward.
265
311
  * @returns The forwarded messages.
266
312
  */
267
- forwardMessages(from: ChatID, to: ChatID, messageIds: number[], params?: ForwardMessagesParams): Promise<Message[]>;
313
+ forwardMessages(from: ID, to: ID, messageIds: number[], params?: ForwardMessagesParams): Promise<Message[]>;
268
314
  /**
269
315
  * Forward a single message.
270
316
  *
@@ -274,7 +320,7 @@ export declare class Client<C extends Context = Context> extends ClientAbstract
274
320
  * @param messageId The identifier of the message to forward.
275
321
  * @returns The forwarded message.
276
322
  */
277
- forwardMessage(from: ChatID, to: ChatID, messageId: number, params?: ForwardMessagesParams): Promise<Message>;
323
+ forwardMessage(from: ID, to: ID, messageId: number, params?: ForwardMessagesParams): Promise<Message>;
278
324
  /**
279
325
  * Get information on the currently authorized user.
280
326
  *
@@ -297,7 +343,7 @@ export declare class Client<C extends Context = Context> extends ClientAbstract
297
343
  * @param options The poll's options.
298
344
  * @returns The sent poll.
299
345
  */
300
- sendPoll(chatId: ChatID, question: string, options: [string, string, ...string[]], params?: SendPollParams): Promise<MessagePoll>;
346
+ sendPoll(chatId: ID, question: string, options: [string, string, ...string[]], params?: SendPollParams): Promise<MessagePoll>;
301
347
  /**
302
348
  * Send a chat action.
303
349
  *
@@ -306,7 +352,7 @@ export declare class Client<C extends Context = Context> extends ClientAbstract
306
352
  * @param action The chat action.
307
353
  * @param messageThreadId The thread to send the chat action to.
308
354
  */
309
- sendChatAction(chatId: ChatID, action: ChatAction, params?: {
355
+ sendChatAction(chatId: ID, action: ChatAction, params?: {
310
356
  messageThreadId?: number;
311
357
  }): Promise<void>;
312
358
  /**
@@ -399,18 +445,18 @@ export declare class Client<C extends Context = Context> extends ClientAbstract
399
445
  * Delete multiple messages.
400
446
  *
401
447
  * @method
402
- * @param chatId The chat that contains the messages.
448
+ * @param chatId The identifier of the chat that contains the messages.
403
449
  * @param messageIds The identifier of the messages to delete.
404
450
  */
405
- deleteMessages(chatId: ChatID, messageIds: number[], params?: DeleteMessagesParams): Promise<void>;
451
+ deleteMessages(chatId: ID, messageIds: number[], params?: DeleteMessagesParams): Promise<void>;
406
452
  /**
407
453
  * Delete a single message.
408
454
  *
409
455
  * @method
410
- * @param chatId The chat that contains the message.
456
+ * @param chatId The identifier of the chat that contains the message.
411
457
  * @param messageId The identifier of the message to delete.
412
458
  */
413
- deleteMessage(chatId: ChatID, messageId: number, params?: DeleteMessageParams): Promise<void>;
459
+ deleteMessage(chatId: ID, messageId: number, params?: DeleteMessageParams): Promise<void>;
414
460
  /**
415
461
  * Send a photo.
416
462
  *
@@ -418,7 +464,7 @@ export declare class Client<C extends Context = Context> extends ClientAbstract
418
464
  * @param chatId The chat to send the photo to.
419
465
  * @param photo The photo to send.
420
466
  */
421
- sendPhoto(chatId: ChatID, photo: FileSource, params?: SendPhotoParams): Promise<MessagePhoto>;
467
+ sendPhoto(chatId: ID, photo: FileSource, params?: SendPhotoParams): Promise<MessagePhoto>;
422
468
  /**
423
469
  * Send a document.
424
470
  *
@@ -426,7 +472,7 @@ export declare class Client<C extends Context = Context> extends ClientAbstract
426
472
  * @param chatId The chat to send the document to.
427
473
  * @param document The document to send.
428
474
  */
429
- sendDocument(chatId: ChatID, document: FileSource, params?: SendDocumentParams): Promise<MessageDocument>;
475
+ sendDocument(chatId: ID, document: FileSource, params?: SendDocumentParams): Promise<MessageDocument>;
430
476
  /**
431
477
  * Send a video.
432
478
  *
@@ -434,7 +480,7 @@ export declare class Client<C extends Context = Context> extends ClientAbstract
434
480
  * @param chatId The chat to send the video to.
435
481
  * @param video The video to send.
436
482
  */
437
- sendVideo(chatId: ChatID, video: FileSource, params?: SendVideoParams): Promise<MessageVideo>;
483
+ sendVideo(chatId: ID, video: FileSource, params?: SendVideoParams): Promise<MessageVideo>;
438
484
  /**
439
485
  * Send an animation.
440
486
  *
@@ -442,7 +488,7 @@ export declare class Client<C extends Context = Context> extends ClientAbstract
442
488
  * @param chatId The chat to send the animation to.
443
489
  * @param animation The animation to send.
444
490
  */
445
- sendAnimation(chatId: ChatID, animation: FileSource, params?: SendAnimationParams): Promise<MessageAnimation>;
491
+ sendAnimation(chatId: ID, animation: FileSource, params?: SendAnimationParams): Promise<MessageAnimation>;
446
492
  /**
447
493
  * Send a voice message.
448
494
  *
@@ -450,7 +496,7 @@ export declare class Client<C extends Context = Context> extends ClientAbstract
450
496
  * @param chatId The chat to send the voice message to.
451
497
  * @param voice The voice to send.
452
498
  */
453
- sendVoice(chatId: ChatID, voice: FileSource, params?: SendVoiceParams): Promise<MessageVoice>;
499
+ sendVoice(chatId: ID, voice: FileSource, params?: SendVoiceParams): Promise<MessageVoice>;
454
500
  /**
455
501
  * Send an audio file.
456
502
  *
@@ -458,7 +504,7 @@ export declare class Client<C extends Context = Context> extends ClientAbstract
458
504
  * @param chatId The chat to send the audio file to.
459
505
  * @param audio The audio to send.
460
506
  */
461
- sendAudio(chatId: ChatID, audio: FileSource, params?: SendAudioParams): Promise<MessageAudio>;
507
+ sendAudio(chatId: ID, audio: FileSource, params?: SendAudioParams): Promise<MessageAudio>;
462
508
  /**
463
509
  * Send a video note.
464
510
  *
@@ -466,7 +512,7 @@ export declare class Client<C extends Context = Context> extends ClientAbstract
466
512
  * @param chatId The chat to send the video note to.
467
513
  * @param videoNote The video note to send.
468
514
  */
469
- sendVideoNote(chatId: ChatID, audio: FileSource, params?: SendVideoNoteParams): Promise<MessageVideoNote>;
515
+ sendVideoNote(chatId: ID, videoNote: FileSource, params?: SendVideoNoteParams): Promise<MessageVideoNote>;
470
516
  /**
471
517
  * Send a location.
472
518
  *
@@ -475,7 +521,7 @@ export declare class Client<C extends Context = Context> extends ClientAbstract
475
521
  * @param latitude The location's latitude.
476
522
  * @param longitude The location's longitude.
477
523
  */
478
- sendLocation(chatId: ChatID, latitude: number, longitude: number, params?: SendLocationParams): Promise<MessageLocation>;
524
+ sendLocation(chatId: ID, latitude: number, longitude: number, params?: SendLocationParams): Promise<MessageLocation>;
479
525
  /**
480
526
  * Send a contact.
481
527
  *
@@ -484,14 +530,14 @@ export declare class Client<C extends Context = Context> extends ClientAbstract
484
530
  * @param firstName The contact's first name.
485
531
  * @param number The contact's phone number.
486
532
  */
487
- sendContact(chatId: ChatID, firstName: string, number: string, params?: SendContactParams): Promise<MessageContact>;
533
+ sendContact(chatId: ID, firstName: string, number: string, params?: SendContactParams): Promise<MessageContact>;
488
534
  /**
489
535
  * Send a dice.
490
536
  *
491
537
  * @method
492
538
  * @param chatId The chat to send the dice to.
493
539
  */
494
- sendDice(chatId: ChatID, params?: SendDiceParams): Promise<MessageDice>;
540
+ sendDice(chatId: ID, params?: SendDiceParams): Promise<MessageDice>;
495
541
  /**
496
542
  * Send a venue.
497
543
  *
@@ -502,7 +548,7 @@ export declare class Client<C extends Context = Context> extends ClientAbstract
502
548
  * @param title The title of the venue.
503
549
  * @param address The written address of the venue.
504
550
  */
505
- sendVenue(chatId: ChatID, latitude: number, longitude: number, title: string, address: string, params?: SendVenueParams): Promise<MessageVenue>;
551
+ sendVenue(chatId: ID, latitude: number, longitude: number, title: string, address: string, params?: SendVenueParams): Promise<MessageVenue>;
506
552
  /**
507
553
  * Get network statistics. This might not always be available.
508
554
  *
@@ -520,32 +566,33 @@ export declare class Client<C extends Context = Context> extends ClientAbstract
520
566
  *
521
567
  * @method
522
568
  */
523
- getChat(chatId: ChatID): Promise<Chat>;
569
+ getChat(chatId: ID): Promise<Chat>;
524
570
  /**
525
571
  * Get chat history. User-only.
526
572
  *
527
- * @param chatId The identifier of the chat to get its history.
528
573
  * @method
574
+ * @param chatId The identifier of the chat to get its history.
529
575
  */
530
- getHistory(chatId: ChatID, params?: GetHistoryParams): Promise<Message[]>;
576
+ getHistory(chatId: ID, params?: GetHistoryParams): Promise<Message[]>;
531
577
  /**
532
578
  * Get custom emoji documents for download.
533
579
  *
534
- * @param id Identifier of one or more of custom emojis.
535
580
  * @method
581
+ * @param id Identifier of one or more of custom emojis.
536
582
  */
537
583
  getCustomEmojiDocuments(id: string | string[]): Promise<Document[]>;
538
584
  /**
539
585
  * Set a chat's available reactions.
540
586
  *
587
+ * @method
541
588
  * @param chatId The identifier of the chat.
542
589
  * @param availableReactions The new available reactions.
543
- * @method
544
590
  */
545
- setAvailableReactions(chatId: ChatID, availableReactions: "none" | "all" | Reaction[]): Promise<void>;
591
+ setAvailableReactions(chatId: ID, availableReactions: "none" | "all" | Reaction[]): Promise<void>;
546
592
  /**
547
593
  * Change reactions made to a message.
548
594
  *
595
+ * @method
549
596
  * @param chatId The identifier of the chat which the message belongs to.
550
597
  * @param messageId The identifier of the message to add the reaction to.
551
598
  * @param reactions The new reactions.
@@ -554,6 +601,7 @@ export declare class Client<C extends Context = Context> extends ClientAbstract
554
601
  /**
555
602
  * Make a reaction to a message.
556
603
  *
604
+ * @method
557
605
  * @param chatId The identifier of the chat which the message belongs to.
558
606
  * @param messageId The identifier of the message to add the reaction to.
559
607
  * @param reaction The reaction to add.
@@ -562,10 +610,89 @@ export declare class Client<C extends Context = Context> extends ClientAbstract
562
610
  /**
563
611
  * Undo a reaction made to a message.
564
612
  *
613
+ * @method
565
614
  * @param chatId The identifier of the chat which the message belongs to.
566
615
  * @param messageId The identifier of the message which the reaction was made to.
567
616
  * @param reaction The reaction to remove.
568
617
  */
569
618
  removeReaction(chatId: number, messageId: number, reaction: Reaction): Promise<void>;
619
+ /**
620
+ * Set a chat's photo.
621
+ *
622
+ * @method
623
+ * @param chatId The identifier of the chat.
624
+ * @param photo A photo to set as the chat's photo.
625
+ */
626
+ setChatPhoto(chatId: number, photo: FileSource, params?: SetChatPhotoParams): Promise<void>;
627
+ /**
628
+ * Delete a chat's photo.
629
+ *
630
+ * @method
631
+ * @param chatId The identifier of the chat.
632
+ */
633
+ deleteChatPhoto(chatId: number): Promise<void>;
634
+ /**
635
+ * Delete all messages sent by a specific member of a chat.
636
+ *
637
+ * @method
638
+ * @param chatId The identifier of the chat. Must be a supergroup.
639
+ * @param memberId The identifier of the member.
640
+ */
641
+ deleteChatMemberMessages(chatId: ID, memberId: ID): Promise<void>;
642
+ /**
643
+ * Pin a message in a chat.
644
+ *
645
+ * @method
646
+ * @param chatId The identifier of the chat that contains the message.
647
+ * @param messageId The message's identifier.
648
+ */
649
+ pinMessage(chatId: ID, messageId: number, params?: PinMessageParams): Promise<void>;
650
+ /**
651
+ * Unpin a pinned message.
652
+ *
653
+ * @method
654
+ * @param chatId The identifier of the chat that contains the message.
655
+ * @param messageId The message's identifier.
656
+ */
657
+ unpinMessage(chatId: ID, messageId: number): Promise<void>;
658
+ /**
659
+ * Unpin all pinned messages.
660
+ *
661
+ * @method
662
+ * @param chatId The identifier of the chat.
663
+ */
664
+ unpinMessages(chatId: ID): Promise<void>;
665
+ /**
666
+ * Ban a member from a chat.
667
+ *
668
+ * @method
669
+ * @param chatId The identifier of the chat.
670
+ * @param memberId The identifier of the member.
671
+ */
672
+ banChatMember(chatId: ID, memberId: ID, params?: BanChatMemberParams): Promise<void>;
673
+ /**
674
+ * Unban a member from a chat.
675
+ *
676
+ * @method
677
+ * @param chatId The identifier of the chat. Must be a supergroup.
678
+ * @param memberId The identifier of the member.
679
+ */
680
+ unbanChatMember(chatId: ID, memberId: ID): Promise<void>;
681
+ /**
682
+ * Kick a member from a chat. Same as a banChatMember call followed by unbanChatMember.
683
+ *
684
+ * @method
685
+ * @param chatId The identifier of the chat. Must be a supergroup.
686
+ * @param memberId The identifier of the member.
687
+ */
688
+ kickChatMember(chatId: ID, memberId: ID): Promise<void>;
689
+ /**
690
+ * Set the rights of a chat member.
691
+ *
692
+ * @method
693
+ * @param chatId The identifier of the chat. Must be a supergroup.
694
+ * @param memberId The identifier of a member.
695
+ */
696
+ setChatMemberRights(chatId: ID, memberId: ID, params?: SetChatMemberRightsParams): Promise<void>;
570
697
  }
571
698
  export {};