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