@mtkruto/node 0.190.0 → 0.192.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 +6 -2
- package/esm/3_types.d.ts.map +1 -1
- package/esm/3_types.js +6 -2
- package/esm/client/0_params.d.ts +10 -0
- package/esm/client/0_params.d.ts.map +1 -1
- package/esm/client/1_client_generic.d.ts +1168 -1075
- 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 +4 -1
- package/esm/client/3_secret_chat_manager.d.ts.map +1 -1
- package/esm/client/3_secret_chat_manager.js +31 -0
- package/esm/client/4_context.d.ts +12 -2
- package/esm/client/4_context.d.ts.map +1 -1
- package/esm/client/4_context.js +25 -0
- package/esm/client/4_forum_manager.d.ts +4 -1
- package/esm/client/4_forum_manager.d.ts.map +1 -1
- package/esm/client/4_forum_manager.js +33 -1
- package/esm/client/6_client.d.ts +1166 -1075
- package/esm/client/6_client.d.ts.map +1 -1
- package/esm/client/6_client.js +1528 -1413
- package/esm/client/6_client_dispatcher.d.ts +1168 -1075
- package/esm/client/6_client_dispatcher.d.ts.map +1 -1
- package/esm/client/6_client_dispatcher.js +1502 -1391
- package/esm/types/0_report_reason.d.ts +1 -0
- package/esm/types/0_report_reason.d.ts.map +1 -1
- 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/0_story_report_option.d.ts +3 -0
- package/esm/types/0_story_report_option.d.ts.map +1 -1
- 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_story_report_result.d.ts +17 -3
- package/esm/types/1_story_report_result.d.ts.map +1 -1
- package/esm/types/2_secret_message.d.ts +1 -0
- package/esm/types/2_secret_message.d.ts.map +1 -1
- package/esm/types/3_bot_access_settings.d.ts +3 -0
- package/esm/types/3_bot_access_settings.d.ts.map +1 -1
- package/esm/types/3_connected_website.d.ts +45 -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 +2 -1
- package/esm/types/3_poll_voter_list.d.ts.map +1 -1
- package/esm/types/3_text_to_translate.d.ts +3 -0
- package/esm/types/3_text_to_translate.d.ts.map +1 -1
- package/esm/types/3_translated_text.d.ts +3 -0
- package/esm/types/3_translated_text.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/A_topic.d.ts +20 -3
- package/esm/types/A_topic.d.ts.map +1 -1
- package/esm/types/A_topic.js +37 -0
- package/esm/types/B_topic_list_item.d.ts +7 -0
- package/esm/types/B_topic_list_item.d.ts.map +1 -0
- package/esm/types/B_topic_list_item.js +1 -0
- package/esm/types/B_update.d.ts +16 -1
- package/esm/types/B_update.d.ts.map +1 -1
- package/esm/types/C_topic_list.d.ts +14 -0
- package/esm/types/C_topic_list.d.ts.map +1 -0
- package/esm/types/C_topic_list.js +9 -0
- package/package.json +1 -1
- package/script/3_types.d.ts +6 -2
- package/script/3_types.d.ts.map +1 -1
- package/script/3_types.js +6 -2
- package/script/client/0_params.d.ts +10 -0
- package/script/client/0_params.d.ts.map +1 -1
- package/script/client/1_client_generic.d.ts +1168 -1075
- 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 +4 -1
- package/script/client/3_secret_chat_manager.d.ts.map +1 -1
- package/script/client/3_secret_chat_manager.js +31 -0
- package/script/client/4_context.d.ts +12 -2
- package/script/client/4_context.d.ts.map +1 -1
- package/script/client/4_context.js +25 -0
- package/script/client/4_forum_manager.d.ts +4 -1
- package/script/client/4_forum_manager.d.ts.map +1 -1
- package/script/client/4_forum_manager.js +32 -0
- package/script/client/6_client.d.ts +1166 -1075
- package/script/client/6_client.d.ts.map +1 -1
- package/script/client/6_client.js +1528 -1413
- package/script/client/6_client_dispatcher.d.ts +1168 -1075
- package/script/client/6_client_dispatcher.d.ts.map +1 -1
- package/script/client/6_client_dispatcher.js +1502 -1391
- package/script/types/0_report_reason.d.ts +1 -0
- package/script/types/0_report_reason.d.ts.map +1 -1
- 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/0_story_report_option.d.ts +3 -0
- package/script/types/0_story_report_option.d.ts.map +1 -1
- 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_story_report_result.d.ts +17 -3
- package/script/types/1_story_report_result.d.ts.map +1 -1
- package/script/types/2_secret_message.d.ts +1 -0
- package/script/types/2_secret_message.d.ts.map +1 -1
- package/script/types/3_bot_access_settings.d.ts +3 -0
- package/script/types/3_bot_access_settings.d.ts.map +1 -1
- package/script/types/3_connected_website.d.ts +45 -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 +2 -1
- package/script/types/3_poll_voter_list.d.ts.map +1 -1
- package/script/types/3_text_to_translate.d.ts +3 -0
- package/script/types/3_text_to_translate.d.ts.map +1 -1
- package/script/types/3_translated_text.d.ts +3 -0
- package/script/types/3_translated_text.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/A_topic.d.ts +20 -3
- package/script/types/A_topic.d.ts.map +1 -1
- package/script/types/A_topic.js +38 -0
- package/script/types/B_topic_list_item.d.ts +7 -0
- package/script/types/B_topic_list_item.d.ts.map +1 -0
- package/script/types/B_topic_list_item.js +2 -0
- package/script/types/B_update.d.ts +16 -1
- package/script/types/B_update.d.ts.map +1 -1
- package/script/types/C_topic_list.d.ts +14 -0
- package/script/types/C_topic_list.d.ts.map +1 -0
- package/script/types/C_topic_list.js +12 -0
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
import { type Storage } from "../2_storage.js";
|
|
21
21
|
import { Api, Mtproto } from "../2_tl.js";
|
|
22
22
|
import { type DC } from "../3_transport.js";
|
|
23
|
-
import { type AlbumStoryList, type Animation, type AppSupport, type AuthorizationSession, type AvailableReactions, type Birthday, type BlockedUserList, type BotAccessSettings, type BotCommand, type BotTokenCheckResult, type BusinessConnection, type CallbackQueryAnswer, type CallbackQueryQuestion, type Chat, type ChatActionType, type ChatListItem, type ChatMember, type ChatP, type ChatPChannel, type ChatPGroup, type ChatPPrivate, type ChatPSupergroup, type ChatSettings, type ClaimedGifts, type CodeCheckResult, type Country, type FailedInvitation, type FileSource, type Gift, type GiftCollection, type ID, type InactiveChat, type InlineQueryAnswer, type InlineQueryResult, type InputChecklistItem, type InputEmojiStatus, type InputGift, type InputMedia, type InputPollOption, type InputRichText, type InputSticker, type InputStoryContent, type InviteLink, type JoinRequest, type LeftChannelList, type LinkPreview, type LiveStreamChannel, type Message, type MessageAnimation, type MessageAudio, type MessageChecklist, type MessageContact, type MessageCounters, type MessageDice, type MessageDocument, type MessageInvoice, type MessageList, type MessageLivePhoto, type MessageLocation, type MessagePhoto, type MessagePoll, type MessageReactionList, type MessageRichText, type MessageSticker, type MessageText, type MessageVenue, type MessageVideo, type MessageVideoNote, type 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 SlowModeDuration, type StarAmount, type StarTransactionList, type Sticker, type StickerSet, type Story, type StoryAlbum, type StoryReportResult, type SummarizedText, type TextToTranslate, type Timezone, type Topic, type TopicList, type TopicListItem, type TranslatedText, type Translation, type User, type VideoChat, type VideoChatActive, type VideoChatScheduled, type VoiceTranscription } from "../3_types.js";
|
|
24
24
|
import { Migrate } from "../4_errors.js";
|
|
25
|
-
import type { AddBotToAttachmentsMenuParams, AddChatMemberParams, AddContactParams, AddReactionParams, AddStickerToStickerSetParams, AnswerCallbackQueryParams, AnswerInlineQueryParams, AnswerPreCheckoutQueryParams, ApproveJoinRequestsParams, BanChatMemberParams, CheckUsernameParams, CreateChannelParams, CreateGroupParams, CreateInviteLinkParams, CreateStickerSetParams, CreateStoryParams, CreateSupergroupParams, CreateTopicParams, DeclineJoinRequestsParams, DeleteAccountParams, DeleteMessageParams, DeleteMessagesParams, DownloadLiveStreamSegmentParams, DownloadParams, EditInlineMessageCaptionParams, EditInlineMessageMediaParams, EditInlineMessageRichTextParams, EditInlineMessageTextParams, EditMessageCaptionParams, EditMessageLiveLocationParams, EditMessageMediaParams, EditMessageReplyMarkupParams, EditMessageRichTextParams, EditMessageTextParams, EditTopicParams, EnableSignaturesParams, EndSecretChatParams, EndTakeoutSessionParams, ForwardMessagesParams, GetBlockedUsersParams, GetChatMembersParams, GetChatsParams, GetClaimedGiftsParams, GetCommonChatsParams, GetCreatedInviteLinksParams, GetHistoryParams, GetJoinRequestsParams, GetLeftChannelsParams, GetLinkPreviewParams, GetMessageReactionsParams, GetMyCommandsParams, 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";
|
|
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, GetTopicsParams, GetTranslationsParams, GiftPremiumSubscriptionParams, InvokeParams, JoinVideoChatParams, MarkAllMentionsAsReadParams, OpenChatParams, OpenMiniAppParams, PinMessageParams, PromoteChatMemberParams, RemoveProfilePhotoParams, ReplaceStickerInStickerSetParams, ReportChatParams, ReportStoryParams, ResolveUsernameParams, ScheduleVideoChatParams, SearchMessagesParams, SendAnimationParams, SendAudioParams, SendChecklistParams, SendContactParams, SendDiceParams, SendDocumentParams, SendGiftParams, SendInlineQueryParams, SendInvoiceParams, SendLivePhotoParams, SendLocationParams, SendMediaGroupParams, SendMessageDraftParams, SendMessageParams, SendPhotoParams, SendPollParams, SendRichTextDraftParams, SendRichTextParams, SendSecretAnimationParams, SendSecretAudioParams, SendSecretContactParams, SendSecretDocumentParams, SendSecretLocationParams, SendSecretMessageParams, SendSecretPhotoParams, SendSecretStickerParams, SendSecretVenueParams, SendSecretVideoNoteParams, SendSecretVideoParams, SendSecretVoiceParams, SendStickerParams, SendVenueParams, SendVideoNoteParams, SendVideoParams, SendVoiceParams, SetBirthdayParams, SetChatMemberRightsParams, SetChatMemberTagParams, SetChatPhotoParams, SetContactNoteParams, SetEmojiStatusParams, SetLocationParams, SetManagedBotAccessSettingsParams, SetMyCommandsParams, SetNameColorParams, SetPersonalChannelParams, SetProfileColorParams, SetReactionsParams, SetWorkingHoursParams, SignInParams, StartBotParams, StartTakeoutSessionParams, StartVideoChatParams, StopPollParams, SummarizeTextParams, TranslateTextParams, UnpinMessageParams, UnpinMessagesParams, UpdateChecklistParams, UpdateProfileParams, UpdateProfilePhotoParams, UpdateProfileVideoParams } from "./0_params.js";
|
|
26
26
|
import { StorageOperations } from "./0_storage_operations.js";
|
|
27
27
|
import type { ClientGeneric } from "./1_client_generic.js";
|
|
28
28
|
import type { ClientPlainParams } from "./1_client_plain.js";
|
|
@@ -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,85 +824,78 @@ 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
|
-
* const message = await client.getMessage("@MTKruto", 212);
|
|
873
|
-
* ```
|
|
874
|
-
* @returns The retrieved message.
|
|
875
|
-
* @cache
|
|
839
|
+
* @param messageId The identifier of the message.
|
|
840
|
+
* @returns The message's viewers.
|
|
876
841
|
*/
|
|
877
|
-
|
|
842
|
+
getMessageViewers(chatId: ID, messageId: number): Promise<MessageViewer[]>;
|
|
878
843
|
/**
|
|
879
|
-
*
|
|
844
|
+
* Get a progress ID that can be passed to relevant send* methods to receive upload progress updates for them.
|
|
880
845
|
*
|
|
881
846
|
* @method ms
|
|
882
|
-
* @
|
|
883
|
-
* @example ```ts
|
|
884
|
-
* const message = await client.resolveMessageLink("https://t.me/MTKruto/212");
|
|
885
|
-
* ```
|
|
886
|
-
* @returns The message that was linked to.
|
|
847
|
+
* @cache
|
|
887
848
|
*/
|
|
888
|
-
|
|
849
|
+
getProgressId(): Promise<string>;
|
|
889
850
|
/**
|
|
890
|
-
*
|
|
851
|
+
* Get recent stickers. User-only.
|
|
891
852
|
*
|
|
892
853
|
* @method ms
|
|
893
|
-
* @param chatId The identifier of the chat which the message belongs to.
|
|
894
|
-
* @param messageIds The identifiers of the messages to delete.
|
|
895
854
|
*/
|
|
896
|
-
|
|
855
|
+
getRecentStickers(): Promise<Sticker[]>;
|
|
897
856
|
/**
|
|
898
|
-
*
|
|
857
|
+
* Get a message's full rich text. User-only.
|
|
899
858
|
*
|
|
900
859
|
* @method ms
|
|
901
|
-
* @param chatId The identifier of the chat
|
|
902
|
-
* @param messageId The identifier of the message
|
|
860
|
+
* @param chatId The identifier of the chat including the message.
|
|
861
|
+
* @param messageId The identifier of the message.
|
|
903
862
|
*/
|
|
904
|
-
|
|
863
|
+
getRichText(chatId: ID, messageId: number): Promise<RichText | null>;
|
|
905
864
|
/**
|
|
906
|
-
*
|
|
865
|
+
* Get saved animations. User-only.
|
|
907
866
|
*
|
|
908
867
|
* @method ms
|
|
909
|
-
* @param chatId The identifier of a chat. Must be a supergroup.
|
|
910
|
-
* @param memberId The identifier of the member.
|
|
911
868
|
*/
|
|
912
|
-
|
|
869
|
+
getSavedAnimations(): Promise<Animation[]>;
|
|
913
870
|
/**
|
|
914
|
-
*
|
|
871
|
+
* Get a list of saved chats.
|
|
915
872
|
*
|
|
916
873
|
* @method ms
|
|
917
|
-
* @param chatId The identifier of a chat.
|
|
918
|
-
* @param messageIds The identifiers of the scheduled messages to delete.
|
|
919
874
|
*/
|
|
920
|
-
|
|
875
|
+
getSavedChats(params?: GetSavedChatsParams): Promise<SavedChats>;
|
|
921
876
|
/**
|
|
922
|
-
*
|
|
877
|
+
* Get messages saved from a specific chat.
|
|
923
878
|
*
|
|
924
879
|
* @method ms
|
|
925
880
|
* @param chatId The identifier of a chat.
|
|
926
|
-
* @param messageId The identifier of the scheduled message to delete.
|
|
927
881
|
*/
|
|
928
|
-
|
|
882
|
+
getSavedMessages(chatId: ID, params?: GetSavedMessagesParams): Promise<Message[]>;
|
|
929
883
|
/**
|
|
930
|
-
*
|
|
884
|
+
* Get the scheduled messages of a chat. User-only.
|
|
931
885
|
*
|
|
932
886
|
* @method ms
|
|
933
|
-
* @param chatId The identifier of
|
|
934
|
-
* @param messageIds The identifiers of the scheduled messages to send.
|
|
887
|
+
* @param chatId The identifier of the chat including the scheduled messages.
|
|
935
888
|
*/
|
|
936
|
-
|
|
889
|
+
getScheduledMessages(chatId: ID): Promise<Message[]>;
|
|
937
890
|
/**
|
|
938
|
-
*
|
|
891
|
+
* Open a mini app. User-only.
|
|
939
892
|
*
|
|
940
893
|
* @method ms
|
|
941
|
-
* @param
|
|
942
|
-
* @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
|
|
943
897
|
*/
|
|
944
|
-
|
|
898
|
+
openMiniApp(botId: ID, chatId: ID, params?: OpenMiniAppParams): Promise<MiniAppInfo>;
|
|
945
899
|
/**
|
|
946
900
|
* Pin a message in a chat.
|
|
947
901
|
*
|
|
@@ -951,49 +905,69 @@ export declare class Client<C extends Context = Context> extends Composer<C> imp
|
|
|
951
905
|
*/
|
|
952
906
|
pinMessage(chatId: ID, messageId: number, params?: PinMessageParams): Promise<void>;
|
|
953
907
|
/**
|
|
954
|
-
*
|
|
908
|
+
* Mark messages as read. User-only.
|
|
955
909
|
*
|
|
956
910
|
* @method ms
|
|
957
|
-
* @param chatId The identifier of
|
|
958
|
-
* @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.
|
|
959
913
|
*/
|
|
960
|
-
|
|
914
|
+
readMessages(chatId: ID, untilMessageId: number): Promise<void>;
|
|
961
915
|
/**
|
|
962
|
-
*
|
|
916
|
+
* Remove a sticker from favorites. User-only.
|
|
963
917
|
*
|
|
964
918
|
* @method ms
|
|
965
|
-
* @param
|
|
919
|
+
* @param fileId The file identifier of the sticker.
|
|
966
920
|
*/
|
|
967
|
-
|
|
921
|
+
removeStickerFromFavorites(fileId: string): Promise<void>;
|
|
968
922
|
/**
|
|
969
|
-
*
|
|
923
|
+
* Remove a sticker from recents. User-only.
|
|
970
924
|
*
|
|
971
925
|
* @method ms
|
|
972
|
-
* @param
|
|
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.
|
|
926
|
+
* @param fileId The file identifier of the sticker.
|
|
976
927
|
*/
|
|
977
|
-
|
|
928
|
+
removeStickerFromRecents(fileId: string): Promise<void>;
|
|
978
929
|
/**
|
|
979
|
-
*
|
|
930
|
+
* Retrieve a message using its link.
|
|
980
931
|
*
|
|
981
932
|
* @method ms
|
|
982
|
-
* @param
|
|
983
|
-
* @
|
|
984
|
-
*
|
|
985
|
-
*
|
|
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.
|
|
986
938
|
*/
|
|
987
|
-
|
|
939
|
+
resolveMessageLink(link: string): Promise<Message | null>;
|
|
988
940
|
/**
|
|
989
|
-
*
|
|
941
|
+
* Save an animation. User-only.
|
|
990
942
|
*
|
|
991
943
|
* @method ms
|
|
992
|
-
* @param
|
|
993
|
-
* @param messageId The identifier of the poll's message.
|
|
994
|
-
* @returns The new state of the poll.
|
|
944
|
+
* @param fileId The file identifier of the animation.
|
|
995
945
|
*/
|
|
996
|
-
|
|
946
|
+
saveAnimation(fileId: string): Promise<void>;
|
|
947
|
+
/**
|
|
948
|
+
* Search for messages. User-only.
|
|
949
|
+
*
|
|
950
|
+
* @method ms
|
|
951
|
+
*/
|
|
952
|
+
searchMessages(params?: SearchMessagesParams): Promise<MessageList>;
|
|
953
|
+
/**
|
|
954
|
+
* Send an animation.
|
|
955
|
+
*
|
|
956
|
+
* @method ms
|
|
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.
|
|
960
|
+
*/
|
|
961
|
+
sendAnimation(chatId: ID, animation: FileSource, params?: SendAnimationParams): Promise<MessageAnimation>;
|
|
962
|
+
/**
|
|
963
|
+
* Send an audio file.
|
|
964
|
+
*
|
|
965
|
+
* @method ms
|
|
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.
|
|
969
|
+
*/
|
|
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.
|
|
1080
|
+
*
|
|
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.
|
|
1085
|
+
*/
|
|
1086
|
+
sendPhoto(chatId: ID, photo: FileSource, params?: SendPhotoParams): Promise<MessagePhoto>;
|
|
1087
|
+
/**
|
|
1088
|
+
* Send a poll.
|
|
1085
1089
|
*
|
|
1086
1090
|
* @method ms
|
|
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.
|
|
1087
1095
|
*/
|
|
1088
|
-
|
|
1096
|
+
sendPoll(chatId: ID, question: string, options: InputPollOption[], params?: SendPollParams): Promise<MessagePoll>;
|
|
1089
1097
|
/**
|
|
1090
|
-
*
|
|
1098
|
+
* Send a rich text message.
|
|
1091
1099
|
*
|
|
1092
1100
|
* @method ms
|
|
1093
|
-
* @param chatId The identifier of a chat.
|
|
1094
|
-
* @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.
|
|
1095
1104
|
*/
|
|
1096
|
-
|
|
1105
|
+
sendRichText(chatId: ID, richText: InputRichText, params?: SendRichTextParams): Promise<MessageRichText>;
|
|
1097
1106
|
/**
|
|
1098
|
-
*
|
|
1107
|
+
* Stream a drafted rich text message. Bot-only.
|
|
1099
1108
|
*
|
|
1100
1109
|
* @method ms
|
|
1101
|
-
* @param chatId The identifier of
|
|
1102
|
-
* @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.
|
|
1103
1113
|
*/
|
|
1104
|
-
|
|
1114
|
+
sendRichTextDraft(chatId: ID, draftId: number, richText: InputRichText, params?: SendRichTextDraftParams): Promise<void>;
|
|
1105
1115
|
/**
|
|
1106
|
-
*
|
|
1116
|
+
* Send a scheduled message before its schedule.
|
|
1107
1117
|
*
|
|
1108
1118
|
* @method ms
|
|
1109
|
-
* @param chatId The identifier of
|
|
1110
|
-
* @param messageId The identifier of the message.
|
|
1119
|
+
* @param chatId The identifier of a chat.
|
|
1120
|
+
* @param messageId The identifier of the scheduled message to send.
|
|
1111
1121
|
*/
|
|
1112
|
-
|
|
1122
|
+
sendScheduledMessage(chatId: ID, messageId: number): Promise<Message>;
|
|
1113
1123
|
/**
|
|
1114
|
-
*
|
|
1124
|
+
* Send multiple scheduled messages before their schedule.
|
|
1115
1125
|
*
|
|
1116
1126
|
* @method ms
|
|
1117
|
-
* @param
|
|
1118
|
-
* @param
|
|
1127
|
+
* @param chatId The identifier of a chat.
|
|
1128
|
+
* @param messageIds The identifiers of the scheduled messages to send.
|
|
1119
1129
|
*/
|
|
1120
|
-
|
|
1130
|
+
sendScheduledMessages(chatId: ID, messageIds: number[]): Promise<Message[]>;
|
|
1121
1131
|
/**
|
|
1122
|
-
*
|
|
1132
|
+
* Send a screenshot notification. User-only.
|
|
1123
1133
|
*
|
|
1124
1134
|
* @method ms
|
|
1125
|
-
* @param
|
|
1126
|
-
* @param
|
|
1135
|
+
* @param chatId The identifier of a chat.
|
|
1136
|
+
* @param replyToMessageId The identifier of the message.
|
|
1127
1137
|
*/
|
|
1128
|
-
|
|
1138
|
+
sendScreenshotNotification(chatId: ID, replyToMessageId: number): Promise<void>;
|
|
1129
1139
|
/**
|
|
1130
|
-
*
|
|
1140
|
+
* Send a sticker.
|
|
1131
1141
|
*
|
|
1132
1142
|
* @method ms
|
|
1133
|
-
* @param
|
|
1134
|
-
* @param
|
|
1135
|
-
* @
|
|
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.
|
|
1136
1146
|
*/
|
|
1137
|
-
|
|
1147
|
+
sendSticker(chatId: ID, sticker: FileSource, params?: SendStickerParams): Promise<MessageSticker>;
|
|
1138
1148
|
/**
|
|
1139
|
-
*
|
|
1149
|
+
* Send a venue.
|
|
1140
1150
|
*
|
|
1141
1151
|
* @method ms
|
|
1142
|
-
* @param
|
|
1143
|
-
* @param
|
|
1144
|
-
* @param
|
|
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.
|
|
1145
1158
|
*/
|
|
1146
|
-
|
|
1159
|
+
sendVenue(chatId: ID, latitude: number, longitude: number, title: string, address: string, params?: SendVenueParams): Promise<MessageVenue>;
|
|
1147
1160
|
/**
|
|
1148
|
-
*
|
|
1161
|
+
* Send a video.
|
|
1149
1162
|
*
|
|
1150
1163
|
* @method ms
|
|
1151
|
-
* @param chatId The identifier of
|
|
1152
|
-
* @param
|
|
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.
|
|
1153
1167
|
*/
|
|
1154
|
-
|
|
1168
|
+
sendVideo(chatId: ID, video: FileSource, params?: SendVideoParams): Promise<MessageVideo>;
|
|
1155
1169
|
/**
|
|
1156
|
-
*
|
|
1170
|
+
* Send a video note.
|
|
1157
1171
|
*
|
|
1158
1172
|
* @method ms
|
|
1159
|
-
* @param chatId The identifier of
|
|
1160
|
-
* @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.
|
|
1161
1176
|
*/
|
|
1162
|
-
|
|
1177
|
+
sendVideoNote(chatId: ID, videoNote: FileSource, params?: SendVideoNoteParams): Promise<MessageVideoNote>;
|
|
1163
1178
|
/**
|
|
1164
|
-
*
|
|
1179
|
+
* Send a voice message.
|
|
1165
1180
|
*
|
|
1166
1181
|
* @method ms
|
|
1167
|
-
* @param chatId The identifier of
|
|
1168
|
-
* @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.
|
|
1185
|
+
*/
|
|
1186
|
+
sendVoice(chatId: ID, voice: FileSource, params?: SendVoiceParams): Promise<MessageVoice>;
|
|
1187
|
+
/**
|
|
1188
|
+
* Set a reaction as default. User-only.
|
|
1189
|
+
*
|
|
1190
|
+
* @method ms
|
|
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,636 +1429,673 @@ 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.
|
|
1394
1433
|
*
|
|
1395
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.
|
|
1396
1438
|
*/
|
|
1397
|
-
|
|
1439
|
+
addChatMember(chatId: ID, userId: ID, params?: AddChatMemberParams): Promise<FailedInvitation[]>;
|
|
1398
1440
|
/**
|
|
1399
|
-
*
|
|
1441
|
+
* Add multiple users at once to a channel or a supergroup.
|
|
1400
1442
|
*
|
|
1401
1443
|
* @method ch
|
|
1402
|
-
* @param
|
|
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.
|
|
1403
1447
|
*/
|
|
1404
|
-
|
|
1448
|
+
addChatMembers(chatId: ID, userIds: ID[]): Promise<FailedInvitation[]>;
|
|
1405
1449
|
/**
|
|
1406
|
-
*
|
|
1450
|
+
* Approve a join request.
|
|
1407
1451
|
*
|
|
1408
1452
|
* @method ch
|
|
1409
|
-
* @
|
|
1453
|
+
* @param chatId The identifier of a chat with the join request.
|
|
1454
|
+
* @param userId The user who made the join request.
|
|
1410
1455
|
*/
|
|
1411
|
-
|
|
1456
|
+
approveJoinRequest(chatId: ID, userId: ID): Promise<void>;
|
|
1412
1457
|
/**
|
|
1413
|
-
*
|
|
1458
|
+
* Approve all join requests. User-only.
|
|
1414
1459
|
*
|
|
1415
1460
|
* @method ch
|
|
1416
|
-
* @param chatId The identifier of a chat.
|
|
1461
|
+
* @param chatId The identifier of a chat with the join requests.
|
|
1417
1462
|
*/
|
|
1418
|
-
|
|
1463
|
+
approveJoinRequests(chatId: ID, params?: ApproveJoinRequestsParams): Promise<void>;
|
|
1419
1464
|
/**
|
|
1420
|
-
*
|
|
1465
|
+
* Archive a single chat. User-only.
|
|
1421
1466
|
*
|
|
1422
1467
|
* @method ch
|
|
1423
1468
|
* @param chatId The identifier of a chat.
|
|
1424
|
-
* @param availableReactions The new available reactions.
|
|
1425
1469
|
*/
|
|
1426
|
-
|
|
1470
|
+
archiveChat(chatId: ID): Promise<void>;
|
|
1427
1471
|
/**
|
|
1428
|
-
*
|
|
1472
|
+
* Archive multiple chats. User-only.
|
|
1429
1473
|
*
|
|
1430
1474
|
* @method ch
|
|
1431
|
-
* @param
|
|
1432
|
-
* @param photo A photo to set as the chat's photo.
|
|
1475
|
+
* @param chatIds The identifiers of the chats to archive.
|
|
1433
1476
|
*/
|
|
1434
|
-
|
|
1477
|
+
archiveChats(chatIds: ID[]): Promise<void>;
|
|
1435
1478
|
/**
|
|
1436
|
-
*
|
|
1479
|
+
* Ban a member from a chat.
|
|
1437
1480
|
*
|
|
1438
1481
|
* @method ch
|
|
1439
1482
|
* @param chatId The identifier of a chat.
|
|
1483
|
+
* @param memberId The identifier of the member.
|
|
1440
1484
|
*/
|
|
1441
|
-
|
|
1485
|
+
banChatMember(chatId: ID, memberId: ID, params?: BanChatMemberParams): Promise<void>;
|
|
1442
1486
|
/**
|
|
1443
|
-
*
|
|
1487
|
+
* Close a chat previously opened by openChat.
|
|
1488
|
+
*
|
|
1489
|
+
* @method ch
|
|
1490
|
+
* @param chatId The identifier of a chat to close.
|
|
1491
|
+
*/
|
|
1492
|
+
closeChat(chatId: ID): Promise<void>;
|
|
1493
|
+
/**
|
|
1494
|
+
* Close a forum topic.
|
|
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.
|
|
1507
|
+
*/
|
|
1508
|
+
createChannel(title: string, params?: CreateChannelParams): Promise<ChatPChannel>;
|
|
1509
|
+
/**
|
|
1510
|
+
* Create a group. User-only.
|
|
1511
|
+
*
|
|
1512
|
+
* @method ch
|
|
1513
|
+
* @param title The title of the group.
|
|
1514
|
+
* @returns The created group.
|
|
1515
|
+
*/
|
|
1516
|
+
createGroup(title: string, params?: CreateGroupParams): Promise<ChatPGroup>;
|
|
1517
|
+
/**
|
|
1518
|
+
* Create an invite link.
|
|
1519
|
+
*
|
|
1520
|
+
* @method ch
|
|
1521
|
+
* @param chatId The identifier of a chat to create the invite link for.
|
|
1522
|
+
* @returns The newly created invite link.
|
|
1523
|
+
*/
|
|
1524
|
+
createInviteLink(chatId: ID, params?: CreateInviteLinkParams): Promise<InviteLink>;
|
|
1525
|
+
/**
|
|
1526
|
+
* Create a supergroup. User-only.
|
|
1527
|
+
*
|
|
1528
|
+
* @method ch
|
|
1529
|
+
* @param title The title of the supergroup.
|
|
1530
|
+
* @returns The created supergroup.
|
|
1531
|
+
*/
|
|
1532
|
+
createSupergroup(title: string, params?: CreateSupergroupParams): Promise<ChatPSupergroup>;
|
|
1533
|
+
/**
|
|
1534
|
+
* Create a forum topic.
|
|
1535
|
+
*
|
|
1536
|
+
* @method ch
|
|
1537
|
+
* @param chatId The identifier of a chat.
|
|
1538
|
+
* @param title The title of the topic.
|
|
1539
|
+
* @returns The created topic.
|
|
1456
1540
|
*/
|
|
1457
|
-
|
|
1541
|
+
createTopic(chatId: ID, title: string, params?: CreateTopicParams): Promise<Topic>;
|
|
1458
1542
|
/**
|
|
1459
|
-
*
|
|
1543
|
+
* Decline a join request.
|
|
1460
1544
|
*
|
|
1461
1545
|
* @method ch
|
|
1462
|
-
* @param chatId The identifier of a chat
|
|
1463
|
-
* @param
|
|
1546
|
+
* @param chatId The identifier of a chat with the join request.
|
|
1547
|
+
* @param userId The user who made the join request.
|
|
1464
1548
|
*/
|
|
1465
|
-
|
|
1549
|
+
declineJoinRequest(chatId: ID, userId: ID): Promise<void>;
|
|
1466
1550
|
/**
|
|
1467
|
-
*
|
|
1551
|
+
* Decline all join requests. User-only.
|
|
1468
1552
|
*
|
|
1469
1553
|
* @method ch
|
|
1470
|
-
* @param chatId The identifier of a chat
|
|
1471
|
-
* @param memberId The identifier of the member.
|
|
1554
|
+
* @param chatId The identifier of a chat with the join requests.
|
|
1472
1555
|
*/
|
|
1473
|
-
|
|
1556
|
+
declineJoinRequests(chatId: ID, params?: DeclineJoinRequestsParams): Promise<void>;
|
|
1474
1557
|
/**
|
|
1475
|
-
*
|
|
1558
|
+
* Delete a chat. User-only.
|
|
1476
1559
|
*
|
|
1477
1560
|
* @method ch
|
|
1478
1561
|
* @param chatId The identifier of a chat.
|
|
1479
|
-
* @returns The chat's administrators.
|
|
1480
1562
|
*/
|
|
1481
|
-
|
|
1563
|
+
deleteChat(chatId: ID): Promise<void>;
|
|
1482
1564
|
/**
|
|
1483
|
-
*
|
|
1565
|
+
* Delete a chat's photo.
|
|
1484
1566
|
*
|
|
1485
1567
|
* @method ch
|
|
1486
|
-
* @param chatId The identifier of a chat.
|
|
1568
|
+
* @param chatId The identifier of a chat.
|
|
1487
1569
|
*/
|
|
1488
|
-
|
|
1570
|
+
deleteChatPhoto(chatId: ID): Promise<void>;
|
|
1489
1571
|
/**
|
|
1490
|
-
*
|
|
1572
|
+
* Delete a chat's sticker set.
|
|
1491
1573
|
*
|
|
1492
1574
|
* @method ch
|
|
1493
|
-
* @param chatId The identifier of a chat. Must be a
|
|
1575
|
+
* @param chatId The identifier of a chat. Must be a supergroup.
|
|
1494
1576
|
*/
|
|
1495
|
-
|
|
1577
|
+
deleteChatStickerSet(chatId: ID): Promise<void>;
|
|
1496
1578
|
/**
|
|
1497
|
-
*
|
|
1579
|
+
* Disable automatic anti-spam in a group. User-only.
|
|
1498
1580
|
*
|
|
1499
1581
|
* @method ch
|
|
1500
|
-
* @
|
|
1582
|
+
* @param chatId The identifier of the group.
|
|
1501
1583
|
*/
|
|
1502
|
-
|
|
1584
|
+
disableAntispam(chatId: ID): Promise<void>;
|
|
1503
1585
|
/**
|
|
1504
|
-
*
|
|
1586
|
+
* Disable business bots in a private chat. User-only.
|
|
1505
1587
|
*
|
|
1506
1588
|
* @method ch
|
|
1507
|
-
* @param chatId The identifier of
|
|
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.
|
|
1589
|
+
* @param chatId The identifier of the private chat to disable business bots in.
|
|
1509
1590
|
*/
|
|
1510
|
-
|
|
1591
|
+
disableBusinessBots(chatId: ID): Promise<void>;
|
|
1511
1592
|
/**
|
|
1512
|
-
*
|
|
1593
|
+
* Disable chat history for new members. User-only.
|
|
1513
1594
|
*
|
|
1514
1595
|
* @method ch
|
|
1515
1596
|
* @param chatId The identifier of a chat.
|
|
1516
1597
|
*/
|
|
1517
|
-
|
|
1598
|
+
disableChatHistoryForNewMembers(chatId: ID): Promise<void>;
|
|
1518
1599
|
/**
|
|
1519
|
-
*
|
|
1600
|
+
* Disable join requests in a chat. User-only.
|
|
1520
1601
|
*
|
|
1521
1602
|
* @method ch
|
|
1522
|
-
* @param chatId The identifier of a chat.
|
|
1603
|
+
* @param chatId The identifier of a chat. Must be a channel or a supergroup.
|
|
1523
1604
|
*/
|
|
1524
|
-
|
|
1605
|
+
disableJoinRequests(chatId: ID): Promise<void>;
|
|
1525
1606
|
/**
|
|
1526
|
-
*
|
|
1607
|
+
* Disable sharing in a chat. User-only.
|
|
1527
1608
|
*
|
|
1528
1609
|
* @method ch
|
|
1529
1610
|
* @param chatId The identifier of a chat.
|
|
1530
|
-
* @param userId The identifier of the user.
|
|
1531
1611
|
*/
|
|
1532
|
-
|
|
1612
|
+
disableSharing(chatId: ID): Promise<void>;
|
|
1533
1613
|
/**
|
|
1534
|
-
*
|
|
1614
|
+
* Disable post signatures in a channel. User-only.
|
|
1535
1615
|
*
|
|
1536
1616
|
* @method ch
|
|
1537
|
-
* @param chatId The identifier of
|
|
1617
|
+
* @param chatId The identifier of the channel.
|
|
1538
1618
|
*/
|
|
1539
|
-
|
|
1619
|
+
disableSignatures(chatId: ID): Promise<void>;
|
|
1540
1620
|
/**
|
|
1541
|
-
*
|
|
1621
|
+
* Disable slow mode in a group. User-only.
|
|
1542
1622
|
*
|
|
1543
1623
|
* @method ch
|
|
1544
|
-
* @param chatId The identifier of
|
|
1545
|
-
* @param setName The name of the set.
|
|
1624
|
+
* @param chatId The identifier of the group to disable slow mode in.
|
|
1546
1625
|
*/
|
|
1547
|
-
|
|
1626
|
+
disableSlowMode(chatId: ID): Promise<void>;
|
|
1548
1627
|
/**
|
|
1549
|
-
*
|
|
1628
|
+
* Disable topics in a group. User-only.
|
|
1550
1629
|
*
|
|
1551
1630
|
* @method ch
|
|
1552
|
-
* @param chatId The identifier of
|
|
1631
|
+
* @param chatId The identifier of the group.
|
|
1553
1632
|
*/
|
|
1554
|
-
|
|
1633
|
+
disableTopics(chatId: ID): Promise<void>;
|
|
1555
1634
|
/**
|
|
1556
|
-
*
|
|
1635
|
+
* Edit a forum topic.
|
|
1557
1636
|
*
|
|
1558
1637
|
* @method ch
|
|
1559
1638
|
* @param chatId The identifier of a chat.
|
|
1560
|
-
* @param
|
|
1639
|
+
* @param topicId The identifier of the topic.
|
|
1640
|
+
* @param title The new title of the topic.
|
|
1641
|
+
* @returns The new topic.
|
|
1561
1642
|
*/
|
|
1562
|
-
|
|
1643
|
+
editTopic(chatId: ID, topicId: number, title: string, params?: EditTopicParams): Promise<Topic>;
|
|
1563
1644
|
/**
|
|
1564
|
-
*
|
|
1645
|
+
* Enable automatic anti-spam in a group. User-only.
|
|
1565
1646
|
*
|
|
1566
1647
|
* @method ch
|
|
1567
|
-
* @param chatId The identifier of
|
|
1568
|
-
* @returns The newly created invite link.
|
|
1648
|
+
* @param chatId The identifier of the group.
|
|
1569
1649
|
*/
|
|
1570
|
-
|
|
1650
|
+
enableAntispam(chatId: ID): Promise<void>;
|
|
1571
1651
|
/**
|
|
1572
|
-
*
|
|
1652
|
+
* Enable business bots in a private chat. User-only.
|
|
1573
1653
|
*
|
|
1574
1654
|
* @method ch
|
|
1575
|
-
* @param chatId The identifier of
|
|
1576
|
-
* @param userId The user who made the join request.
|
|
1655
|
+
* @param chatId The identifier of the private chat to enable business bots in.
|
|
1577
1656
|
*/
|
|
1578
|
-
|
|
1657
|
+
enableBusinessBots(chatId: ID): Promise<void>;
|
|
1579
1658
|
/**
|
|
1580
|
-
*
|
|
1659
|
+
* Enable chat history for new members. User-only.
|
|
1581
1660
|
*
|
|
1582
1661
|
* @method ch
|
|
1583
|
-
* @param chatId The identifier of a chat
|
|
1584
|
-
* @param userId The user who made the join request.
|
|
1662
|
+
* @param chatId The identifier of a chat.
|
|
1585
1663
|
*/
|
|
1586
|
-
|
|
1664
|
+
enableChatHistoryForNewMembers(chatId: ID): Promise<void>;
|
|
1587
1665
|
/**
|
|
1588
|
-
*
|
|
1666
|
+
* Enable join requests in a chat. User-only.
|
|
1589
1667
|
*
|
|
1590
1668
|
* @method ch
|
|
1591
|
-
* @param chatId The identifier of a chat
|
|
1669
|
+
* @param chatId The identifier of a chat. Must be a channel or a supergroup.
|
|
1592
1670
|
*/
|
|
1593
|
-
|
|
1671
|
+
enableJoinRequests(chatId: ID): Promise<void>;
|
|
1594
1672
|
/**
|
|
1595
|
-
*
|
|
1673
|
+
* Enable sharing in a chat. User-only.
|
|
1596
1674
|
*
|
|
1597
1675
|
* @method ch
|
|
1598
|
-
* @param chatId The identifier of a chat
|
|
1676
|
+
* @param chatId The identifier of a chat.
|
|
1599
1677
|
*/
|
|
1600
|
-
|
|
1678
|
+
enableSharing(chatId: ID): Promise<void>;
|
|
1601
1679
|
/**
|
|
1602
|
-
*
|
|
1680
|
+
* Enable post signatures in a channel. User-only.
|
|
1603
1681
|
*
|
|
1604
1682
|
* @method ch
|
|
1605
|
-
* @param chatId The identifier of
|
|
1683
|
+
* @param chatId The identifier of the channel.
|
|
1606
1684
|
*/
|
|
1607
|
-
|
|
1685
|
+
enableSignatures(chatId: ID, params?: EnableSignaturesParams): Promise<void>;
|
|
1608
1686
|
/**
|
|
1609
|
-
*
|
|
1687
|
+
* Enable topics in a group. User-only.
|
|
1610
1688
|
*
|
|
1611
1689
|
* @method ch
|
|
1612
|
-
* @param chatId The identifier of
|
|
1613
|
-
* @param
|
|
1614
|
-
* @returns An array of FailedInvitation that has at most a length of 1. If empty, it means that the user was added.
|
|
1690
|
+
* @param chatId The identifier of the group.
|
|
1691
|
+
* @param isShownAsTabs Whether topics should be displayed as tabs.
|
|
1615
1692
|
*/
|
|
1616
|
-
|
|
1693
|
+
enableTopics(chatId: ID, isShownAsTabs: boolean): Promise<void>;
|
|
1617
1694
|
/**
|
|
1618
|
-
*
|
|
1695
|
+
* Get a chat.
|
|
1619
1696
|
*
|
|
1620
1697
|
* @method ch
|
|
1621
|
-
* @
|
|
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.
|
|
1698
|
+
* @cache
|
|
1624
1699
|
*/
|
|
1625
|
-
|
|
1700
|
+
getChat(chatId: ID): Promise<Chat>;
|
|
1626
1701
|
/**
|
|
1627
|
-
*
|
|
1702
|
+
* Get the administrators of a chat.
|
|
1628
1703
|
*
|
|
1629
1704
|
* @method ch
|
|
1630
|
-
* @param chatId The identifier of a chat
|
|
1705
|
+
* @param chatId The identifier of a chat.
|
|
1706
|
+
* @returns The chat's administrators.
|
|
1631
1707
|
*/
|
|
1632
|
-
|
|
1708
|
+
getChatAdministrators(chatId: ID): Promise<ChatMember[]>;
|
|
1633
1709
|
/**
|
|
1634
|
-
*
|
|
1710
|
+
* Get information on a user's chat membership.
|
|
1635
1711
|
*
|
|
1636
1712
|
* @method ch
|
|
1637
|
-
* @param chatId The identifier of a chat
|
|
1713
|
+
* @param chatId The identifier of a chat.
|
|
1714
|
+
* @param userId The identifier of the user.
|
|
1638
1715
|
*/
|
|
1639
|
-
|
|
1716
|
+
getChatMember(chatId: ID, userId: ID): Promise<ChatMember>;
|
|
1640
1717
|
/**
|
|
1641
|
-
*
|
|
1718
|
+
* Get the members of a chat.
|
|
1642
1719
|
*
|
|
1643
1720
|
* @method ch
|
|
1644
|
-
* @param
|
|
1645
|
-
* @returns The created group.
|
|
1721
|
+
* @param chatId The identifier of a chat.
|
|
1646
1722
|
*/
|
|
1647
|
-
|
|
1723
|
+
getChatMembers(chatId: ID, params?: GetChatMembersParams): Promise<ChatMember[]>;
|
|
1648
1724
|
/**
|
|
1649
|
-
*
|
|
1725
|
+
* Get a partial chat.
|
|
1650
1726
|
*
|
|
1651
1727
|
* @method ch
|
|
1652
|
-
* @
|
|
1653
|
-
* @returns The created supergroup.
|
|
1728
|
+
* @cache
|
|
1654
1729
|
*/
|
|
1655
|
-
|
|
1730
|
+
getChatP(chatId: ID): Promise<ChatP>;
|
|
1656
1731
|
/**
|
|
1657
|
-
*
|
|
1732
|
+
* Get chats from a chat list. User-only.
|
|
1658
1733
|
*
|
|
1659
1734
|
* @method ch
|
|
1660
|
-
* @param title The title of the channel.
|
|
1661
|
-
* @returns The created channel.
|
|
1662
1735
|
*/
|
|
1663
|
-
|
|
1736
|
+
getChats(params?: GetChatsParams): Promise<ChatListItem[]>;
|
|
1664
1737
|
/**
|
|
1665
|
-
*
|
|
1738
|
+
* Get the settings of a chat. User-only.
|
|
1666
1739
|
*
|
|
1667
1740
|
* @method ch
|
|
1668
1741
|
* @param chatId The identifier of a chat.
|
|
1669
|
-
* @param messageTtl The time to live of the messages in seconds.
|
|
1670
1742
|
*/
|
|
1671
|
-
|
|
1743
|
+
getChatSettings(chatId: ID): Promise<ChatSettings>;
|
|
1672
1744
|
/**
|
|
1673
|
-
*
|
|
1745
|
+
* Get common chats between a user and the current one. User-only.
|
|
1674
1746
|
*
|
|
1675
1747
|
* @method ch
|
|
1676
|
-
* @param
|
|
1748
|
+
* @param userId The identifier of the user to get the common chats with them.
|
|
1677
1749
|
*/
|
|
1678
|
-
|
|
1750
|
+
getCommonChats(userId: ID, params?: GetCommonChatsParams): Promise<ChatP[]>;
|
|
1679
1751
|
/**
|
|
1680
|
-
*
|
|
1752
|
+
* Get the invite links created for a chat. User-only.
|
|
1681
1753
|
*
|
|
1682
1754
|
* @method ch
|
|
1683
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.
|
|
1684
1757
|
*/
|
|
1685
|
-
|
|
1758
|
+
getCreatedInviteLinks(chatId: ID, params?: GetCreatedInviteLinksParams): Promise<InviteLink[]>;
|
|
1686
1759
|
/**
|
|
1687
|
-
*
|
|
1760
|
+
* Get discussion chat suggestions. User-only.
|
|
1688
1761
|
*
|
|
1689
1762
|
* @method ch
|
|
1690
|
-
* @param chatIds The identifiers of the chats to unarchive.
|
|
1691
1763
|
*/
|
|
1692
|
-
|
|
1764
|
+
getDiscussionChatSuggestions(): Promise<ChatP[]>;
|
|
1693
1765
|
/**
|
|
1694
|
-
*
|
|
1766
|
+
* Get chat history. User-only.
|
|
1695
1767
|
*
|
|
1696
1768
|
* @method ch
|
|
1697
1769
|
* @param chatId The identifier of a chat.
|
|
1698
1770
|
*/
|
|
1699
|
-
|
|
1771
|
+
getHistory(chatId: ID, params?: GetHistoryParams): Promise<Message[]>;
|
|
1700
1772
|
/**
|
|
1701
|
-
* Get
|
|
1773
|
+
* Get inactive chats. User-only.
|
|
1702
1774
|
*
|
|
1703
1775
|
* @method ch
|
|
1704
|
-
* @
|
|
1776
|
+
* @returns A list of inactive chats the current user is a member of.
|
|
1705
1777
|
*/
|
|
1706
|
-
|
|
1778
|
+
getInactiveChats(): Promise<InactiveChat[]>;
|
|
1707
1779
|
/**
|
|
1708
|
-
* Get
|
|
1780
|
+
* Get pending join requests in a chat. User-only.
|
|
1709
1781
|
*
|
|
1710
1782
|
* @method ch
|
|
1711
|
-
* @param chatId The identifier of a chat.
|
|
1783
|
+
* @param chatId The identifier of a chat with the join requests.
|
|
1712
1784
|
*/
|
|
1713
|
-
|
|
1785
|
+
getJoinRequests(chatId: ID, params?: GetJoinRequestsParams): Promise<JoinRequest[]>;
|
|
1714
1786
|
/**
|
|
1715
|
-
*
|
|
1787
|
+
* Get the count of online members in a chat. User-only.
|
|
1716
1788
|
*
|
|
1717
1789
|
* @method ch
|
|
1718
|
-
* @param chatId The identifier of
|
|
1790
|
+
* @param chatId The identifier of a chat.
|
|
1791
|
+
* @returns The count of online members in the chat.
|
|
1719
1792
|
*/
|
|
1720
|
-
|
|
1793
|
+
getOnlineCount(chatId: ID): Promise<number>;
|
|
1721
1794
|
/**
|
|
1722
|
-
*
|
|
1795
|
+
* Get pinned chats from a chat list. User-only.
|
|
1723
1796
|
*
|
|
1724
1797
|
* @method ch
|
|
1725
|
-
* @param
|
|
1798
|
+
* @param from The chat list to get the pinned chats from. Defaults to main.
|
|
1726
1799
|
*/
|
|
1727
|
-
|
|
1800
|
+
getPinnedChats(from?: "archived" | "main"): Promise<ChatListItem[]>;
|
|
1728
1801
|
/**
|
|
1729
|
-
*
|
|
1802
|
+
* Get recommended channels. User-only.
|
|
1730
1803
|
*
|
|
1731
1804
|
* @method ch
|
|
1732
|
-
* @
|
|
1805
|
+
* @returns A list of recommended channels.
|
|
1733
1806
|
*/
|
|
1734
|
-
|
|
1807
|
+
getRecommendedChannels(): Promise<ChatPChannel[]>;
|
|
1735
1808
|
/**
|
|
1736
|
-
*
|
|
1809
|
+
* Get similar bots. User-only.
|
|
1737
1810
|
*
|
|
1738
1811
|
* @method ch
|
|
1739
|
-
* @param chatId The identifier of
|
|
1740
|
-
* @
|
|
1812
|
+
* @param chatId The identifier of a bot to get similar bots for.
|
|
1813
|
+
* @returns A list of similar bots.
|
|
1741
1814
|
*/
|
|
1742
|
-
|
|
1815
|
+
getSimilarBots(chatId: ID): Promise<ChatPPrivate[]>;
|
|
1743
1816
|
/**
|
|
1744
|
-
*
|
|
1817
|
+
* Get similar channels. User-only.
|
|
1745
1818
|
*
|
|
1746
1819
|
* @method ch
|
|
1747
|
-
* @param chatId The identifier of a
|
|
1748
|
-
* @
|
|
1820
|
+
* @param chatId The identifier of a channel to get similar channels for.
|
|
1821
|
+
* @returns A list of similar channels.
|
|
1749
1822
|
*/
|
|
1750
|
-
|
|
1823
|
+
getSimilarChannels(chatId: ID): Promise<ChatPChannel[]>;
|
|
1751
1824
|
/**
|
|
1752
|
-
*
|
|
1825
|
+
* Get a topic of a forum chat by its identifier. User-only.
|
|
1753
1826
|
*
|
|
1754
1827
|
* @method ch
|
|
1755
|
-
* @param chatId The identifier of
|
|
1756
|
-
* @param
|
|
1828
|
+
* @param chatId The identifier of the chat.
|
|
1829
|
+
* @param topicId The identifier of the topic.
|
|
1757
1830
|
*/
|
|
1758
|
-
|
|
1831
|
+
getTopic(chatId: ID, topicId: number): Promise<TopicListItem | null>;
|
|
1759
1832
|
/**
|
|
1760
|
-
*
|
|
1833
|
+
* Get the topics of a forum chat. User-only.
|
|
1761
1834
|
*
|
|
1762
1835
|
* @method ch
|
|
1763
|
-
* @param chatId The identifier of the
|
|
1836
|
+
* @param chatId The identifier of the chat.
|
|
1764
1837
|
*/
|
|
1765
|
-
|
|
1838
|
+
getTopics(chatId: ID, params?: GetTopicsParams): Promise<TopicList>;
|
|
1766
1839
|
/**
|
|
1767
|
-
*
|
|
1840
|
+
* Get topics of a forum chat by their identifiers. User-only.
|
|
1768
1841
|
*
|
|
1769
1842
|
* @method ch
|
|
1770
|
-
* @param chatId The identifier of the
|
|
1843
|
+
* @param chatId The identifier of the chat.
|
|
1844
|
+
* @param topicIds The identifiers of the topics.
|
|
1771
1845
|
*/
|
|
1772
|
-
|
|
1846
|
+
getTopicsById(chatId: ID, topicIds: number[]): Promise<TopicList>;
|
|
1773
1847
|
/**
|
|
1774
|
-
*
|
|
1848
|
+
* Hide the general forum topic.
|
|
1775
1849
|
*
|
|
1776
1850
|
* @method ch
|
|
1777
|
-
* @param chatId The identifier of
|
|
1778
|
-
* @param isShownAsTabs Whether topics should be displayed as tabs.
|
|
1851
|
+
* @param chatId The identifier of a chat.
|
|
1779
1852
|
*/
|
|
1780
|
-
|
|
1853
|
+
hideGeneralTopic(chatId: ID): Promise<void>;
|
|
1781
1854
|
/**
|
|
1782
|
-
*
|
|
1855
|
+
* Hide the member list of a group to non-admins. User-only.
|
|
1783
1856
|
*
|
|
1784
1857
|
* @method ch
|
|
1785
1858
|
* @param chatId The identifier of the group.
|
|
1786
1859
|
*/
|
|
1787
|
-
|
|
1860
|
+
hideMemberList(chatId: ID): Promise<void>;
|
|
1788
1861
|
/**
|
|
1789
|
-
*
|
|
1862
|
+
* Join a chat. User-only.
|
|
1790
1863
|
*
|
|
1791
1864
|
* @method ch
|
|
1792
|
-
* @param chatId The identifier of
|
|
1865
|
+
* @param chatId The identifier of a chat.
|
|
1793
1866
|
*/
|
|
1794
|
-
|
|
1867
|
+
joinChat(chatId: ID): Promise<void>;
|
|
1795
1868
|
/**
|
|
1796
|
-
*
|
|
1869
|
+
* Kick a member from a chat. Same as a banChatMember call followed by unbanChatMember.
|
|
1797
1870
|
*
|
|
1798
1871
|
* @method ch
|
|
1799
|
-
* @param chatId The identifier of
|
|
1872
|
+
* @param chatId The identifier of a chat. Must be a supergroup.
|
|
1873
|
+
* @param memberId The identifier of the member.
|
|
1800
1874
|
*/
|
|
1801
|
-
|
|
1875
|
+
kickChatMember(chatId: ID, memberId: ID): Promise<void>;
|
|
1802
1876
|
/**
|
|
1803
|
-
*
|
|
1877
|
+
* Leave a chat.
|
|
1804
1878
|
*
|
|
1805
1879
|
* @method ch
|
|
1806
|
-
* @param chatId The identifier of
|
|
1880
|
+
* @param chatId The identifier of a chat.
|
|
1807
1881
|
*/
|
|
1808
|
-
|
|
1882
|
+
leaveChat(chatId: ID): Promise<void>;
|
|
1809
1883
|
/**
|
|
1810
|
-
*
|
|
1884
|
+
* Mark all mentions in a chat as read. User-only.
|
|
1811
1885
|
*
|
|
1812
1886
|
* @method ch
|
|
1813
|
-
* @param chatId The identifier of the
|
|
1887
|
+
* @param chatId The identifier of the chat.
|
|
1814
1888
|
*/
|
|
1815
|
-
|
|
1889
|
+
markAllMentionsAsRead(chatId: ID, params?: MarkAllMentionsAsReadParams): Promise<void>;
|
|
1816
1890
|
/**
|
|
1817
|
-
*
|
|
1891
|
+
* Mark a chat as read. User-only.
|
|
1818
1892
|
*
|
|
1819
1893
|
* @method ch
|
|
1820
1894
|
* @param chatId The identifier of a chat.
|
|
1821
1895
|
*/
|
|
1822
|
-
|
|
1896
|
+
markChatAsRead(chatId: ID): Promise<void>;
|
|
1823
1897
|
/**
|
|
1824
|
-
*
|
|
1898
|
+
* Mark a chat as unread. User-only.
|
|
1825
1899
|
*
|
|
1826
1900
|
* @method ch
|
|
1901
|
+
* @param chatId The identifier of a chat.
|
|
1827
1902
|
*/
|
|
1828
|
-
|
|
1903
|
+
markChatAsUnread(chatId: ID): Promise<void>;
|
|
1829
1904
|
/**
|
|
1830
|
-
*
|
|
1905
|
+
* Open a chat.
|
|
1831
1906
|
*
|
|
1832
1907
|
* @method ch
|
|
1833
|
-
* @param chatId The identifier of a
|
|
1834
|
-
* @param discussionChatId The identifier of a chat to use as discussion for the channel.
|
|
1908
|
+
* @param chatId The identifier of a chat to open.
|
|
1835
1909
|
*/
|
|
1836
|
-
|
|
1910
|
+
openChat(chatId: ID, params?: OpenChatParams): Promise<void>;
|
|
1837
1911
|
/**
|
|
1838
|
-
*
|
|
1912
|
+
* Pin a forum topic.
|
|
1839
1913
|
*
|
|
1840
1914
|
* @method ch
|
|
1841
1915
|
* @param chatId The identifier of a chat.
|
|
1842
|
-
* @param
|
|
1843
|
-
* @param password The password of the current account.
|
|
1916
|
+
* @param topicId The identifier of the topic.
|
|
1844
1917
|
*/
|
|
1845
|
-
|
|
1918
|
+
pinTopic(chatId: ID, topicId: number): Promise<void>;
|
|
1846
1919
|
/**
|
|
1847
|
-
*
|
|
1920
|
+
* Promote a chat member.
|
|
1848
1921
|
*
|
|
1849
1922
|
* @method ch
|
|
1850
1923
|
* @param chatId The identifier of a chat.
|
|
1851
|
-
* @param
|
|
1852
|
-
* @returns The created topic.
|
|
1924
|
+
* @param userId The identifier of the user to promote.
|
|
1853
1925
|
*/
|
|
1854
|
-
|
|
1926
|
+
promoteChatMember(chatId: ID, userId: ID, params?: PromoteChatMemberParams): Promise<void>;
|
|
1855
1927
|
/**
|
|
1856
|
-
*
|
|
1928
|
+
* Reopen a forum topic.
|
|
1857
1929
|
*
|
|
1858
1930
|
* @method ch
|
|
1859
1931
|
* @param chatId The identifier of a chat.
|
|
1860
1932
|
* @param topicId The identifier of the topic.
|
|
1861
|
-
* @param title The new title of the topic.
|
|
1862
|
-
* @returns The new topic.
|
|
1863
1933
|
*/
|
|
1864
|
-
|
|
1934
|
+
reopenTopic(chatId: ID, topicId: number): Promise<void>;
|
|
1865
1935
|
/**
|
|
1866
|
-
*
|
|
1936
|
+
* Report a chat. User-only.
|
|
1867
1937
|
*
|
|
1868
1938
|
* @method ch
|
|
1869
|
-
* @param chatId The identifier of a chat.
|
|
1939
|
+
* @param chatId The identifier of a chat to report.
|
|
1940
|
+
* @param reason The reason of the report.
|
|
1870
1941
|
*/
|
|
1871
|
-
|
|
1942
|
+
reportChat(chatId: ID, reason: ReportReason, params?: ReportChatParams): Promise<void>;
|
|
1872
1943
|
/**
|
|
1873
|
-
*
|
|
1944
|
+
* Set a chat's available reactions. User-only.
|
|
1874
1945
|
*
|
|
1875
1946
|
* @method ch
|
|
1876
1947
|
* @param chatId The identifier of a chat.
|
|
1948
|
+
* @param availableReactions The new available reactions.
|
|
1877
1949
|
*/
|
|
1878
|
-
|
|
1950
|
+
setAvailableReactions(chatId: ID, availableReactions: AvailableReactions): Promise<void>;
|
|
1879
1951
|
/**
|
|
1880
|
-
*
|
|
1952
|
+
* Set the number of boosts required to circumvent a chat's default restrictions. User-only.
|
|
1881
1953
|
*
|
|
1882
1954
|
* @method ch
|
|
1883
1955
|
* @param chatId The identifier of a chat.
|
|
1884
|
-
* @param
|
|
1956
|
+
* @param boosts The number of boosts required to circumvent its restrictions.
|
|
1885
1957
|
*/
|
|
1886
|
-
|
|
1958
|
+
setBoostsRequiredToCircumventRestrictions(chatId: ID, boosts: number): Promise<void>;
|
|
1887
1959
|
/**
|
|
1888
|
-
*
|
|
1960
|
+
* Change the description of a chat.
|
|
1889
1961
|
*
|
|
1890
1962
|
* @method ch
|
|
1891
1963
|
* @param chatId The identifier of a chat.
|
|
1892
|
-
* @param
|
|
1964
|
+
* @param description The new description.
|
|
1893
1965
|
*/
|
|
1894
|
-
|
|
1966
|
+
setChatDescription(chatId: ID, description: string): Promise<void>;
|
|
1895
1967
|
/**
|
|
1896
|
-
*
|
|
1968
|
+
* Set the rights of a chat member.
|
|
1897
1969
|
*
|
|
1898
1970
|
* @method ch
|
|
1899
|
-
* @param chatId The identifier of a chat.
|
|
1900
|
-
* @param
|
|
1971
|
+
* @param chatId The identifier of a chat. Must be a supergroup.
|
|
1972
|
+
* @param memberId The identifier of the member.
|
|
1901
1973
|
*/
|
|
1902
|
-
|
|
1974
|
+
setChatMemberRights(chatId: ID, memberId: ID, params?: SetChatMemberRightsParams): Promise<void>;
|
|
1903
1975
|
/**
|
|
1904
|
-
*
|
|
1976
|
+
* Change the tag of a chat member.
|
|
1905
1977
|
*
|
|
1906
1978
|
* @method ch
|
|
1907
1979
|
* @param chatId The identifier of a chat.
|
|
1908
|
-
* @param
|
|
1980
|
+
* @param userId The identifier of the user that is a member of the chat.
|
|
1909
1981
|
*/
|
|
1910
|
-
|
|
1982
|
+
setChatMemberTag(chatId: ID, userId: ID, params?: SetChatMemberTagParams): Promise<void>;
|
|
1911
1983
|
/**
|
|
1912
|
-
*
|
|
1984
|
+
* Set a chat's photo.
|
|
1913
1985
|
*
|
|
1914
1986
|
* @method ch
|
|
1915
1987
|
* @param chatId The identifier of a chat.
|
|
1916
|
-
* @param
|
|
1988
|
+
* @param photo A photo to set as the chat's photo.
|
|
1917
1989
|
*/
|
|
1918
|
-
|
|
1990
|
+
setChatPhoto(chatId: ID, photo: FileSource, params?: SetChatPhotoParams): Promise<void>;
|
|
1919
1991
|
/**
|
|
1920
|
-
*
|
|
1992
|
+
* Set a chat's sticker set.
|
|
1921
1993
|
*
|
|
1922
1994
|
* @method ch
|
|
1923
|
-
* @param chatId The identifier of a chat.
|
|
1924
|
-
* @param
|
|
1995
|
+
* @param chatId The identifier of a chat. Must be a supergroup.
|
|
1996
|
+
* @param setName The name of the set.
|
|
1925
1997
|
*/
|
|
1926
|
-
|
|
1998
|
+
setChatStickerSet(chatId: ID, setName: string): Promise<void>;
|
|
1927
1999
|
/**
|
|
1928
|
-
*
|
|
2000
|
+
* Change the title of a chat.
|
|
1929
2001
|
*
|
|
1930
2002
|
* @method ch
|
|
1931
2003
|
* @param chatId The identifier of a chat.
|
|
2004
|
+
* @param title The new title.
|
|
1932
2005
|
*/
|
|
1933
|
-
|
|
2006
|
+
setChatTitle(chatId: ID, title: string): Promise<void>;
|
|
1934
2007
|
/**
|
|
1935
|
-
*
|
|
2008
|
+
* Set the default send as chat of a chat. User-only.
|
|
1936
2009
|
*
|
|
1937
2010
|
* @method ch
|
|
1938
2011
|
* @param chatId The identifier of a chat.
|
|
2012
|
+
* @param sendAs The new default send as chat.
|
|
1939
2013
|
*/
|
|
1940
|
-
|
|
2014
|
+
setDefaultSendAs(chatId: ID, sendAs: ID): Promise<void>;
|
|
1941
2015
|
/**
|
|
1942
|
-
*
|
|
2016
|
+
* Set a channel's discussion chat. User-only.
|
|
1943
2017
|
*
|
|
1944
2018
|
* @method ch
|
|
1945
|
-
* @
|
|
2019
|
+
* @param chatId The identifier of a channel.
|
|
2020
|
+
* @param discussionChatId The identifier of a chat to use as discussion for the channel.
|
|
1946
2021
|
*/
|
|
1947
|
-
|
|
2022
|
+
setDiscussionChat(chatId: ID, discussionChatId: ID): Promise<void>;
|
|
1948
2023
|
/**
|
|
1949
|
-
*
|
|
2024
|
+
* Set the time to live of the messages of a chat. User-only.
|
|
1950
2025
|
*
|
|
1951
2026
|
* @method ch
|
|
1952
|
-
* @param chatId The identifier of a
|
|
1953
|
-
* @
|
|
2027
|
+
* @param chatId The identifier of a chat.
|
|
2028
|
+
* @param messageTtl The time to live of the messages in seconds.
|
|
1954
2029
|
*/
|
|
1955
|
-
|
|
2030
|
+
setMessageTtl(chatId: ID, messageTtl: number): Promise<void>;
|
|
1956
2031
|
/**
|
|
1957
|
-
*
|
|
2032
|
+
* Change slow mode in a group. User-only.
|
|
1958
2033
|
*
|
|
1959
2034
|
* @method ch
|
|
1960
|
-
* @param chatId The identifier of
|
|
1961
|
-
* @
|
|
2035
|
+
* @param chatId The identifier of the group to change slow mode in.
|
|
2036
|
+
* @param duration New slow mode duration.
|
|
1962
2037
|
*/
|
|
1963
|
-
|
|
2038
|
+
setSlowMode(chatId: ID, duration: SlowModeDuration): Promise<void>;
|
|
1964
2039
|
/**
|
|
1965
|
-
*
|
|
2040
|
+
* Show the general forum topic.
|
|
1966
2041
|
*
|
|
1967
2042
|
* @method ch
|
|
1968
2043
|
* @param chatId The identifier of a chat.
|
|
1969
|
-
* @returns The count of online members in the chat.
|
|
1970
2044
|
*/
|
|
1971
|
-
|
|
2045
|
+
showGeneralTopic(chatId: ID): Promise<void>;
|
|
1972
2046
|
/**
|
|
1973
|
-
*
|
|
2047
|
+
* Show the member list of a group to non-admins. User-only.
|
|
1974
2048
|
*
|
|
1975
2049
|
* @method ch
|
|
1976
|
-
* @param chatId The identifier of
|
|
2050
|
+
* @param chatId The identifier of the group.
|
|
1977
2051
|
*/
|
|
1978
|
-
|
|
2052
|
+
showMemberList(chatId: ID): Promise<void>;
|
|
1979
2053
|
/**
|
|
1980
|
-
*
|
|
2054
|
+
* Transfer the ownership of a chat. User-only.
|
|
1981
2055
|
*
|
|
1982
2056
|
* @method ch
|
|
1983
2057
|
* @param chatId The identifier of a chat.
|
|
2058
|
+
* @param userId The identifier of the new owner.
|
|
2059
|
+
* @param password The password of the current account.
|
|
1984
2060
|
*/
|
|
1985
|
-
|
|
2061
|
+
transferChatOwnership(chatId: ID, userId: ID, password: string): Promise<void>;
|
|
1986
2062
|
/**
|
|
1987
|
-
*
|
|
2063
|
+
* Unarchive a single chat. User-only.
|
|
1988
2064
|
*
|
|
1989
2065
|
* @method ch
|
|
1990
2066
|
* @param chatId The identifier of a chat.
|
|
1991
|
-
* @param sendAs The new default send as chat.
|
|
1992
2067
|
*/
|
|
1993
|
-
|
|
2068
|
+
unarchiveChat(chatId: ID): Promise<void>;
|
|
1994
2069
|
/**
|
|
1995
|
-
*
|
|
2070
|
+
* Unarchive multiple chats. User-only.
|
|
1996
2071
|
*
|
|
1997
2072
|
* @method ch
|
|
1998
|
-
* @param
|
|
1999
|
-
* @param reason The reason of the report.
|
|
2073
|
+
* @param chatIds The identifiers of the chats to unarchive.
|
|
2000
2074
|
*/
|
|
2001
|
-
|
|
2075
|
+
unarchiveChats(chatIds: ID[]): Promise<void>;
|
|
2002
2076
|
/**
|
|
2003
|
-
*
|
|
2077
|
+
* Unban a member from a chat.
|
|
2004
2078
|
*
|
|
2005
2079
|
* @method ch
|
|
2006
|
-
* @param chatId The identifier of a chat.
|
|
2080
|
+
* @param chatId The identifier of a chat. Must be a supergroup.
|
|
2081
|
+
* @param memberId The identifier of the member.
|
|
2007
2082
|
*/
|
|
2008
|
-
|
|
2083
|
+
unbanChatMember(chatId: ID, memberId: ID): Promise<void>;
|
|
2009
2084
|
/**
|
|
2010
|
-
*
|
|
2085
|
+
* Unpin a forum topic.
|
|
2011
2086
|
*
|
|
2012
2087
|
* @method ch
|
|
2013
2088
|
* @param chatId The identifier of a chat.
|
|
2089
|
+
* @param topicId The identifier of the topic.
|
|
2014
2090
|
*/
|
|
2015
|
-
|
|
2091
|
+
unpinTopic(chatId: ID, topicId: number): Promise<void>;
|
|
2016
2092
|
/**
|
|
2017
|
-
*
|
|
2093
|
+
* Answer a callback query. Bot-only.
|
|
2018
2094
|
*
|
|
2019
|
-
* @method
|
|
2020
|
-
* @param
|
|
2095
|
+
* @method cq
|
|
2096
|
+
* @param id ID of the callback query to answer.
|
|
2021
2097
|
*/
|
|
2022
|
-
|
|
2098
|
+
answerCallbackQuery(id: string, params?: AnswerCallbackQueryParams): Promise<void>;
|
|
2023
2099
|
/**
|
|
2024
2100
|
* Send a callback query. User-only.
|
|
2025
2101
|
*
|
|
@@ -2032,12 +2108,13 @@ export declare class Client<C extends Context = Context> extends Composer<C> imp
|
|
|
2032
2108
|
*/
|
|
2033
2109
|
sendCallbackQuery(botId: ID, messageId: number, question: CallbackQueryQuestion): Promise<CallbackQueryAnswer>;
|
|
2034
2110
|
/**
|
|
2035
|
-
* Answer
|
|
2111
|
+
* Answer an inline query. Bot-only.
|
|
2036
2112
|
*
|
|
2037
|
-
* @method
|
|
2038
|
-
* @param id
|
|
2113
|
+
* @method iq
|
|
2114
|
+
* @param id The identifier of the inline query to answer.
|
|
2115
|
+
* @param results The results to answer with.
|
|
2039
2116
|
*/
|
|
2040
|
-
|
|
2117
|
+
answerInlineQuery(id: string, results: InlineQueryResult[], params?: AnswerInlineQueryParams): Promise<void>;
|
|
2041
2118
|
/**
|
|
2042
2119
|
* Send an inline query. User-only.
|
|
2043
2120
|
*
|
|
@@ -2049,40 +2126,12 @@ export declare class Client<C extends Context = Context> extends Composer<C> imp
|
|
|
2049
2126
|
*/
|
|
2050
2127
|
sendInlineQuery(botId: ID, chatId: ID, params?: SendInlineQueryParams): Promise<InlineQueryAnswer>;
|
|
2051
2128
|
/**
|
|
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.
|
|
2129
|
+
* Get the bot's commands in the given scope and/or language. Bot-only.
|
|
2079
2130
|
*
|
|
2080
2131
|
* @method bo
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
languageCode?: string;
|
|
2085
|
-
}): Promise<void>;
|
|
2132
|
+
* @returns The current bot's commands in the specified language.
|
|
2133
|
+
*/
|
|
2134
|
+
getMyCommands(params?: GetMyCommandsParams): Promise<BotCommand[]>;
|
|
2086
2135
|
/**
|
|
2087
2136
|
* Get the bot's description in the given language. Bot-only.
|
|
2088
2137
|
*
|
|
@@ -2118,21 +2167,32 @@ export declare class Client<C extends Context = Context> extends Composer<C> imp
|
|
|
2118
2167
|
*/
|
|
2119
2168
|
setMyCommands(commands: BotCommand[], params?: SetMyCommandsParams): Promise<void>;
|
|
2120
2169
|
/**
|
|
2121
|
-
*
|
|
2170
|
+
* Set the bot's description in the given language. Bot-only.
|
|
2122
2171
|
*
|
|
2123
2172
|
* @method bo
|
|
2124
|
-
* @returns The current bot's commands in the specified language.
|
|
2125
2173
|
*/
|
|
2126
|
-
|
|
2174
|
+
setMyDescription(params?: {
|
|
2175
|
+
description?: string;
|
|
2176
|
+
languageCode?: string;
|
|
2177
|
+
}): Promise<void>;
|
|
2127
2178
|
/**
|
|
2128
|
-
*
|
|
2179
|
+
* Set the bot's name in the given language. Bot-only.
|
|
2129
2180
|
*
|
|
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.
|
|
2181
|
+
* @method bo
|
|
2134
2182
|
*/
|
|
2135
|
-
|
|
2183
|
+
setMyName(params?: {
|
|
2184
|
+
name?: string;
|
|
2185
|
+
languageCode?: string;
|
|
2186
|
+
}): Promise<void>;
|
|
2187
|
+
/**
|
|
2188
|
+
* Set the bot's short description in the given language. Bot-only.
|
|
2189
|
+
*
|
|
2190
|
+
* @method bo
|
|
2191
|
+
*/
|
|
2192
|
+
setMyShortDescription(params?: {
|
|
2193
|
+
shortDescription?: string;
|
|
2194
|
+
languageCode?: string;
|
|
2195
|
+
}): Promise<void>;
|
|
2136
2196
|
/**
|
|
2137
2197
|
* Make a reaction to a message.
|
|
2138
2198
|
*
|
|
@@ -2142,6 +2202,12 @@ export declare class Client<C extends Context = Context> extends Composer<C> imp
|
|
|
2142
2202
|
* @param reaction The reaction to add.
|
|
2143
2203
|
*/
|
|
2144
2204
|
addReaction(chatId: ID, messageId: number, reaction: Reaction, params?: AddReactionParams): Promise<void>;
|
|
2205
|
+
/**
|
|
2206
|
+
* Clear recent reactions. User-only.
|
|
2207
|
+
*
|
|
2208
|
+
* @method re
|
|
2209
|
+
*/
|
|
2210
|
+
clearRecentReactions(): Promise<void>;
|
|
2145
2211
|
/**
|
|
2146
2212
|
* Undo a reaction made to a message.
|
|
2147
2213
|
*
|
|
@@ -2169,37 +2235,38 @@ export declare class Client<C extends Context = Context> extends Composer<C> imp
|
|
|
2169
2235
|
*/
|
|
2170
2236
|
removeUserReactions(chatId: ID, userId: ID): Promise<void>;
|
|
2171
2237
|
/**
|
|
2172
|
-
*
|
|
2238
|
+
* Change reactions made to a message.
|
|
2173
2239
|
*
|
|
2174
2240
|
* @method re
|
|
2241
|
+
* @param chatId The identifier of the chat which the message belongs to.
|
|
2242
|
+
* @param messageId The identifier of the message to add the reaction to.
|
|
2243
|
+
* @param reactions The new reactions.
|
|
2175
2244
|
*/
|
|
2176
|
-
|
|
2245
|
+
setReactions(chatId: ID, messageId: number, reactions: Reaction[], params?: SetReactionsParams): Promise<void>;
|
|
2177
2246
|
/**
|
|
2178
|
-
*
|
|
2247
|
+
* Add multiple stories to highlights. User-only.
|
|
2179
2248
|
*
|
|
2180
2249
|
* @method st
|
|
2181
|
-
* @param
|
|
2182
|
-
* @
|
|
2250
|
+
* @param chatId The identifier of a chat.
|
|
2251
|
+
* @param storyIds The identifiers of the stories to add to highlights.
|
|
2183
2252
|
*/
|
|
2184
|
-
|
|
2253
|
+
addStoriesToHighlights(chatId: ID, storyIds: number[]): Promise<void>;
|
|
2185
2254
|
/**
|
|
2186
|
-
*
|
|
2255
|
+
* Add a single story to highlights. User-only.
|
|
2187
2256
|
*
|
|
2188
2257
|
* @method st
|
|
2189
2258
|
* @param chatId The identifier of a chat.
|
|
2190
|
-
* @param
|
|
2191
|
-
* @returns The retrieved stories.
|
|
2259
|
+
* @param storyId The identifier of the story to add to highlights.
|
|
2192
2260
|
*/
|
|
2193
|
-
|
|
2261
|
+
addStoryToHighlights(chatId: ID, storyId: number): Promise<void>;
|
|
2194
2262
|
/**
|
|
2195
|
-
*
|
|
2263
|
+
* Create a story. User-only.
|
|
2196
2264
|
*
|
|
2197
2265
|
* @method st
|
|
2198
|
-
* @param
|
|
2199
|
-
* @
|
|
2200
|
-
* @returns The retrieved story.
|
|
2266
|
+
* @param content The content of the story.
|
|
2267
|
+
* @returns The created story.
|
|
2201
2268
|
*/
|
|
2202
|
-
|
|
2269
|
+
createStory(chatId: ID, content: InputStoryContent, params?: CreateStoryParams): Promise<Story>;
|
|
2203
2270
|
/**
|
|
2204
2271
|
* Delete multiple stories. User-only.
|
|
2205
2272
|
*
|
|
@@ -2217,21 +2284,23 @@ export declare class Client<C extends Context = Context> extends Composer<C> imp
|
|
|
2217
2284
|
*/
|
|
2218
2285
|
deleteStory(chatId: ID, storyId: number): Promise<void>;
|
|
2219
2286
|
/**
|
|
2220
|
-
*
|
|
2287
|
+
* Retrieve multiple stories. User-only.
|
|
2221
2288
|
*
|
|
2222
2289
|
* @method st
|
|
2223
2290
|
* @param chatId The identifier of a chat.
|
|
2224
|
-
* @param storyIds The identifiers of the stories to
|
|
2291
|
+
* @param storyIds The identifiers of the stories to retrieve.
|
|
2292
|
+
* @returns The retrieved stories.
|
|
2225
2293
|
*/
|
|
2226
|
-
|
|
2294
|
+
getStories(chatId: ID, storyIds: number[]): Promise<Story[]>;
|
|
2227
2295
|
/**
|
|
2228
|
-
*
|
|
2296
|
+
* Retrieve a single story. User-only.
|
|
2229
2297
|
*
|
|
2230
2298
|
* @method st
|
|
2231
2299
|
* @param chatId The identifier of a chat.
|
|
2232
|
-
* @param storyId The identifier of the story to
|
|
2300
|
+
* @param storyId The identifier of the story to retrieve.
|
|
2301
|
+
* @returns The retrieved story.
|
|
2233
2302
|
*/
|
|
2234
|
-
|
|
2303
|
+
getStory(chatId: ID, storyId: number): Promise<Story | null>;
|
|
2235
2304
|
/**
|
|
2236
2305
|
* Remove multiple stories from highlights. User-only.
|
|
2237
2306
|
*
|
|
@@ -2248,14 +2317,6 @@ export declare class Client<C extends Context = Context> extends Composer<C> imp
|
|
|
2248
2317
|
* @param storyId The identifier of the story to remove from highlights.
|
|
2249
2318
|
*/
|
|
2250
2319
|
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
2320
|
/**
|
|
2260
2321
|
* Report multiple stories. User-only.
|
|
2261
2322
|
*
|
|
@@ -2265,23 +2326,13 @@ export declare class Client<C extends Context = Context> extends Composer<C> imp
|
|
|
2265
2326
|
*/
|
|
2266
2327
|
reportStories(chatId: ID, storyIds: number[], params?: ReportStoryParams): Promise<StoryReportResult>;
|
|
2267
2328
|
/**
|
|
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.
|
|
2329
|
+
* Report a single story. User-only.
|
|
2278
2330
|
*
|
|
2279
|
-
* @method
|
|
2280
|
-
* @param chatId The identifier of
|
|
2281
|
-
* @param
|
|
2282
|
-
* @param name The new name of the album.
|
|
2331
|
+
* @method st
|
|
2332
|
+
* @param chatId The identifier of a chat that posted the story.
|
|
2333
|
+
* @param storyId The identifier of the story to report.
|
|
2283
2334
|
*/
|
|
2284
|
-
|
|
2335
|
+
reportStory(chatId: ID, storyId: number, params?: ReportStoryParams): Promise<StoryReportResult>;
|
|
2285
2336
|
/**
|
|
2286
2337
|
* Add multiple stories to an album. User-only.
|
|
2287
2338
|
*
|
|
@@ -2300,6 +2351,30 @@ export declare class Client<C extends Context = Context> extends Composer<C> imp
|
|
|
2300
2351
|
* @param storyId The identifier of the story to add.
|
|
2301
2352
|
*/
|
|
2302
2353
|
addStoryToAlbum(chatId: ID, albumId: number, storyId: number): Promise<StoryAlbum>;
|
|
2354
|
+
/**
|
|
2355
|
+
* Create a story album. User-only.
|
|
2356
|
+
*
|
|
2357
|
+
* @method sa
|
|
2358
|
+
* @param chatId The identifier of the chat to create the album in.
|
|
2359
|
+
* @param name The name of the album.
|
|
2360
|
+
* @param storyIds The initial stories inside the album.
|
|
2361
|
+
*/
|
|
2362
|
+
createStoryAlbum(chatId: ID, name: string, storyIds: number[]): Promise<StoryAlbum>;
|
|
2363
|
+
/**
|
|
2364
|
+
* Get stories inside an album. User-only.
|
|
2365
|
+
*
|
|
2366
|
+
* @method sa
|
|
2367
|
+
* @param chatId The identifier of the chat including albums.
|
|
2368
|
+
* @param albumId The identifier of an album.
|
|
2369
|
+
*/
|
|
2370
|
+
getStoriesInAlbum(chatId: ID, albumId: number): Promise<AlbumStoryList>;
|
|
2371
|
+
/**
|
|
2372
|
+
* Get story albums in a chat. User-only.
|
|
2373
|
+
*
|
|
2374
|
+
* @method sa
|
|
2375
|
+
* @param chatId The identifier of a chat including albums.
|
|
2376
|
+
*/
|
|
2377
|
+
getStoryAlbums(chatId: ID): Promise<StoryAlbum[]>;
|
|
2303
2378
|
/**
|
|
2304
2379
|
* Remove multiple stories from an album. User-only.
|
|
2305
2380
|
*
|
|
@@ -2328,20 +2403,14 @@ export declare class Client<C extends Context = Context> extends Composer<C> imp
|
|
|
2328
2403
|
*/
|
|
2329
2404
|
reorderStoriesInAlbum(chatId: ID, albumId: number, storyIds: number[]): Promise<StoryAlbum>;
|
|
2330
2405
|
/**
|
|
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.
|
|
2406
|
+
* Set the name of a story album. User-only.
|
|
2339
2407
|
*
|
|
2340
2408
|
* @method sa
|
|
2341
|
-
* @param chatId The identifier of the chat including
|
|
2342
|
-
* @param albumId The identifier of
|
|
2409
|
+
* @param chatId The identifier of the chat including the album.
|
|
2410
|
+
* @param albumId The identifier of the album to rename.
|
|
2411
|
+
* @param name The new name of the album.
|
|
2343
2412
|
*/
|
|
2344
|
-
|
|
2413
|
+
setStoryAlbumName(chatId: ID, albumId: number, name: string): Promise<StoryAlbum>;
|
|
2345
2414
|
/**
|
|
2346
2415
|
* Get network statistics. This might not always be available.
|
|
2347
2416
|
*
|
|
@@ -2349,70 +2418,70 @@ export declare class Client<C extends Context = Context> extends Composer<C> imp
|
|
|
2349
2418
|
*/
|
|
2350
2419
|
getNetworkStatistics(): Promise<NetworkStatistics>;
|
|
2351
2420
|
/**
|
|
2352
|
-
*
|
|
2421
|
+
* Download a live stream segment. User-only.
|
|
2353
2422
|
*
|
|
2354
2423
|
* @method vc
|
|
2355
|
-
* @param
|
|
2356
|
-
* @
|
|
2424
|
+
* @param id The identifier of a video chat retrieved from getChat, startVideoChat, or scheduleVideoChat.
|
|
2425
|
+
* @param channelId Stream channel ID.
|
|
2426
|
+
* @param scale Stream channel scale.
|
|
2427
|
+
* @param timestamp Millisecond timestamp of the chunk to download.
|
|
2357
2428
|
*/
|
|
2358
|
-
|
|
2429
|
+
downloadLiveStreamSegment(id: string, channelId: number, scale: number, timestamp: number, params?: DownloadLiveStreamSegmentParams): Promise<Uint8Array>;
|
|
2359
2430
|
/**
|
|
2360
|
-
*
|
|
2431
|
+
* Get live stream channels. User-only.
|
|
2361
2432
|
*
|
|
2362
2433
|
* @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.
|
|
2434
|
+
* @param id The identifier of a video chat retrieved from getChat, startVideoChat, or scheduleVideoChat.
|
|
2366
2435
|
*/
|
|
2367
|
-
|
|
2436
|
+
getLiveStreamChannels(id: string): Promise<LiveStreamChannel[]>;
|
|
2368
2437
|
/**
|
|
2369
|
-
*
|
|
2438
|
+
* Get a video chat. User-only.
|
|
2370
2439
|
*
|
|
2371
2440
|
* @method vc
|
|
2372
2441
|
* @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.
|
|
2442
|
+
* @cache
|
|
2375
2443
|
*/
|
|
2376
|
-
|
|
2444
|
+
getVideoChat(id: string): Promise<VideoChat>;
|
|
2377
2445
|
/**
|
|
2378
|
-
*
|
|
2446
|
+
* Join a live stream. User-only.
|
|
2379
2447
|
*
|
|
2380
2448
|
* @method vc
|
|
2381
2449
|
* @param id The identifier of a video chat retrieved from getChat, startVideoChat, or scheduleVideoChat.
|
|
2382
2450
|
*/
|
|
2383
|
-
|
|
2451
|
+
joinLiveStream(id: string): Promise<void>;
|
|
2384
2452
|
/**
|
|
2385
|
-
* Join a
|
|
2453
|
+
* Join a video chat. User-only.
|
|
2386
2454
|
*
|
|
2387
2455
|
* @method vc
|
|
2388
2456
|
* @param id The identifier of a video chat retrieved from getChat, startVideoChat, or scheduleVideoChat.
|
|
2457
|
+
* @param params_ WebRTC connection parameters.
|
|
2458
|
+
* @returns Parameters to be passed to the used WebRTC library.
|
|
2389
2459
|
*/
|
|
2390
|
-
|
|
2460
|
+
joinVideoChat(id: string, params_: string, params?: JoinVideoChatParams): Promise<string>;
|
|
2391
2461
|
/**
|
|
2392
|
-
*
|
|
2462
|
+
* Leave a video chat. User-only.
|
|
2393
2463
|
*
|
|
2394
2464
|
* @method vc
|
|
2395
2465
|
* @param id The identifier of a video chat retrieved from getChat, startVideoChat, or scheduleVideoChat.
|
|
2396
|
-
* @cache
|
|
2397
2466
|
*/
|
|
2398
|
-
|
|
2467
|
+
leaveVideoChat(id: string): Promise<void>;
|
|
2399
2468
|
/**
|
|
2400
|
-
*
|
|
2469
|
+
* Schedule a video chat. User-only.
|
|
2401
2470
|
*
|
|
2402
2471
|
* @method vc
|
|
2403
|
-
* @param
|
|
2472
|
+
* @param chatId The identifier of a chat to schedule the video chat in.
|
|
2473
|
+
* @param startAt A point in time in the future when the video chat will be started.
|
|
2474
|
+
* @returns The scheduled video chat.
|
|
2404
2475
|
*/
|
|
2405
|
-
|
|
2476
|
+
scheduleVideoChat(chatId: ID, startAt: number, params?: ScheduleVideoChatParams): Promise<VideoChatScheduled>;
|
|
2406
2477
|
/**
|
|
2407
|
-
*
|
|
2478
|
+
* Start a video chat. User-only.
|
|
2408
2479
|
*
|
|
2409
2480
|
* @method vc
|
|
2410
|
-
* @param
|
|
2411
|
-
* @
|
|
2412
|
-
* @param scale Stream channel scale.
|
|
2413
|
-
* @param timestamp Millisecond timestamp of the chunk to download.
|
|
2481
|
+
* @param chatId The identifier of a chat to start the video chat in.
|
|
2482
|
+
* @returns The started video chat.
|
|
2414
2483
|
*/
|
|
2415
|
-
|
|
2484
|
+
startVideoChat(chatId: ID, params?: StartVideoChatParams): Promise<VideoChatActive>;
|
|
2416
2485
|
/**
|
|
2417
2486
|
* Answer a pre-checkout query. Bot-only.
|
|
2418
2487
|
*
|
|
@@ -2422,20 +2491,19 @@ export declare class Client<C extends Context = Context> extends Composer<C> imp
|
|
|
2422
2491
|
*/
|
|
2423
2492
|
answerPreCheckoutQuery(preCheckoutQueryId: string, ok: boolean, params?: AnswerPreCheckoutQueryParams): Promise<void>;
|
|
2424
2493
|
/**
|
|
2425
|
-
*
|
|
2494
|
+
* Get the star balance of a chat.
|
|
2426
2495
|
*
|
|
2427
2496
|
* @method pa
|
|
2428
|
-
* @param
|
|
2429
|
-
* @param telegramPaymentChargeId The identifier of the charge.
|
|
2497
|
+
* @param chatId The identifier of the chat to get the star balance for.
|
|
2430
2498
|
*/
|
|
2431
|
-
|
|
2499
|
+
getStarBalance(chatId: ID): Promise<StarAmount>;
|
|
2432
2500
|
/**
|
|
2433
|
-
* Get
|
|
2501
|
+
* Get star transactions.
|
|
2434
2502
|
*
|
|
2435
2503
|
* @method pa
|
|
2436
|
-
* @param chatId The identifier of the chat to get
|
|
2504
|
+
* @param chatId The identifier of the chat to get star transactions for.
|
|
2437
2505
|
*/
|
|
2438
|
-
|
|
2506
|
+
getStarTransactions(chatId: ID, params?: GetStarTransactionsParams): Promise<StarTransactionList>;
|
|
2439
2507
|
/**
|
|
2440
2508
|
* Get the TON balance of a chat.
|
|
2441
2509
|
*
|
|
@@ -2444,40 +2512,41 @@ export declare class Client<C extends Context = Context> extends Composer<C> imp
|
|
|
2444
2512
|
*/
|
|
2445
2513
|
getTonBalance(chatId: ID): Promise<number>;
|
|
2446
2514
|
/**
|
|
2447
|
-
*
|
|
2515
|
+
* Refund a star payment. Bot-only.
|
|
2448
2516
|
*
|
|
2449
2517
|
* @method pa
|
|
2450
|
-
* @param
|
|
2518
|
+
* @param userId The identifier of the user that was charged.
|
|
2519
|
+
* @param telegramPaymentChargeId The identifier of the charge.
|
|
2451
2520
|
*/
|
|
2452
|
-
|
|
2521
|
+
refundStarPayment(userId: ID, telegramPaymentChargeId: string): Promise<void>;
|
|
2453
2522
|
/**
|
|
2454
|
-
*
|
|
2523
|
+
* Add a contact. User-only.
|
|
2455
2524
|
*
|
|
2456
2525
|
* @method co
|
|
2526
|
+
* @param userId The identifier of the user to add as contact.
|
|
2527
|
+
* @param firstName The contact's first name.
|
|
2457
2528
|
*/
|
|
2458
|
-
|
|
2529
|
+
addContact(userId: ID, firstName: string, params?: AddContactParams): Promise<void>;
|
|
2459
2530
|
/**
|
|
2460
|
-
* Delete
|
|
2531
|
+
* Delete a single contact. User-only.
|
|
2461
2532
|
*
|
|
2462
2533
|
* @method co
|
|
2463
|
-
* @param
|
|
2534
|
+
* @param userId The identifier of the contact to delete.
|
|
2464
2535
|
*/
|
|
2465
|
-
|
|
2536
|
+
deleteContact(userId: ID): Promise<void>;
|
|
2466
2537
|
/**
|
|
2467
|
-
* Delete
|
|
2538
|
+
* Delete multiple contacts. User-only.
|
|
2468
2539
|
*
|
|
2469
2540
|
* @method co
|
|
2470
|
-
* @param
|
|
2541
|
+
* @param userIds The identifiers of contacts to delete.
|
|
2471
2542
|
*/
|
|
2472
|
-
|
|
2543
|
+
deleteContacts(userIds: ID[]): Promise<void>;
|
|
2473
2544
|
/**
|
|
2474
|
-
*
|
|
2545
|
+
* Get contacts. User-only.
|
|
2475
2546
|
*
|
|
2476
2547
|
* @method co
|
|
2477
|
-
* @param userId The identifier of the user to add as contact.
|
|
2478
|
-
* @param firstName The contact's first name.
|
|
2479
2548
|
*/
|
|
2480
|
-
|
|
2549
|
+
getContacts(): Promise<User[]>;
|
|
2481
2550
|
/**
|
|
2482
2551
|
* Set a contact note.
|
|
2483
2552
|
*
|
|
@@ -2493,11 +2562,12 @@ export declare class Client<C extends Context = Context> extends Composer<C> imp
|
|
|
2493
2562
|
*/
|
|
2494
2563
|
getTranslations(params?: GetTranslationsParams): Promise<Translation[]>;
|
|
2495
2564
|
/**
|
|
2496
|
-
*
|
|
2565
|
+
* Craft gifts.
|
|
2497
2566
|
*
|
|
2498
2567
|
* @method gf
|
|
2568
|
+
* @param gifts The gifts to craft.
|
|
2499
2569
|
*/
|
|
2500
|
-
|
|
2570
|
+
craftGifts(gifts: InputGift[]): Promise<void>;
|
|
2501
2571
|
/**
|
|
2502
2572
|
* Get gifts claimed by a user or a channel. User-only.
|
|
2503
2573
|
*
|
|
@@ -2506,57 +2576,58 @@ export declare class Client<C extends Context = Context> extends Composer<C> imp
|
|
|
2506
2576
|
*/
|
|
2507
2577
|
getClaimedGifts(chatId: ID, params?: GetClaimedGiftsParams): Promise<ClaimedGifts>;
|
|
2508
2578
|
/**
|
|
2509
|
-
*
|
|
2579
|
+
* Get a gift using its slug.
|
|
2510
2580
|
*
|
|
2511
2581
|
* @method gf
|
|
2512
|
-
* @param
|
|
2513
|
-
* @param giftId The identifier of the gift to send.
|
|
2582
|
+
* @param slug The slug of a gift.
|
|
2514
2583
|
*/
|
|
2515
|
-
|
|
2584
|
+
getGift(slug: string): Promise<Gift>;
|
|
2516
2585
|
/**
|
|
2517
|
-
*
|
|
2586
|
+
* Get available gifts.
|
|
2518
2587
|
*
|
|
2519
2588
|
* @method gf
|
|
2520
|
-
* @param gift The gift to sell.
|
|
2521
2589
|
*/
|
|
2522
|
-
|
|
2590
|
+
getGifts(): Promise<Gift[]>;
|
|
2523
2591
|
/**
|
|
2524
|
-
*
|
|
2592
|
+
* Gift a Telegram Premium subscription. Bot-only.
|
|
2525
2593
|
*
|
|
2526
2594
|
* @method gf
|
|
2527
|
-
* @param
|
|
2595
|
+
* @param userId The identifier of a user to gift the Telegram Premium subscription to.
|
|
2596
|
+
* @param duration The duration of the subscription.
|
|
2528
2597
|
*/
|
|
2529
|
-
|
|
2598
|
+
giftPremiumSubscription(userId: ID, duration: PremiumSubscriptionDuration, params?: GiftPremiumSubscriptionParams): Promise<void>;
|
|
2530
2599
|
/**
|
|
2531
|
-
*
|
|
2600
|
+
* Sell a gift.
|
|
2532
2601
|
*
|
|
2533
2602
|
* @method gf
|
|
2534
|
-
* @param
|
|
2603
|
+
* @param gift The gift to sell.
|
|
2535
2604
|
*/
|
|
2536
|
-
|
|
2605
|
+
sellGift(gift: InputGift): Promise<void>;
|
|
2537
2606
|
/**
|
|
2538
|
-
*
|
|
2607
|
+
* Send a gift.
|
|
2539
2608
|
*
|
|
2540
2609
|
* @method gf
|
|
2541
|
-
* @param chatId The identifier of a
|
|
2542
|
-
* @param
|
|
2610
|
+
* @param chatId The identifier of a user or a channel to send the gift to.
|
|
2611
|
+
* @param giftId The identifier of the gift to send.
|
|
2543
2612
|
*/
|
|
2544
|
-
|
|
2613
|
+
sendGift(chatId: ID, giftId: string, params?: SendGiftParams): Promise<void>;
|
|
2545
2614
|
/**
|
|
2546
|
-
*
|
|
2615
|
+
* Transfer a gift. User-only.
|
|
2547
2616
|
*
|
|
2548
2617
|
* @method gf
|
|
2549
|
-
* @param
|
|
2550
|
-
* @param
|
|
2618
|
+
* @param chatId The identifier of a chat to transfer the gift to.
|
|
2619
|
+
* @param gift The gift to transfer.
|
|
2551
2620
|
*/
|
|
2552
|
-
|
|
2621
|
+
transferGift(chatId: ID, gift: InputGift): Promise<void>;
|
|
2553
2622
|
/**
|
|
2554
|
-
*
|
|
2623
|
+
* Add gifts to a gift collection. User-only.
|
|
2555
2624
|
*
|
|
2556
2625
|
* @method gc
|
|
2557
|
-
* @param chatId The identifier of
|
|
2626
|
+
* @param chatId The identifier of the chat that includes the gift collection.
|
|
2627
|
+
* @param collectionId The identifier of a gift collection.
|
|
2628
|
+
* @param gifts The gifts to add to the collection.
|
|
2558
2629
|
*/
|
|
2559
|
-
|
|
2630
|
+
addGiftsToCollection(chatId: ID, collectionId: number, gifts: InputGift[]): Promise<GiftCollection>;
|
|
2560
2631
|
/**
|
|
2561
2632
|
* Create a gift collection. User-only.
|
|
2562
2633
|
*
|
|
@@ -2567,23 +2638,20 @@ export declare class Client<C extends Context = Context> extends Composer<C> imp
|
|
|
2567
2638
|
*/
|
|
2568
2639
|
createGiftCollection(chatId: ID, name: string, gifts: InputGift[]): Promise<GiftCollection>;
|
|
2569
2640
|
/**
|
|
2570
|
-
*
|
|
2641
|
+
* Delete a gift collection. User-only.
|
|
2571
2642
|
*
|
|
2572
2643
|
* @method gc
|
|
2573
2644
|
* @param chatId The identifier of the chat that includes the gift collection.
|
|
2574
2645
|
* @param collectionId The identifier of a gift collection.
|
|
2575
|
-
* @param name The gift collection's new name.
|
|
2576
2646
|
*/
|
|
2577
|
-
|
|
2647
|
+
deleteGiftCollection(chatId: ID, collectionId: number): Promise<void>;
|
|
2578
2648
|
/**
|
|
2579
|
-
*
|
|
2649
|
+
* Get gift collections of a chat. User-only.
|
|
2580
2650
|
*
|
|
2581
2651
|
* @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.
|
|
2652
|
+
* @param chatId The identifier of a chat to get gift collections for.
|
|
2585
2653
|
*/
|
|
2586
|
-
|
|
2654
|
+
getGiftCollections(chatId: ID): Promise<GiftCollection[]>;
|
|
2587
2655
|
/**
|
|
2588
2656
|
* Remove gifts from a gift collection. User-only.
|
|
2589
2657
|
*
|
|
@@ -2603,20 +2671,14 @@ export declare class Client<C extends Context = Context> extends Composer<C> imp
|
|
|
2603
2671
|
*/
|
|
2604
2672
|
reorderGiftsInCollection(chatId: ID, collectionId: number, gifts: InputGift[]): Promise<GiftCollection>;
|
|
2605
2673
|
/**
|
|
2606
|
-
*
|
|
2674
|
+
* Set the name of a gift collection. User-only.
|
|
2607
2675
|
*
|
|
2608
2676
|
* @method gc
|
|
2609
2677
|
* @param chatId The identifier of the chat that includes the gift collection.
|
|
2610
2678
|
* @param collectionId The identifier of a gift collection.
|
|
2679
|
+
* @param name The gift collection's new name.
|
|
2611
2680
|
*/
|
|
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>;
|
|
2681
|
+
setGiftCollectionName(chatId: ID, collectionId: number, name: string): Promise<GiftCollection>;
|
|
2620
2682
|
/**
|
|
2621
2683
|
* End a takeout session. User-only.
|
|
2622
2684
|
*
|
|
@@ -2632,19 +2694,28 @@ export declare class Client<C extends Context = Context> extends Composer<C> imp
|
|
|
2632
2694
|
*/
|
|
2633
2695
|
getLeftChannels(takeoutId: string, params?: GetLeftChannelsParams): Promise<LeftChannelList>;
|
|
2634
2696
|
/**
|
|
2635
|
-
*
|
|
2697
|
+
* Start a takeout session. User-only.
|
|
2698
|
+
*
|
|
2699
|
+
* @method to
|
|
2700
|
+
* @returns The identifier of the takeout session.
|
|
2701
|
+
*/
|
|
2702
|
+
startTakeoutSession(params?: StartTakeoutSessionParams): Promise<string>;
|
|
2703
|
+
/**
|
|
2704
|
+
* Add a sticker to a sticker set.
|
|
2636
2705
|
*
|
|
2637
2706
|
* @method ss
|
|
2638
2707
|
* @param slug The slug of the sticker set or its link.
|
|
2708
|
+
* @param sticker The sticker to add.
|
|
2639
2709
|
*/
|
|
2640
|
-
|
|
2710
|
+
addStickerToStickerSet(slug: string, sticker: InputSticker, params?: AddStickerToStickerSetParams): Promise<void>;
|
|
2641
2711
|
/**
|
|
2642
|
-
*
|
|
2712
|
+
* Change the position of a sticker in its set.
|
|
2643
2713
|
*
|
|
2644
2714
|
* @method ss
|
|
2645
|
-
* @param
|
|
2715
|
+
* @param fileId The identifier of the sticker.
|
|
2716
|
+
* @param position The new position of the sticker.
|
|
2646
2717
|
*/
|
|
2647
|
-
|
|
2718
|
+
changeStickerPositionInStickerSet(fileId: string, position: number): Promise<void>;
|
|
2648
2719
|
/**
|
|
2649
2720
|
* Check the availability of a sticker set slug.
|
|
2650
2721
|
*
|
|
@@ -2653,14 +2724,6 @@ export declare class Client<C extends Context = Context> extends Composer<C> imp
|
|
|
2653
2724
|
* @returns Whether the slug is available.
|
|
2654
2725
|
*/
|
|
2655
2726
|
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
2727
|
/**
|
|
2665
2728
|
* Create a sticker set.
|
|
2666
2729
|
*
|
|
@@ -2671,13 +2734,26 @@ export declare class Client<C extends Context = Context> extends Composer<C> imp
|
|
|
2671
2734
|
*/
|
|
2672
2735
|
createStickerSet(name: string, slug: string, stickers: InputSticker[], params?: CreateStickerSetParams): Promise<StickerSet>;
|
|
2673
2736
|
/**
|
|
2674
|
-
*
|
|
2737
|
+
* Delete a sticker set.
|
|
2675
2738
|
*
|
|
2676
2739
|
* @method ss
|
|
2677
2740
|
* @param slug The slug of the sticker set or its link.
|
|
2678
|
-
* @param sticker The sticker to add.
|
|
2679
2741
|
*/
|
|
2680
|
-
|
|
2742
|
+
deleteStickerSet(slug: string): Promise<void>;
|
|
2743
|
+
/**
|
|
2744
|
+
* Get a dice sticker set.
|
|
2745
|
+
*
|
|
2746
|
+
* @method ss
|
|
2747
|
+
* @param emoji The emoji of the dice.
|
|
2748
|
+
*/
|
|
2749
|
+
getDiceStickerSet(emoji: string): Promise<StickerSet>;
|
|
2750
|
+
/**
|
|
2751
|
+
* Get a sticker set.
|
|
2752
|
+
*
|
|
2753
|
+
* @method ss
|
|
2754
|
+
* @param slug The slug of the sticker set or its link.
|
|
2755
|
+
*/
|
|
2756
|
+
getStickerSet(slug: string): Promise<StickerSet>;
|
|
2681
2757
|
/**
|
|
2682
2758
|
* Remove a sticker from its set.
|
|
2683
2759
|
*
|
|
@@ -2702,44 +2778,44 @@ export declare class Client<C extends Context = Context> extends Composer<C> imp
|
|
|
2702
2778
|
*/
|
|
2703
2779
|
replaceStickerInStickerSet(currentStickerFileId: string, newSticker: InputSticker, params?: ReplaceStickerInStickerSetParams): Promise<void>;
|
|
2704
2780
|
/**
|
|
2705
|
-
*
|
|
2781
|
+
* Set a custom emoji as a sticker set's thumbnail.
|
|
2706
2782
|
*
|
|
2707
2783
|
* @method ss
|
|
2708
2784
|
* @param slug The slug of the sticker set or its link.
|
|
2785
|
+
* @param customEmojiId The identifier of the custom emoji to use as thumbnail.
|
|
2709
2786
|
*/
|
|
2710
|
-
|
|
2787
|
+
setCustomEmojiAsStickerSetThumbnail(slug: string, customEmojiId: string): Promise<void>;
|
|
2711
2788
|
/**
|
|
2712
|
-
* Set
|
|
2789
|
+
* Set a sticker set's thumbnail.
|
|
2713
2790
|
*
|
|
2714
2791
|
* @method ss
|
|
2715
2792
|
* @param slug The slug of the sticker set or its link.
|
|
2716
|
-
* @param
|
|
2793
|
+
* @param thumbnail The new thumbnail of the sticker set.
|
|
2717
2794
|
*/
|
|
2718
|
-
|
|
2795
|
+
setStickerSetThumbnail(slug: string, thumbnail: FileSource): Promise<void>;
|
|
2719
2796
|
/**
|
|
2720
|
-
*
|
|
2797
|
+
* Set the title of a sticker set.
|
|
2721
2798
|
*
|
|
2722
2799
|
* @method ss
|
|
2723
|
-
* @param
|
|
2724
|
-
* @param
|
|
2800
|
+
* @param slug The slug of the sticker set or its link.
|
|
2801
|
+
* @param title The sticker set's new title.
|
|
2725
2802
|
*/
|
|
2726
|
-
|
|
2803
|
+
setStickerSetTitle(slug: string, title: string): Promise<void>;
|
|
2727
2804
|
/**
|
|
2728
|
-
*
|
|
2805
|
+
* Suggest a sticker set slug from its title.
|
|
2729
2806
|
*
|
|
2730
2807
|
* @method ss
|
|
2731
|
-
* @param
|
|
2732
|
-
* @
|
|
2808
|
+
* @param title A title of a sticker set.
|
|
2809
|
+
* @returns The suggested slug.
|
|
2733
2810
|
*/
|
|
2734
|
-
|
|
2811
|
+
suggestStickerSetSlug(title: string): Promise<string>;
|
|
2735
2812
|
/**
|
|
2736
|
-
* Set
|
|
2813
|
+
* Set the access settings of a managed bot. Bot-only.
|
|
2737
2814
|
*
|
|
2738
|
-
* @method
|
|
2739
|
-
* @param
|
|
2740
|
-
* @param customEmojiId The identifier of the custom emoji to use as thumbnail.
|
|
2815
|
+
* @method mb
|
|
2816
|
+
* @param userId The identifier of the bot user.
|
|
2741
2817
|
*/
|
|
2742
|
-
|
|
2818
|
+
getManagedBotAccessSettings(userId: ID): Promise<BotAccessSettings>;
|
|
2743
2819
|
/**
|
|
2744
2820
|
* Get the token of a managed bot. Bot-only.
|
|
2745
2821
|
*
|
|
@@ -2764,13 +2840,6 @@ export declare class Client<C extends Context = Context> extends Composer<C> imp
|
|
|
2764
2840
|
* @param isAccessRestricted Whether access is restricted to specific users.
|
|
2765
2841
|
*/
|
|
2766
2842
|
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
2843
|
/**
|
|
2775
2844
|
* Answer a guest query. Bot-only.
|
|
2776
2845
|
*
|
|
@@ -2779,13 +2848,6 @@ export declare class Client<C extends Context = Context> extends Composer<C> imp
|
|
|
2779
2848
|
* @returns The identifier of the sent message.
|
|
2780
2849
|
*/
|
|
2781
2850
|
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
2851
|
/**
|
|
2790
2852
|
* Accept a secret chat. User-only.
|
|
2791
2853
|
*
|
|
@@ -2801,33 +2863,35 @@ export declare class Client<C extends Context = Context> extends Composer<C> imp
|
|
|
2801
2863
|
*/
|
|
2802
2864
|
endSecretChat(id: number, params?: EndSecretChatParams): Promise<SecretChat>;
|
|
2803
2865
|
/**
|
|
2804
|
-
*
|
|
2866
|
+
* Request a secret chat. User-only.
|
|
2867
|
+
*
|
|
2868
|
+
* @method sc
|
|
2869
|
+
* @param chatId The identifier of a chat.
|
|
2870
|
+
*/
|
|
2871
|
+
requestSecretChat(chatId: ID): Promise<SecretChat>;
|
|
2872
|
+
/**
|
|
2873
|
+
* Send an animation to a secret chat. User-only.
|
|
2805
2874
|
*
|
|
2806
2875
|
* @method sc
|
|
2807
2876
|
* @param id The identifier of the secret chat.
|
|
2808
|
-
* @param
|
|
2877
|
+
* @param animation The animation to send.
|
|
2809
2878
|
*/
|
|
2810
|
-
|
|
2879
|
+
sendSecretAnimation(id: number, animation: FileSource, params?: SendSecretAnimationParams): Promise<void>;
|
|
2811
2880
|
/**
|
|
2812
|
-
* Send
|
|
2881
|
+
* Send an audio file to a secret chat. User-only.
|
|
2813
2882
|
*
|
|
2814
2883
|
* @method sc
|
|
2815
2884
|
* @param id The identifier of the secret chat.
|
|
2816
|
-
* @param
|
|
2817
|
-
* @param longitude The location's longitude.
|
|
2885
|
+
* @param audio The audio file to send.
|
|
2818
2886
|
*/
|
|
2819
|
-
|
|
2887
|
+
sendSecretAudio(id: number, audio: FileSource, params?: SendSecretAudioParams): Promise<void>;
|
|
2820
2888
|
/**
|
|
2821
|
-
* Send a
|
|
2889
|
+
* Send a cancel typing action to a secret chat. User-only.
|
|
2822
2890
|
*
|
|
2823
2891
|
* @method sc
|
|
2824
2892
|
* @param id The identifier of the secret chat.
|
|
2825
|
-
* @param latitude The latitude of the venue.
|
|
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.
|
|
2829
2893
|
*/
|
|
2830
|
-
|
|
2894
|
+
sendSecretCancelTypingAction(id: number): Promise<void>;
|
|
2831
2895
|
/**
|
|
2832
2896
|
* Send a contact to a secret chat. User-only.
|
|
2833
2897
|
*
|
|
@@ -2845,6 +2909,23 @@ export declare class Client<C extends Context = Context> extends Composer<C> imp
|
|
|
2845
2909
|
* @param document The document to send.
|
|
2846
2910
|
*/
|
|
2847
2911
|
sendSecretDocument(id: number, document: FileSource, params?: SendSecretDocumentParams): Promise<void>;
|
|
2912
|
+
/**
|
|
2913
|
+
* Send a location to a secret chat. User-only.
|
|
2914
|
+
*
|
|
2915
|
+
* @method sc
|
|
2916
|
+
* @param id The identifier of the secret chat.
|
|
2917
|
+
* @param latitude The location's latitude.
|
|
2918
|
+
* @param longitude The location's longitude.
|
|
2919
|
+
*/
|
|
2920
|
+
sendSecretLocation(id: number, latitude: number, longitude: number, params?: SendSecretLocationParams): Promise<void>;
|
|
2921
|
+
/**
|
|
2922
|
+
* Send a message to a secret chat. User-only.
|
|
2923
|
+
*
|
|
2924
|
+
* @method sc
|
|
2925
|
+
* @param id The identifier of the secret chat.
|
|
2926
|
+
* @param text The message's text.
|
|
2927
|
+
*/
|
|
2928
|
+
sendSecretMessage(id: number, text: string, params?: SendSecretMessageParams): Promise<void>;
|
|
2848
2929
|
/**
|
|
2849
2930
|
* Send a photo to a secret chat. User-only.
|
|
2850
2931
|
*
|
|
@@ -2854,52 +2935,62 @@ export declare class Client<C extends Context = Context> extends Composer<C> imp
|
|
|
2854
2935
|
*/
|
|
2855
2936
|
sendSecretPhoto(id: number, photo: FileSource, params?: SendSecretPhotoParams): Promise<void>;
|
|
2856
2937
|
/**
|
|
2857
|
-
* Send a
|
|
2938
|
+
* Send a secret chat screenshot notification. User-only.
|
|
2858
2939
|
*
|
|
2859
2940
|
* @method sc
|
|
2860
2941
|
* @param id The identifier of the secret chat.
|
|
2861
|
-
* @param
|
|
2942
|
+
* @param messageIds Identifiers of messages.
|
|
2862
2943
|
*/
|
|
2863
|
-
|
|
2944
|
+
sendSecretScreenshotNotification(id: number, messageIds: string[]): Promise<void>;
|
|
2864
2945
|
/**
|
|
2865
|
-
* Send a
|
|
2946
|
+
* Send a sticker to a secret chat. User-only.
|
|
2866
2947
|
*
|
|
2867
2948
|
* @method sc
|
|
2868
2949
|
* @param id The identifier of the secret chat.
|
|
2869
|
-
* @param
|
|
2950
|
+
* @param sticker The sticker to send.
|
|
2870
2951
|
*/
|
|
2871
|
-
|
|
2952
|
+
sendSecretSticker(id: number, sticker: Sticker, params?: SendSecretStickerParams): Promise<void>;
|
|
2872
2953
|
/**
|
|
2873
|
-
* Send
|
|
2954
|
+
* Send a typing action to a secret chat. User-only.
|
|
2874
2955
|
*
|
|
2875
2956
|
* @method sc
|
|
2876
2957
|
* @param id The identifier of the secret chat.
|
|
2877
|
-
* @param animation The animation to send.
|
|
2878
2958
|
*/
|
|
2879
|
-
|
|
2959
|
+
sendSecretTypingAction(id: number): Promise<void>;
|
|
2880
2960
|
/**
|
|
2881
|
-
* Send
|
|
2961
|
+
* Send a venue to a secret chat. User-only.
|
|
2882
2962
|
*
|
|
2883
2963
|
* @method sc
|
|
2884
2964
|
* @param id The identifier of the secret chat.
|
|
2885
|
-
* @param
|
|
2965
|
+
* @param latitude The latitude of the venue.
|
|
2966
|
+
* @param longitude The longitude of the venue.
|
|
2967
|
+
* @param title The title of the venue.
|
|
2968
|
+
* @param address The written address of the venue.
|
|
2886
2969
|
*/
|
|
2887
|
-
|
|
2970
|
+
sendSecretVenue(id: number, latitude: number, longitude: number, title: string, address: string, params?: SendSecretVenueParams): Promise<void>;
|
|
2888
2971
|
/**
|
|
2889
|
-
* Send a
|
|
2972
|
+
* Send a video to a secret chat. User-only.
|
|
2890
2973
|
*
|
|
2891
2974
|
* @method sc
|
|
2892
2975
|
* @param id The identifier of the secret chat.
|
|
2893
|
-
* @param
|
|
2976
|
+
* @param video The video to send.
|
|
2894
2977
|
*/
|
|
2895
|
-
|
|
2978
|
+
sendSecretVideo(id: number, video: FileSource, params?: SendSecretVideoParams): Promise<void>;
|
|
2896
2979
|
/**
|
|
2897
|
-
* Send a
|
|
2980
|
+
* Send a video note to a secret chat. User-only.
|
|
2898
2981
|
*
|
|
2899
2982
|
* @method sc
|
|
2900
2983
|
* @param id The identifier of the secret chat.
|
|
2901
|
-
* @param
|
|
2984
|
+
* @param videoNote The video note to send.
|
|
2902
2985
|
*/
|
|
2903
|
-
|
|
2986
|
+
sendSecretVideoNote(id: number, videoNote: FileSource, params?: SendSecretVideoNoteParams): Promise<void>;
|
|
2987
|
+
/**
|
|
2988
|
+
* Send a voice message to a secret chat. User-only.
|
|
2989
|
+
*
|
|
2990
|
+
* @method sc
|
|
2991
|
+
* @param id The identifier of the secret chat.
|
|
2992
|
+
* @param voice The voice message to send.
|
|
2993
|
+
*/
|
|
2994
|
+
sendSecretVoice(id: number, voice: FileSource, params?: SendSecretVoiceParams): Promise<void>;
|
|
2904
2995
|
}
|
|
2905
2996
|
//# sourceMappingURL=6_client.d.ts.map
|