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