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