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