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