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