@mtkruto/node 0.180.1 → 0.191.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 (157) hide show
  1. package/esm/3_types.d.ts +6 -0
  2. package/esm/3_types.d.ts.map +1 -1
  3. package/esm/3_types.js +6 -0
  4. package/esm/client/0_params.d.ts +42 -30
  5. package/esm/client/0_params.d.ts.map +1 -1
  6. package/esm/client/1_client_generic.d.ts +1158 -1056
  7. package/esm/client/1_client_generic.d.ts.map +1 -1
  8. package/esm/client/2_client_encrypted.d.ts.map +1 -1
  9. package/esm/client/2_client_encrypted.js +19 -12
  10. package/esm/client/2_file_manager.js +1 -1
  11. package/esm/client/3_account_manager.d.ts +6 -0
  12. package/esm/client/3_account_manager.d.ts.map +1 -1
  13. package/esm/client/3_account_manager.js +30 -1
  14. package/esm/client/3_message_manager.d.ts +3 -1
  15. package/esm/client/3_message_manager.d.ts.map +1 -1
  16. package/esm/client/3_message_manager.js +33 -19
  17. package/esm/client/3_secret_chat_manager.d.ts +3 -1
  18. package/esm/client/3_secret_chat_manager.d.ts.map +1 -1
  19. package/esm/client/3_secret_chat_manager.js +77 -3
  20. package/esm/client/4_chat_manager.d.ts +2 -1
  21. package/esm/client/4_chat_manager.d.ts.map +1 -1
  22. package/esm/client/4_chat_manager.js +7 -1
  23. package/esm/client/4_context.d.ts +132 -48
  24. package/esm/client/4_context.d.ts.map +1 -1
  25. package/esm/client/4_context.js +336 -125
  26. package/esm/client/4_poll_manager.d.ts +3 -1
  27. package/esm/client/4_poll_manager.d.ts.map +1 -1
  28. package/esm/client/4_poll_manager.js +16 -5
  29. package/esm/client/6_client.d.ts +1158 -1056
  30. package/esm/client/6_client.d.ts.map +1 -1
  31. package/esm/client/6_client.js +1514 -1386
  32. package/esm/client/6_client_dispatcher.d.ts +1158 -1056
  33. package/esm/client/6_client_dispatcher.d.ts.map +1 -1
  34. package/esm/client/6_client_dispatcher.js +1478 -1356
  35. package/esm/types/0_checklist_changed.d.ts +1 -1
  36. package/esm/types/0_checklist_changed.d.ts.map +1 -1
  37. package/esm/types/0_location.d.ts +2 -2
  38. package/esm/types/0_location.d.ts.map +1 -1
  39. package/esm/types/0_message_viewer.d.ts +29 -0
  40. package/esm/types/0_message_viewer.d.ts.map +1 -0
  41. package/esm/types/0_message_viewer.js +25 -0
  42. package/esm/types/0_secret_chat_action_type.d.ts +69 -0
  43. package/esm/types/0_secret_chat_action_type.d.ts.map +1 -0
  44. package/esm/types/0_secret_chat_action_type.js +46 -0
  45. package/esm/types/1_chat_p.d.ts +1 -5
  46. package/esm/types/1_chat_p.d.ts.map +1 -1
  47. package/esm/types/1_input_poll_media.d.ts +5 -5
  48. package/esm/types/1_input_poll_media.d.ts.map +1 -1
  49. package/esm/types/1_input_sticker.d.ts +1 -1
  50. package/esm/types/1_secret_chat_action.d.ts +30 -0
  51. package/esm/types/1_secret_chat_action.d.ts.map +1 -0
  52. package/esm/types/1_secret_chat_action.js +28 -0
  53. package/esm/types/1_sticker.d.ts +3 -3
  54. package/esm/types/1_sticker.d.ts.map +1 -1
  55. package/esm/types/1_video.d.ts +3 -3
  56. package/esm/types/1_video.d.ts.map +1 -1
  57. package/esm/types/1_video_note.d.ts +3 -3
  58. package/esm/types/1_video_note.d.ts.map +1 -1
  59. package/esm/types/2_poll_voter.d.ts +13 -0
  60. package/esm/types/2_poll_voter.d.ts.map +1 -0
  61. package/esm/types/2_poll_voter.js +18 -0
  62. package/esm/types/3_connected_website.d.ts +35 -0
  63. package/esm/types/3_connected_website.d.ts.map +1 -0
  64. package/esm/types/3_connected_website.js +39 -0
  65. package/esm/types/3_input_media.d.ts +5 -5
  66. package/esm/types/3_input_media.d.ts.map +1 -1
  67. package/esm/types/3_poll_voter_list.d.ts +31 -0
  68. package/esm/types/3_poll_voter_list.d.ts.map +1 -0
  69. package/esm/types/3_poll_voter_list.js +28 -0
  70. package/esm/types/4_reply_to.d.ts +2 -2
  71. package/esm/types/4_reply_to.d.ts.map +1 -1
  72. package/esm/types/6_message_content.d.ts +2 -2
  73. package/esm/types/6_message_content.d.ts.map +1 -1
  74. package/esm/types/9_message.d.ts +8 -1
  75. package/esm/types/9_message.d.ts.map +1 -1
  76. package/esm/types/9_message.js +3 -0
  77. package/esm/types/B_update.d.ts +25 -10
  78. package/esm/types/B_update.d.ts.map +1 -1
  79. package/package.json +1 -1
  80. package/script/3_types.d.ts +6 -0
  81. package/script/3_types.d.ts.map +1 -1
  82. package/script/3_types.js +6 -0
  83. package/script/client/0_params.d.ts +42 -30
  84. package/script/client/0_params.d.ts.map +1 -1
  85. package/script/client/1_client_generic.d.ts +1158 -1056
  86. package/script/client/1_client_generic.d.ts.map +1 -1
  87. package/script/client/2_client_encrypted.d.ts.map +1 -1
  88. package/script/client/2_client_encrypted.js +19 -12
  89. package/script/client/2_file_manager.js +1 -1
  90. package/script/client/3_account_manager.d.ts +6 -0
  91. package/script/client/3_account_manager.d.ts.map +1 -1
  92. package/script/client/3_account_manager.js +29 -0
  93. package/script/client/3_message_manager.d.ts +3 -1
  94. package/script/client/3_message_manager.d.ts.map +1 -1
  95. package/script/client/3_message_manager.js +32 -18
  96. package/script/client/3_secret_chat_manager.d.ts +3 -1
  97. package/script/client/3_secret_chat_manager.d.ts.map +1 -1
  98. package/script/client/3_secret_chat_manager.js +76 -2
  99. package/script/client/4_chat_manager.d.ts +2 -1
  100. package/script/client/4_chat_manager.d.ts.map +1 -1
  101. package/script/client/4_chat_manager.js +7 -1
  102. package/script/client/4_context.d.ts +132 -48
  103. package/script/client/4_context.d.ts.map +1 -1
  104. package/script/client/4_context.js +336 -125
  105. package/script/client/4_poll_manager.d.ts +3 -1
  106. package/script/client/4_poll_manager.d.ts.map +1 -1
  107. package/script/client/4_poll_manager.js +15 -4
  108. package/script/client/6_client.d.ts +1158 -1056
  109. package/script/client/6_client.d.ts.map +1 -1
  110. package/script/client/6_client.js +1514 -1386
  111. package/script/client/6_client_dispatcher.d.ts +1158 -1056
  112. package/script/client/6_client_dispatcher.d.ts.map +1 -1
  113. package/script/client/6_client_dispatcher.js +1478 -1356
  114. package/script/types/0_checklist_changed.d.ts +1 -1
  115. package/script/types/0_checklist_changed.d.ts.map +1 -1
  116. package/script/types/0_location.d.ts +2 -2
  117. package/script/types/0_location.d.ts.map +1 -1
  118. package/script/types/0_message_viewer.d.ts +29 -0
  119. package/script/types/0_message_viewer.d.ts.map +1 -0
  120. package/script/types/0_message_viewer.js +28 -0
  121. package/script/types/0_secret_chat_action_type.d.ts +69 -0
  122. package/script/types/0_secret_chat_action_type.d.ts.map +1 -0
  123. package/script/types/0_secret_chat_action_type.js +49 -0
  124. package/script/types/1_chat_p.d.ts +1 -5
  125. package/script/types/1_chat_p.d.ts.map +1 -1
  126. package/script/types/1_input_poll_media.d.ts +5 -5
  127. package/script/types/1_input_poll_media.d.ts.map +1 -1
  128. package/script/types/1_input_sticker.d.ts +1 -1
  129. package/script/types/1_secret_chat_action.d.ts +30 -0
  130. package/script/types/1_secret_chat_action.d.ts.map +1 -0
  131. package/script/types/1_secret_chat_action.js +31 -0
  132. package/script/types/1_sticker.d.ts +3 -3
  133. package/script/types/1_sticker.d.ts.map +1 -1
  134. package/script/types/1_video.d.ts +3 -3
  135. package/script/types/1_video.d.ts.map +1 -1
  136. package/script/types/1_video_note.d.ts +3 -3
  137. package/script/types/1_video_note.d.ts.map +1 -1
  138. package/script/types/2_poll_voter.d.ts +13 -0
  139. package/script/types/2_poll_voter.d.ts.map +1 -0
  140. package/script/types/2_poll_voter.js +21 -0
  141. package/script/types/3_connected_website.d.ts +35 -0
  142. package/script/types/3_connected_website.d.ts.map +1 -0
  143. package/script/types/3_connected_website.js +42 -0
  144. package/script/types/3_input_media.d.ts +5 -5
  145. package/script/types/3_input_media.d.ts.map +1 -1
  146. package/script/types/3_poll_voter_list.d.ts +31 -0
  147. package/script/types/3_poll_voter_list.d.ts.map +1 -0
  148. package/script/types/3_poll_voter_list.js +31 -0
  149. package/script/types/4_reply_to.d.ts +2 -2
  150. package/script/types/4_reply_to.d.ts.map +1 -1
  151. package/script/types/6_message_content.d.ts +2 -2
  152. package/script/types/6_message_content.d.ts.map +1 -1
  153. package/script/types/9_message.d.ts +8 -1
  154. package/script/types/9_message.d.ts.map +1 -1
  155. package/script/types/9_message.js +3 -0
  156. package/script/types/B_update.d.ts +25 -10
  157. package/script/types/B_update.d.ts.map +1 -1
@@ -20,9 +20,9 @@
20
20
  import { type Storage } from "../2_storage.js";
21
21
  import { Api, Mtproto } from "../2_tl.js";
22
22
  import { type DC } from "../3_transport.js";
23
- import { type AlbumStoryList, type Animation, type AppSupport, type AuthorizationSession, type AvailableReactions, type Birthday, type BlockedUserList, type BotAccessSettings, type BotCommand, type BotTokenCheckResult, type BusinessConnection, type CallbackQueryAnswer, type CallbackQueryQuestion, type Chat, type ChatActionType, type ChatListItem, type ChatMember, type ChatP, type ChatPChannel, type ChatPGroup, type ChatPPrivate, type ChatPSupergroup, type ChatSettings, type ClaimedGifts, type CodeCheckResult, type Country, type FailedInvitation, type FileSource, type Gift, type GiftCollection, type ID, type InactiveChat, type InlineQueryAnswer, type InlineQueryResult, type InputChecklistItem, type InputEmojiStatus, type InputGift, type InputMedia, type InputPollOption, type InputRichText, type InputSticker, type InputStoryContent, type InviteLink, type JoinRequest, type LeftChannelList, type LinkPreview, type LiveStreamChannel, type Message, type MessageAnimation, type MessageAudio, type MessageChecklist, type MessageContact, type MessageCounters, type MessageDice, type MessageDocument, type MessageInvoice, type MessageList, type MessageLivePhoto, type MessageLocation, type MessagePhoto, type MessagePoll, type MessageReactionList, type MessageRichText, type MessageSticker, type MessageText, type MessageVenue, type MessageVideo, type MessageVideoNote, type MessageVoice, type MiniAppInfo, type NetworkStatistics, type ParseMode, type PasswordCheckResult, type Poll, type PremiumSubscriptionDuration, type PriceTag, type ProfilePhotoList, type Reaction, type ReportReason, type RichText, type SavedChats, type SecretChat, type SlowModeDuration, type StarAmount, type StarTransactionList, type Sticker, type StickerSet, type Story, type StoryAlbum, type StoryReportResult, type SummarizedText, type TextToTranslate, type Timezone, type Topic, type TranslatedText, type Translation, type User, type VideoChat, type VideoChatActive, type VideoChatScheduled, type VoiceTranscription } from "../3_types.js";
23
+ import { type AlbumStoryList, type Animation, type AppSupport, type AuthorizationSession, type AvailableReactions, type Birthday, type BlockedUserList, type BotAccessSettings, type BotCommand, type BotTokenCheckResult, type BusinessConnection, type CallbackQueryAnswer, type CallbackQueryQuestion, type Chat, type ChatActionType, type ChatListItem, type ChatMember, type ChatP, type ChatPChannel, type ChatPGroup, type ChatPPrivate, type ChatPSupergroup, type ChatSettings, type ClaimedGifts, type CodeCheckResult, type ConnectedWebsite, type Country, type FailedInvitation, type FileSource, type Gift, type GiftCollection, type ID, type InactiveChat, type InlineQueryAnswer, type InlineQueryResult, type InputChecklistItem, type InputEmojiStatus, type InputGift, type InputMedia, type InputPollOption, type InputRichText, type InputSticker, type InputStoryContent, type InviteLink, type JoinRequest, type LeftChannelList, type LinkPreview, type LiveStreamChannel, type Message, type MessageAnimation, type MessageAudio, type MessageChecklist, type MessageContact, type MessageCounters, type MessageDice, type MessageDocument, type MessageInvoice, type MessageList, type MessageLivePhoto, type MessageLocation, type MessagePhoto, type MessagePoll, type MessageReactionList, type MessageRichText, type MessageSticker, type MessageText, type MessageVenue, type MessageVideo, type MessageVideoNote, type MessageViewer, type MessageVoice, type MiniAppInfo, type NetworkStatistics, type ParseMode, type PasswordCheckResult, type Poll, type PollVoterList, type PremiumSubscriptionDuration, type PriceTag, type ProfilePhotoList, type Reaction, type ReportReason, type RichText, type SavedChats, type SecretChat, type SecretChatActionType, type SlowModeDuration, type StarAmount, type StarTransactionList, type Sticker, type StickerSet, type Story, type StoryAlbum, type StoryReportResult, type SummarizedText, type TextToTranslate, type Timezone, type Topic, type TranslatedText, type Translation, type User, type VideoChat, type VideoChatActive, type VideoChatScheduled, type VoiceTranscription } from "../3_types.js";
24
24
  import { Migrate } from "../4_errors.js";
25
- import type { AddBotToAttachmentsMenuParams, AddChatMemberParams, AddContactParams, AddReactionParams, AddStickerToStickerSetParams, AnswerCallbackQueryParams, AnswerInlineQueryParams, AnswerPreCheckoutQueryParams, ApproveJoinRequestsParams, BanChatMemberParams, CheckUsernameParams, CreateChannelParams, CreateGroupParams, CreateInviteLinkParams, CreateStickerSetParams, CreateStoryParams, CreateSupergroupParams, CreateTopicParams, DeclineJoinRequestsParams, DeleteAccountParams, DeleteMessageParams, DeleteMessagesParams, DownloadLiveStreamSegmentParams, DownloadParams, EditInlineMessageCaptionParams, EditInlineMessageMediaParams, EditInlineMessageRichTextParams, EditInlineMessageTextParams, EditMessageCaptionParams, EditMessageLiveLocationParams, EditMessageMediaParams, EditMessageReplyMarkupParams, EditMessageRichTextParams, EditMessageTextParams, EditTopicParams, EnableSignaturesParams, EndSecretChatParams, EndTakeoutSessionParams, ForwardMessagesParams, GetBlockedUsersParams, GetChatMembersParams, GetChatsParams, GetClaimedGiftsParams, GetCommonChatsParams, GetCreatedInviteLinksParams, GetHistoryParams, GetJoinRequestsParams, GetLeftChannelsParams, GetLinkPreviewParams, GetMessageReactionsParams, GetMyCommandsParams, GetProfilePhotosParams, GetSavedChatsParams, GetSavedMessagesParams, GetStarTransactionsParams, GetTranslationsParams, GiftPremiumSubscriptionParams, InvokeParams, JoinVideoChatParams, OpenChatParams, OpenMiniAppParams, PinMessageParams, PromoteChatMemberParams, RemoveProfilePhotoParams, ReplaceStickerInStickerSetParams, ReportChatParams, ReportStoryParams, ResolveUsernameParams, ScheduleVideoChatParams, SearchMessagesParams, SendAnimationParams, SendAudioParams, SendChecklistParams, SendContactParams, SendDiceParams, SendDocumentParams, SendGiftParams, SendInlineQueryParams, SendInvoiceParams, SendLivePhotoParams, SendLocationParams, SendMediaGroupParams, SendMessageDraftParams, SendMessageParams, SendPhotoParams, SendPollParams, SendRichTextDraftParams, SendRichTextParams, SendSecretAnimationParams, SendSecretAudioParams, SendSecretContactParams, SendSecretDocumentParams, SendSecretLocationParams, SendSecretMessageParams, SendSecretPhotoParams, SendSecretStickerParams, SendSecretVenueParams, SendSecretVideoNoteParams, SendSecretVideoParams, SendSecretVoiceParams, SendStickerParams, SendVenueParams, SendVideoNoteParams, SendVideoParams, SendVoiceParams, SetBirthdayParams, SetChatMemberRightsParams, SetChatMemberTagParams, SetChatPhotoParams, SetContactNoteParams, SetEmojiStatusParams, SetLocationParams, SetManagedBotAccessSettingsParams, SetMyCommandsParams, SetNameColorParams, SetPersonalChannelParams, SetProfileColorParams, SetReactionsParams, SetWorkingHoursParams, SignInParams, StartBotParams, StartTakeoutSessionParams, StartVideoChatParams, StopPollParams, SummarizeTextParams, TranslateTextParams, UnpinMessageParams, UnpinMessagesParams, UpdateChecklistParams, UpdateProfileParams, UpdateProfilePhotoParams, UpdateProfileVideoParams } from "./0_params.js";
25
+ import type { AddBotToAttachmentsMenuParams, AddChatMemberParams, AddContactParams, AddReactionParams, AddStickerToStickerSetParams, AnswerCallbackQueryParams, AnswerInlineQueryParams, AnswerPreCheckoutQueryParams, ApproveJoinRequestsParams, BanChatMemberParams, CheckUsernameParams, CreateChannelParams, CreateGroupParams, CreateInviteLinkParams, CreateStickerSetParams, CreateStoryParams, CreateSupergroupParams, CreateTopicParams, DeclineJoinRequestsParams, DeleteAccountParams, DeleteMessageParams, DeleteMessagesParams, DownloadLiveStreamSegmentParams, DownloadParams, EditInlineMessageCaptionParams, EditInlineMessageMediaParams, EditInlineMessageRichTextParams, EditInlineMessageTextParams, EditMessageCaptionParams, EditMessageLiveLocationParams, EditMessageMediaParams, EditMessageReplyMarkupParams, EditMessageRichTextParams, EditMessageTextParams, EditTopicParams, EnableSignaturesParams, EndSecretChatParams, EndTakeoutSessionParams, ForwardMessagesParams, GetBlockedUsersParams, GetChatMembersParams, GetChatsParams, GetClaimedGiftsParams, GetCommonChatsParams, GetCreatedInviteLinksParams, GetHistoryParams, GetJoinRequestsParams, GetLeftChannelsParams, GetLinkPreviewParams, GetMessageReactionsParams, GetMyCommandsParams, GetPollVotersParams, GetProfilePhotosParams, GetSavedChatsParams, GetSavedMessagesParams, GetStarTransactionsParams, GetTranslationsParams, GiftPremiumSubscriptionParams, InvokeParams, JoinVideoChatParams, MarkAllMentionsAsReadParams, OpenChatParams, OpenMiniAppParams, PinMessageParams, PromoteChatMemberParams, RemoveProfilePhotoParams, ReplaceStickerInStickerSetParams, ReportChatParams, ReportStoryParams, ResolveUsernameParams, ScheduleVideoChatParams, SearchMessagesParams, SendAnimationParams, SendAudioParams, SendChecklistParams, SendContactParams, SendDiceParams, SendDocumentParams, SendGiftParams, SendInlineQueryParams, SendInvoiceParams, SendLivePhotoParams, SendLocationParams, SendMediaGroupParams, SendMessageDraftParams, SendMessageParams, SendPhotoParams, SendPollParams, SendRichTextDraftParams, SendRichTextParams, SendSecretAnimationParams, SendSecretAudioParams, SendSecretContactParams, SendSecretDocumentParams, SendSecretLocationParams, SendSecretMessageParams, SendSecretPhotoParams, SendSecretStickerParams, SendSecretVenueParams, SendSecretVideoNoteParams, SendSecretVideoParams, SendSecretVoiceParams, SendStickerParams, SendVenueParams, SendVideoNoteParams, SendVideoParams, SendVoiceParams, SetBirthdayParams, SetChatMemberRightsParams, SetChatMemberTagParams, SetChatPhotoParams, SetContactNoteParams, SetEmojiStatusParams, SetLocationParams, SetManagedBotAccessSettingsParams, SetMyCommandsParams, SetNameColorParams, SetPersonalChannelParams, SetProfileColorParams, SetReactionsParams, SetWorkingHoursParams, SignInParams, StartBotParams, StartTakeoutSessionParams, StartVideoChatParams, StopPollParams, SummarizeTextParams, TranslateTextParams, UnpinMessageParams, UnpinMessagesParams, UpdateChecklistParams, UpdateProfileParams, UpdateProfilePhotoParams, UpdateProfileVideoParams } from "./0_params.js";
26
26
  import { StorageOperations } from "./0_storage_operations.js";
27
27
  import type { ClientGeneric } from "./1_client_generic.js";
28
28
  import type { ClientPlainParams } from "./1_client_plain.js";
@@ -60,7 +60,7 @@ export interface ClientParams extends ClientPlainParams {
60
60
  outgoingMessages?: boolean;
61
61
  /** 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`. */
62
62
  guaranteeUpdateDelivery?: boolean;
63
- /** Whether to not handle updates received when the client was not running. Defaults to `true` for bots, and `false` for users. */
63
+ /** Whether to ignore updates received while the client was not running. Defaults to `true` for bots and `false` for users. */
64
64
  dropPendingUpdates?: boolean;
65
65
  /**
66
66
  * Whether to persist cache to the provided storage, and not memory. Defaults to `false`.
@@ -194,28 +194,19 @@ export declare class Client<C extends Context = Context> extends Composer<C> imp
194
194
  private [mustGetPeer];
195
195
  private [mustGetPeer];
196
196
  /**
197
- * Get information on the currently authorized user.
198
- *
199
- * @method ac
200
- * @returns Information on the currently authorized user.
201
- */
202
- getMe(): Promise<User>;
203
- /**
204
- * Show a username in the current account, a bot account, a supergroup, or a channel's profile. User-only.
197
+ * Add a bot to the attachments menu. User-only.
205
198
  *
206
199
  * @method ac
207
- * @param id `"me"`, a bot ID, a supergroup ID, or a channel ID.
208
- * @param username The username to show.
200
+ * @param botId The identifier of the bot to add to the attachments menu.
209
201
  */
210
- showUsername(id: ID, username: string): Promise<void>;
202
+ addBotToAttachmentsMenu(botId: ID, params?: AddBotToAttachmentsMenuParams): Promise<void>;
211
203
  /**
212
- * Hide a username from the current account, a bot account, a supergroup, or a channel's profile. User-only.
204
+ * Block a user. User-only.
213
205
  *
214
206
  * @method ac
215
- * @param id `"me"`, a bot ID, a supergroup ID, or a channel ID.
216
- * @param username The username to hide.
207
+ * @param userId The identifier of the user to block.
217
208
  */
218
- hideUsername(id: ID, username: string): Promise<void>;
209
+ blockUser(userId: ID): Promise<void>;
219
210
  /**
220
211
  * Check the availability of a username. User-only.
221
212
  *
@@ -225,538 +216,491 @@ export declare class Client<C extends Context = Context> extends Composer<C> imp
225
216
  */
226
217
  checkUsername(username: string, params?: CheckUsernameParams): Promise<boolean>;
227
218
  /**
228
- * Set the username of the current account. User-only.
219
+ * Delete the current account. User-only.
229
220
  *
230
221
  * @method ac
231
- * @param username The username to set.
222
+ * @param reason The reason of the deletion.
232
223
  */
233
- setUsername(username: string): Promise<void>;
224
+ deleteAccount(reason: string, params?: DeleteAccountParams): Promise<void>;
234
225
  /**
235
- * Remove the current account's username. User-only.
226
+ * Disable sponsored messages on the current user. User-only.
236
227
  *
237
228
  * @method ac
238
229
  */
239
- removeUsername(): Promise<void>;
230
+ disableSponsoredMessages(): Promise<void>;
240
231
  /**
241
- * Reorder the usernames of the current account, a bot account, a supergroup, or a channel's profile. User-only.
232
+ * Disconnect a connected website. User-only.
242
233
  *
243
234
  * @method ac
244
- * @param id `"me"`, a bot ID, a supergroup ID, or a channel ID.
245
- * @param order The new order to use.
246
- * @returns Whether the order was changed.
235
+ * @param id The identifier of a connected website.
247
236
  */
248
- reorderUsernames(id: ID, order: string[]): Promise<boolean>;
237
+ disconnectConnectedWebsite(id: string): Promise<void>;
249
238
  /**
250
- * Hide all usernames from a supergroup or a channel's profile. User-only.
239
+ * Disconnect all connected websites. User-only.
251
240
  *
252
241
  * @method ac
253
- * @param id A supergroup ID or a channel ID.
254
- * @returns Whether any username was hidden.
255
242
  */
256
- hideUsernames(id: ID): Promise<boolean>;
243
+ disconnectConnectedWebsites(): Promise<void>;
257
244
  /**
258
- * Get a business connection. Bot-only.
245
+ * Enable sponsored messages on the current user. User-only.
259
246
  *
260
247
  * @method ac
261
- * @param id The identifier of the business connection.
262
- * @cache
263
248
  */
264
- getBusinessConnection(id: string): Promise<BusinessConnection>;
249
+ enableSponsoredMessages(): Promise<void>;
265
250
  /**
266
- * Set the current account's online status. User-only.
251
+ * Get the current account's TTL. User-only.
267
252
  *
268
253
  * @method ac
269
- * @param isOnline The new online status.
254
+ * @returns The current account's TTL in days.
270
255
  */
271
- setIsOnline(isOnline: boolean): Promise<void>;
256
+ getAccountTtl(): Promise<number>;
272
257
  /**
273
- * Set the current account's emoji status. User-only.
258
+ * Get app support. User-only.
274
259
  *
275
260
  * @method ac
276
- * @param emojiStatus The emoji or gift to set as the new emoji status.
277
261
  */
278
- setEmojiStatus(emojiStatus: InputEmojiStatus, params?: SetEmojiStatusParams): Promise<void>;
262
+ getAppSupport(): Promise<AppSupport>;
279
263
  /**
280
- * Remove the current account's emoji status. User-only.
264
+ * Get app support name. User-only.
281
265
  *
282
266
  * @method ac
283
267
  */
284
- removeEmojiStatus(): Promise<void>;
268
+ getAppSupportName(): Promise<string>;
285
269
  /**
286
- * Set the emoji status of a channel. User-only.
270
+ * Get the authorization sessions. User-only.
287
271
  *
288
272
  * @method ac
289
- * @param chatId The identifier of a channel.
290
- * @param emojiStatus The emoji or gift to set as the new emoji status.
291
273
  */
292
- setChannelEmojiStatus(chatId: ID, emojiStatus: InputEmojiStatus, params?: SetEmojiStatusParams): Promise<void>;
274
+ getAuthorizationSessions(): Promise<AuthorizationSession[]>;
293
275
  /**
294
- * Remove the emoji status of a channel. User-only.
276
+ * Get blocked users. User-only.
295
277
  *
296
278
  * @method ac
297
- * @param chatId The identifier of a channel.
298
279
  */
299
- removeChannelEmojiStatus(chatId: ID): Promise<void>;
280
+ getBlockedUsers(params?: GetBlockedUsersParams): Promise<BlockedUserList>;
300
281
  /**
301
- * Set the emoji status of a bot's user. Bot-only.
282
+ * Get a business connection. Bot-only.
302
283
  *
303
284
  * @method ac
304
- * @param userId The identifier of a user of the bot.
305
- * @param emojiStatus The emoji or gift to set as the new emoji status.
285
+ * @param id The identifier of the business connection.
286
+ * @cache
306
287
  */
307
- setUserEmojiStatus(userId: ID, emojiStatus: InputEmojiStatus, params?: SetEmojiStatusParams): Promise<void>;
288
+ getBusinessConnection(id: string): Promise<BusinessConnection>;
308
289
  /**
309
- * Remove the emoji status of a bot's user. Bot-only.
290
+ * Get connected websites. User-only.
310
291
  *
311
292
  * @method ac
312
- * @param userId The identifier of a user of the bot.
313
293
  */
314
- removeUserEmojiStatus(userId: ID): Promise<void>;
294
+ getConnectedWebsites(): Promise<ConnectedWebsite[]>;
315
295
  /**
316
- * Update the profile of the current user. At least one parameter must be specified. User-only.
296
+ * Get countries. User-only.
317
297
  *
318
298
  * @method ac
319
299
  */
320
- updateProfile(params?: UpdateProfileParams): Promise<void>;
300
+ getCountries(languageCode: string): Promise<Country[]>;
321
301
  /**
322
- * Update the profile photo of the current user or a bot managed by the current user.
302
+ * Get the country code for the current user based on its IP address. User-only.
323
303
  *
324
304
  * @method ac
325
- * @param photo The photo to set as profile photo.
326
305
  */
327
- updateProfilePhoto(photo: FileSource, params?: UpdateProfilePhotoParams): Promise<void>;
306
+ getCountryCode(): Promise<string>;
328
307
  /**
329
- * Update the profile video of the current user or a bot managed by the current user.
308
+ * Get information on the currently authorized user.
330
309
  *
331
310
  * @method ac
332
- * @param video The video to set as profile video.
311
+ * @returns Information on the currently authorized user.
333
312
  */
334
- updateProfileVideo(video: FileSource, params?: UpdateProfileVideoParams): Promise<void>;
313
+ getMe(): Promise<User>;
335
314
  /**
336
- * Remove the profile video of the current user or a bot managed by the current user.
315
+ * Get owned bots. User-only.
337
316
  *
338
317
  * @method ac
339
318
  */
340
- removeProfilePhoto(params?: RemoveProfilePhotoParams): Promise<void>;
319
+ getOwnedBots(): Promise<User[]>;
341
320
  /**
342
- * Set the birthday of the current user. User-only.
321
+ * Get the profile photos of a user.
343
322
  *
344
323
  * @method ac
324
+ * @param userId The identifier of a user.
345
325
  */
346
- setBirthday(params?: SetBirthdayParams): Promise<void>;
326
+ getProfilePhotos(userId: ID, params?: GetProfilePhotosParams): Promise<ProfilePhotoList>;
347
327
  /**
348
- * Set the personal channel of the current user. User-only.
328
+ * Get timezones. User-only.
349
329
  *
350
330
  * @method ac
351
331
  */
352
- setPersonalChannel(params?: SetPersonalChannelParams): Promise<void>;
332
+ getTimezones(): Promise<Timezone[]>;
353
333
  /**
354
- * Set the name color of the current user. User-only.
334
+ * Hide a username from the current account, a bot account, a supergroup, or a channel's profile. User-only.
355
335
  *
356
336
  * @method ac
357
- * @param color The identifier of the color to set.
337
+ * @param id `"me"`, a bot ID, a supergroup ID, or a channel ID.
338
+ * @param username The username to hide.
358
339
  */
359
- setNameColor(color: number, params?: SetNameColorParams): Promise<void>;
340
+ hideUsername(id: ID, username: string): Promise<void>;
360
341
  /**
361
- * Set the profile color of the current user. User-only.
342
+ * Hide all usernames from a supergroup or a channel's profile. User-only.
362
343
  *
363
344
  * @method ac
364
- * @param color The identifier of the color to set.
345
+ * @param id A supergroup ID or a channel ID.
346
+ * @returns Whether any username was hidden.
365
347
  */
366
- setProfileColor(color: number, params?: SetProfileColorParams): Promise<void>;
348
+ hideUsernames(id: ID): Promise<boolean>;
367
349
  /**
368
- * Set the location of the current user. User-only.
350
+ * Pause the business bot in a chat. User-only.
369
351
  *
370
352
  * @method ac
353
+ * @param chatId The identifier of a chat.
371
354
  */
372
- setLocation(params?: SetLocationParams): Promise<void>;
355
+ pauseBusinessBotConnection(chatId: ID): Promise<void>;
373
356
  /**
374
- * Set the working hours of the current user. User-only.
357
+ * Remove an authorization session. User-only.
375
358
  *
376
359
  * @method ac
360
+ * @param id The identifier of the authorization session to remove.
377
361
  */
378
- setWorkingHours(params?: SetWorkingHoursParams): Promise<void>;
362
+ removeAuthorizationSession(id: string): Promise<void>;
379
363
  /**
380
- * Enable sponsored messages on the current user. User-only.
364
+ * Remove all authorization sessions except for the current one. User-only.
381
365
  *
382
366
  * @method ac
383
367
  */
384
- enableSponsoredMessages(): Promise<void>;
368
+ removeAuthorizationSessions(): Promise<void>;
385
369
  /**
386
- * Disable sponsored messages on the current user. User-only.
370
+ * Remove a bot from the attachments menu. User-only.
387
371
  *
388
372
  * @method ac
373
+ * @param botId The identifier of the bot to remove from the attachments menu.
389
374
  */
390
- disableSponsoredMessages(): Promise<void>;
375
+ removeBotFromAttachmentsMenu(botId: ID): Promise<void>;
391
376
  /**
392
- * Pause the business bot in a chat. User-only.
377
+ * Remove the emoji status of a channel. User-only.
393
378
  *
394
379
  * @method ac
395
- * @param chatId The identifier of a chat.
380
+ * @param chatId The identifier of a channel.
396
381
  */
397
- pauseBusinessBotConnection(chatId: ID): Promise<void>;
382
+ removeChannelEmojiStatus(chatId: ID): Promise<void>;
398
383
  /**
399
- * Resume the business bot in a chat. User-only.
384
+ * Remove the current account's emoji status. User-only.
400
385
  *
401
386
  * @method ac
402
- * @param chatId The identifier of a chat.
403
387
  */
404
- resumeBusinessBotConnection(chatId: ID): Promise<void>;
388
+ removeEmojiStatus(): Promise<void>;
405
389
  /**
406
- * Resolve a username.
390
+ * Remove the profile video of the current user or a bot managed by the current user.
407
391
  *
408
392
  * @method ac
409
- * @param username The username to resolve.
410
393
  */
411
- resolveUsername(username: string, params?: ResolveUsernameParams): Promise<ChatP>;
394
+ removeProfilePhoto(params?: RemoveProfilePhotoParams): Promise<void>;
412
395
  /**
413
- * Resolve a phone number. User-only.
396
+ * Remove the emoji status of a bot's user. Bot-only.
414
397
  *
415
398
  * @method ac
416
- * @param phoneNumber The phone number to resolve.
399
+ * @param userId The identifier of a user of the bot.
417
400
  */
418
- resolvePhoneNumber(phoneNumber: string): Promise<User>;
401
+ removeUserEmojiStatus(userId: ID): Promise<void>;
419
402
  /**
420
- * Set the list of close friends. User-only.
403
+ * Remove the current account's username. User-only.
421
404
  *
422
405
  * @method ac
423
- * @param userIds The identifiers of users to set as close friends.
424
406
  */
425
- setCloseFriends(userIds: ID[]): Promise<void>;
407
+ removeUsername(): Promise<void>;
426
408
  /**
427
- * Suggest a birthday. User-only.
409
+ * Reorder the usernames of the current account, a bot account, a supergroup, or a channel's profile. User-only.
428
410
  *
429
411
  * @method ac
430
- * @param userId The identifier of the user to suggest a birthday for.
431
- * @param birthday The birthday to suggest.
412
+ * @param id `"me"`, a bot ID, a supergroup ID, or a channel ID.
413
+ * @param order The new order to use.
414
+ * @returns Whether the order was changed.
432
415
  */
433
- suggestBirthday(userId: ID, birthday: Birthday): Promise<void>;
416
+ reorderUsernames(id: ID, order: string[]): Promise<boolean>;
434
417
  /**
435
- * Block a user. User-only.
418
+ * Resolve a phone number. User-only.
436
419
  *
437
420
  * @method ac
438
- * @param userId The identifier of the user to block.
421
+ * @param phoneNumber The phone number to resolve.
439
422
  */
440
- blockUser(userId: ID): Promise<void>;
423
+ resolvePhoneNumber(phoneNumber: string): Promise<User>;
441
424
  /**
442
- * Unblock a user. User-only.
425
+ * Resolve a username.
443
426
  *
444
427
  * @method ac
445
- * @param userId The identifier of the user to unblock.
428
+ * @param username The username to resolve.
446
429
  */
447
- unblockUser(userId: ID): Promise<void>;
430
+ resolveUsername(username: string, params?: ResolveUsernameParams): Promise<ChatP>;
448
431
  /**
449
- * Get blocked users. User-only.
432
+ * Resume the business bot in a chat. User-only.
450
433
  *
451
434
  * @method ac
435
+ * @param chatId The identifier of a chat.
452
436
  */
453
- getBlockedUsers(params?: GetBlockedUsersParams): Promise<BlockedUserList>;
437
+ resumeBusinessBotConnection(chatId: ID): Promise<void>;
454
438
  /**
455
- * Add a bot to the attachments menu. User-only.
439
+ * Set the current account's TTL. User-only.
456
440
  *
457
441
  * @method ac
458
- * @param botId The identifier of the bot to add to the attachments menu.
442
+ * @param dayCount The current account's TTL in days.
459
443
  */
460
- addBotToAttachmentsMenu(botId: ID, params?: AddBotToAttachmentsMenuParams): Promise<void>;
444
+ setAccountTtl(dayCount: number): Promise<void>;
461
445
  /**
462
- * Remove a bot from the attachments menu. User-only.
446
+ * Set the birthday of the current user. User-only.
463
447
  *
464
448
  * @method ac
465
- * @param botId The identifier of the bot to remove from the attachments menu.
466
449
  */
467
- removeBotFromAttachmentsMenu(botId: ID): Promise<void>;
450
+ setBirthday(params?: SetBirthdayParams): Promise<void>;
468
451
  /**
469
- * Get app support. User-only.
452
+ * Set the emoji status of a channel. User-only.
470
453
  *
471
454
  * @method ac
455
+ * @param chatId The identifier of a channel.
456
+ * @param emojiStatus The emoji or gift to set as the new emoji status.
472
457
  */
473
- getAppSupport(): Promise<AppSupport>;
458
+ setChannelEmojiStatus(chatId: ID, emojiStatus: InputEmojiStatus, params?: SetEmojiStatusParams): Promise<void>;
474
459
  /**
475
- * Get app support name. User-only.
460
+ * Set the list of close friends. User-only.
476
461
  *
477
462
  * @method ac
463
+ * @param userIds The identifiers of users to set as close friends.
478
464
  */
479
- getAppSupportName(): Promise<string>;
465
+ setCloseFriends(userIds: ID[]): Promise<void>;
480
466
  /**
481
- * Get owned bots. User-only.
467
+ * Set the current account's emoji status. User-only.
482
468
  *
483
469
  * @method ac
470
+ * @param emojiStatus The emoji or gift to set as the new emoji status.
484
471
  */
485
- getOwnedBots(): Promise<User[]>;
472
+ setEmojiStatus(emojiStatus: InputEmojiStatus, params?: SetEmojiStatusParams): Promise<void>;
486
473
  /**
487
- * Get timezones. User-only.
474
+ * Set the current account's online status. User-only.
488
475
  *
489
476
  * @method ac
477
+ * @param isOnline The new online status.
490
478
  */
491
- getTimezones(): Promise<Timezone[]>;
479
+ setIsOnline(isOnline: boolean): Promise<void>;
492
480
  /**
493
- * Get countries. User-only.
481
+ * Set the location of the current user. User-only.
494
482
  *
495
483
  * @method ac
496
484
  */
497
- getCountries(languageCode: string): Promise<Country[]>;
485
+ setLocation(params?: SetLocationParams): Promise<void>;
498
486
  /**
499
- * Get the profile photos of a user.
487
+ * Set the name color of the current user. User-only.
500
488
  *
501
489
  * @method ac
502
- * @param userId The identifier of a user.
490
+ * @param color The identifier of the color to set.
503
491
  */
504
- getProfilePhotos(userId: ID, params?: GetProfilePhotosParams): Promise<ProfilePhotoList>;
492
+ setNameColor(color: number, params?: SetNameColorParams): Promise<void>;
505
493
  /**
506
- * Delete the current account. User-only.
494
+ * Set the personal channel of the current user. User-only.
507
495
  *
508
496
  * @method ac
509
- * @param reason The reason of the deletion.
510
497
  */
511
- deleteAccount(reason: string, params?: DeleteAccountParams): Promise<void>;
498
+ setPersonalChannel(params?: SetPersonalChannelParams): Promise<void>;
512
499
  /**
513
- * Get the authorization sessions. User-only.
500
+ * Set the profile color of the current user. User-only.
514
501
  *
515
502
  * @method ac
503
+ * @param color The identifier of the color to set.
516
504
  */
517
- getAuthorizationSessions(): Promise<AuthorizationSession[]>;
505
+ setProfileColor(color: number, params?: SetProfileColorParams): Promise<void>;
518
506
  /**
519
- * Remove an authorization session. User-only.
507
+ * Set the emoji status of a bot's user. Bot-only.
520
508
  *
521
509
  * @method ac
522
- * @param id The identifier of the authorization session to remove.
510
+ * @param userId The identifier of a user of the bot.
511
+ * @param emojiStatus The emoji or gift to set as the new emoji status.
523
512
  */
524
- removeAuthorizationSession(id: string): Promise<void>;
513
+ setUserEmojiStatus(userId: ID, emojiStatus: InputEmojiStatus, params?: SetEmojiStatusParams): Promise<void>;
525
514
  /**
526
- * Remove all authorization sessions except for the current one. User-only.
515
+ * Set the username of the current account. User-only.
527
516
  *
528
517
  * @method ac
518
+ * @param username The username to set.
529
519
  */
530
- removeAuthorizationSessions(): Promise<void>;
520
+ setUsername(username: string): Promise<void>;
531
521
  /**
532
- * Send a text message.
522
+ * Set the working hours of the current user. User-only.
533
523
  *
534
- * @method ms
535
- * @param chatId The identifier of a chat to send the message to.
536
- * @param text The message's text.
537
- * @returns The sent text message.
524
+ * @method ac
538
525
  */
539
- sendMessage(chatId: ID, text: string, params?: SendMessageParams): Promise<MessageText>;
526
+ setWorkingHours(params?: SetWorkingHoursParams): Promise<void>;
540
527
  /**
541
- * Send a rich text message.
528
+ * Show a username in the current account, a bot account, a supergroup, or a channel's profile. User-only.
542
529
  *
543
- * @method ms
544
- * @param chatId The identifier of a chat to send the message to.
545
- * @param richText The message's rich text.
546
- * @returns The sent rich text message.
530
+ * @method ac
531
+ * @param id `"me"`, a bot ID, a supergroup ID, or a channel ID.
532
+ * @param username The username to show.
547
533
  */
548
- sendRichText(chatId: ID, richText: InputRichText, params?: SendRichTextParams): Promise<MessageRichText>;
534
+ showUsername(id: ID, username: string): Promise<void>;
549
535
  /**
550
- * Stream a drafted text message. Bot-only.
536
+ * Suggest a birthday. User-only.
551
537
  *
552
- * @method ms
553
- * @param chatId The identifier of a chat to send the message to.
554
- * @param draftId The identifier of the draft.
555
- * @param text The message's text.
538
+ * @method ac
539
+ * @param userId The identifier of the user to suggest a birthday for.
540
+ * @param birthday The birthday to suggest.
556
541
  */
557
- sendMessageDraft(chatId: ID, draftId: number, text: string, params?: SendMessageDraftParams): Promise<void>;
542
+ suggestBirthday(userId: ID, birthday: Birthday): Promise<void>;
558
543
  /**
559
- * Stream a drafted rich text message. Bot-only.
544
+ * Unblock a user. User-only.
560
545
  *
561
- * @method ms
562
- * @param chatId The identifier of a chat to send the message to.
563
- * @param draftId The identifier of the draft.
564
- * @param richText The message's rich text.
546
+ * @method ac
547
+ * @param userId The identifier of the user to unblock.
565
548
  */
566
- sendRichTextDraft(chatId: ID, draftId: number, richText: InputRichText, params?: SendRichTextDraftParams): Promise<void>;
549
+ unblockUser(userId: ID): Promise<void>;
567
550
  /**
568
- * Send a photo.
551
+ * Update the profile of the current user. At least one parameter must be specified. User-only.
569
552
  *
570
- * @method ms
571
- * @param chatId The identifier of a chat to send the photo to.
572
- * @param photo The photo to send.
573
- * @returns The sent photo.
553
+ * @method ac
574
554
  */
575
- sendPhoto(chatId: ID, photo: FileSource, params?: SendPhotoParams): Promise<MessagePhoto>;
555
+ updateProfile(params?: UpdateProfileParams): Promise<void>;
576
556
  /**
577
- * Send a live photo.
557
+ * Update the profile photo of the current user or a bot managed by the current user.
578
558
  *
579
- * @method ms
580
- * @param chatId The identifier of a chat to send the photo to.
581
- * @param photo The photo to send.
582
- * @param video The video version of the photo.
583
- * @returns The sent live photo.
559
+ * @method ac
560
+ * @param photo The photo to set as profile photo.
584
561
  */
585
- sendLivePhoto(chatId: ID, photo: FileSource, video: FileSource, params?: SendLivePhotoParams): Promise<MessageLivePhoto>;
562
+ updateProfilePhoto(photo: FileSource, params?: UpdateProfilePhotoParams): Promise<void>;
586
563
  /**
587
- * Send a document.
564
+ * Update the profile video of the current user or a bot managed by the current user.
588
565
  *
589
- * @method ms
590
- * @param chatId The identifier of a chat to send the document to.
591
- * @param document The document to send.
592
- * @returns The sent document.
566
+ * @method ac
567
+ * @param video The video to set as profile video.
593
568
  */
594
- sendDocument(chatId: ID, document: FileSource, params?: SendDocumentParams): Promise<MessageDocument>;
569
+ updateProfileVideo(video: FileSource, params?: UpdateProfileVideoParams): Promise<void>;
595
570
  /**
596
- * Send a sticker.
571
+ * Add a sticker to favorites. User-only.
597
572
  *
598
573
  * @method ms
599
- * @param chatId The identifier of a chat to send the sticker to.
600
- * @param sticker The sticker to send.
601
- * @returns The sent sticker.
574
+ * @param fileId The file identifier of the sticker.
602
575
  */
603
- sendSticker(chatId: ID, sticker: FileSource, params?: SendStickerParams): Promise<MessageSticker>;
576
+ addStickerToFavorites(fileId: string): Promise<void>;
604
577
  /**
605
- * Send a video.
578
+ * Add a sticker to recents. User-only.
606
579
  *
607
580
  * @method ms
608
- * @param chatId The identifier of a chat to send the video to.
609
- * @param video The video to send.
610
- * @returns The sent video.
581
+ * @param fileId The file identifier of the sticker.
611
582
  */
612
- sendVideo(chatId: ID, video: FileSource, params?: SendVideoParams): Promise<MessageVideo>;
583
+ addStickerToRecents(fileId: string): Promise<void>;
613
584
  /**
614
- * Send an animation.
585
+ * Clear all message drafts. User-only.
615
586
  *
616
587
  * @method ms
617
- * @param chatId The identifier of a chat to send the animation to.
618
- * @param animation The animation to send.
619
- * @returns The sent animation.
620
588
  */
621
- sendAnimation(chatId: ID, animation: FileSource, params?: SendAnimationParams): Promise<MessageAnimation>;
589
+ clearDrafts(): Promise<void>;
622
590
  /**
623
- * Send a voice message.
591
+ * Clear recent stickers. User-only.
624
592
  *
625
593
  * @method ms
626
- * @param chatId The identifier of a chat to send the voice message to.
627
- * @param voice The voice to send.
628
- * @returns The sent voice message.
629
594
  */
630
- sendVoice(chatId: ID, voice: FileSource, params?: SendVoiceParams): Promise<MessageVoice>;
595
+ clearRecentStickers(): Promise<void>;
631
596
  /**
632
- * Send an audio file.
597
+ * Delete all messages sent by a specific member of a chat. User-only.
633
598
  *
634
599
  * @method ms
635
- * @param chatId The identifier of a chat to send the audio file to.
636
- * @param audio The audio to send.
637
- * @returns The sent audio file.
600
+ * @param chatId The identifier of a chat. Must be a supergroup.
601
+ * @param memberId The identifier of the member.
638
602
  */
639
- sendAudio(chatId: ID, audio: FileSource, params?: SendAudioParams): Promise<MessageAudio>;
603
+ deleteChatMemberMessages(chatId: ID, memberId: ID): Promise<void>;
640
604
  /**
641
- * Send a media group.
605
+ * Delete a single message.
642
606
  *
643
607
  * @method ms
644
- * @param chatId The identifier of a chat to send the media group to.
645
- * @param media The media to include in the media group. Animations are not allowed. All of them must be of the same media type, but an exception is that photos and videos can be mixed.
646
- * @returns The sent messages.
608
+ * @param chatId The identifier of the chat which the message belongs to.
609
+ * @param messageId The identifier of the message to delete.
647
610
  */
648
- sendMediaGroup(chatId: ID, media: InputMedia[], params?: SendMediaGroupParams): Promise<Message[]>;
611
+ deleteMessage(chatId: ID, messageId: number, params?: DeleteMessageParams): Promise<void>;
649
612
  /**
650
- * Send a video note.
613
+ * Delete multiple messages.
651
614
  *
652
615
  * @method ms
653
- * @param chatId The identifier of a chat to send the video note to.
654
- * @param videoNote The video note to send.
655
- * @returns The sent video note.
616
+ * @param chatId The identifier of the chat which the message belongs to.
617
+ * @param messageIds The identifiers of the messages to delete.
656
618
  */
657
- sendVideoNote(chatId: ID, videoNote: FileSource, params?: SendVideoNoteParams): Promise<MessageVideoNote>;
619
+ deleteMessages(chatId: ID, messageIds: number[], params?: DeleteMessagesParams): Promise<void>;
658
620
  /**
659
- * Send a location.
621
+ * Delete a scheduled message.
660
622
  *
661
623
  * @method ms
662
- * @param chatId The identifier of a chat to send the location to.
663
- * @param latitude The location's latitude.
664
- * @param longitude The location's longitude.
665
- * @returns The sent location.
624
+ * @param chatId The identifier of a chat.
625
+ * @param messageId The identifier of the scheduled message to delete.
666
626
  */
667
- sendLocation(chatId: ID, latitude: number, longitude: number, params?: SendLocationParams): Promise<MessageLocation>;
627
+ deleteScheduledMessage(chatId: ID, messageId: number): Promise<void>;
668
628
  /**
669
- * Send a contact.
629
+ * Delete multiple scheduled messages.
670
630
  *
671
631
  * @method ms
672
- * @param chatId The identifier of a chat to send the contact to.
673
- * @param firstName The contact's first name.
674
- * @param phoneNumber The contact's phone number.
675
- * @returns The sent contact.
632
+ * @param chatId The identifier of a chat.
633
+ * @param messageIds The identifiers of the scheduled messages to delete.
676
634
  */
677
- sendContact(chatId: ID, firstName: string, phoneNumber: string, params?: SendContactParams): Promise<MessageContact>;
635
+ deleteScheduledMessages(chatId: ID, messageIds: number[]): Promise<void>;
678
636
  /**
679
- * Send a dice.
637
+ * Edit an inline message's caption. Bot-only.
680
638
  *
681
639
  * @method ms
682
- * @param chatId The identifier of a chat to send the dice to.
683
- * @returns The sent dice.
640
+ * @param inlineMessageId The identifier of the inline message.
684
641
  */
685
- sendDice(chatId: ID, params?: SendDiceParams): Promise<MessageDice>;
642
+ editInlineMessageCaption(inlineMessageId: string, params?: EditInlineMessageCaptionParams): Promise<void>;
686
643
  /**
687
- * Send a venue.
644
+ * Edit an inline message's live location. Bot-only.
688
645
  *
689
646
  * @method ms
690
- * @param chatId The identifier of a chat to send the venue to.
691
- * @param latitude The latitude of the venue.
692
- * @param longitude The longitude of the venue.
693
- * @param title The title of the venue.
694
- * @param address The written address of the venue.
695
- * @returns The sent venue.
647
+ * @param inlineMessageId The identifier of the inline message.
648
+ * @param latitude The new latitude.
649
+ * @param longitude The new longitude.
650
+ * @returns The edited location message.
696
651
  */
697
- sendVenue(chatId: ID, latitude: number, longitude: number, title: string, address: string, params?: SendVenueParams): Promise<MessageVenue>;
652
+ editInlineMessageLiveLocation(inlineMessageId: string, latitude: number, longitude: number, params?: EditMessageLiveLocationParams): Promise<void>;
698
653
  /**
699
- * Send a poll.
654
+ * Edit an inline message's media.
700
655
  *
701
656
  * @method ms
702
- * @param chatId The identifier of a chat to send the poll to.
703
- * @param question The poll's question.
704
- * @param options The poll's options.
705
- * @returns The sent poll.
657
+ * @param inlineMessageId The identifier of the inline message.
658
+ * @param media The new media of the message.
706
659
  */
707
- sendPoll(chatId: ID, question: string, options: InputPollOption[], params?: SendPollParams): Promise<MessagePoll>;
660
+ editInlineMessageMedia(inlineMessageId: string, media: InputMedia, params?: EditInlineMessageMediaParams): Promise<void>;
708
661
  /**
709
- * Send a checklist.
662
+ * Edit an inline message's reply markup. Bot-only.
710
663
  *
711
664
  * @method ms
712
- * @param chatId The identifier of a chat to send the checklist to.
713
- * @param title The checklist's title.
714
- * @param items The checklist's items.
715
- * @returns The sent checklist.
665
+ * @param inlineMessageId The identifier of the inline message.
716
666
  */
717
- sendChecklist(chatId: ID, title: string, items: InputChecklistItem[], params?: SendChecklistParams): Promise<MessageChecklist>;
667
+ editInlineMessageReplyMarkup(inlineMessageId: string, params?: EditMessageReplyMarkupParams): Promise<void>;
718
668
  /**
719
- * Send an invoice. Bot-only.
669
+ * Edit an inline message's rich text. Bot-only.
720
670
  *
721
671
  * @method ms
722
- * @param chatId The identifier of a chat to send the invoice to.
723
- * @param title The invoice's title.
724
- * @param description The invoice's description.
725
- * @param payload The invoice's payload.
726
- * @param currency The invoice's currency.
727
- * @param prices The invoice's price tags.
728
- * @returns The sent invoice.
672
+ * @param inlineMessageId The identifier of the inline message.
673
+ * @param richText The new rich text of the message.
729
674
  */
730
- sendInvoice(chatId: ID, title: string, description: string, payload: string, currency: string, prices: PriceTag[], params?: SendInvoiceParams): Promise<MessageInvoice>;
675
+ editInlineMessageRichText(inlineMessageId: string, richText: InputRichText, params?: EditInlineMessageRichTextParams): Promise<void>;
731
676
  /**
732
- * Edit a message's text.
677
+ * Edit an inline message's text. Bot-only.
733
678
  *
734
679
  * @method ms
735
- * @param chatId The identifier of the chat which the message belongs to.
736
- * @param messageId The identifier of the message.
680
+ * @param inlineMessageId The identifier of the inline message.
737
681
  * @param text The new text of the message.
738
- * @returns The edited text message.
739
682
  */
740
- editMessageText(chatId: ID, messageId: number, text: string, params?: EditMessageTextParams): Promise<MessageText>;
683
+ editInlineMessageText(inlineMessageId: string, text: string, params?: EditInlineMessageTextParams): Promise<void>;
741
684
  /**
742
- * Edit a message's rich text.
685
+ * Edit a message's caption.
743
686
  *
744
687
  * @method ms
745
688
  * @param chatId The identifier of the chat which the message belongs to.
746
689
  * @param messageId The identifier of the message.
747
- * @param richText The new rich text of the message.
748
- * @returns The edited rich text message.
690
+ * @returns The edited message.
749
691
  */
750
- editMessageRichText(chatId: ID, messageId: number, richText: InputRichText, params?: EditMessageRichTextParams): Promise<MessageRichText>;
692
+ editMessageCaption(chatId: ID, messageId: number, params?: EditMessageCaptionParams): Promise<Message>;
751
693
  /**
752
- * Edit a message's caption.
694
+ * Edit a message's live location.
753
695
  *
754
696
  * @method ms
755
697
  * @param chatId The identifier of the chat which the message belongs to.
756
698
  * @param messageId The identifier of the message.
757
- * @returns The edited message.
699
+ * @param latitude The new latitude.
700
+ * @param longitude The new longitude.
701
+ * @returns The edited location message.
758
702
  */
759
- editMessageCaption(chatId: ID, messageId: number, params?: EditMessageCaptionParams): Promise<Message>;
703
+ editMessageLiveLocation(chatId: ID, messageId: number, latitude: number, longitude: number, params?: EditMessageLiveLocationParams): Promise<MessageLocation>;
760
704
  /**
761
705
  * Edit a message's media.
762
706
  *
@@ -768,73 +712,104 @@ export declare class Client<C extends Context = Context> extends Composer<C> imp
768
712
  */
769
713
  editMessageMedia(chatId: ID, messageId: number, media: InputMedia, params?: EditMessageMediaParams): Promise<Message>;
770
714
  /**
771
- * Edit an inline message's media.
715
+ * Edit a message's reply markup.
772
716
  *
773
717
  * @method ms
774
- * @param inlineMessageId The identifier of the inline message.
775
- * @param media The new media of the message.
718
+ * @param chatId The identifier of the chat which the message belongs to.
719
+ * @param messageId The identifier of the message.
720
+ * @returns The edited message.
776
721
  */
777
- editInlineMessageMedia(inlineMessageId: string, media: InputMedia, params?: EditInlineMessageMediaParams): Promise<void>;
722
+ editMessageReplyMarkup(chatId: ID, messageId: number, params?: EditMessageReplyMarkupParams): Promise<Message>;
778
723
  /**
779
- * Edit an inline message's rich text. Bot-only.
724
+ * Edit a message's rich text.
780
725
  *
781
726
  * @method ms
782
- * @param inlineMessageId The identifier of the inline message.
727
+ * @param chatId The identifier of the chat which the message belongs to.
728
+ * @param messageId The identifier of the message.
783
729
  * @param richText The new rich text of the message.
730
+ * @returns The edited rich text message.
784
731
  */
785
- editInlineMessageRichText(inlineMessageId: string, richText: InputRichText, params?: EditInlineMessageRichTextParams): Promise<void>;
732
+ editMessageRichText(chatId: ID, messageId: number, richText: InputRichText, params?: EditMessageRichTextParams): Promise<MessageRichText>;
786
733
  /**
787
- * Edit an inline message's text. Bot-only.
734
+ * Edit a message's text.
788
735
  *
789
736
  * @method ms
790
- * @param inlineMessageId The identifier of the inline message.
737
+ * @param chatId The identifier of the chat which the message belongs to.
738
+ * @param messageId The identifier of the message.
791
739
  * @param text The new text of the message.
740
+ * @returns The edited text message.
792
741
  */
793
- editInlineMessageText(inlineMessageId: string, text: string, params?: EditInlineMessageTextParams): Promise<void>;
742
+ editMessageText(chatId: ID, messageId: number, text: string, params?: EditMessageTextParams): Promise<MessageText>;
794
743
  /**
795
- * Edit an inline message's caption. Bot-only.
744
+ * Forward a single message.
796
745
  *
797
746
  * @method ms
798
- * @param inlineMessageId The identifier of the inline message.
747
+ * @param from The identifier of a chat to forward the message from.
748
+ * @param to The identifier of a chat to forward the message to.
749
+ * @param messageId The identifier of the message to forward.
750
+ * @returns The forwarded message.
799
751
  */
800
- editInlineMessageCaption(inlineMessageId: string, params?: EditInlineMessageCaptionParams): Promise<void>;
752
+ forwardMessage(from: ID, to: ID, messageId: number, params?: ForwardMessagesParams): Promise<Message>;
801
753
  /**
802
- * Edit a message's reply markup.
754
+ * Forward multiple messages.
803
755
  *
804
756
  * @method ms
805
- * @param chatId The identifier of the chat which the message belongs to.
806
- * @param messageId The identifier of the message.
807
- * @returns The edited message.
757
+ * @param from The identifier of a chat to forward the messages from.
758
+ * @param to The identifier of a chat to forward the messages to.
759
+ * @param messageIds The identifiers of the messages to forward.
760
+ * @returns The forwarded messages.
808
761
  */
809
- editMessageReplyMarkup(chatId: ID, messageId: number, params?: EditMessageReplyMarkupParams): Promise<Message>;
762
+ forwardMessages(from: ID, to: ID, messageIds: number[], params?: ForwardMessagesParams): Promise<Message[]>;
810
763
  /**
811
- * Edit an inline message's reply markup. Bot-only.
764
+ * Get favorite stickers. User-only.
812
765
  *
813
766
  * @method ms
814
- * @param inlineMessageId The identifier of the inline message.
815
767
  */
816
- editInlineMessageReplyMarkup(inlineMessageId: string, params?: EditMessageReplyMarkupParams): Promise<void>;
768
+ getFavoriteStickers(): Promise<Sticker[]>;
817
769
  /**
818
- * Edit a message's live location.
770
+ * Get the link preview for a message that is about to be sent. User-only.
819
771
  *
820
772
  * @method ms
821
- * @param chatId The identifier of the chat which the message belongs to.
773
+ * @param text The message's text.
774
+ */
775
+ getLinkPreview(text: string, params?: GetLinkPreviewParams): Promise<LinkPreview | null>;
776
+ /**
777
+ * Retrieve a single message.
778
+ *
779
+ * @method ms
780
+ * @param chatId The identifier of a chat.
781
+ * @param messageId The identifier of the message to retrieve.
782
+ * @example ```ts
783
+ * const message = await client.getMessage("@MTKruto", 212);
784
+ * ```
785
+ * @returns The retrieved message.
786
+ * @cache
787
+ */
788
+ getMessage(chatId: ID, messageId: number): Promise<Message | null>;
789
+ /**
790
+ * Get the counters of a single message. User-only.
791
+ *
792
+ * @method ms
793
+ * @param chatId The identifier of the chat including the message.
822
794
  * @param messageId The identifier of the message.
823
- * @param latitude The new latitude.
824
- * @param longitude The new longitude.
825
- * @returns The edited location message.
826
795
  */
827
- editMessageLiveLocation(chatId: ID, messageId: number, latitude: number, longitude: number, params?: EditMessageLiveLocationParams): Promise<MessageLocation>;
796
+ getMessageCounters(chatId: ID, messageId: number): Promise<MessageCounters>;
828
797
  /**
829
- * Edit an inline message's live location. Bot-only.
798
+ * Get a list of reactions made to a message. User-only.
830
799
  *
800
+ * @param chatId The identifier of a chat.
801
+ * @param messageId The identifier of the message.
831
802
  * @method ms
832
- * @param inlineMessageId The identifier of the inline message.
833
- * @param latitude The new latitude.
834
- * @param longitude The new longitude.
835
- * @returns The edited location message.
836
803
  */
837
- editInlineMessageLiveLocation(inlineMessageId: string, latitude: number, longitude: number, params?: EditMessageLiveLocationParams): Promise<void>;
804
+ getMessageReactions(chatId: ID, messageId: number, params?: GetMessageReactionsParams): Promise<MessageReactionList>;
805
+ /**
806
+ * Get a message's read date. User-only.
807
+ *
808
+ * @method ms
809
+ * @param chatId The identifier of a chat.
810
+ * @param messageId The identifier of the message.
811
+ */
812
+ getMessageReadDate(chatId: ID, messageId: number): Promise<number>;
838
813
  /**
839
814
  * Retrieve multiple messages.
840
815
  *
@@ -849,137 +824,150 @@ export declare class Client<C extends Context = Context> extends Composer<C> imp
849
824
  */
850
825
  getMessages(chatId: ID, messageIds: number[]): Promise<Message[]>;
851
826
  /**
852
- * Retrieve a single message.
827
+ * Get the counters of multiple messages. User-only.
828
+ *
829
+ * @method ms
830
+ * @param chatId The identifier of the chat including the messages.
831
+ * @param messageIds The identifiers of the messages.
832
+ */
833
+ getMessagesCounters(chatId: ID, messageIds: number[]): Promise<MessageCounters[]>;
834
+ /**
835
+ * Get a message's viewers. User-only.
853
836
  *
854
837
  * @method ms
855
838
  * @param chatId The identifier of a chat.
856
- * @param messageId The identifier of the message to retrieve.
857
- * @example ```ts
858
- * const message = await client.getMessage("@MTKruto", 212);
859
- * ```
860
- * @returns The retrieved message.
839
+ * @param messageId The identifier of the message.
840
+ * @returns The message's viewers.
841
+ */
842
+ getMessageViewers(chatId: ID, messageId: number): Promise<MessageViewer[]>;
843
+ /**
844
+ * Get a progress ID that can be passed to relevant send* methods to receive upload progress updates for them.
845
+ *
846
+ * @method ms
861
847
  * @cache
862
848
  */
863
- getMessage(chatId: ID, messageId: number): Promise<Message | null>;
849
+ getProgressId(): Promise<string>;
864
850
  /**
865
- * Retrieve a message using its link.
851
+ * Get recent stickers. User-only.
866
852
  *
867
853
  * @method ms
868
- * @param link A message link.
869
- * @example ```ts
870
- * const message = await client.resolveMessageLink("https://t.me/MTKruto/212");
871
- * ```
872
- * @returns The message that was linked to.
873
854
  */
874
- resolveMessageLink(link: string): Promise<Message | null>;
855
+ getRecentStickers(): Promise<Sticker[]>;
875
856
  /**
876
- * Delete multiple messages.
857
+ * Get a message's full rich text. User-only.
877
858
  *
878
859
  * @method ms
879
- * @param chatId The identifier of the chat which the message belongs to.
880
- * @param messageIds The identifiers of the messages to delete.
860
+ * @param chatId The identifier of the chat including the message.
861
+ * @param messageId The identifier of the message.
881
862
  */
882
- deleteMessages(chatId: ID, messageIds: number[], params?: DeleteMessagesParams): Promise<void>;
863
+ getRichText(chatId: ID, messageId: number): Promise<RichText | null>;
883
864
  /**
884
- * Delete a single message.
865
+ * Get saved animations. User-only.
885
866
  *
886
867
  * @method ms
887
- * @param chatId The identifier of the chat which the message belongs to.
888
- * @param messageId The identifier of the message to delete.
889
868
  */
890
- deleteMessage(chatId: ID, messageId: number, params?: DeleteMessageParams): Promise<void>;
869
+ getSavedAnimations(): Promise<Animation[]>;
891
870
  /**
892
- * Delete all messages sent by a specific member of a chat. User-only.
871
+ * Get a list of saved chats.
872
+ *
873
+ * @method ms
874
+ */
875
+ getSavedChats(params?: GetSavedChatsParams): Promise<SavedChats>;
876
+ /**
877
+ * Get messages saved from a specific chat.
878
+ *
879
+ * @method ms
880
+ * @param chatId The identifier of a chat.
881
+ */
882
+ getSavedMessages(chatId: ID, params?: GetSavedMessagesParams): Promise<Message[]>;
883
+ /**
884
+ * Get the scheduled messages of a chat. User-only.
893
885
  *
894
886
  * @method ms
895
- * @param chatId The identifier of a chat. Must be a supergroup.
896
- * @param memberId The identifier of the member.
887
+ * @param chatId The identifier of the chat including the scheduled messages.
897
888
  */
898
- deleteChatMemberMessages(chatId: ID, memberId: ID): Promise<void>;
889
+ getScheduledMessages(chatId: ID): Promise<Message[]>;
899
890
  /**
900
- * Delete multiple scheduled messages.
891
+ * Open a mini app. User-only.
901
892
  *
902
893
  * @method ms
903
- * @param chatId The identifier of a chat.
904
- * @param messageIds The identifiers of the scheduled messages to delete.
894
+ * @param botId The identifier of a bot with the mini app.
895
+ * @param chatId The identifier of the chat from which the mini app is opened.
896
+ * @cache
905
897
  */
906
- deleteScheduledMessages(chatId: ID, messageIds: number[]): Promise<void>;
898
+ openMiniApp(botId: ID, chatId: ID, params?: OpenMiniAppParams): Promise<MiniAppInfo>;
907
899
  /**
908
- * Delete a scheduled message.
900
+ * Pin a message in a chat.
909
901
  *
910
902
  * @method ms
911
903
  * @param chatId The identifier of a chat.
912
- * @param messageId The identifier of the scheduled message to delete.
904
+ * @param messageId The identifier of the message.
913
905
  */
914
- deleteScheduledMessage(chatId: ID, messageId: number): Promise<void>;
906
+ pinMessage(chatId: ID, messageId: number, params?: PinMessageParams): Promise<void>;
915
907
  /**
916
- * Send multiple scheduled messages before their schedule.
908
+ * Mark messages as read. User-only.
917
909
  *
918
910
  * @method ms
919
- * @param chatId The identifier of a chat.
920
- * @param messageIds The identifiers of the scheduled messages to send.
911
+ * @param chatId The identifier of the chat which the messages belong to.
912
+ * @param untilMessageId The identifier of the message that will be marked as read, along with any other unread messages before it.
921
913
  */
922
- sendScheduledMessages(chatId: ID, messageIds: number[]): Promise<Message[]>;
914
+ readMessages(chatId: ID, untilMessageId: number): Promise<void>;
923
915
  /**
924
- * Send a scheduled message before its schedule.
916
+ * Remove a sticker from favorites. User-only.
925
917
  *
926
918
  * @method ms
927
- * @param chatId The identifier of a chat.
928
- * @param messageId The identifier of the scheduled message to send.
919
+ * @param fileId The file identifier of the sticker.
929
920
  */
930
- sendScheduledMessage(chatId: ID, messageId: number): Promise<Message>;
921
+ removeStickerFromFavorites(fileId: string): Promise<void>;
931
922
  /**
932
- * Pin a message in a chat.
923
+ * Remove a sticker from recents. User-only.
933
924
  *
934
925
  * @method ms
935
- * @param chatId The identifier of a chat.
936
- * @param messageId The identifier of the message.
926
+ * @param fileId The file identifier of the sticker.
937
927
  */
938
- pinMessage(chatId: ID, messageId: number, params?: PinMessageParams): Promise<void>;
928
+ removeStickerFromRecents(fileId: string): Promise<void>;
939
929
  /**
940
- * Unpin a pinned message.
930
+ * Retrieve a message using its link.
941
931
  *
942
932
  * @method ms
943
- * @param chatId The identifier of a chat.
944
- * @param messageId The identifier of the message.
933
+ * @param link A message link.
934
+ * @example ```ts
935
+ * const message = await client.resolveMessageLink("https://t.me/MTKruto/212");
936
+ * ```
937
+ * @returns The message that was linked to.
945
938
  */
946
- unpinMessage(chatId: ID, messageId: number, params?: UnpinMessageParams): Promise<void>;
939
+ resolveMessageLink(link: string): Promise<Message | null>;
947
940
  /**
948
- * Unpin all pinned messages.
941
+ * Save an animation. User-only.
949
942
  *
950
943
  * @method ms
951
- * @param chatId The identifier of a chat.
944
+ * @param fileId The file identifier of the animation.
952
945
  */
953
- unpinMessages(chatId: ID, params?: UnpinMessagesParams): Promise<void>;
946
+ saveAnimation(fileId: string): Promise<void>;
954
947
  /**
955
- * Forward multiple messages.
948
+ * Search for messages. User-only.
956
949
  *
957
950
  * @method ms
958
- * @param from The identifier of a chat to forward the messages from.
959
- * @param to The identifier of a chat to forward the messages to.
960
- * @param messageIds The identifiers of the messages to forward.
961
- * @returns The forwarded messages.
962
951
  */
963
- forwardMessages(from: ID, to: ID, messageIds: number[], params?: ForwardMessagesParams): Promise<Message[]>;
952
+ searchMessages(params?: SearchMessagesParams): Promise<MessageList>;
964
953
  /**
965
- * Forward a single message.
954
+ * Send an animation.
966
955
  *
967
956
  * @method ms
968
- * @param from The identifier of a chat to forward the message from.
969
- * @param to The identifier of a chat to forward the message to.
970
- * @param messageId The identifier of the message to forward.
971
- * @returns The forwarded message.
957
+ * @param chatId The identifier of a chat to send the animation to.
958
+ * @param animation The animation to send.
959
+ * @returns The sent animation.
972
960
  */
973
- forwardMessage(from: ID, to: ID, messageId: number, params?: ForwardMessagesParams): Promise<Message>;
961
+ sendAnimation(chatId: ID, animation: FileSource, params?: SendAnimationParams): Promise<MessageAnimation>;
974
962
  /**
975
- * Stop a poll.
963
+ * Send an audio file.
976
964
  *
977
965
  * @method ms
978
- * @param chatId The chat that includes the poll.
979
- * @param messageId The identifier of the poll's message.
980
- * @returns The new state of the poll.
966
+ * @param chatId The identifier of a chat to send the audio file to.
967
+ * @param audio The audio to send.
968
+ * @returns The sent audio file.
981
969
  */
982
- stopPoll(chatId: ID, messageId: number, params?: StopPollParams): Promise<Poll>;
970
+ sendAudio(chatId: ID, audio: FileSource, params?: SendAudioParams): Promise<MessageAudio>;
983
971
  /**
984
972
  * Send a chat action.
985
973
  *
@@ -991,235 +979,301 @@ export declare class Client<C extends Context = Context> extends Composer<C> imp
991
979
  messageThreadId?: number;
992
980
  }): Promise<void>;
993
981
  /**
994
- * Search for messages. User-only.
982
+ * Send a checklist.
995
983
  *
996
984
  * @method ms
985
+ * @param chatId The identifier of a chat to send the checklist to.
986
+ * @param title The checklist's title.
987
+ * @param items The checklist's items.
988
+ * @returns The sent checklist.
997
989
  */
998
- searchMessages(params?: SearchMessagesParams): Promise<MessageList>;
990
+ sendChecklist(chatId: ID, title: string, items: InputChecklistItem[], params?: SendChecklistParams): Promise<MessageChecklist>;
999
991
  /**
1000
- * Mark messages as read. User-only.
992
+ * Send a contact.
1001
993
  *
1002
994
  * @method ms
1003
- * @param chatId The identifier of the chat which the messages belong to.
1004
- * @param untilMessageId The identifier of the message that will be marked as read, along with any other unread messages before it.
995
+ * @param chatId The identifier of a chat to send the contact to.
996
+ * @param firstName The contact's first name.
997
+ * @param phoneNumber The contact's phone number.
998
+ * @returns The sent contact.
1005
999
  */
1006
- readMessages(chatId: ID, untilMessageId: number): Promise<void>;
1000
+ sendContact(chatId: ID, firstName: string, phoneNumber: string, params?: SendContactParams): Promise<MessageContact>;
1007
1001
  /**
1008
- * Start a bot. User-only.
1002
+ * Send a dice.
1009
1003
  *
1010
1004
  * @method ms
1011
- * @param botId The identifier of the bot to start.
1012
- * @returns The start message.
1005
+ * @param chatId The identifier of a chat to send the dice to.
1006
+ * @returns The sent dice.
1013
1007
  */
1014
- startBot(botId: number, params?: StartBotParams): Promise<Message>;
1008
+ sendDice(chatId: ID, params?: SendDiceParams): Promise<MessageDice>;
1015
1009
  /**
1016
- * Transcribe a voice message. User-only.
1010
+ * Send a document.
1017
1011
  *
1018
1012
  * @method ms
1019
- * @param chatId The identifier of the chat which the message belongs to.
1020
- * @param messageId The identifier of the message.
1021
- * @cache
1013
+ * @param chatId The identifier of a chat to send the document to.
1014
+ * @param document The document to send.
1015
+ * @returns The sent document.
1022
1016
  */
1023
- transcribeVoice(chatId: ID, messageId: number): Promise<VoiceTranscription>;
1024
- getLinkPreview(text: string, params?: GetLinkPreviewParams): Promise<LinkPreview | null>;
1017
+ sendDocument(chatId: ID, document: FileSource, params?: SendDocumentParams): Promise<MessageDocument>;
1025
1018
  /**
1026
- * Open a mini app. User-only.
1019
+ * Send an invoice. Bot-only.
1027
1020
  *
1028
1021
  * @method ms
1029
- * @param botId The identifier of a bot with the mini app.
1030
- * @param chatId The identifier of the chat from which the mini app is opened.
1031
- * @cache
1022
+ * @param chatId The identifier of a chat to send the invoice to.
1023
+ * @param title The invoice's title.
1024
+ * @param description The invoice's description.
1025
+ * @param payload The invoice's payload.
1026
+ * @param currency The invoice's currency.
1027
+ * @param prices The invoice's price tags.
1028
+ * @returns The sent invoice.
1032
1029
  */
1033
- openMiniApp(botId: ID, chatId: ID, params?: OpenMiniAppParams): Promise<MiniAppInfo>;
1030
+ sendInvoice(chatId: ID, title: string, description: string, payload: string, currency: string, prices: PriceTag[], params?: SendInvoiceParams): Promise<MessageInvoice>;
1034
1031
  /**
1035
- * Get a progress ID that can be passed to relevant send* methods to receive upload progress updates for them.
1032
+ * Send a live photo.
1036
1033
  *
1037
1034
  * @method ms
1038
- * @cache
1035
+ * @param chatId The identifier of a chat to send the photo to.
1036
+ * @param photo The photo to send.
1037
+ * @param video The video version of the photo.
1038
+ * @returns The sent live photo.
1039
1039
  */
1040
- getProgressId(): Promise<string>;
1040
+ sendLivePhoto(chatId: ID, photo: FileSource, video: FileSource, params?: SendLivePhotoParams): Promise<MessageLivePhoto>;
1041
1041
  /**
1042
- * Get messages saved from a specific chat.
1042
+ * Send a location.
1043
1043
  *
1044
1044
  * @method ms
1045
- * @param chatId The identifier of a chat.
1045
+ * @param chatId The identifier of a chat to send the location to.
1046
+ * @param latitude The location's latitude.
1047
+ * @param longitude The location's longitude.
1048
+ * @returns The sent location.
1046
1049
  */
1047
- getSavedMessages(chatId: ID, params?: GetSavedMessagesParams): Promise<Message[]>;
1050
+ sendLocation(chatId: ID, latitude: number, longitude: number, params?: SendLocationParams): Promise<MessageLocation>;
1048
1051
  /**
1049
- * Get a list of saved chats.
1052
+ * Send a media group.
1050
1053
  *
1051
1054
  * @method ms
1055
+ * @param chatId The identifier of a chat to send the media group to.
1056
+ * @param media The media to include in the media group. Animations are not allowed. All of them must be of the same media type, but an exception is that photos and videos can be mixed.
1057
+ * @returns The sent messages.
1052
1058
  */
1053
- getSavedChats(params?: GetSavedChatsParams): Promise<SavedChats>;
1059
+ sendMediaGroup(chatId: ID, media: InputMedia[], params?: SendMediaGroupParams): Promise<Message[]>;
1054
1060
  /**
1055
- * Get a list of reactions made to a message. User-only.
1061
+ * Send a text message.
1056
1062
  *
1057
- * @param chatId The identifier of a chat.
1058
- * @param messageId The identifier of the message.
1059
1063
  * @method ms
1064
+ * @param chatId The identifier of a chat to send the message to.
1065
+ * @param text The message's text.
1066
+ * @returns The sent text message.
1060
1067
  */
1061
- getMessageReactions(chatId: ID, messageId: number, params?: GetMessageReactionsParams): Promise<MessageReactionList>;
1068
+ sendMessage(chatId: ID, text: string, params?: SendMessageParams): Promise<MessageText>;
1062
1069
  /**
1063
- * Set a reaction as default. User-only.
1070
+ * Stream a drafted text message. Bot-only.
1064
1071
  *
1065
1072
  * @method ms
1066
- * @param reaction The reaction to set as default.
1073
+ * @param chatId The identifier of a chat to send the message to.
1074
+ * @param draftId The identifier of the draft.
1075
+ * @param text The message's text.
1067
1076
  */
1068
- setDefaultReaction(reaction: Reaction): Promise<void>;
1077
+ sendMessageDraft(chatId: ID, draftId: number, text: string, params?: SendMessageDraftParams): Promise<void>;
1069
1078
  /**
1070
- * Clear all message drafts. User-only.
1079
+ * Send a photo.
1071
1080
  *
1072
1081
  * @method ms
1082
+ * @param chatId The identifier of a chat to send the photo to.
1083
+ * @param photo The photo to send.
1084
+ * @returns The sent photo.
1073
1085
  */
1074
- clearDrafts(): Promise<void>;
1086
+ sendPhoto(chatId: ID, photo: FileSource, params?: SendPhotoParams): Promise<MessagePhoto>;
1075
1087
  /**
1076
- * Summarize a message's text. User-only.
1088
+ * Send a poll.
1077
1089
  *
1078
1090
  * @method ms
1079
- * @param chatId The identifier of a chat.
1080
- * @param messageId The identifier of a message.
1091
+ * @param chatId The identifier of a chat to send the poll to.
1092
+ * @param question The poll's question.
1093
+ * @param options The poll's options.
1094
+ * @returns The sent poll.
1081
1095
  */
1082
- summarizeText(chatId: ID, messageId: number, params?: SummarizeTextParams): Promise<SummarizedText>;
1096
+ sendPoll(chatId: ID, question: string, options: InputPollOption[], params?: SendPollParams): Promise<MessagePoll>;
1083
1097
  /**
1084
- * View multiple messages. User-only.
1098
+ * Send a rich text message.
1085
1099
  *
1086
1100
  * @method ms
1087
- * @param chatId The identifier of the chat including the messages.
1088
- * @param messageIds The identifiers of the messages.
1101
+ * @param chatId The identifier of a chat to send the message to.
1102
+ * @param richText The message's rich text.
1103
+ * @returns The sent rich text message.
1089
1104
  */
1090
- viewMessages(chatId: ID, messageIds: number[]): Promise<void>;
1105
+ sendRichText(chatId: ID, richText: InputRichText, params?: SendRichTextParams): Promise<MessageRichText>;
1091
1106
  /**
1092
- * View a single message. User-only.
1107
+ * Stream a drafted rich text message. Bot-only.
1093
1108
  *
1094
1109
  * @method ms
1095
- * @param chatId The identifier of the chat including the message.
1096
- * @param messageId The identifier of the message.
1110
+ * @param chatId The identifier of a chat to send the message to.
1111
+ * @param draftId The identifier of the draft.
1112
+ * @param richText The message's rich text.
1097
1113
  */
1098
- viewMessage(chatId: ID, messageId: number): Promise<void>;
1114
+ sendRichTextDraft(chatId: ID, draftId: number, richText: InputRichText, params?: SendRichTextDraftParams): Promise<void>;
1099
1115
  /**
1100
- * Translate multiple texts. User-only.
1116
+ * Send a scheduled message before its schedule.
1101
1117
  *
1102
1118
  * @method ms
1103
- * @param toLanguage The code of the language to translate into.
1104
- * @param texts The texts to translate.
1119
+ * @param chatId The identifier of a chat.
1120
+ * @param messageId The identifier of the scheduled message to send.
1105
1121
  */
1106
- translateTexts(toLanguage: string, texts: TextToTranslate[], params?: TranslateTextParams): Promise<TranslatedText[]>;
1122
+ sendScheduledMessage(chatId: ID, messageId: number): Promise<Message>;
1107
1123
  /**
1108
- * Translate a single text. User-only.
1124
+ * Send multiple scheduled messages before their schedule.
1109
1125
  *
1110
1126
  * @method ms
1111
- * @param toLanguage The code of the language to translate into.
1112
- * @param text The text to translate.
1127
+ * @param chatId The identifier of a chat.
1128
+ * @param messageIds The identifiers of the scheduled messages to send.
1113
1129
  */
1114
- translateText(toLanguage: string, text: TextToTranslate, params?: TranslateTextParams): Promise<TranslatedText>;
1130
+ sendScheduledMessages(chatId: ID, messageIds: number[]): Promise<Message[]>;
1115
1131
  /**
1116
- * Translate multiple texts. User-only.
1132
+ * Send a screenshot notification. User-only.
1117
1133
  *
1118
1134
  * @method ms
1119
- * @param toLanguage The code of the language to translate into.
1120
- * @param chatId The identifier of the chat including the messages.
1121
- * @param messageIds The identifiers of the messages to translate.
1135
+ * @param chatId The identifier of a chat.
1136
+ * @param replyToMessageId The identifier of the message.
1137
+ */
1138
+ sendScreenshotNotification(chatId: ID, replyToMessageId: number): Promise<void>;
1139
+ /**
1140
+ * Send a sticker.
1141
+ *
1142
+ * @method ms
1143
+ * @param chatId The identifier of a chat to send the sticker to.
1144
+ * @param sticker The sticker to send.
1145
+ * @returns The sent sticker.
1146
+ */
1147
+ sendSticker(chatId: ID, sticker: FileSource, params?: SendStickerParams): Promise<MessageSticker>;
1148
+ /**
1149
+ * Send a venue.
1150
+ *
1151
+ * @method ms
1152
+ * @param chatId The identifier of a chat to send the venue to.
1153
+ * @param latitude The latitude of the venue.
1154
+ * @param longitude The longitude of the venue.
1155
+ * @param title The title of the venue.
1156
+ * @param address The written address of the venue.
1157
+ * @returns The sent venue.
1122
1158
  */
1123
- translateMessages(toLanguage: string, chatId: ID, messageIds: number[], params?: TranslateTextParams): Promise<TranslatedText[]>;
1159
+ sendVenue(chatId: ID, latitude: number, longitude: number, title: string, address: string, params?: SendVenueParams): Promise<MessageVenue>;
1124
1160
  /**
1125
- * Translate a single text. User-only.
1161
+ * Send a video.
1126
1162
  *
1127
1163
  * @method ms
1128
- * @param toLanguage The code of the language to translate into.
1129
- * @param chatId The identifier of the chat including the message.
1130
- * @param messageId The identifier of the message to translate.
1164
+ * @param chatId The identifier of a chat to send the video to.
1165
+ * @param video The video to send.
1166
+ * @returns The sent video.
1131
1167
  */
1132
- translateMessage(toLanguage: string, chatId: ID, messageId: number, params?: TranslateTextParams): Promise<TranslatedText>;
1168
+ sendVideo(chatId: ID, video: FileSource, params?: SendVideoParams): Promise<MessageVideo>;
1133
1169
  /**
1134
- * Get the counters of multiple messages. User-only.
1170
+ * Send a video note.
1135
1171
  *
1136
1172
  * @method ms
1137
- * @param chatId The identifier of the chat including the messages.
1138
- * @param messageIds The identifiers of the messages.
1173
+ * @param chatId The identifier of a chat to send the video note to.
1174
+ * @param videoNote The video note to send.
1175
+ * @returns The sent video note.
1139
1176
  */
1140
- getMessagesCounters(chatId: ID, messageIds: number[]): Promise<MessageCounters[]>;
1177
+ sendVideoNote(chatId: ID, videoNote: FileSource, params?: SendVideoNoteParams): Promise<MessageVideoNote>;
1141
1178
  /**
1142
- * Get the counters of a single message. User-only.
1179
+ * Send a voice message.
1143
1180
  *
1144
1181
  * @method ms
1145
- * @param chatId The identifier of the chat including the message.
1146
- * @param messageId The identifier of the message.
1182
+ * @param chatId The identifier of a chat to send the voice message to.
1183
+ * @param voice The voice to send.
1184
+ * @returns The sent voice message.
1147
1185
  */
1148
- getMessageCounters(chatId: ID, messageId: number): Promise<MessageCounters>;
1186
+ sendVoice(chatId: ID, voice: FileSource, params?: SendVoiceParams): Promise<MessageVoice>;
1149
1187
  /**
1150
- * Get a message's full rich text. User-only.
1188
+ * Set a reaction as default. User-only.
1151
1189
  *
1152
1190
  * @method ms
1153
- * @param chatId The identifier of the chat including the message.
1154
- * @param messageId The identifier of the message.
1191
+ * @param reaction The reaction to set as default.
1155
1192
  */
1156
- getRichText(chatId: ID, messageId: number): Promise<RichText | null>;
1193
+ setDefaultReaction(reaction: Reaction): Promise<void>;
1157
1194
  /**
1158
- * Get the scheduled messages of a chat. User-only.
1195
+ * Start a bot. User-only.
1159
1196
  *
1160
1197
  * @method ms
1161
- * @param chatId The identifier of the chat including the scheduled messages.
1198
+ * @param botId The identifier of the bot to start.
1199
+ * @returns The start message.
1162
1200
  */
1163
- getScheduledMessages(chatId: ID): Promise<Message[]>;
1201
+ startBot(botId: number, params?: StartBotParams): Promise<Message>;
1164
1202
  /**
1165
- * Get favorite stickers. User-only.
1203
+ * Stop a poll.
1166
1204
  *
1167
1205
  * @method ms
1206
+ * @param chatId The chat that includes the poll.
1207
+ * @param messageId The identifier of the poll's message.
1208
+ * @returns The new state of the poll.
1168
1209
  */
1169
- getFavoriteStickers(): Promise<Sticker[]>;
1210
+ stopPoll(chatId: ID, messageId: number, params?: StopPollParams): Promise<Poll>;
1170
1211
  /**
1171
- * Add a sticker to favorites. User-only.
1212
+ * Summarize a message's text. User-only.
1172
1213
  *
1173
1214
  * @method ms
1174
- * @param fileId The file identifier of the sticker.
1215
+ * @param chatId The identifier of a chat.
1216
+ * @param messageId The identifier of a message.
1175
1217
  */
1176
- addStickerToFavorites(fileId: string): Promise<void>;
1218
+ summarizeText(chatId: ID, messageId: number, params?: SummarizeTextParams): Promise<SummarizedText>;
1177
1219
  /**
1178
- * Remove a sticker from favorites. User-only.
1220
+ * Transcribe a voice message. User-only.
1179
1221
  *
1180
1222
  * @method ms
1181
- * @param fileId The file identifier of the sticker.
1223
+ * @param chatId The identifier of the chat which the message belongs to.
1224
+ * @param messageId The identifier of the message.
1225
+ * @cache
1182
1226
  */
1183
- removeStickerFromFavorites(fileId: string): Promise<void>;
1227
+ transcribeVoice(chatId: ID, messageId: number): Promise<VoiceTranscription>;
1184
1228
  /**
1185
- * Add a sticker to recents. User-only.
1229
+ * Translate a single text. User-only.
1186
1230
  *
1187
1231
  * @method ms
1188
- * @param fileId The file identifier of the sticker.
1232
+ * @param toLanguage The code of the language to translate into.
1233
+ * @param chatId The identifier of the chat including the message.
1234
+ * @param messageId The identifier of the message to translate.
1189
1235
  */
1190
- addStickerToRecents(fileId: string): Promise<void>;
1236
+ translateMessage(toLanguage: string, chatId: ID, messageId: number, params?: TranslateTextParams): Promise<TranslatedText>;
1191
1237
  /**
1192
- * Remove a sticker from recents. User-only.
1238
+ * Translate multiple texts. User-only.
1193
1239
  *
1194
1240
  * @method ms
1195
- * @param fileId The file identifier of the sticker.
1241
+ * @param toLanguage The code of the language to translate into.
1242
+ * @param chatId The identifier of the chat including the messages.
1243
+ * @param messageIds The identifiers of the messages to translate.
1196
1244
  */
1197
- removeStickerFromRecents(fileId: string): Promise<void>;
1245
+ translateMessages(toLanguage: string, chatId: ID, messageIds: number[], params?: TranslateTextParams): Promise<TranslatedText[]>;
1198
1246
  /**
1199
- * Get recent stickers. User-only.
1247
+ * Translate a single text. User-only.
1200
1248
  *
1201
1249
  * @method ms
1250
+ * @param toLanguage The code of the language to translate into.
1251
+ * @param text The text to translate.
1202
1252
  */
1203
- getRecentStickers(): Promise<Sticker[]>;
1253
+ translateText(toLanguage: string, text: TextToTranslate, params?: TranslateTextParams): Promise<TranslatedText>;
1204
1254
  /**
1205
- * Clear recent stickers. User-only.
1255
+ * Translate multiple texts. User-only.
1206
1256
  *
1207
1257
  * @method ms
1258
+ * @param toLanguage The code of the language to translate into.
1259
+ * @param texts The texts to translate.
1208
1260
  */
1209
- clearRecentStickers(): Promise<void>;
1261
+ translateTexts(toLanguage: string, texts: TextToTranslate[], params?: TranslateTextParams): Promise<TranslatedText[]>;
1210
1262
  /**
1211
- * Get saved animations. User-only.
1263
+ * Unpin a pinned message.
1212
1264
  *
1213
1265
  * @method ms
1266
+ * @param chatId The identifier of a chat.
1267
+ * @param messageId The identifier of the message.
1214
1268
  */
1215
- getSavedAnimations(): Promise<Animation[]>;
1269
+ unpinMessage(chatId: ID, messageId: number, params?: UnpinMessageParams): Promise<void>;
1216
1270
  /**
1217
- * Save an animation. User-only.
1271
+ * Unpin all pinned messages.
1218
1272
  *
1219
1273
  * @method ms
1220
- * @param fileId The file identifier of the animation.
1274
+ * @param chatId The identifier of a chat.
1221
1275
  */
1222
- saveAnimation(fileId: string): Promise<void>;
1276
+ unpinMessages(chatId: ID, params?: UnpinMessagesParams): Promise<void>;
1223
1277
  /**
1224
1278
  * Unsave an animation. User-only.
1225
1279
  *
@@ -1228,46 +1282,64 @@ export declare class Client<C extends Context = Context> extends Composer<C> imp
1228
1282
  */
1229
1283
  unsaveAnimation(fileId: string): Promise<void>;
1230
1284
  /**
1231
- * Get a message's read date. User-only.
1285
+ * View a single message. User-only.
1232
1286
  *
1233
1287
  * @method ms
1234
- * @param chatId The identifier of a chat.
1288
+ * @param chatId The identifier of the chat including the message.
1235
1289
  * @param messageId The identifier of the message.
1236
1290
  */
1237
- getMessageReadDate(chatId: ID, messageId: number): Promise<number>;
1291
+ viewMessage(chatId: ID, messageId: number): Promise<void>;
1238
1292
  /**
1239
- * Cast a vote. User-only.
1293
+ * View multiple messages. User-only.
1294
+ *
1295
+ * @method ms
1296
+ * @param chatId The identifier of the chat including the messages.
1297
+ * @param messageIds The identifiers of the messages.
1298
+ */
1299
+ viewMessages(chatId: ID, messageIds: number[]): Promise<void>;
1300
+ /**
1301
+ * Add an option to a poll. User-only.
1240
1302
  *
1241
1303
  * @method pl
1242
1304
  * @param chatId The identifier of the chat that includes the poll.
1243
1305
  * @param messageId The identifier of the message that includes the poll.
1244
- * @param optionIndexes The indexes of the options to cast for.
1306
+ * @param option The option to add.
1245
1307
  */
1246
- vote(chatId: ID, messageId: number, optionIndexes: number[]): Promise<void>;
1308
+ addPollOption(chatId: ID, messageId: number, option: InputPollOption): Promise<void>;
1247
1309
  /**
1248
- * Retract a vote. User-only.
1310
+ * Get poll voters. User-only.
1249
1311
  *
1250
1312
  * @method pl
1251
1313
  * @param chatId The identifier of the chat that includes the poll.
1252
1314
  * @param messageId The identifier of the message that includes the poll.
1253
1315
  */
1254
- retractVote(chatId: ID, messageId: number): Promise<void>;
1316
+ getPollVoters(chatId: ID, messageId: number, params?: GetPollVotersParams): Promise<PollVoterList>;
1255
1317
  /**
1256
- * Add an option to a poll. User-only.
1318
+ * Remove an option from a poll. User-only.
1257
1319
  *
1320
+ * @method pl
1258
1321
  * @param chatId The identifier of the chat that includes the poll.
1259
1322
  * @param messageId The identifier of the message that includes the poll.
1260
- * @param option The option to add.
1323
+ * @param optionIndex The index of the option to remove.
1261
1324
  */
1262
- addPollOption(chatId: ID, messageId: number, option: InputPollOption): Promise<void>;
1325
+ removePollOption(chatId: ID, messageId: number, optionIndex: number): Promise<void>;
1263
1326
  /**
1264
- * Remove an option from a poll. User-only.
1327
+ * Retract a vote. User-only.
1328
+ *
1329
+ * @method pl
1330
+ * @param chatId The identifier of the chat that includes the poll.
1331
+ * @param messageId The identifier of the message that includes the poll.
1332
+ */
1333
+ retractVote(chatId: ID, messageId: number): Promise<void>;
1334
+ /**
1335
+ * Cast a vote. User-only.
1265
1336
  *
1337
+ * @method pl
1266
1338
  * @param chatId The identifier of the chat that includes the poll.
1267
1339
  * @param messageId The identifier of the message that includes the poll.
1268
- * @param optionId The identifier of the option to remove.
1340
+ * @param optionIndexes The indexes of the options to cast for.
1269
1341
  */
1270
- removePollOption(chatId: ID, messageId: number, optionId: string): Promise<void>;
1342
+ vote(chatId: ID, messageId: number, optionIndexes: number[]): Promise<void>;
1271
1343
  /**
1272
1344
  * Add items to a checklist. User-only.
1273
1345
  *
@@ -1278,13 +1350,14 @@ export declare class Client<C extends Context = Context> extends Composer<C> imp
1278
1350
  */
1279
1351
  addToChecklist(chatId: ID, messageId: number, items: InputChecklistItem[]): Promise<void>;
1280
1352
  /**
1281
- * Update a checklist. User-only.
1353
+ * Check a single item of a checklist. User-only.
1282
1354
  *
1283
1355
  * @param chatId The identifier of a chat.
1284
1356
  * @param messageId The identifier of the checklist message.
1357
+ * @param item The identifier of the item to check.
1285
1358
  * @method cl
1286
1359
  */
1287
- updateChecklist(chatId: ID, messageId: number, params?: UpdateChecklistParams): Promise<void>;
1360
+ checkChecklistItem(chatId: ID, messageId: number, item: number): Promise<void>;
1288
1361
  /**
1289
1362
  * Check multiple items of a checklist. User-only.
1290
1363
  *
@@ -1295,44 +1368,31 @@ export declare class Client<C extends Context = Context> extends Composer<C> imp
1295
1368
  */
1296
1369
  checkChecklistItems(chatId: ID, messageId: number, items: number[]): Promise<void>;
1297
1370
  /**
1298
- * Uncheck multiple items of a checklist. User-only.
1371
+ * Uncheck a single item of a checklist. User-only.
1299
1372
  *
1300
1373
  * @param chatId The identifier of a chat.
1301
1374
  * @param messageId The identifier of the checklist message.
1302
- * @param items The identifiers of the items to uncheck.
1375
+ * @param item The identifier of the item to uncheck.
1303
1376
  * @method cl
1304
1377
  */
1305
- uncheckChecklistItems(chatId: ID, messageId: number, items: number[]): Promise<void>;
1378
+ uncheckChecklistItem(chatId: ID, messageId: number, item: number): Promise<void>;
1306
1379
  /**
1307
- * Check a single item of a checklist. User-only.
1380
+ * Uncheck multiple items of a checklist. User-only.
1308
1381
  *
1309
1382
  * @param chatId The identifier of a chat.
1310
1383
  * @param messageId The identifier of the checklist message.
1311
- * @param item The identifier of the item to check.
1384
+ * @param items The identifiers of the items to uncheck.
1312
1385
  * @method cl
1313
1386
  */
1314
- checkChecklistItem(chatId: ID, messageId: number, item: number): Promise<void>;
1387
+ uncheckChecklistItems(chatId: ID, messageId: number, items: number[]): Promise<void>;
1315
1388
  /**
1316
- * Uncheck a single item of a checklist. User-only.
1389
+ * Update a checklist. User-only.
1317
1390
  *
1318
1391
  * @param chatId The identifier of a chat.
1319
1392
  * @param messageId The identifier of the checklist message.
1320
- * @param item The identifier of the item to uncheck.
1321
1393
  * @method cl
1322
1394
  */
1323
- uncheckChecklistItem(chatId: ID, messageId: number, item: number): Promise<void>;
1324
- /**
1325
- * Download a chunk of a file.
1326
- *
1327
- * @method fs
1328
- * @param fileId The identifier of a file.
1329
- * @example ```ts
1330
- * const chunk = await client.downloadChunk(fileId, { chunkSize: 256 * 1024 });
1331
- * ```
1332
- * @returns The downloaded chunk.
1333
- * @cache file
1334
- */
1335
- downloadChunk(fileId: string, params?: DownloadParams): Promise<Uint8Array>;
1395
+ updateChecklist(chatId: ID, messageId: number, params?: UpdateChecklistParams): Promise<void>;
1336
1396
  /**
1337
1397
  * Download a file.
1338
1398
  *
@@ -1347,6 +1407,18 @@ export declare class Client<C extends Context = Context> extends Composer<C> imp
1347
1407
  * @cache file
1348
1408
  */
1349
1409
  download(fileId: string, params?: DownloadParams): AsyncGenerator<Uint8Array, void, unknown>;
1410
+ /**
1411
+ * Download a chunk of a file.
1412
+ *
1413
+ * @method fs
1414
+ * @param fileId The identifier of a file.
1415
+ * @example ```ts
1416
+ * const chunk = await client.downloadChunk(fileId, { chunkSize: 256 * 1024 });
1417
+ * ```
1418
+ * @returns The downloaded chunk.
1419
+ * @cache file
1420
+ */
1421
+ downloadChunk(fileId: string, params?: DownloadParams): Promise<Uint8Array>;
1350
1422
  /**
1351
1423
  * Get custom emoji documents for download.
1352
1424
  *
@@ -1357,313 +1429,318 @@ export declare class Client<C extends Context = Context> extends Composer<C> imp
1357
1429
  */
1358
1430
  getCustomEmojiStickers(id: string | string[]): Promise<Sticker[]>;
1359
1431
  /**
1360
- * Get chats from a chat list. User-only.
1432
+ * Add a single user to a chat.
1361
1433
  *
1362
1434
  * @method ch
1435
+ * @param chatId The identifier of a chat to add the user to.
1436
+ * @param userId The identifier of the user to add to the chat.
1437
+ * @returns An array of FailedInvitation that has at most a length of 1. If empty, it means that the user was added.
1363
1438
  */
1364
- getChats(params?: GetChatsParams): Promise<ChatListItem[]>;
1439
+ addChatMember(chatId: ID, userId: ID, params?: AddChatMemberParams): Promise<FailedInvitation[]>;
1365
1440
  /**
1366
- * Get pinned chats from a chat list. User-only.
1441
+ * Add multiple users at once to a channel or a supergroup.
1367
1442
  *
1368
1443
  * @method ch
1369
- * @param from The chat list to get the pinned chats from. Defaults to main.
1444
+ * @param chatId The identifier of the channel or supergroup to add the users to.
1445
+ * @param userIds The identifiers of the users to add to the channel or supergroup.
1446
+ * @returns An array of FailedInvitation that has at most a length that is the same as that of the parameter userIds. If empty, it means that all the provided users were added.
1370
1447
  */
1371
- getPinnedChats(from?: "archived" | "main"): Promise<ChatListItem[]>;
1448
+ addChatMembers(chatId: ID, userIds: ID[]): Promise<FailedInvitation[]>;
1372
1449
  /**
1373
- * Get a chat.
1450
+ * Approve a join request.
1374
1451
  *
1375
1452
  * @method ch
1376
- * @cache
1453
+ * @param chatId The identifier of a chat with the join request.
1454
+ * @param userId The user who made the join request.
1377
1455
  */
1378
- getChat(chatId: ID): Promise<Chat>;
1456
+ approveJoinRequest(chatId: ID, userId: ID): Promise<void>;
1379
1457
  /**
1380
- * Get chat history. User-only.
1458
+ * Approve all join requests. User-only.
1381
1459
  *
1382
1460
  * @method ch
1383
- * @param chatId The identifier of a chat.
1461
+ * @param chatId The identifier of a chat with the join requests.
1384
1462
  */
1385
- getHistory(chatId: ID, params?: GetHistoryParams): Promise<Message[]>;
1463
+ approveJoinRequests(chatId: ID, params?: ApproveJoinRequestsParams): Promise<void>;
1386
1464
  /**
1387
- * Set a chat's available reactions. User-only.
1465
+ * Archive a single chat. User-only.
1388
1466
  *
1389
1467
  * @method ch
1390
1468
  * @param chatId The identifier of a chat.
1391
- * @param availableReactions The new available reactions.
1392
1469
  */
1393
- setAvailableReactions(chatId: ID, availableReactions: AvailableReactions): Promise<void>;
1470
+ archiveChat(chatId: ID): Promise<void>;
1394
1471
  /**
1395
- * Set a chat's photo.
1472
+ * Archive multiple chats. User-only.
1396
1473
  *
1397
1474
  * @method ch
1398
- * @param chatId The identifier of a chat.
1399
- * @param photo A photo to set as the chat's photo.
1475
+ * @param chatIds The identifiers of the chats to archive.
1400
1476
  */
1401
- setChatPhoto(chatId: ID, photo: FileSource, params?: SetChatPhotoParams): Promise<void>;
1477
+ archiveChats(chatIds: ID[]): Promise<void>;
1402
1478
  /**
1403
- * Delete a chat's photo.
1479
+ * Ban a member from a chat.
1404
1480
  *
1405
1481
  * @method ch
1406
1482
  * @param chatId The identifier of a chat.
1483
+ * @param memberId The identifier of the member.
1407
1484
  */
1408
- deleteChatPhoto(chatId: ID): Promise<void>;
1485
+ banChatMember(chatId: ID, memberId: ID, params?: BanChatMemberParams): Promise<void>;
1409
1486
  /**
1410
- * Ban a member from a chat.
1487
+ * Close a chat previously opened by openChat.
1488
+ *
1489
+ * @method ch
1490
+ * @param chatId The identifier of a chat to close.
1491
+ */
1492
+ closeChat(chatId: ID): Promise<void>;
1493
+ /**
1494
+ * Close a forum topic.
1411
1495
  *
1412
1496
  * @method ch
1413
1497
  * @param chatId The identifier of a chat.
1414
- * @param memberId The identifier of the member.
1498
+ * @param topicId The identifier of the topic.
1415
1499
  */
1416
- banChatMember(chatId: ID, memberId: ID, params?: BanChatMemberParams): Promise<void>;
1500
+ closeTopic(chatId: ID, topicId: number): Promise<void>;
1417
1501
  /**
1418
- * Unban a member from a chat.
1502
+ * Create a channel. User-only.
1419
1503
  *
1420
1504
  * @method ch
1421
- * @param chatId The identifier of a chat. Must be a supergroup.
1422
- * @param memberId The identifier of the member.
1505
+ * @param title The title of the channel.
1506
+ * @returns The created channel.
1423
1507
  */
1424
- unbanChatMember(chatId: ID, memberId: ID): Promise<void>;
1508
+ createChannel(title: string, params?: CreateChannelParams): Promise<ChatPChannel>;
1425
1509
  /**
1426
- * Kick a member from a chat. Same as a banChatMember call followed by unbanChatMember.
1510
+ * Create a group. User-only.
1427
1511
  *
1428
1512
  * @method ch
1429
- * @param chatId The identifier of a chat. Must be a supergroup.
1430
- * @param memberId The identifier of the member.
1513
+ * @param title The title of the group.
1514
+ * @returns The created group.
1431
1515
  */
1432
- kickChatMember(chatId: ID, memberId: ID): Promise<void>;
1516
+ createGroup(title: string, params?: CreateGroupParams): Promise<ChatPGroup>;
1433
1517
  /**
1434
- * Set the rights of a chat member.
1518
+ * Create an invite link.
1435
1519
  *
1436
1520
  * @method ch
1437
- * @param chatId The identifier of a chat. Must be a supergroup.
1438
- * @param memberId The identifier of the member.
1521
+ * @param chatId The identifier of a chat to create the invite link for.
1522
+ * @returns The newly created invite link.
1439
1523
  */
1440
- setChatMemberRights(chatId: ID, memberId: ID, params?: SetChatMemberRightsParams): Promise<void>;
1524
+ createInviteLink(chatId: ID, params?: CreateInviteLinkParams): Promise<InviteLink>;
1441
1525
  /**
1442
- * Get the administrators of a chat.
1526
+ * Create a supergroup. User-only.
1443
1527
  *
1444
1528
  * @method ch
1445
- * @param chatId The identifier of a chat.
1446
- * @returns The chat's administrators.
1529
+ * @param title The title of the supergroup.
1530
+ * @returns The created supergroup.
1447
1531
  */
1448
- getChatAdministrators(chatId: ID): Promise<ChatMember[]>;
1532
+ createSupergroup(title: string, params?: CreateSupergroupParams): Promise<ChatPSupergroup>;
1449
1533
  /**
1450
- * Enable join requests in a chat. User-only.
1534
+ * Create a forum topic.
1451
1535
  *
1452
1536
  * @method ch
1453
- * @param chatId The identifier of a chat. Must be a channel or a supergroup.
1537
+ * @param chatId The identifier of a chat.
1538
+ * @param title The title of the topic.
1539
+ * @returns The created topic.
1454
1540
  */
1455
- enableJoinRequests(chatId: ID): Promise<void>;
1541
+ createTopic(chatId: ID, title: string, params?: CreateTopicParams): Promise<Topic>;
1456
1542
  /**
1457
- * Disable join requests in a chat. User-only.
1543
+ * Decline a join request.
1458
1544
  *
1459
1545
  * @method ch
1460
- * @param chatId The identifier of a chat. Must be a channel or a supergroup.
1546
+ * @param chatId The identifier of a chat with the join request.
1547
+ * @param userId The user who made the join request.
1461
1548
  */
1462
- disableJoinRequests(chatId: ID): Promise<void>;
1549
+ declineJoinRequest(chatId: ID, userId: ID): Promise<void>;
1463
1550
  /**
1464
- * Get inactive chats. User-only.
1551
+ * Decline all join requests. User-only.
1465
1552
  *
1466
1553
  * @method ch
1467
- * @returns A list of inactive chats the current user is a member of.
1554
+ * @param chatId The identifier of a chat with the join requests.
1468
1555
  */
1469
- getInactiveChats(): Promise<InactiveChat[]>;
1556
+ declineJoinRequests(chatId: ID, params?: DeclineJoinRequestsParams): Promise<void>;
1470
1557
  /**
1471
- * Get the invite links created for a chat. User-only.
1558
+ * Delete a chat. User-only.
1472
1559
  *
1473
1560
  * @method ch
1474
1561
  * @param chatId The identifier of a chat.
1475
- * @returns The invite links created for the chat. This might be a subset of the results if they were less than `limit`. The parameters `afterDate` and `afterInviteLink` can be used for pagination.
1476
1562
  */
1477
- getCreatedInviteLinks(chatId: ID, params?: GetCreatedInviteLinksParams): Promise<InviteLink[]>;
1563
+ deleteChat(chatId: ID): Promise<void>;
1478
1564
  /**
1479
- * Join a chat. User-only.
1565
+ * Delete a chat's photo.
1480
1566
  *
1481
1567
  * @method ch
1482
1568
  * @param chatId The identifier of a chat.
1483
1569
  */
1484
- joinChat(chatId: ID): Promise<void>;
1570
+ deleteChatPhoto(chatId: ID): Promise<void>;
1485
1571
  /**
1486
- * Leave a chat.
1572
+ * Delete a chat's sticker set.
1487
1573
  *
1488
1574
  * @method ch
1489
- * @param chatId The identifier of a chat.
1575
+ * @param chatId The identifier of a chat. Must be a supergroup.
1490
1576
  */
1491
- leaveChat(chatId: ID): Promise<void>;
1577
+ deleteChatStickerSet(chatId: ID): Promise<void>;
1492
1578
  /**
1493
- * Get information on a user's chat membership.
1579
+ * Disable automatic anti-spam in a group. User-only.
1494
1580
  *
1495
1581
  * @method ch
1496
- * @param chatId The identifier of a chat.
1497
- * @param userId The identifier of the user.
1582
+ * @param chatId The identifier of the group.
1498
1583
  */
1499
- getChatMember(chatId: ID, userId: ID): Promise<ChatMember>;
1584
+ disableAntispam(chatId: ID): Promise<void>;
1500
1585
  /**
1501
- * Get the members of a chat.
1586
+ * Disable business bots in a private chat. User-only.
1502
1587
  *
1503
1588
  * @method ch
1504
- * @param chatId The identifier of a chat.
1589
+ * @param chatId The identifier of the private chat to disable business bots in.
1505
1590
  */
1506
- getChatMembers(chatId: ID, params?: GetChatMembersParams): Promise<ChatMember[]>;
1591
+ disableBusinessBots(chatId: ID): Promise<void>;
1507
1592
  /**
1508
- * Set a chat's sticker set.
1593
+ * Disable chat history for new members. User-only.
1509
1594
  *
1510
1595
  * @method ch
1511
- * @param chatId The identifier of a chat. Must be a supergroup.
1512
- * @param setName The name of the set.
1596
+ * @param chatId The identifier of a chat.
1513
1597
  */
1514
- setChatStickerSet(chatId: ID, setName: string): Promise<void>;
1598
+ disableChatHistoryForNewMembers(chatId: ID): Promise<void>;
1515
1599
  /**
1516
- * Delete a chat's sticker set.
1600
+ * Disable join requests in a chat. User-only.
1517
1601
  *
1518
1602
  * @method ch
1519
- * @param chatId The identifier of a chat. Must be a supergroup.
1603
+ * @param chatId The identifier of a chat. Must be a channel or a supergroup.
1520
1604
  */
1521
- deleteChatStickerSet(chatId: ID): Promise<void>;
1605
+ disableJoinRequests(chatId: ID): Promise<void>;
1522
1606
  /**
1523
- * Set the number of boosts required to circumvent a chat's default restrictions. User-only.
1607
+ * Disable sharing in a chat. User-only.
1524
1608
  *
1525
1609
  * @method ch
1526
1610
  * @param chatId The identifier of a chat.
1527
- * @param boosts The number of boosts required to circumvent its restrictions.
1528
1611
  */
1529
- setBoostsRequiredToCircumventRestrictions(chatId: ID, boosts: number): Promise<void>;
1612
+ disableSharing(chatId: ID): Promise<void>;
1530
1613
  /**
1531
- * Create an invite link.
1614
+ * Disable post signatures in a channel. User-only.
1532
1615
  *
1533
1616
  * @method ch
1534
- * @param chatId The identifier of a chat to create the invite link for.
1535
- * @returns The newly created invite link.
1617
+ * @param chatId The identifier of the channel.
1536
1618
  */
1537
- createInviteLink(chatId: ID, params?: CreateInviteLinkParams): Promise<InviteLink>;
1619
+ disableSignatures(chatId: ID): Promise<void>;
1538
1620
  /**
1539
- * Approve a join request.
1621
+ * Disable slow mode in a group. User-only.
1540
1622
  *
1541
1623
  * @method ch
1542
- * @param chatId The identifier of a chat with the join request.
1543
- * @param userId The user who made the join request.
1624
+ * @param chatId The identifier of the group to disable slow mode in.
1544
1625
  */
1545
- approveJoinRequest(chatId: ID, userId: ID): Promise<void>;
1626
+ disableSlowMode(chatId: ID): Promise<void>;
1546
1627
  /**
1547
- * Decline a join request.
1628
+ * Disable topics in a group. User-only.
1548
1629
  *
1549
1630
  * @method ch
1550
- * @param chatId The identifier of a chat with the join request.
1551
- * @param userId The user who made the join request.
1631
+ * @param chatId The identifier of the group.
1552
1632
  */
1553
- declineJoinRequest(chatId: ID, userId: ID): Promise<void>;
1633
+ disableTopics(chatId: ID): Promise<void>;
1554
1634
  /**
1555
- * Approve all join requests. User-only.
1635
+ * Edit a forum topic.
1556
1636
  *
1557
1637
  * @method ch
1558
- * @param chatId The identifier of a chat with the join requests.
1638
+ * @param chatId The identifier of a chat.
1639
+ * @param topicId The identifier of the topic.
1640
+ * @param title The new title of the topic.
1641
+ * @returns The new topic.
1559
1642
  */
1560
- approveJoinRequests(chatId: ID, params?: ApproveJoinRequestsParams): Promise<void>;
1643
+ editTopic(chatId: ID, topicId: number, title: string, params?: EditTopicParams): Promise<Topic>;
1561
1644
  /**
1562
- * Decline all join requests. User-only.
1645
+ * Enable automatic anti-spam in a group. User-only.
1563
1646
  *
1564
1647
  * @method ch
1565
- * @param chatId The identifier of a chat with the join requests.
1648
+ * @param chatId The identifier of the group.
1566
1649
  */
1567
- declineJoinRequests(chatId: ID, params?: DeclineJoinRequestsParams): Promise<void>;
1650
+ enableAntispam(chatId: ID): Promise<void>;
1568
1651
  /**
1569
- * Get pending join requests in a chat. User-only.
1652
+ * Enable business bots in a private chat. User-only.
1570
1653
  *
1571
1654
  * @method ch
1572
- * @param chatId The identifier of a chat with the join requests.
1655
+ * @param chatId The identifier of the private chat to enable business bots in.
1573
1656
  */
1574
- getJoinRequests(chatId: ID, params?: GetJoinRequestsParams): Promise<JoinRequest[]>;
1657
+ enableBusinessBots(chatId: ID): Promise<void>;
1575
1658
  /**
1576
- * Add a single user to a chat.
1659
+ * Enable chat history for new members. User-only.
1577
1660
  *
1578
1661
  * @method ch
1579
- * @param chatId The identifier of a chat to add the user to.
1580
- * @param userId The identifier of the user to add to the chat.
1581
- * @returns An array of FailedInvitation that has at most a length of 1. If empty, it means that the user was added.
1662
+ * @param chatId The identifier of a chat.
1582
1663
  */
1583
- addChatMember(chatId: ID, userId: ID, params?: AddChatMemberParams): Promise<FailedInvitation[]>;
1664
+ enableChatHistoryForNewMembers(chatId: ID): Promise<void>;
1584
1665
  /**
1585
- * Add multiple users at once to a channel or a supergroup.
1666
+ * Enable join requests in a chat. User-only.
1586
1667
  *
1587
1668
  * @method ch
1588
- * @param chatId The identifier of the channel or supergroup to add the users to.
1589
- * @param userIds The identifiers of the users to add to the channel or supergroup.
1590
- * @returns An array of FailedInvitation that has at most a length that is the same as that of the parameter userIds. If empty, it means that all the provided users were added.
1669
+ * @param chatId The identifier of a chat. Must be a channel or a supergroup.
1591
1670
  */
1592
- addChatMembers(chatId: ID, userIds: ID[]): Promise<FailedInvitation[]>;
1671
+ enableJoinRequests(chatId: ID): Promise<void>;
1593
1672
  /**
1594
- * Open a chat.
1673
+ * Enable sharing in a chat. User-only.
1595
1674
  *
1596
1675
  * @method ch
1597
- * @param chatId The identifier of a chat to open.
1676
+ * @param chatId The identifier of a chat.
1598
1677
  */
1599
- openChat(chatId: ID, params?: OpenChatParams): Promise<void>;
1678
+ enableSharing(chatId: ID): Promise<void>;
1600
1679
  /**
1601
- * Close a chat previously opened by openChat.
1680
+ * Enable post signatures in a channel. User-only.
1602
1681
  *
1603
1682
  * @method ch
1604
- * @param chatId The identifier of a chat to close.
1683
+ * @param chatId The identifier of the channel.
1605
1684
  */
1606
- closeChat(chatId: ID): Promise<void>;
1685
+ enableSignatures(chatId: ID, params?: EnableSignaturesParams): Promise<void>;
1607
1686
  /**
1608
- * Create a group. User-only.
1687
+ * Enable topics in a group. User-only.
1609
1688
  *
1610
1689
  * @method ch
1611
- * @param title The title of the group.
1612
- * @returns The created group.
1690
+ * @param chatId The identifier of the group.
1691
+ * @param isShownAsTabs Whether topics should be displayed as tabs.
1613
1692
  */
1614
- createGroup(title: string, params?: CreateGroupParams): Promise<ChatPGroup>;
1693
+ enableTopics(chatId: ID, isShownAsTabs: boolean): Promise<void>;
1615
1694
  /**
1616
- * Create a supergroup. User-only.
1695
+ * Get a chat.
1617
1696
  *
1618
1697
  * @method ch
1619
- * @param title The title of the supergroup.
1620
- * @returns The created supergroup.
1698
+ * @cache
1621
1699
  */
1622
- createSupergroup(title: string, params?: CreateSupergroupParams): Promise<ChatPSupergroup>;
1700
+ getChat(chatId: ID): Promise<Chat>;
1623
1701
  /**
1624
- * Create a channel. User-only.
1702
+ * Get the administrators of a chat.
1625
1703
  *
1626
1704
  * @method ch
1627
- * @param title The title of the channel.
1628
- * @returns The created channel.
1705
+ * @param chatId The identifier of a chat.
1706
+ * @returns The chat's administrators.
1629
1707
  */
1630
- createChannel(title: string, params?: CreateChannelParams): Promise<ChatPChannel>;
1708
+ getChatAdministrators(chatId: ID): Promise<ChatMember[]>;
1631
1709
  /**
1632
- * Set the time to live of the messages of a chat. User-only.
1710
+ * Get information on a user's chat membership.
1633
1711
  *
1634
1712
  * @method ch
1635
1713
  * @param chatId The identifier of a chat.
1636
- * @param messageTtl The time to live of the messages in seconds.
1714
+ * @param userId The identifier of the user.
1637
1715
  */
1638
- setMessageTtl(chatId: ID, messageTtl: number): Promise<void>;
1716
+ getChatMember(chatId: ID, userId: ID): Promise<ChatMember>;
1639
1717
  /**
1640
- * Archive multiple chats. User-only.
1718
+ * Get the members of a chat.
1641
1719
  *
1642
1720
  * @method ch
1643
- * @param chatIds The identifiers of the chats to archive.
1721
+ * @param chatId The identifier of a chat.
1644
1722
  */
1645
- archiveChats(chatIds: ID[]): Promise<void>;
1723
+ getChatMembers(chatId: ID, params?: GetChatMembersParams): Promise<ChatMember[]>;
1646
1724
  /**
1647
- * Archive a single chat. User-only.
1725
+ * Get a partial chat.
1648
1726
  *
1649
1727
  * @method ch
1650
- * @param chatId The identifier of a chat.
1728
+ * @cache
1651
1729
  */
1652
- archiveChat(chatId: ID): Promise<void>;
1730
+ getChatP(chatId: ID): Promise<ChatP>;
1653
1731
  /**
1654
- * Unarchive multiple chats. User-only.
1732
+ * Get chats from a chat list. User-only.
1655
1733
  *
1656
1734
  * @method ch
1657
- * @param chatIds The identifiers of the chats to unarchive.
1658
1735
  */
1659
- unarchiveChats(chatIds: ID[]): Promise<void>;
1736
+ getChats(params?: GetChatsParams): Promise<ChatListItem[]>;
1660
1737
  /**
1661
- * Unarchive a single chat. User-only.
1738
+ * Get the settings of a chat. User-only.
1662
1739
  *
1663
1740
  * @method ch
1664
1741
  * @param chatId The identifier of a chat.
1665
1742
  */
1666
- unarchiveChat(chatId: ID): Promise<void>;
1743
+ getChatSettings(chatId: ID): Promise<ChatSettings>;
1667
1744
  /**
1668
1745
  * Get common chats between a user and the current one. User-only.
1669
1746
  *
@@ -1672,314 +1749,330 @@ export declare class Client<C extends Context = Context> extends Composer<C> imp
1672
1749
  */
1673
1750
  getCommonChats(userId: ID, params?: GetCommonChatsParams): Promise<ChatP[]>;
1674
1751
  /**
1675
- * Get the settings of a chat. User-only.
1752
+ * Get the invite links created for a chat. User-only.
1676
1753
  *
1677
1754
  * @method ch
1678
1755
  * @param chatId The identifier of a chat.
1756
+ * @returns The invite links created for the chat. This might be a subset of the results if they were less than `limit`. The parameters `afterDate` and `afterInviteLink` can be used for pagination.
1679
1757
  */
1680
- getChatSettings(chatId: ID): Promise<ChatSettings>;
1758
+ getCreatedInviteLinks(chatId: ID, params?: GetCreatedInviteLinksParams): Promise<InviteLink[]>;
1681
1759
  /**
1682
- * Disable business bots in a private chat. User-only.
1760
+ * Get discussion chat suggestions. User-only.
1683
1761
  *
1684
1762
  * @method ch
1685
- * @param chatId The identifier of the private chat to disable business bots in.
1686
1763
  */
1687
- disableBusinessBots(chatId: ID): Promise<void>;
1764
+ getDiscussionChatSuggestions(): Promise<ChatP[]>;
1688
1765
  /**
1689
- * Enable business bots in a private chat. User-only.
1766
+ * Get chat history. User-only.
1690
1767
  *
1691
1768
  * @method ch
1692
- * @param chatId The identifier of the private chat to enable business bots in.
1769
+ * @param chatId The identifier of a chat.
1693
1770
  */
1694
- enableBusinessBots(chatId: ID): Promise<void>;
1771
+ getHistory(chatId: ID, params?: GetHistoryParams): Promise<Message[]>;
1695
1772
  /**
1696
- * Disable slow mode in a group. User-only.
1773
+ * Get inactive chats. User-only.
1697
1774
  *
1698
1775
  * @method ch
1699
- * @param chatId The identifier of the group to disable slow mode in.
1776
+ * @returns A list of inactive chats the current user is a member of.
1700
1777
  */
1701
- disableSlowMode(chatId: ID): Promise<void>;
1778
+ getInactiveChats(): Promise<InactiveChat[]>;
1702
1779
  /**
1703
- * Change slow mode in a group. User-only.
1780
+ * Get pending join requests in a chat. User-only.
1704
1781
  *
1705
1782
  * @method ch
1706
- * @param chatId The identifier of the group to change slow mode in.
1707
- * @param duration New slow mode duration.
1783
+ * @param chatId The identifier of a chat with the join requests.
1708
1784
  */
1709
- setSlowMode(chatId: ID, duration: SlowModeDuration): Promise<void>;
1785
+ getJoinRequests(chatId: ID, params?: GetJoinRequestsParams): Promise<JoinRequest[]>;
1710
1786
  /**
1711
- * Change the title of a chat.
1787
+ * Get the count of online members in a chat. User-only.
1712
1788
  *
1713
1789
  * @method ch
1714
1790
  * @param chatId The identifier of a chat.
1715
- * @param title The new title.
1791
+ * @returns The count of online members in the chat.
1716
1792
  */
1717
- setChatTitle(chatId: ID, title: string): Promise<void>;
1793
+ getOnlineCount(chatId: ID): Promise<number>;
1718
1794
  /**
1719
- * Change the description of a chat.
1795
+ * Get pinned chats from a chat list. User-only.
1796
+ *
1797
+ * @method ch
1798
+ * @param from The chat list to get the pinned chats from. Defaults to main.
1799
+ */
1800
+ getPinnedChats(from?: "archived" | "main"): Promise<ChatListItem[]>;
1801
+ /**
1802
+ * Get recommended channels. User-only.
1720
1803
  *
1721
1804
  * @method ch
1722
- * @param chatId The identifier of a chat.
1723
- * @param description The new description.
1805
+ * @returns A list of recommended channels.
1724
1806
  */
1725
- setChatDescription(chatId: ID, description: string): Promise<void>;
1807
+ getRecommendedChannels(): Promise<ChatPChannel[]>;
1726
1808
  /**
1727
- * Hide the member list of a group to non-admins. User-only.
1809
+ * Get similar bots. User-only.
1728
1810
  *
1729
1811
  * @method ch
1730
- * @param chatId The identifier of the group.
1812
+ * @param chatId The identifier of a bot to get similar bots for.
1813
+ * @returns A list of similar bots.
1731
1814
  */
1732
- hideMemberList(chatId: ID): Promise<void>;
1815
+ getSimilarBots(chatId: ID): Promise<ChatPPrivate[]>;
1733
1816
  /**
1734
- * Show the member list of a group to non-admins. User-only.
1817
+ * Get similar channels. User-only.
1735
1818
  *
1736
1819
  * @method ch
1737
- * @param chatId The identifier of the group.
1820
+ * @param chatId The identifier of a channel to get similar channels for.
1821
+ * @returns A list of similar channels.
1738
1822
  */
1739
- showMemberList(chatId: ID): Promise<void>;
1823
+ getSimilarChannels(chatId: ID): Promise<ChatPChannel[]>;
1740
1824
  /**
1741
- * Enable topics in a group. User-only.
1825
+ * Hide the general forum topic.
1742
1826
  *
1743
1827
  * @method ch
1744
- * @param chatId The identifier of the group.
1745
- * @param isShownAsTabs Whether topics should be displayed as tabs.
1828
+ * @param chatId The identifier of a chat.
1746
1829
  */
1747
- enableTopics(chatId: ID, isShownAsTabs: boolean): Promise<void>;
1830
+ hideGeneralTopic(chatId: ID): Promise<void>;
1748
1831
  /**
1749
- * Disable topics in a group. User-only.
1832
+ * Hide the member list of a group to non-admins. User-only.
1750
1833
  *
1751
1834
  * @method ch
1752
1835
  * @param chatId The identifier of the group.
1753
1836
  */
1754
- disableTopics(chatId: ID): Promise<void>;
1837
+ hideMemberList(chatId: ID): Promise<void>;
1755
1838
  /**
1756
- * Enable automatic anti-spam in a group. User-only.
1839
+ * Join a chat. User-only.
1757
1840
  *
1758
1841
  * @method ch
1759
- * @param chatId The identifier of the group.
1842
+ * @param chatId The identifier of a chat.
1760
1843
  */
1761
- enableAntispam(chatId: ID): Promise<void>;
1844
+ joinChat(chatId: ID): Promise<void>;
1762
1845
  /**
1763
- * Disable automatic anti-spam in a group. User-only.
1846
+ * Kick a member from a chat. Same as a banChatMember call followed by unbanChatMember.
1764
1847
  *
1765
1848
  * @method ch
1766
- * @param chatId The identifier of the group.
1849
+ * @param chatId The identifier of a chat. Must be a supergroup.
1850
+ * @param memberId The identifier of the member.
1767
1851
  */
1768
- disableAntispam(chatId: ID): Promise<void>;
1852
+ kickChatMember(chatId: ID, memberId: ID): Promise<void>;
1769
1853
  /**
1770
- * Enable post signatures in a channel. User-only.
1854
+ * Leave a chat.
1771
1855
  *
1772
1856
  * @method ch
1773
- * @param chatId The identifier of the channel.
1857
+ * @param chatId The identifier of a chat.
1774
1858
  */
1775
- enableSignatures(chatId: ID, params?: EnableSignaturesParams): Promise<void>;
1859
+ leaveChat(chatId: ID): Promise<void>;
1776
1860
  /**
1777
- * Disable post signatures in a channel. User-only.
1861
+ * Mark all mentions in a chat as read. User-only.
1778
1862
  *
1779
1863
  * @method ch
1780
- * @param chatId The identifier of the channel.
1864
+ * @param chatId The identifier of the chat.
1781
1865
  */
1782
- disableSignatures(chatId: ID): Promise<void>;
1866
+ markAllMentionsAsRead(chatId: ID, params?: MarkAllMentionsAsReadParams): Promise<void>;
1783
1867
  /**
1784
- * Delete a chat. User-only.
1868
+ * Mark a chat as read. User-only.
1785
1869
  *
1786
1870
  * @method ch
1787
1871
  * @param chatId The identifier of a chat.
1788
1872
  */
1789
- deleteChat(chatId: ID): Promise<void>;
1873
+ markChatAsRead(chatId: ID): Promise<void>;
1790
1874
  /**
1791
- * Get discussion chat suggestions. User-only.
1875
+ * Mark a chat as unread. User-only.
1792
1876
  *
1793
1877
  * @method ch
1878
+ * @param chatId The identifier of a chat.
1794
1879
  */
1795
- getDiscussionChatSuggestions(): Promise<ChatP[]>;
1880
+ markChatAsUnread(chatId: ID): Promise<void>;
1796
1881
  /**
1797
- * Set a channel's discussion chat. User-only.
1882
+ * Open a chat.
1798
1883
  *
1799
1884
  * @method ch
1800
- * @param chatId The identifier of a channel.
1801
- * @param discussionChatId The identifier of a chat to use as discussion for the channel.
1885
+ * @param chatId The identifier of a chat to open.
1802
1886
  */
1803
- setDiscussionChat(chatId: ID, discussionChatId: ID): Promise<void>;
1887
+ openChat(chatId: ID, params?: OpenChatParams): Promise<void>;
1804
1888
  /**
1805
- * Transfer the ownership of a chat. User-only.
1889
+ * Pin a forum topic.
1806
1890
  *
1807
1891
  * @method ch
1808
1892
  * @param chatId The identifier of a chat.
1809
- * @param userId The identifier of the new owner.
1810
- * @param password The password of the current account.
1893
+ * @param topicId The identifier of the topic.
1811
1894
  */
1812
- transferChatOwnership(chatId: ID, userId: ID, password: string): Promise<void>;
1895
+ pinTopic(chatId: ID, topicId: number): Promise<void>;
1813
1896
  /**
1814
- * Create a forum topic.
1897
+ * Promote a chat member.
1815
1898
  *
1816
1899
  * @method ch
1817
1900
  * @param chatId The identifier of a chat.
1818
- * @param title The title of the topic.
1819
- * @returns The created topic.
1901
+ * @param userId The identifier of the user to promote.
1820
1902
  */
1821
- createTopic(chatId: ID, title: string, params?: CreateTopicParams): Promise<Topic>;
1903
+ promoteChatMember(chatId: ID, userId: ID, params?: PromoteChatMemberParams): Promise<void>;
1822
1904
  /**
1823
- * Edit a forum topic.
1905
+ * Reopen a forum topic.
1824
1906
  *
1825
1907
  * @method ch
1826
1908
  * @param chatId The identifier of a chat.
1827
1909
  * @param topicId The identifier of the topic.
1828
- * @param title The new title of the topic.
1829
- * @returns The new topic.
1830
1910
  */
1831
- editTopic(chatId: ID, topicId: number, title: string, params?: EditTopicParams): Promise<Topic>;
1911
+ reopenTopic(chatId: ID, topicId: number): Promise<void>;
1832
1912
  /**
1833
- * Hide the general forum topic.
1913
+ * Report a chat. User-only.
1834
1914
  *
1835
1915
  * @method ch
1836
- * @param chatId The identifier of a chat.
1916
+ * @param chatId The identifier of a chat to report.
1917
+ * @param reason The reason of the report.
1837
1918
  */
1838
- hideGeneralTopic(chatId: ID): Promise<void>;
1919
+ reportChat(chatId: ID, reason: ReportReason, params?: ReportChatParams): Promise<void>;
1839
1920
  /**
1840
- * Show the general forum topic.
1921
+ * Set a chat's available reactions. User-only.
1841
1922
  *
1842
1923
  * @method ch
1843
1924
  * @param chatId The identifier of a chat.
1925
+ * @param availableReactions The new available reactions.
1844
1926
  */
1845
- showGeneralTopic(chatId: ID): Promise<void>;
1927
+ setAvailableReactions(chatId: ID, availableReactions: AvailableReactions): Promise<void>;
1846
1928
  /**
1847
- * Close a forum topic.
1929
+ * Set the number of boosts required to circumvent a chat's default restrictions. User-only.
1848
1930
  *
1849
1931
  * @method ch
1850
1932
  * @param chatId The identifier of a chat.
1851
- * @param topicId The identifier of the topic.
1933
+ * @param boosts The number of boosts required to circumvent its restrictions.
1852
1934
  */
1853
- closeTopic(chatId: ID, topicId: number): Promise<void>;
1935
+ setBoostsRequiredToCircumventRestrictions(chatId: ID, boosts: number): Promise<void>;
1854
1936
  /**
1855
- * Reopen a forum topic.
1937
+ * Change the description of a chat.
1856
1938
  *
1857
1939
  * @method ch
1858
1940
  * @param chatId The identifier of a chat.
1859
- * @param topicId The identifier of the topic.
1941
+ * @param description The new description.
1860
1942
  */
1861
- reopenTopic(chatId: ID, topicId: number): Promise<void>;
1943
+ setChatDescription(chatId: ID, description: string): Promise<void>;
1862
1944
  /**
1863
- * Pin a forum topic.
1945
+ * Set the rights of a chat member.
1864
1946
  *
1865
1947
  * @method ch
1866
- * @param chatId The identifier of a chat.
1867
- * @param topicId The identifier of the topic.
1948
+ * @param chatId The identifier of a chat. Must be a supergroup.
1949
+ * @param memberId The identifier of the member.
1868
1950
  */
1869
- pinTopic(chatId: ID, topicId: number): Promise<void>;
1951
+ setChatMemberRights(chatId: ID, memberId: ID, params?: SetChatMemberRightsParams): Promise<void>;
1870
1952
  /**
1871
- * Unpin a forum topic.
1953
+ * Change the tag of a chat member.
1872
1954
  *
1873
1955
  * @method ch
1874
1956
  * @param chatId The identifier of a chat.
1875
- * @param topicId The identifier of the topic.
1957
+ * @param userId The identifier of the user that is a member of the chat.
1876
1958
  */
1877
- unpinTopic(chatId: ID, topicId: number): Promise<void>;
1959
+ setChatMemberTag(chatId: ID, userId: ID, params?: SetChatMemberTagParams): Promise<void>;
1878
1960
  /**
1879
- * Promote a chat member.
1961
+ * Set a chat's photo.
1880
1962
  *
1881
1963
  * @method ch
1882
1964
  * @param chatId The identifier of a chat.
1883
- * @param userId The identifier of the user to promote.
1965
+ * @param photo A photo to set as the chat's photo.
1884
1966
  */
1885
- promoteChatMember(chatId: ID, userId: ID, params?: PromoteChatMemberParams): Promise<void>;
1967
+ setChatPhoto(chatId: ID, photo: FileSource, params?: SetChatPhotoParams): Promise<void>;
1886
1968
  /**
1887
- * Change the tag of a chat member.
1969
+ * Set a chat's sticker set.
1888
1970
  *
1889
1971
  * @method ch
1890
- * @param chatId The identifier of a chat.
1891
- * @param userId The identifier of the user that is a member of the chat.
1972
+ * @param chatId The identifier of a chat. Must be a supergroup.
1973
+ * @param setName The name of the set.
1892
1974
  */
1893
- setChatMemberTag(chatId: ID, userId: ID, params?: SetChatMemberTagParams): Promise<void>;
1975
+ setChatStickerSet(chatId: ID, setName: string): Promise<void>;
1894
1976
  /**
1895
- * Enable sharing in a chat. User-only.
1977
+ * Change the title of a chat.
1896
1978
  *
1897
1979
  * @method ch
1898
1980
  * @param chatId The identifier of a chat.
1981
+ * @param title The new title.
1899
1982
  */
1900
- enableSharing(chatId: ID): Promise<void>;
1983
+ setChatTitle(chatId: ID, title: string): Promise<void>;
1901
1984
  /**
1902
- * Disable sharing in a chat. User-only.
1985
+ * Set the default send as chat of a chat. User-only.
1903
1986
  *
1904
1987
  * @method ch
1905
1988
  * @param chatId The identifier of a chat.
1989
+ * @param sendAs The new default send as chat.
1906
1990
  */
1907
- disableSharing(chatId: ID): Promise<void>;
1991
+ setDefaultSendAs(chatId: ID, sendAs: ID): Promise<void>;
1908
1992
  /**
1909
- * Get recommended channels. User-only.
1993
+ * Set a channel's discussion chat. User-only.
1910
1994
  *
1911
1995
  * @method ch
1912
- * @returns A list of recommended channels.
1996
+ * @param chatId The identifier of a channel.
1997
+ * @param discussionChatId The identifier of a chat to use as discussion for the channel.
1913
1998
  */
1914
- getRecommendedChannels(): Promise<ChatPChannel[]>;
1999
+ setDiscussionChat(chatId: ID, discussionChatId: ID): Promise<void>;
1915
2000
  /**
1916
- * Get similar channels. User-only.
2001
+ * Set the time to live of the messages of a chat. User-only.
1917
2002
  *
1918
2003
  * @method ch
1919
- * @param chatId The identifier of a channel to get similar channels for.
1920
- * @returns A list of similar channels.
2004
+ * @param chatId The identifier of a chat.
2005
+ * @param messageTtl The time to live of the messages in seconds.
1921
2006
  */
1922
- getSimilarChannels(chatId: ID): Promise<ChatPChannel[]>;
2007
+ setMessageTtl(chatId: ID, messageTtl: number): Promise<void>;
1923
2008
  /**
1924
- * Get similar bots. User-only.
2009
+ * Change slow mode in a group. User-only.
1925
2010
  *
1926
2011
  * @method ch
1927
- * @param chatId The identifier of a bot to get similar bots for.
1928
- * @returns A list of similar bots.
2012
+ * @param chatId The identifier of the group to change slow mode in.
2013
+ * @param duration New slow mode duration.
1929
2014
  */
1930
- getSimilarBots(chatId: ID): Promise<ChatPPrivate[]>;
2015
+ setSlowMode(chatId: ID, duration: SlowModeDuration): Promise<void>;
1931
2016
  /**
1932
- * Get the count of online members in a chat. User-only.
2017
+ * Show the general forum topic.
1933
2018
  *
1934
2019
  * @method ch
1935
2020
  * @param chatId The identifier of a chat.
1936
- * @returns The count of online members in the chat.
1937
2021
  */
1938
- getOnlineCount(chatId: ID): Promise<number>;
2022
+ showGeneralTopic(chatId: ID): Promise<void>;
1939
2023
  /**
1940
- * Enable chat history for new members. User-only.
2024
+ * Show the member list of a group to non-admins. User-only.
1941
2025
  *
1942
2026
  * @method ch
1943
- * @param chatId The identifier of a chat.
2027
+ * @param chatId The identifier of the group.
1944
2028
  */
1945
- enableChatHistoryForNewMembers(chatId: ID): Promise<void>;
2029
+ showMemberList(chatId: ID): Promise<void>;
1946
2030
  /**
1947
- * Disable chat history for new members. User-only.
2031
+ * Transfer the ownership of a chat. User-only.
1948
2032
  *
1949
2033
  * @method ch
1950
2034
  * @param chatId The identifier of a chat.
2035
+ * @param userId The identifier of the new owner.
2036
+ * @param password The password of the current account.
1951
2037
  */
1952
- disableChatHistoryForNewMembers(chatId: ID): Promise<void>;
2038
+ transferChatOwnership(chatId: ID, userId: ID, password: string): Promise<void>;
1953
2039
  /**
1954
- * Set the default send as chat of a chat. User-only.
2040
+ * Unarchive a single chat. User-only.
1955
2041
  *
1956
2042
  * @method ch
1957
2043
  * @param chatId The identifier of a chat.
1958
- * @param sendAs The new default send as chat.
1959
2044
  */
1960
- setDefaultSendAs(chatId: ID, sendAs: ID): Promise<void>;
2045
+ unarchiveChat(chatId: ID): Promise<void>;
1961
2046
  /**
1962
- * Report a chat. User-only.
2047
+ * Unarchive multiple chats. User-only.
1963
2048
  *
1964
2049
  * @method ch
1965
- * @param chatId The identifier of a chat to report.
1966
- * @param reason The reason of the report.
2050
+ * @param chatIds The identifiers of the chats to unarchive.
1967
2051
  */
1968
- reportChat(chatId: ID, reason: ReportReason, params?: ReportChatParams): Promise<void>;
2052
+ unarchiveChats(chatIds: ID[]): Promise<void>;
1969
2053
  /**
1970
- * Mark a chat as unread. User-only.
2054
+ * Unban a member from a chat.
1971
2055
  *
1972
2056
  * @method ch
1973
- * @param chatId The identifier of a chat.
2057
+ * @param chatId The identifier of a chat. Must be a supergroup.
2058
+ * @param memberId The identifier of the member.
1974
2059
  */
1975
- markChatAsUnread(chatId: ID): Promise<void>;
2060
+ unbanChatMember(chatId: ID, memberId: ID): Promise<void>;
1976
2061
  /**
1977
- * Mark a chat as read. User-only.
2062
+ * Unpin a forum topic.
1978
2063
  *
1979
2064
  * @method ch
1980
2065
  * @param chatId The identifier of a chat.
2066
+ * @param topicId The identifier of the topic.
1981
2067
  */
1982
- markChatAsRead(chatId: ID): Promise<void>;
2068
+ unpinTopic(chatId: ID, topicId: number): Promise<void>;
2069
+ /**
2070
+ * Answer a callback query. Bot-only.
2071
+ *
2072
+ * @method cq
2073
+ * @param id ID of the callback query to answer.
2074
+ */
2075
+ answerCallbackQuery(id: string, params?: AnswerCallbackQueryParams): Promise<void>;
1983
2076
  /**
1984
2077
  * Send a callback query. User-only.
1985
2078
  *
@@ -1992,12 +2085,13 @@ export declare class Client<C extends Context = Context> extends Composer<C> imp
1992
2085
  */
1993
2086
  sendCallbackQuery(botId: ID, messageId: number, question: CallbackQueryQuestion): Promise<CallbackQueryAnswer>;
1994
2087
  /**
1995
- * Answer a callback query. Bot-only.
2088
+ * Answer an inline query. Bot-only.
1996
2089
  *
1997
- * @method cq
1998
- * @param id ID of the callback query to answer.
2090
+ * @method iq
2091
+ * @param id The identifier of the inline query to answer.
2092
+ * @param results The results to answer with.
1999
2093
  */
2000
- answerCallbackQuery(id: string, params?: AnswerCallbackQueryParams): Promise<void>;
2094
+ answerInlineQuery(id: string, results: InlineQueryResult[], params?: AnswerInlineQueryParams): Promise<void>;
2001
2095
  /**
2002
2096
  * Send an inline query. User-only.
2003
2097
  *
@@ -2009,40 +2103,12 @@ export declare class Client<C extends Context = Context> extends Composer<C> imp
2009
2103
  */
2010
2104
  sendInlineQuery(botId: ID, chatId: ID, params?: SendInlineQueryParams): Promise<InlineQueryAnswer>;
2011
2105
  /**
2012
- * Answer an inline query. Bot-only.
2013
- *
2014
- * @method iq
2015
- * @param id The identifier of the inline query to answer.
2016
- * @param results The results to answer with.
2017
- */
2018
- answerInlineQuery(id: string, results: InlineQueryResult[], params?: AnswerInlineQueryParams): Promise<void>;
2019
- /**
2020
- * Set the bot's description in the given language. Bot-only.
2021
- *
2022
- * @method bo
2023
- */
2024
- setMyDescription(params?: {
2025
- description?: string;
2026
- languageCode?: string;
2027
- }): Promise<void>;
2028
- /**
2029
- * Set the bot's name in the given language. Bot-only.
2030
- *
2031
- * @method bo
2032
- */
2033
- setMyName(params?: {
2034
- name?: string;
2035
- languageCode?: string;
2036
- }): Promise<void>;
2037
- /**
2038
- * Set the bot's short description in the given language. Bot-only.
2106
+ * Get the bot's commands in the given scope and/or language. Bot-only.
2039
2107
  *
2040
2108
  * @method bo
2109
+ * @returns The current bot's commands in the specified language.
2041
2110
  */
2042
- setMyShortDescription(params?: {
2043
- shortDescription?: string;
2044
- languageCode?: string;
2045
- }): Promise<void>;
2111
+ getMyCommands(params?: GetMyCommandsParams): Promise<BotCommand[]>;
2046
2112
  /**
2047
2113
  * Get the bot's description in the given language. Bot-only.
2048
2114
  *
@@ -2078,21 +2144,32 @@ export declare class Client<C extends Context = Context> extends Composer<C> imp
2078
2144
  */
2079
2145
  setMyCommands(commands: BotCommand[], params?: SetMyCommandsParams): Promise<void>;
2080
2146
  /**
2081
- * Get the bot's commands in the given scope and/or language. Bot-only.
2147
+ * Set the bot's description in the given language. Bot-only.
2082
2148
  *
2083
2149
  * @method bo
2084
- * @returns The current bot's commands in the specified language.
2085
2150
  */
2086
- getMyCommands(params?: GetMyCommandsParams): Promise<BotCommand[]>;
2151
+ setMyDescription(params?: {
2152
+ description?: string;
2153
+ languageCode?: string;
2154
+ }): Promise<void>;
2087
2155
  /**
2088
- * Change reactions made to a message.
2156
+ * Set the bot's name in the given language. Bot-only.
2089
2157
  *
2090
- * @method re
2091
- * @param chatId The identifier of the chat which the message belongs to.
2092
- * @param messageId The identifier of the message to add the reaction to.
2093
- * @param reactions The new reactions.
2158
+ * @method bo
2094
2159
  */
2095
- setReactions(chatId: ID, messageId: number, reactions: Reaction[], params?: SetReactionsParams): Promise<void>;
2160
+ setMyName(params?: {
2161
+ name?: string;
2162
+ languageCode?: string;
2163
+ }): Promise<void>;
2164
+ /**
2165
+ * Set the bot's short description in the given language. Bot-only.
2166
+ *
2167
+ * @method bo
2168
+ */
2169
+ setMyShortDescription(params?: {
2170
+ shortDescription?: string;
2171
+ languageCode?: string;
2172
+ }): Promise<void>;
2096
2173
  /**
2097
2174
  * Make a reaction to a message.
2098
2175
  *
@@ -2102,6 +2179,12 @@ export declare class Client<C extends Context = Context> extends Composer<C> imp
2102
2179
  * @param reaction The reaction to add.
2103
2180
  */
2104
2181
  addReaction(chatId: ID, messageId: number, reaction: Reaction, params?: AddReactionParams): Promise<void>;
2182
+ /**
2183
+ * Clear recent reactions. User-only.
2184
+ *
2185
+ * @method re
2186
+ */
2187
+ clearRecentReactions(): Promise<void>;
2105
2188
  /**
2106
2189
  * Undo a reaction made to a message.
2107
2190
  *
@@ -2129,37 +2212,38 @@ export declare class Client<C extends Context = Context> extends Composer<C> imp
2129
2212
  */
2130
2213
  removeUserReactions(chatId: ID, userId: ID): Promise<void>;
2131
2214
  /**
2132
- * Clear recent reactions. User-only.
2215
+ * Change reactions made to a message.
2133
2216
  *
2134
2217
  * @method re
2218
+ * @param chatId The identifier of the chat which the message belongs to.
2219
+ * @param messageId The identifier of the message to add the reaction to.
2220
+ * @param reactions The new reactions.
2135
2221
  */
2136
- clearRecentReactions(): Promise<void>;
2222
+ setReactions(chatId: ID, messageId: number, reactions: Reaction[], params?: SetReactionsParams): Promise<void>;
2137
2223
  /**
2138
- * Create a story. User-only.
2224
+ * Add multiple stories to highlights. User-only.
2139
2225
  *
2140
2226
  * @method st
2141
- * @param content The content of the story.
2142
- * @returns The created story.
2227
+ * @param chatId The identifier of a chat.
2228
+ * @param storyIds The identifiers of the stories to add to highlights.
2143
2229
  */
2144
- createStory(chatId: ID, content: InputStoryContent, params?: CreateStoryParams): Promise<Story>;
2230
+ addStoriesToHighlights(chatId: ID, storyIds: number[]): Promise<void>;
2145
2231
  /**
2146
- * Retrieve multiple stories. User-only.
2232
+ * Add a single story to highlights. User-only.
2147
2233
  *
2148
2234
  * @method st
2149
2235
  * @param chatId The identifier of a chat.
2150
- * @param storyIds The identifiers of the stories to retrieve.
2151
- * @returns The retrieved stories.
2236
+ * @param storyId The identifier of the story to add to highlights.
2152
2237
  */
2153
- getStories(chatId: ID, storyIds: number[]): Promise<Story[]>;
2238
+ addStoryToHighlights(chatId: ID, storyId: number): Promise<void>;
2154
2239
  /**
2155
- * Retrieve a single story. User-only.
2240
+ * Create a story. User-only.
2156
2241
  *
2157
2242
  * @method st
2158
- * @param chatId The identifier of a chat.
2159
- * @param storyId The identifier of the story to retrieve.
2160
- * @returns The retrieved story.
2243
+ * @param content The content of the story.
2244
+ * @returns The created story.
2161
2245
  */
2162
- getStory(chatId: ID, storyId: number): Promise<Story | null>;
2246
+ createStory(chatId: ID, content: InputStoryContent, params?: CreateStoryParams): Promise<Story>;
2163
2247
  /**
2164
2248
  * Delete multiple stories. User-only.
2165
2249
  *
@@ -2177,21 +2261,23 @@ export declare class Client<C extends Context = Context> extends Composer<C> imp
2177
2261
  */
2178
2262
  deleteStory(chatId: ID, storyId: number): Promise<void>;
2179
2263
  /**
2180
- * Add multiple stories to highlights. User-only.
2264
+ * Retrieve multiple stories. User-only.
2181
2265
  *
2182
2266
  * @method st
2183
2267
  * @param chatId The identifier of a chat.
2184
- * @param storyIds The identifiers of the stories to add to highlights.
2268
+ * @param storyIds The identifiers of the stories to retrieve.
2269
+ * @returns The retrieved stories.
2185
2270
  */
2186
- addStoriesToHighlights(chatId: ID, storyIds: number[]): Promise<void>;
2271
+ getStories(chatId: ID, storyIds: number[]): Promise<Story[]>;
2187
2272
  /**
2188
- * Add a single story to highlights. User-only.
2273
+ * Retrieve a single story. User-only.
2189
2274
  *
2190
2275
  * @method st
2191
2276
  * @param chatId The identifier of a chat.
2192
- * @param storyId The identifier of the story to add to highlights.
2277
+ * @param storyId The identifier of the story to retrieve.
2278
+ * @returns The retrieved story.
2193
2279
  */
2194
- addStoryToHighlights(chatId: ID, storyId: number): Promise<void>;
2280
+ getStory(chatId: ID, storyId: number): Promise<Story | null>;
2195
2281
  /**
2196
2282
  * Remove multiple stories from highlights. User-only.
2197
2283
  *
@@ -2208,14 +2294,6 @@ export declare class Client<C extends Context = Context> extends Composer<C> imp
2208
2294
  * @param storyId The identifier of the story to remove from highlights.
2209
2295
  */
2210
2296
  removeStoryFromHighlights(chatId: ID, storyId: number): Promise<void>;
2211
- /**
2212
- * Report a single story. User-only.
2213
- *
2214
- * @method st
2215
- * @param chatId The identifier of a chat that posted the story.
2216
- * @param storyId The identifier of the story to report.
2217
- */
2218
- reportStory(chatId: ID, storyId: number, params?: ReportStoryParams): Promise<StoryReportResult>;
2219
2297
  /**
2220
2298
  * Report multiple stories. User-only.
2221
2299
  *
@@ -2225,23 +2303,13 @@ export declare class Client<C extends Context = Context> extends Composer<C> imp
2225
2303
  */
2226
2304
  reportStories(chatId: ID, storyIds: number[], params?: ReportStoryParams): Promise<StoryReportResult>;
2227
2305
  /**
2228
- * Create a story album. User-only.
2229
- *
2230
- * @method sa
2231
- * @param chatId The identifier of the chat to create the album in.
2232
- * @param name The name of the album.
2233
- * @param storyIds The initial stories inside the album.
2234
- */
2235
- createStoryAlbum(chatId: ID, name: string, storyIds: number[]): Promise<StoryAlbum>;
2236
- /**
2237
- * Set the name of a story album. User-only.
2306
+ * Report a single story. User-only.
2238
2307
  *
2239
- * @method sa
2240
- * @param chatId The identifier of the chat including the album.
2241
- * @param albumId The identifier of the album to rename.
2242
- * @param name The new name of the album.
2308
+ * @method st
2309
+ * @param chatId The identifier of a chat that posted the story.
2310
+ * @param storyId The identifier of the story to report.
2243
2311
  */
2244
- setStoryAlbumName(chatId: ID, albumId: number, name: string): Promise<StoryAlbum>;
2312
+ reportStory(chatId: ID, storyId: number, params?: ReportStoryParams): Promise<StoryReportResult>;
2245
2313
  /**
2246
2314
  * Add multiple stories to an album. User-only.
2247
2315
  *
@@ -2260,6 +2328,30 @@ export declare class Client<C extends Context = Context> extends Composer<C> imp
2260
2328
  * @param storyId The identifier of the story to add.
2261
2329
  */
2262
2330
  addStoryToAlbum(chatId: ID, albumId: number, storyId: number): Promise<StoryAlbum>;
2331
+ /**
2332
+ * Create a story album. User-only.
2333
+ *
2334
+ * @method sa
2335
+ * @param chatId The identifier of the chat to create the album in.
2336
+ * @param name The name of the album.
2337
+ * @param storyIds The initial stories inside the album.
2338
+ */
2339
+ createStoryAlbum(chatId: ID, name: string, storyIds: number[]): Promise<StoryAlbum>;
2340
+ /**
2341
+ * Get stories inside an album. User-only.
2342
+ *
2343
+ * @method sa
2344
+ * @param chatId The identifier of the chat including albums.
2345
+ * @param albumId The identifier of an album.
2346
+ */
2347
+ getStoriesInAlbum(chatId: ID, albumId: number): Promise<AlbumStoryList>;
2348
+ /**
2349
+ * Get story albums in a chat. User-only.
2350
+ *
2351
+ * @method sa
2352
+ * @param chatId The identifier of a chat including albums.
2353
+ */
2354
+ getStoryAlbums(chatId: ID): Promise<StoryAlbum[]>;
2263
2355
  /**
2264
2356
  * Remove multiple stories from an album. User-only.
2265
2357
  *
@@ -2288,20 +2380,14 @@ export declare class Client<C extends Context = Context> extends Composer<C> imp
2288
2380
  */
2289
2381
  reorderStoriesInAlbum(chatId: ID, albumId: number, storyIds: number[]): Promise<StoryAlbum>;
2290
2382
  /**
2291
- * Get story albums in a chat. User-only.
2292
- *
2293
- * @method sa
2294
- * @param chatId The identifier of a chat including albums.
2295
- */
2296
- getStoryAlbums(chatId: ID): Promise<StoryAlbum[]>;
2297
- /**
2298
- * Get stories inside an album. User-only.
2383
+ * Set the name of a story album. User-only.
2299
2384
  *
2300
2385
  * @method sa
2301
- * @param chatId The identifier of the chat including albums.
2302
- * @param albumId The identifier of an album.
2386
+ * @param chatId The identifier of the chat including the album.
2387
+ * @param albumId The identifier of the album to rename.
2388
+ * @param name The new name of the album.
2303
2389
  */
2304
- getStoriesInAlbum(chatId: ID, albumId: number): Promise<AlbumStoryList>;
2390
+ setStoryAlbumName(chatId: ID, albumId: number, name: string): Promise<StoryAlbum>;
2305
2391
  /**
2306
2392
  * Get network statistics. This might not always be available.
2307
2393
  *
@@ -2309,70 +2395,70 @@ export declare class Client<C extends Context = Context> extends Composer<C> imp
2309
2395
  */
2310
2396
  getNetworkStatistics(): Promise<NetworkStatistics>;
2311
2397
  /**
2312
- * Start a video chat. User-only.
2398
+ * Download a live stream segment. User-only.
2313
2399
  *
2314
2400
  * @method vc
2315
- * @param chatId The identifier of a chat to start the video chat in.
2316
- * @returns The started video chat.
2401
+ * @param id The identifier of a video chat retrieved from getChat, startVideoChat, or scheduleVideoChat.
2402
+ * @param channelId Stream channel ID.
2403
+ * @param scale Stream channel scale.
2404
+ * @param timestamp Millisecond timestamp of the chunk to download.
2317
2405
  */
2318
- startVideoChat(chatId: ID, params?: StartVideoChatParams): Promise<VideoChatActive>;
2406
+ downloadLiveStreamSegment(id: string, channelId: number, scale: number, timestamp: number, params?: DownloadLiveStreamSegmentParams): Promise<Uint8Array>;
2319
2407
  /**
2320
- * Schedule a video chat. User-only.
2408
+ * Get live stream channels. User-only.
2321
2409
  *
2322
2410
  * @method vc
2323
- * @param chatId The identifier of a chat to schedule the video chat in.
2324
- * @param startAt A point in time in the future when the video chat will be started.
2325
- * @returns The scheduled video chat.
2411
+ * @param id The identifier of a video chat retrieved from getChat, startVideoChat, or scheduleVideoChat.
2326
2412
  */
2327
- scheduleVideoChat(chatId: ID, startAt: number, params?: ScheduleVideoChatParams): Promise<VideoChatScheduled>;
2413
+ getLiveStreamChannels(id: string): Promise<LiveStreamChannel[]>;
2328
2414
  /**
2329
- * Join a video chat. User-only.
2415
+ * Get a video chat. User-only.
2330
2416
  *
2331
2417
  * @method vc
2332
2418
  * @param id The identifier of a video chat retrieved from getChat, startVideoChat, or scheduleVideoChat.
2333
- * @param params_ WebRTC connection parameters.
2334
- * @returns Parameters to be passed to the used WebRTC library.
2419
+ * @cache
2335
2420
  */
2336
- joinVideoChat(id: string, params_: string, params?: JoinVideoChatParams): Promise<string>;
2421
+ getVideoChat(id: string): Promise<VideoChat>;
2337
2422
  /**
2338
- * Leave a video chat. User-only.
2423
+ * Join a live stream. User-only.
2339
2424
  *
2340
2425
  * @method vc
2341
2426
  * @param id The identifier of a video chat retrieved from getChat, startVideoChat, or scheduleVideoChat.
2342
2427
  */
2343
- leaveVideoChat(id: string): Promise<void>;
2428
+ joinLiveStream(id: string): Promise<void>;
2344
2429
  /**
2345
- * Join a live stream. User-only.
2430
+ * Join a video chat. User-only.
2346
2431
  *
2347
2432
  * @method vc
2348
2433
  * @param id The identifier of a video chat retrieved from getChat, startVideoChat, or scheduleVideoChat.
2434
+ * @param params_ WebRTC connection parameters.
2435
+ * @returns Parameters to be passed to the used WebRTC library.
2349
2436
  */
2350
- joinLiveStream(id: string): Promise<void>;
2437
+ joinVideoChat(id: string, params_: string, params?: JoinVideoChatParams): Promise<string>;
2351
2438
  /**
2352
- * Get a video chat. User-only.
2439
+ * Leave a video chat. User-only.
2353
2440
  *
2354
2441
  * @method vc
2355
2442
  * @param id The identifier of a video chat retrieved from getChat, startVideoChat, or scheduleVideoChat.
2356
- * @cache
2357
2443
  */
2358
- getVideoChat(id: string): Promise<VideoChat>;
2444
+ leaveVideoChat(id: string): Promise<void>;
2359
2445
  /**
2360
- * Get live stream channels. User-only.
2446
+ * Schedule a video chat. User-only.
2361
2447
  *
2362
2448
  * @method vc
2363
- * @param id The identifier of a video chat retrieved from getChat, startVideoChat, or scheduleVideoChat.
2449
+ * @param chatId The identifier of a chat to schedule the video chat in.
2450
+ * @param startAt A point in time in the future when the video chat will be started.
2451
+ * @returns The scheduled video chat.
2364
2452
  */
2365
- getLiveStreamChannels(id: string): Promise<LiveStreamChannel[]>;
2453
+ scheduleVideoChat(chatId: ID, startAt: number, params?: ScheduleVideoChatParams): Promise<VideoChatScheduled>;
2366
2454
  /**
2367
- * Download a live stream segment. User-only.
2455
+ * Start a video chat. User-only.
2368
2456
  *
2369
2457
  * @method vc
2370
- * @param id The identifier of a video chat retrieved from getChat, startVideoChat, or scheduleVideoChat.
2371
- * @param channelId Stream channel ID.
2372
- * @param scale Stream channel scale.
2373
- * @param timestamp Millisecond timestamp of the chunk to download.
2458
+ * @param chatId The identifier of a chat to start the video chat in.
2459
+ * @returns The started video chat.
2374
2460
  */
2375
- downloadLiveStreamSegment(id: string, channelId: number, scale: number, timestamp: number, params?: DownloadLiveStreamSegmentParams): Promise<Uint8Array>;
2461
+ startVideoChat(chatId: ID, params?: StartVideoChatParams): Promise<VideoChatActive>;
2376
2462
  /**
2377
2463
  * Answer a pre-checkout query. Bot-only.
2378
2464
  *
@@ -2382,20 +2468,19 @@ export declare class Client<C extends Context = Context> extends Composer<C> imp
2382
2468
  */
2383
2469
  answerPreCheckoutQuery(preCheckoutQueryId: string, ok: boolean, params?: AnswerPreCheckoutQueryParams): Promise<void>;
2384
2470
  /**
2385
- * Refund a star payment. Bot-only.
2471
+ * Get the star balance of a chat.
2386
2472
  *
2387
2473
  * @method pa
2388
- * @param userId The identifier of the user that was charged.
2389
- * @param telegramPaymentChargeId The identifier of the charge.
2474
+ * @param chatId The identifier of the chat to get the star balance for.
2390
2475
  */
2391
- refundStarPayment(userId: ID, telegramPaymentChargeId: string): Promise<void>;
2476
+ getStarBalance(chatId: ID): Promise<StarAmount>;
2392
2477
  /**
2393
- * Get the star balance of a chat.
2478
+ * Get star transactions.
2394
2479
  *
2395
2480
  * @method pa
2396
- * @param chatId The identifier of the chat to get the star balance for.
2481
+ * @param chatId The identifier of the chat to get star transactions for.
2397
2482
  */
2398
- getStarBalance(chatId: ID): Promise<StarAmount>;
2483
+ getStarTransactions(chatId: ID, params?: GetStarTransactionsParams): Promise<StarTransactionList>;
2399
2484
  /**
2400
2485
  * Get the TON balance of a chat.
2401
2486
  *
@@ -2404,40 +2489,41 @@ export declare class Client<C extends Context = Context> extends Composer<C> imp
2404
2489
  */
2405
2490
  getTonBalance(chatId: ID): Promise<number>;
2406
2491
  /**
2407
- * Get star transactions.
2492
+ * Refund a star payment. Bot-only.
2408
2493
  *
2409
2494
  * @method pa
2410
- * @param chatId The identifier of the chat to get star transactions for.
2495
+ * @param userId The identifier of the user that was charged.
2496
+ * @param telegramPaymentChargeId The identifier of the charge.
2411
2497
  */
2412
- getStarTransactions(chatId: ID, params?: GetStarTransactionsParams): Promise<StarTransactionList>;
2498
+ refundStarPayment(userId: ID, telegramPaymentChargeId: string): Promise<void>;
2413
2499
  /**
2414
- * Get contacts. User-only.
2500
+ * Add a contact. User-only.
2415
2501
  *
2416
2502
  * @method co
2503
+ * @param userId The identifier of the user to add as contact.
2504
+ * @param firstName The contact's first name.
2417
2505
  */
2418
- getContacts(): Promise<User[]>;
2506
+ addContact(userId: ID, firstName: string, params?: AddContactParams): Promise<void>;
2419
2507
  /**
2420
- * Delete multiple contacts. User-only.
2508
+ * Delete a single contact. User-only.
2421
2509
  *
2422
2510
  * @method co
2423
- * @param userIds The identifiers of contacts to delete.
2511
+ * @param userId The identifier of the contact to delete.
2424
2512
  */
2425
- deleteContacts(userIds: ID[]): Promise<void>;
2513
+ deleteContact(userId: ID): Promise<void>;
2426
2514
  /**
2427
- * Delete a single contact. User-only.
2515
+ * Delete multiple contacts. User-only.
2428
2516
  *
2429
2517
  * @method co
2430
- * @param userId The identifier of the contact to delete.
2518
+ * @param userIds The identifiers of contacts to delete.
2431
2519
  */
2432
- deleteContact(userId: ID): Promise<void>;
2520
+ deleteContacts(userIds: ID[]): Promise<void>;
2433
2521
  /**
2434
- * Add a contact. User-only.
2522
+ * Get contacts. User-only.
2435
2523
  *
2436
2524
  * @method co
2437
- * @param userId The identifier of the user to add as contact.
2438
- * @param firstName The contact's first name.
2439
2525
  */
2440
- addContact(userId: ID, firstName: string, params?: AddContactParams): Promise<void>;
2526
+ getContacts(): Promise<User[]>;
2441
2527
  /**
2442
2528
  * Set a contact note.
2443
2529
  *
@@ -2453,11 +2539,12 @@ export declare class Client<C extends Context = Context> extends Composer<C> imp
2453
2539
  */
2454
2540
  getTranslations(params?: GetTranslationsParams): Promise<Translation[]>;
2455
2541
  /**
2456
- * Get available gifts.
2542
+ * Craft gifts.
2457
2543
  *
2458
2544
  * @method gf
2545
+ * @param gifts The gifts to craft.
2459
2546
  */
2460
- getGifts(): Promise<Gift[]>;
2547
+ craftGifts(gifts: InputGift[]): Promise<void>;
2461
2548
  /**
2462
2549
  * Get gifts claimed by a user or a channel. User-only.
2463
2550
  *
@@ -2466,57 +2553,58 @@ export declare class Client<C extends Context = Context> extends Composer<C> imp
2466
2553
  */
2467
2554
  getClaimedGifts(chatId: ID, params?: GetClaimedGiftsParams): Promise<ClaimedGifts>;
2468
2555
  /**
2469
- * Send a gift.
2556
+ * Get a gift using its slug.
2470
2557
  *
2471
2558
  * @method gf
2472
- * @param chatId The identifier of a user or a channel to send the gift to.
2473
- * @param giftId The identifier of the gift to send.
2559
+ * @param slug The slug of a gift.
2474
2560
  */
2475
- sendGift(chatId: ID, giftId: string, params?: SendGiftParams): Promise<void>;
2561
+ getGift(slug: string): Promise<Gift>;
2476
2562
  /**
2477
- * Sell a gift.
2563
+ * Get available gifts.
2478
2564
  *
2479
2565
  * @method gf
2480
- * @param gift The gift to sell.
2481
2566
  */
2482
- sellGift(gift: InputGift): Promise<void>;
2567
+ getGifts(): Promise<Gift[]>;
2483
2568
  /**
2484
- * Craft gifts.
2569
+ * Gift a Telegram Premium subscription. Bot-only.
2485
2570
  *
2486
2571
  * @method gf
2487
- * @param gifts The gifts to craft.
2572
+ * @param userId The identifier of a user to gift the Telegram Premium subscription to.
2573
+ * @param duration The duration of the subscription.
2488
2574
  */
2489
- craftGifts(gifts: InputGift[]): Promise<void>;
2575
+ giftPremiumSubscription(userId: ID, duration: PremiumSubscriptionDuration, params?: GiftPremiumSubscriptionParams): Promise<void>;
2490
2576
  /**
2491
- * Get a gift using its slug.
2577
+ * Sell a gift.
2492
2578
  *
2493
2579
  * @method gf
2494
- * @param slug The slug of a gift.
2580
+ * @param gift The gift to sell.
2495
2581
  */
2496
- getGift(slug: string): Promise<Gift>;
2582
+ sellGift(gift: InputGift): Promise<void>;
2497
2583
  /**
2498
- * Transfer a gift. User-only.
2584
+ * Send a gift.
2499
2585
  *
2500
2586
  * @method gf
2501
- * @param chatId The identifier of a chat to transfer the gift to.
2502
- * @param gift The gift to transfer.
2587
+ * @param chatId The identifier of a user or a channel to send the gift to.
2588
+ * @param giftId The identifier of the gift to send.
2503
2589
  */
2504
- transferGift(chatId: ID, gift: InputGift): Promise<void>;
2590
+ sendGift(chatId: ID, giftId: string, params?: SendGiftParams): Promise<void>;
2505
2591
  /**
2506
- * Gift a Telegram Premium subscription. Bot-only.
2592
+ * Transfer a gift. User-only.
2507
2593
  *
2508
2594
  * @method gf
2509
- * @param userId The identifier of a user to gift the Telegram Premium subscription to.
2510
- * @param duration The duration of the subscription.
2595
+ * @param chatId The identifier of a chat to transfer the gift to.
2596
+ * @param gift The gift to transfer.
2511
2597
  */
2512
- giftPremiumSubscription(userId: ID, duration: PremiumSubscriptionDuration, params?: GiftPremiumSubscriptionParams): Promise<void>;
2598
+ transferGift(chatId: ID, gift: InputGift): Promise<void>;
2513
2599
  /**
2514
- * Get gift collections of a chat. User-only.
2600
+ * Add gifts to a gift collection. User-only.
2515
2601
  *
2516
2602
  * @method gc
2517
- * @param chatId The identifier of a chat to get gift collections for.
2603
+ * @param chatId The identifier of the chat that includes the gift collection.
2604
+ * @param collectionId The identifier of a gift collection.
2605
+ * @param gifts The gifts to add to the collection.
2518
2606
  */
2519
- getGiftCollections(chatId: ID): Promise<GiftCollection[]>;
2607
+ addGiftsToCollection(chatId: ID, collectionId: number, gifts: InputGift[]): Promise<GiftCollection>;
2520
2608
  /**
2521
2609
  * Create a gift collection. User-only.
2522
2610
  *
@@ -2527,23 +2615,20 @@ export declare class Client<C extends Context = Context> extends Composer<C> imp
2527
2615
  */
2528
2616
  createGiftCollection(chatId: ID, name: string, gifts: InputGift[]): Promise<GiftCollection>;
2529
2617
  /**
2530
- * Set the name of a gift collection. User-only.
2618
+ * Delete a gift collection. User-only.
2531
2619
  *
2532
2620
  * @method gc
2533
2621
  * @param chatId The identifier of the chat that includes the gift collection.
2534
2622
  * @param collectionId The identifier of a gift collection.
2535
- * @param name The gift collection's new name.
2536
2623
  */
2537
- setGiftCollectionName(chatId: ID, collectionId: number, name: string): Promise<GiftCollection>;
2624
+ deleteGiftCollection(chatId: ID, collectionId: number): Promise<void>;
2538
2625
  /**
2539
- * Add gifts to a gift collection. User-only.
2626
+ * Get gift collections of a chat. User-only.
2540
2627
  *
2541
2628
  * @method gc
2542
- * @param chatId The identifier of the chat that includes the gift collection.
2543
- * @param collectionId The identifier of a gift collection.
2544
- * @param gifts The gifts to add to the collection.
2629
+ * @param chatId The identifier of a chat to get gift collections for.
2545
2630
  */
2546
- addGiftsToCollection(chatId: ID, collectionId: number, gifts: InputGift[]): Promise<GiftCollection>;
2631
+ getGiftCollections(chatId: ID): Promise<GiftCollection[]>;
2547
2632
  /**
2548
2633
  * Remove gifts from a gift collection. User-only.
2549
2634
  *
@@ -2563,20 +2648,14 @@ export declare class Client<C extends Context = Context> extends Composer<C> imp
2563
2648
  */
2564
2649
  reorderGiftsInCollection(chatId: ID, collectionId: number, gifts: InputGift[]): Promise<GiftCollection>;
2565
2650
  /**
2566
- * Delete a gift collection. User-only.
2651
+ * Set the name of a gift collection. User-only.
2567
2652
  *
2568
2653
  * @method gc
2569
2654
  * @param chatId The identifier of the chat that includes the gift collection.
2570
2655
  * @param collectionId The identifier of a gift collection.
2656
+ * @param name The gift collection's new name.
2571
2657
  */
2572
- deleteGiftCollection(chatId: ID, collectionId: number): Promise<void>;
2573
- /**
2574
- * Start a takeout session. User-only.
2575
- *
2576
- * @method to
2577
- * @returns The identifier of the takeout session.
2578
- */
2579
- startTakeoutSession(params?: StartTakeoutSessionParams): Promise<string>;
2658
+ setGiftCollectionName(chatId: ID, collectionId: number, name: string): Promise<GiftCollection>;
2580
2659
  /**
2581
2660
  * End a takeout session. User-only.
2582
2661
  *
@@ -2592,19 +2671,28 @@ export declare class Client<C extends Context = Context> extends Composer<C> imp
2592
2671
  */
2593
2672
  getLeftChannels(takeoutId: string, params?: GetLeftChannelsParams): Promise<LeftChannelList>;
2594
2673
  /**
2595
- * Get a sticker set.
2674
+ * Start a takeout session. User-only.
2675
+ *
2676
+ * @method to
2677
+ * @returns The identifier of the takeout session.
2678
+ */
2679
+ startTakeoutSession(params?: StartTakeoutSessionParams): Promise<string>;
2680
+ /**
2681
+ * Add a sticker to a sticker set.
2596
2682
  *
2597
2683
  * @method ss
2598
2684
  * @param slug The slug of the sticker set or its link.
2685
+ * @param sticker The sticker to add.
2599
2686
  */
2600
- getStickerSet(slug: string): Promise<StickerSet>;
2687
+ addStickerToStickerSet(slug: string, sticker: InputSticker, params?: AddStickerToStickerSetParams): Promise<void>;
2601
2688
  /**
2602
- * Get a dice sticker set.
2689
+ * Change the position of a sticker in its set.
2603
2690
  *
2604
2691
  * @method ss
2605
- * @param emoji The emoji of the dice.
2692
+ * @param fileId The identifier of the sticker.
2693
+ * @param position The new position of the sticker.
2606
2694
  */
2607
- getDiceStickerSet(emoji: string): Promise<StickerSet>;
2695
+ changeStickerPositionInStickerSet(fileId: string, position: number): Promise<void>;
2608
2696
  /**
2609
2697
  * Check the availability of a sticker set slug.
2610
2698
  *
@@ -2613,14 +2701,6 @@ export declare class Client<C extends Context = Context> extends Composer<C> imp
2613
2701
  * @returns Whether the slug is available.
2614
2702
  */
2615
2703
  checkStickerSetSlug(slug: string): Promise<boolean>;
2616
- /**
2617
- * Suggest a sticker set slug from its title.
2618
- *
2619
- * @method ss
2620
- * @param title A title of a sticker set.
2621
- * @returns The suggested slug.
2622
- */
2623
- suggestStickerSetSlug(title: string): Promise<string>;
2624
2704
  /**
2625
2705
  * Create a sticker set.
2626
2706
  *
@@ -2631,13 +2711,26 @@ export declare class Client<C extends Context = Context> extends Composer<C> imp
2631
2711
  */
2632
2712
  createStickerSet(name: string, slug: string, stickers: InputSticker[], params?: CreateStickerSetParams): Promise<StickerSet>;
2633
2713
  /**
2634
- * Add a sticker to a sticker set.
2714
+ * Delete a sticker set.
2635
2715
  *
2636
2716
  * @method ss
2637
2717
  * @param slug The slug of the sticker set or its link.
2638
- * @param sticker The sticker to add.
2639
2718
  */
2640
- addStickerToStickerSet(slug: string, sticker: InputSticker, params?: AddStickerToStickerSetParams): Promise<void>;
2719
+ deleteStickerSet(slug: string): Promise<void>;
2720
+ /**
2721
+ * Get a dice sticker set.
2722
+ *
2723
+ * @method ss
2724
+ * @param emoji The emoji of the dice.
2725
+ */
2726
+ getDiceStickerSet(emoji: string): Promise<StickerSet>;
2727
+ /**
2728
+ * Get a sticker set.
2729
+ *
2730
+ * @method ss
2731
+ * @param slug The slug of the sticker set or its link.
2732
+ */
2733
+ getStickerSet(slug: string): Promise<StickerSet>;
2641
2734
  /**
2642
2735
  * Remove a sticker from its set.
2643
2736
  *
@@ -2662,44 +2755,44 @@ export declare class Client<C extends Context = Context> extends Composer<C> imp
2662
2755
  */
2663
2756
  replaceStickerInStickerSet(currentStickerFileId: string, newSticker: InputSticker, params?: ReplaceStickerInStickerSetParams): Promise<void>;
2664
2757
  /**
2665
- * Delete a sticker set.
2758
+ * Set a custom emoji as a sticker set's thumbnail.
2666
2759
  *
2667
2760
  * @method ss
2668
2761
  * @param slug The slug of the sticker set or its link.
2762
+ * @param customEmojiId The identifier of the custom emoji to use as thumbnail.
2669
2763
  */
2670
- deleteStickerSet(slug: string): Promise<void>;
2764
+ setCustomEmojiAsStickerSetThumbnail(slug: string, customEmojiId: string): Promise<void>;
2671
2765
  /**
2672
- * Set the title of a sticker set.
2766
+ * Set a sticker set's thumbnail.
2673
2767
  *
2674
2768
  * @method ss
2675
2769
  * @param slug The slug of the sticker set or its link.
2676
- * @param title The sticker set's new title.
2770
+ * @param thumbnail The new thumbnail of the sticker set.
2677
2771
  */
2678
- setStickerSetTitle(slug: string, title: string): Promise<void>;
2772
+ setStickerSetThumbnail(slug: string, thumbnail: FileSource): Promise<void>;
2679
2773
  /**
2680
- * Change the position of a sticker in its set.
2774
+ * Set the title of a sticker set.
2681
2775
  *
2682
2776
  * @method ss
2683
- * @param fileId The identifier of the sticker.
2684
- * @param position The new position of the sticker.
2777
+ * @param slug The slug of the sticker set or its link.
2778
+ * @param title The sticker set's new title.
2685
2779
  */
2686
- changeStickerPositionInStickerSet(fileId: string, position: number): Promise<void>;
2780
+ setStickerSetTitle(slug: string, title: string): Promise<void>;
2687
2781
  /**
2688
- * Set a sticker set's thumbnail.
2782
+ * Suggest a sticker set slug from its title.
2689
2783
  *
2690
2784
  * @method ss
2691
- * @param slug The slug of the sticker set or its link.
2692
- * @param thumbnail The new thumbnail of the sticker set.
2785
+ * @param title A title of a sticker set.
2786
+ * @returns The suggested slug.
2693
2787
  */
2694
- setStickerSetThumbnail(slug: string, thumbnail: FileSource): Promise<void>;
2788
+ suggestStickerSetSlug(title: string): Promise<string>;
2695
2789
  /**
2696
- * Set a custom emoji as a sticker set's thumbnail.
2790
+ * Set the access settings of a managed bot. Bot-only.
2697
2791
  *
2698
- * @method ss
2699
- * @param slug The slug of the sticker set or its link.
2700
- * @param customEmojiId The identifier of the custom emoji to use as thumbnail.
2792
+ * @method mb
2793
+ * @param userId The identifier of the bot user.
2701
2794
  */
2702
- setCustomEmojiAsStickerSetThumbnail(slug: string, customEmojiId: string): Promise<void>;
2795
+ getManagedBotAccessSettings(userId: ID): Promise<BotAccessSettings>;
2703
2796
  /**
2704
2797
  * Get the token of a managed bot. Bot-only.
2705
2798
  *
@@ -2724,13 +2817,6 @@ export declare class Client<C extends Context = Context> extends Composer<C> imp
2724
2817
  * @param isAccessRestricted Whether access is restricted to specific users.
2725
2818
  */
2726
2819
  setManagedBotAccessSettings(userId: ID, isAccessRestricted: boolean, params?: SetManagedBotAccessSettingsParams): Promise<void>;
2727
- /**
2728
- * Set the access settings of a managed bot. Bot-only.
2729
- *
2730
- * @method mb
2731
- * @param userId The identifier of the bot user.
2732
- */
2733
- getManagedBotAccessSettings(userId: ID): Promise<BotAccessSettings>;
2734
2820
  /**
2735
2821
  * Answer a guest query. Bot-only.
2736
2822
  *
@@ -2739,13 +2825,6 @@ export declare class Client<C extends Context = Context> extends Composer<C> imp
2739
2825
  * @returns The identifier of the sent message.
2740
2826
  */
2741
2827
  answerGuestQuery(id: string, result: InlineQueryResult): Promise<string>;
2742
- /**
2743
- * Request a secret chat. User-only.
2744
- *
2745
- * @method sc
2746
- * @param chatId The identifier of a chat.
2747
- */
2748
- requestSecretChat(chatId: ID): Promise<SecretChat>;
2749
2828
  /**
2750
2829
  * Accept a secret chat. User-only.
2751
2830
  *
@@ -2761,33 +2840,36 @@ export declare class Client<C extends Context = Context> extends Composer<C> imp
2761
2840
  */
2762
2841
  endSecretChat(id: number, params?: EndSecretChatParams): Promise<SecretChat>;
2763
2842
  /**
2764
- * Send a message to a secret chat. User-only.
2843
+ * Request a secret chat. User-only.
2844
+ *
2845
+ * @method sc
2846
+ * @param chatId The identifier of a chat.
2847
+ */
2848
+ requestSecretChat(chatId: ID): Promise<SecretChat>;
2849
+ /**
2850
+ * Send an animation to a secret chat. User-only.
2765
2851
  *
2766
2852
  * @method sc
2767
2853
  * @param id The identifier of the secret chat.
2768
- * @param text The message's text.
2854
+ * @param animation The animation to send.
2769
2855
  */
2770
- sendSecretMessage(id: number, text: string, params?: SendSecretMessageParams): Promise<void>;
2856
+ sendSecretAnimation(id: number, animation: FileSource, params?: SendSecretAnimationParams): Promise<void>;
2771
2857
  /**
2772
- * Send a location to a secret chat. User-only.
2858
+ * Send an audio file to a secret chat. User-only.
2773
2859
  *
2774
2860
  * @method sc
2775
2861
  * @param id The identifier of the secret chat.
2776
- * @param latitude The location's latitude.
2777
- * @param longitude The location's longitude.
2862
+ * @param audio The audio file to send.
2778
2863
  */
2779
- sendSecretLocation(id: number, latitude: number, longitude: number, params?: SendSecretLocationParams): Promise<void>;
2864
+ sendSecretAudio(id: number, audio: FileSource, params?: SendSecretAudioParams): Promise<void>;
2780
2865
  /**
2781
- * Send a venue to a secret chat. User-only.
2866
+ * Send a secret chat action. User-only.
2782
2867
  *
2783
2868
  * @method sc
2784
2869
  * @param id The identifier of the secret chat.
2785
- * @param latitude The latitude of the venue.
2786
- * @param longitude The longitude of the venue.
2787
- * @param title The title of the venue.
2788
- * @param address The written address of the venue.
2870
+ * @param action The type of action to send.
2789
2871
  */
2790
- sendSecretVenue(id: number, latitude: number, longitude: number, title: string, address: string, params?: SendSecretVenueParams): Promise<void>;
2872
+ sendSecretChatAction(id: number, action: SecretChatActionType): Promise<void>;
2791
2873
  /**
2792
2874
  * Send a contact to a secret chat. User-only.
2793
2875
  *
@@ -2805,6 +2887,23 @@ export declare class Client<C extends Context = Context> extends Composer<C> imp
2805
2887
  * @param document The document to send.
2806
2888
  */
2807
2889
  sendSecretDocument(id: number, document: FileSource, params?: SendSecretDocumentParams): Promise<void>;
2890
+ /**
2891
+ * Send a location to a secret chat. User-only.
2892
+ *
2893
+ * @method sc
2894
+ * @param id The identifier of the secret chat.
2895
+ * @param latitude The location's latitude.
2896
+ * @param longitude The location's longitude.
2897
+ */
2898
+ sendSecretLocation(id: number, latitude: number, longitude: number, params?: SendSecretLocationParams): Promise<void>;
2899
+ /**
2900
+ * Send a message to a secret chat. User-only.
2901
+ *
2902
+ * @method sc
2903
+ * @param id The identifier of the secret chat.
2904
+ * @param text The message's text.
2905
+ */
2906
+ sendSecretMessage(id: number, text: string, params?: SendSecretMessageParams): Promise<void>;
2808
2907
  /**
2809
2908
  * Send a photo to a secret chat. User-only.
2810
2909
  *
@@ -2814,52 +2913,55 @@ export declare class Client<C extends Context = Context> extends Composer<C> imp
2814
2913
  */
2815
2914
  sendSecretPhoto(id: number, photo: FileSource, params?: SendSecretPhotoParams): Promise<void>;
2816
2915
  /**
2817
- * Send a video to a secret chat. User-only.
2916
+ * Send a secret chat screenshot notification. User-only.
2818
2917
  *
2819
2918
  * @method sc
2820
2919
  * @param id The identifier of the secret chat.
2821
- * @param video The video to send.
2920
+ * @param messageIds Identifiers of messages.
2822
2921
  */
2823
- sendSecretVideo(id: number, video: FileSource, params?: SendSecretVideoParams): Promise<void>;
2922
+ sendSecretScreenshotNotification(id: number, messageIds: string[]): Promise<void>;
2824
2923
  /**
2825
- * Send a video note to a secret chat. User-only.
2924
+ * Send a sticker to a secret chat. User-only.
2826
2925
  *
2827
2926
  * @method sc
2828
2927
  * @param id The identifier of the secret chat.
2829
- * @param videoNote The video note to send.
2928
+ * @param sticker The sticker to send.
2830
2929
  */
2831
- sendSecretVideoNote(id: number, videoNote: FileSource, params?: SendSecretVideoNoteParams): Promise<void>;
2930
+ sendSecretSticker(id: number, sticker: Sticker, params?: SendSecretStickerParams): Promise<void>;
2832
2931
  /**
2833
- * Send an animation to a secret chat. User-only.
2932
+ * Send a venue to a secret chat. User-only.
2834
2933
  *
2835
2934
  * @method sc
2836
2935
  * @param id The identifier of the secret chat.
2837
- * @param animation The animation to send.
2936
+ * @param latitude The latitude of the venue.
2937
+ * @param longitude The longitude of the venue.
2938
+ * @param title The title of the venue.
2939
+ * @param address The written address of the venue.
2838
2940
  */
2839
- sendSecretAnimation(id: number, animation: FileSource, params?: SendSecretAnimationParams): Promise<void>;
2941
+ sendSecretVenue(id: number, latitude: number, longitude: number, title: string, address: string, params?: SendSecretVenueParams): Promise<void>;
2840
2942
  /**
2841
- * Send an audio file to a secret chat. User-only.
2943
+ * Send a video to a secret chat. User-only.
2842
2944
  *
2843
2945
  * @method sc
2844
2946
  * @param id The identifier of the secret chat.
2845
- * @param audio The audio file to send.
2947
+ * @param video The video to send.
2846
2948
  */
2847
- sendSecretAudio(id: number, audio: FileSource, params?: SendSecretAudioParams): Promise<void>;
2949
+ sendSecretVideo(id: number, video: FileSource, params?: SendSecretVideoParams): Promise<void>;
2848
2950
  /**
2849
- * Send a voice message to a secret chat. User-only.
2951
+ * Send a video note to a secret chat. User-only.
2850
2952
  *
2851
2953
  * @method sc
2852
2954
  * @param id The identifier of the secret chat.
2853
- * @param voice The voice message to send.
2955
+ * @param videoNote The video note to send.
2854
2956
  */
2855
- sendSecretVoice(id: number, voice: FileSource, params?: SendSecretVoiceParams): Promise<void>;
2957
+ sendSecretVideoNote(id: number, videoNote: FileSource, params?: SendSecretVideoNoteParams): Promise<void>;
2856
2958
  /**
2857
- * Send a sticker to a secret chat. User-only.
2959
+ * Send a voice message to a secret chat. User-only.
2858
2960
  *
2859
2961
  * @method sc
2860
2962
  * @param id The identifier of the secret chat.
2861
- * @param sticker The sticker to send.
2963
+ * @param voice The voice message to send.
2862
2964
  */
2863
- sendSecretSticker(id: number, sticker: Sticker, params?: SendSecretStickerParams): Promise<void>;
2965
+ sendSecretVoice(id: number, voice: FileSource, params?: SendSecretVoiceParams): Promise<void>;
2864
2966
  }
2865
2967
  //# sourceMappingURL=6_client.d.ts.map