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