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