@mtkruto/node 0.114.0 → 0.116.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 +7 -1
- package/esm/3_types.d.ts.map +1 -1
- package/esm/3_types.js +7 -1
- package/esm/client/0_params.d.ts +4 -0
- package/esm/client/0_params.d.ts.map +1 -1
- package/esm/client/1_client_generic.d.ts +51 -30
- package/esm/client/1_client_generic.d.ts.map +1 -1
- package/esm/client/2_account_manager.d.ts +13 -4
- package/esm/client/2_account_manager.d.ts.map +1 -1
- package/esm/client/2_account_manager.js +44 -7
- package/esm/client/2_bot_info_manager.d.ts +9 -2
- package/esm/client/2_bot_info_manager.d.ts.map +1 -1
- package/esm/client/2_bot_info_manager.js +14 -0
- package/esm/client/2_context.d.ts +332 -280
- package/esm/client/2_context.d.ts.map +1 -1
- package/esm/client/2_context.js +608 -517
- package/esm/client/3_filters.d.ts +1 -1
- package/esm/client/3_filters.d.ts.map +1 -1
- package/esm/client/3_message_manager.d.ts +2 -8
- package/esm/client/3_message_manager.d.ts.map +1 -1
- package/esm/client/3_message_manager.js +6 -44
- package/esm/client/4_checklist_manager.d.ts +38 -0
- package/esm/client/4_checklist_manager.d.ts.map +1 -0
- package/esm/client/4_checklist_manager.js +68 -0
- package/esm/client/4_gift_manager.d.ts +1 -0
- package/esm/client/4_gift_manager.d.ts.map +1 -1
- package/esm/client/4_gift_manager.js +6 -0
- package/esm/client/5_client.d.ts +51 -30
- package/esm/client/5_client.d.ts.map +1 -1
- package/esm/client/5_client.js +84 -44
- package/esm/client/5_client_dispatcher.d.ts +51 -30
- package/esm/client/5_client_dispatcher.d.ts.map +1 -1
- package/esm/client/5_client_dispatcher.js +68 -38
- package/esm/types/0_emoji_status.d.ts +45 -0
- package/esm/types/0_emoji_status.d.ts.map +1 -0
- package/esm/types/0_emoji_status.js +33 -0
- package/esm/types/0_input_emoji_status.d.ts +33 -0
- package/esm/types/0_input_emoji_status.d.ts.map +1 -0
- package/esm/types/0_user_status.d.ts +64 -0
- package/esm/types/0_user_status.d.ts.map +1 -0
- package/esm/types/0_user_status.js +35 -0
- package/esm/types/{0_working_hour_interval.d.ts → 0_working_hours_interval.d.ts} +2 -2
- package/esm/types/0_working_hours_interval.d.ts.map +1 -0
- package/esm/types/0_working_hours_interval.js +20 -0
- package/esm/types/1_bot_commands.d.ts +30 -0
- package/esm/types/1_bot_commands.d.ts.map +1 -0
- package/esm/types/1_bot_commands.js +20 -0
- package/esm/types/1_chat_p.d.ts +6 -0
- package/esm/types/1_chat_p.d.ts.map +1 -1
- package/esm/types/1_chat_p.js +4 -0
- package/esm/types/1_working_hours.d.ts +2 -2
- package/esm/types/1_working_hours.d.ts.map +1 -1
- package/esm/types/2_user.d.ts +6 -0
- package/esm/types/2_user.d.ts.map +1 -1
- package/esm/types/2_user.js +5 -0
- package/esm/types/3_reply_quote.d.ts +1 -1
- package/esm/types/3_reply_quote.d.ts.map +1 -1
- package/esm/types/4_gift.d.ts +1 -1
- package/esm/types/4_gift.d.ts.map +1 -1
- package/esm/types/5_claimed_gift.d.ts +1 -1
- package/esm/types/5_claimed_gift.js +1 -1
- package/esm/types/5_gift_non_upgraded_information.d.ts +47 -0
- package/esm/types/5_gift_non_upgraded_information.d.ts.map +1 -0
- package/esm/types/5_gift_non_upgraded_information.js +69 -0
- package/esm/types/5_gift_upgraded_information.d.ts +41 -0
- package/esm/types/5_gift_upgraded_information.d.ts.map +1 -0
- package/esm/types/5_gift_upgraded_information.js +58 -0
- package/esm/types/6_message.d.ts +21 -1
- package/esm/types/6_message.d.ts.map +1 -1
- package/esm/types/6_message.js +12 -0
- package/esm/types/8_update.d.ts +60 -2
- package/esm/types/8_update.d.ts.map +1 -1
- package/package.json +1 -1
- package/script/3_types.d.ts +7 -1
- package/script/3_types.d.ts.map +1 -1
- package/script/3_types.js +7 -1
- package/script/client/0_params.d.ts +4 -0
- package/script/client/0_params.d.ts.map +1 -1
- package/script/client/1_client_generic.d.ts +51 -30
- package/script/client/1_client_generic.d.ts.map +1 -1
- package/script/client/2_account_manager.d.ts +13 -4
- package/script/client/2_account_manager.d.ts.map +1 -1
- package/script/client/2_account_manager.js +43 -6
- package/script/client/2_bot_info_manager.d.ts +9 -2
- package/script/client/2_bot_info_manager.d.ts.map +1 -1
- package/script/client/2_bot_info_manager.js +14 -0
- package/script/client/2_context.d.ts +332 -280
- package/script/client/2_context.d.ts.map +1 -1
- package/script/client/2_context.js +608 -517
- package/script/client/3_filters.d.ts +1 -1
- package/script/client/3_filters.d.ts.map +1 -1
- package/script/client/3_message_manager.d.ts +2 -8
- package/script/client/3_message_manager.d.ts.map +1 -1
- package/script/client/3_message_manager.js +6 -44
- package/script/client/4_checklist_manager.d.ts +38 -0
- package/script/client/4_checklist_manager.d.ts.map +1 -0
- package/script/client/4_checklist_manager.js +72 -0
- package/script/client/4_gift_manager.d.ts +1 -0
- package/script/client/4_gift_manager.d.ts.map +1 -1
- package/script/client/4_gift_manager.js +6 -0
- package/script/client/5_client.d.ts +51 -30
- package/script/client/5_client.d.ts.map +1 -1
- package/script/client/5_client.js +84 -44
- package/script/client/5_client_dispatcher.d.ts +51 -30
- package/script/client/5_client_dispatcher.d.ts.map +1 -1
- package/script/client/5_client_dispatcher.js +68 -38
- package/script/types/0_emoji_status.d.ts +45 -0
- package/script/types/0_emoji_status.d.ts.map +1 -0
- package/script/types/0_emoji_status.js +36 -0
- package/script/types/0_input_emoji_status.d.ts +33 -0
- package/script/types/0_input_emoji_status.d.ts.map +1 -0
- package/script/types/0_user_status.d.ts +64 -0
- package/script/types/0_user_status.d.ts.map +1 -0
- package/script/types/0_user_status.js +38 -0
- package/script/types/{0_working_hour_interval.d.ts → 0_working_hours_interval.d.ts} +2 -2
- package/script/types/0_working_hours_interval.d.ts.map +1 -0
- package/script/types/0_working_hours_interval.js +21 -0
- package/script/types/1_bot_commands.d.ts +30 -0
- package/script/types/1_bot_commands.d.ts.map +1 -0
- package/script/types/1_bot_commands.js +21 -0
- package/script/types/1_chat_p.d.ts +6 -0
- package/script/types/1_chat_p.d.ts.map +1 -1
- package/script/types/1_chat_p.js +4 -0
- package/script/types/1_working_hours.d.ts +2 -2
- package/script/types/1_working_hours.d.ts.map +1 -1
- package/script/types/2_user.d.ts +6 -0
- package/script/types/2_user.d.ts.map +1 -1
- package/script/types/2_user.js +5 -0
- package/script/types/3_reply_quote.d.ts +1 -1
- package/script/types/3_reply_quote.d.ts.map +1 -1
- package/script/types/4_gift.d.ts +1 -1
- package/script/types/4_gift.d.ts.map +1 -1
- package/script/types/5_claimed_gift.d.ts +1 -1
- package/script/types/5_claimed_gift.js +1 -1
- package/script/types/5_gift_non_upgraded_information.d.ts +47 -0
- package/script/types/5_gift_non_upgraded_information.d.ts.map +1 -0
- package/script/types/5_gift_non_upgraded_information.js +72 -0
- package/script/types/5_gift_upgraded_information.d.ts +41 -0
- package/script/types/5_gift_upgraded_information.d.ts.map +1 -0
- package/script/types/5_gift_upgraded_information.js +61 -0
- package/script/types/6_message.d.ts +21 -1
- package/script/types/6_message.d.ts.map +1 -1
- package/script/types/6_message.js +12 -0
- package/script/types/8_update.d.ts +60 -2
- package/script/types/8_update.d.ts.map +1 -1
- package/esm/types/0_working_hour_interval.d.ts.map +0 -1
- package/script/types/0_working_hour_interval.d.ts.map +0 -1
- /package/esm/types/{0_working_hour_interval.js → 0_input_emoji_status.js} +0 -0
- /package/script/types/{0_working_hour_interval.js → 0_input_emoji_status.js} +0 -0
|
@@ -149,148 +149,200 @@ class Context {
|
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
151
|
/**
|
|
152
|
-
* Context-aware alias for {@link Client.
|
|
152
|
+
* Context-aware alias for {@link Client.addContact}.
|
|
153
153
|
*/
|
|
154
|
-
async
|
|
155
|
-
const
|
|
156
|
-
|
|
157
|
-
return await this.client.sendMessage(chatId, text, { ...params, ...replyTo, businessConnectionId });
|
|
154
|
+
async addAsContact(params) {
|
|
155
|
+
const chatId = this.#mustGetChatId();
|
|
156
|
+
return await this.client.addContact(chatId, params);
|
|
158
157
|
}
|
|
159
158
|
/**
|
|
160
|
-
* Context-aware alias for {@link Client.
|
|
159
|
+
* Context-aware alias for {@link Client.addChatMember}.
|
|
161
160
|
*/
|
|
162
|
-
async
|
|
163
|
-
const
|
|
164
|
-
|
|
165
|
-
return await this.client.sendMessageDraft(chatId, draftId, text, { ...params, ...replyTo });
|
|
161
|
+
async addMember(userId, params) {
|
|
162
|
+
const chatId = this.#mustGetChatId();
|
|
163
|
+
return await this.client.addChatMember(chatId, userId, params);
|
|
166
164
|
}
|
|
167
165
|
/**
|
|
168
|
-
* Context-aware alias for {@link Client.
|
|
166
|
+
* Context-aware alias for {@link Client.addChatMembers}.
|
|
169
167
|
*/
|
|
170
|
-
async
|
|
171
|
-
const
|
|
172
|
-
|
|
173
|
-
return await this.client.sendPoll(chatId, question, options, { ...params, ...replyTo, businessConnectionId });
|
|
168
|
+
async addMembers(userIds) {
|
|
169
|
+
const chatId = this.#mustGetChatId();
|
|
170
|
+
return await this.client.addChatMembers(chatId, userIds);
|
|
174
171
|
}
|
|
175
172
|
/**
|
|
176
|
-
* Context-aware alias for {@link Client.
|
|
173
|
+
* Context-aware alias for {@link Client.addReaction}.
|
|
177
174
|
*/
|
|
178
|
-
async
|
|
179
|
-
const
|
|
180
|
-
|
|
181
|
-
return await this.client.sendChecklist(chatId, title, items, { ...params, ...replyTo, businessConnectionId });
|
|
175
|
+
async addReaction(messageId, reaction, params) {
|
|
176
|
+
const chatId = this.#mustGetChatId();
|
|
177
|
+
return await this.client.addReaction(chatId, messageId, reaction, params);
|
|
182
178
|
}
|
|
183
179
|
/**
|
|
184
|
-
* Context-aware alias for {@link Client.
|
|
180
|
+
* Context-aware alias for {@link Client.addStoriesToHighlights}.
|
|
185
181
|
*/
|
|
186
|
-
async
|
|
187
|
-
const
|
|
188
|
-
|
|
189
|
-
return await this.client.sendPhoto(chatId, photo, { ...params, ...replyTo, businessConnectionId });
|
|
182
|
+
async addStoriesToHighlights(storyIds) {
|
|
183
|
+
const chatId = this.#mustGetChatId();
|
|
184
|
+
return await this.client.addStoriesToHighlights(chatId, storyIds);
|
|
190
185
|
}
|
|
191
186
|
/**
|
|
192
|
-
* Context-aware alias for {@link Client.
|
|
187
|
+
* Context-aware alias for {@link Client.addStoryToHighlights}.
|
|
193
188
|
*/
|
|
194
|
-
async
|
|
195
|
-
const
|
|
196
|
-
|
|
197
|
-
return await this.client.sendMediaGroup(chatId, media, { ...params, ...replyTo, businessConnectionId });
|
|
189
|
+
async addStoryToHighlights(storyId) {
|
|
190
|
+
const chatId = this.#mustGetChatId();
|
|
191
|
+
return await this.client.addStoryToHighlights(chatId, storyId);
|
|
198
192
|
}
|
|
199
193
|
/**
|
|
200
|
-
* Context-aware alias for {@link Client.
|
|
194
|
+
* Context-aware alias for {@link Client.addToChecklist}.
|
|
201
195
|
*/
|
|
202
|
-
async
|
|
203
|
-
const
|
|
204
|
-
|
|
205
|
-
return await this.client.sendInvoice(chatId, title, description, payload, currency, prices, { ...params, ...replyTo, businessConnectionId });
|
|
196
|
+
async addToChecklist(messageId, items) {
|
|
197
|
+
const chatId = this.#mustGetChatId();
|
|
198
|
+
return await this.client.addToChecklist(chatId, messageId, items);
|
|
206
199
|
}
|
|
207
200
|
/**
|
|
208
|
-
* Context-aware alias for {@link Client.
|
|
201
|
+
* Context-aware alias for {@link Client.answerCallbackQuery}.
|
|
209
202
|
*/
|
|
210
|
-
async
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
203
|
+
async answerCallbackQuery(params) {
|
|
204
|
+
if (!("callbackQuery" in this.update)) {
|
|
205
|
+
(0, _0_deps_js_1.unreachable)();
|
|
206
|
+
}
|
|
207
|
+
return await this.client.answerCallbackQuery(this.update.callbackQuery.id, params);
|
|
214
208
|
}
|
|
215
209
|
/**
|
|
216
|
-
* Context-aware alias for {@link Client.
|
|
210
|
+
* Context-aware alias for {@link Client.answerInlineQuery}.
|
|
217
211
|
*/
|
|
218
|
-
async
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
212
|
+
async answerInlineQuery(results, params) {
|
|
213
|
+
if (!("inlineQuery" in this.update)) {
|
|
214
|
+
(0, _0_deps_js_1.unreachable)();
|
|
215
|
+
}
|
|
216
|
+
return await this.client.answerInlineQuery(this.update.inlineQuery.id, results, params);
|
|
222
217
|
}
|
|
223
218
|
/**
|
|
224
|
-
* Context-aware alias for {@link Client.
|
|
219
|
+
* Context-aware alias for {@link Client.answerPreCheckoutQuery}.
|
|
225
220
|
*/
|
|
226
|
-
async
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
221
|
+
async answerPreCheckoutQuery(ok, params) {
|
|
222
|
+
if (!("preCheckoutQuery" in this.update)) {
|
|
223
|
+
(0, _0_deps_js_1.unreachable)();
|
|
224
|
+
}
|
|
225
|
+
return await this.client.answerPreCheckoutQuery(this.update.preCheckoutQuery.id, ok, params);
|
|
230
226
|
}
|
|
231
227
|
/**
|
|
232
|
-
* Context-aware alias for {@link Client.
|
|
228
|
+
* Context-aware alias for {@link Client.approveJoinRequest}.
|
|
233
229
|
*/
|
|
234
|
-
async
|
|
235
|
-
const { chatId,
|
|
236
|
-
|
|
237
|
-
|
|
230
|
+
async approveJoinRequest() {
|
|
231
|
+
const { chatId, userId } = this.#mustGetMsg();
|
|
232
|
+
if (!userId) {
|
|
233
|
+
(0, _0_deps_js_1.unreachable)();
|
|
234
|
+
}
|
|
235
|
+
return await this.client.approveJoinRequest(chatId, userId);
|
|
238
236
|
}
|
|
239
237
|
/**
|
|
240
|
-
* Context-aware alias for {@link Client.
|
|
238
|
+
* Context-aware alias for {@link Client.approveJoinRequests}.
|
|
241
239
|
*/
|
|
242
|
-
async
|
|
243
|
-
const
|
|
244
|
-
|
|
245
|
-
return await this.client.sendVenue(chatId, latitude, longitude, title, address, { ...params, ...replyTo, businessConnectionId });
|
|
240
|
+
async approveJoinRequests(params) {
|
|
241
|
+
const chatId = this.#mustGetChatId();
|
|
242
|
+
return await this.client.approveJoinRequests(chatId, params);
|
|
246
243
|
}
|
|
247
244
|
/**
|
|
248
|
-
* Context-aware alias for {@link Client.
|
|
245
|
+
* Context-aware alias for {@link Client.archiveChat}.
|
|
249
246
|
*/
|
|
250
|
-
async
|
|
251
|
-
const
|
|
252
|
-
|
|
253
|
-
return await this.client.sendContact(chatId, firstName, number, { ...params, ...replyTo, businessConnectionId });
|
|
247
|
+
async archive() {
|
|
248
|
+
const chatId = this.#mustGetChatId();
|
|
249
|
+
return await this.client.archiveChat(chatId);
|
|
254
250
|
}
|
|
255
251
|
/**
|
|
256
|
-
* Context-aware alias for {@link Client.
|
|
252
|
+
* Context-aware alias for {@link Client.banChatMember}.
|
|
257
253
|
*/
|
|
258
|
-
async
|
|
259
|
-
const
|
|
260
|
-
|
|
261
|
-
return await this.client.sendVideo(chatId, video, { ...params, ...replyTo, businessConnectionId });
|
|
254
|
+
async banChatMember(memberId, params) {
|
|
255
|
+
const chatId = this.#mustGetChatId();
|
|
256
|
+
return await this.client.banChatMember(chatId, memberId, params);
|
|
262
257
|
}
|
|
263
258
|
/**
|
|
264
|
-
* Context-aware alias for {@link Client.
|
|
259
|
+
* Context-aware alias for {@link Client.banChatMember}.
|
|
265
260
|
*/
|
|
266
|
-
async
|
|
267
|
-
const { chatId,
|
|
268
|
-
|
|
269
|
-
|
|
261
|
+
async banSender(params) {
|
|
262
|
+
const { chatId, senderId } = this.#mustGetMsg();
|
|
263
|
+
if (!senderId) {
|
|
264
|
+
(0, _0_deps_js_1.unreachable)();
|
|
265
|
+
}
|
|
266
|
+
return await this.client.banChatMember(chatId, senderId, params);
|
|
270
267
|
}
|
|
271
268
|
/**
|
|
272
|
-
* Context-aware alias for {@link Client.
|
|
269
|
+
* Context-aware alias for {@link Client.blockUser}.
|
|
273
270
|
*/
|
|
274
|
-
async
|
|
275
|
-
|
|
276
|
-
const replyTo = this.#getReplyTo(params?.isQuoted, chatId, messageId);
|
|
277
|
-
return await this.client.sendVoice(chatId, voice, { ...params, ...replyTo, businessConnectionId });
|
|
271
|
+
async blockUser() {
|
|
272
|
+
return await this.client.blockUser(this.#mustGetUserId());
|
|
278
273
|
}
|
|
279
274
|
/**
|
|
280
|
-
* Context-aware alias for {@link Client.
|
|
275
|
+
* Context-aware alias for {@link Client.checkChecklistItem}.
|
|
281
276
|
*/
|
|
282
|
-
async
|
|
283
|
-
const
|
|
284
|
-
|
|
285
|
-
return await this.client.sendAudio(chatId, audio, { ...params, ...replyTo, businessConnectionId });
|
|
277
|
+
async checkChecklistItem(messageId, item) {
|
|
278
|
+
const chatId = this.#mustGetChatId();
|
|
279
|
+
return await this.client.checkChecklistItem(chatId, messageId, item);
|
|
286
280
|
}
|
|
287
281
|
/**
|
|
288
|
-
* Context-aware alias for {@link Client.
|
|
282
|
+
* Context-aware alias for {@link Client.checkChecklistItems}.
|
|
289
283
|
*/
|
|
290
|
-
async
|
|
291
|
-
const
|
|
292
|
-
|
|
293
|
-
|
|
284
|
+
async checkChecklistItems(messageId, items) {
|
|
285
|
+
const chatId = this.#mustGetChatId();
|
|
286
|
+
return await this.client.checkChecklistItems(chatId, messageId, items);
|
|
287
|
+
}
|
|
288
|
+
/**
|
|
289
|
+
* Context-aware alias for {@link Client.closeChat}.
|
|
290
|
+
*/
|
|
291
|
+
async close() {
|
|
292
|
+
const chatId = this.#mustGetChatId();
|
|
293
|
+
return await this.client.closeChat(chatId);
|
|
294
|
+
}
|
|
295
|
+
/**
|
|
296
|
+
* Context-aware alias for {@link Client.closeTopic}.
|
|
297
|
+
*/
|
|
298
|
+
async closeTopic(topicId) {
|
|
299
|
+
const chatId = this.#mustGetChatId();
|
|
300
|
+
return await this.client.closeTopic(chatId, topicId);
|
|
301
|
+
}
|
|
302
|
+
/**
|
|
303
|
+
* Context-aware alias for {@link Client.createInviteLink}.
|
|
304
|
+
*/
|
|
305
|
+
async createInviteLink(params) {
|
|
306
|
+
const chatId = this.#mustGetChatId();
|
|
307
|
+
return await this.client.createInviteLink(chatId, params);
|
|
308
|
+
}
|
|
309
|
+
/**
|
|
310
|
+
* Context-aware alias for {@link Client.createStory}.
|
|
311
|
+
*/
|
|
312
|
+
async createStory(content, params) {
|
|
313
|
+
const chatId = this.#mustGetChatId();
|
|
314
|
+
return await this.client.createStory(chatId, content, params);
|
|
315
|
+
}
|
|
316
|
+
/**
|
|
317
|
+
* Context-aware alias for {@link Client.createTopic}.
|
|
318
|
+
*/
|
|
319
|
+
async createTopic(title, params) {
|
|
320
|
+
const chatId = this.#mustGetChatId();
|
|
321
|
+
return await this.client.createTopic(chatId, title, params);
|
|
322
|
+
}
|
|
323
|
+
/**
|
|
324
|
+
* Context-aware alias for {@link Client.declineJoinRequest}.
|
|
325
|
+
*/
|
|
326
|
+
async declineJoinRequest() {
|
|
327
|
+
const { chatId, userId } = this.#mustGetMsg();
|
|
328
|
+
if (!userId) {
|
|
329
|
+
(0, _0_deps_js_1.unreachable)();
|
|
330
|
+
}
|
|
331
|
+
return await this.client.declineJoinRequest(chatId, userId);
|
|
332
|
+
}
|
|
333
|
+
/**
|
|
334
|
+
* Context-aware alias for {@link Client.declineJoinRequests}.
|
|
335
|
+
*/
|
|
336
|
+
async declineJoinRequests(params) {
|
|
337
|
+
const chatId = this.#mustGetChatId();
|
|
338
|
+
return await this.client.declineJoinRequests(chatId, params);
|
|
339
|
+
}
|
|
340
|
+
/**
|
|
341
|
+
* Context-aware alias for {@link Client.deleteChatPhoto}.
|
|
342
|
+
*/
|
|
343
|
+
async deletChatPhoto() {
|
|
344
|
+
const chatId = this.#mustGetChatId();
|
|
345
|
+
return await this.client.deleteChatPhoto(chatId);
|
|
294
346
|
}
|
|
295
347
|
/**
|
|
296
348
|
* Context-aware alias for {@link Client.deleteMessage}.
|
|
@@ -300,83 +352,116 @@ class Context {
|
|
|
300
352
|
return await this.client.deleteMessage(chatId, messageId);
|
|
301
353
|
}
|
|
302
354
|
/**
|
|
303
|
-
* Context-aware alias for {@link Client.
|
|
355
|
+
* Context-aware alias for {@link Client.deleteChat}.
|
|
304
356
|
*/
|
|
305
|
-
async
|
|
306
|
-
const
|
|
307
|
-
return await this.client.
|
|
357
|
+
async deleteChat() {
|
|
358
|
+
const chatId = this.#mustGetChatId();
|
|
359
|
+
return await this.client.deleteChat(chatId);
|
|
308
360
|
}
|
|
309
361
|
/**
|
|
310
|
-
* Context-aware alias for {@link Client.
|
|
362
|
+
* Context-aware alias for {@link Client.deleteChatMemberMessages}.
|
|
311
363
|
*/
|
|
312
|
-
async
|
|
313
|
-
const
|
|
314
|
-
return await this.client.
|
|
364
|
+
async deleteChatMemberMessages(userId) {
|
|
365
|
+
const chatId = this.#mustGetChatId();
|
|
366
|
+
return await this.client.deleteChatMemberMessages(chatId, userId);
|
|
315
367
|
}
|
|
316
368
|
/**
|
|
317
|
-
* Context-aware alias for {@link Client.
|
|
369
|
+
* Context-aware alias for {@link Client.deleteChatStickerSet}.
|
|
318
370
|
*/
|
|
319
|
-
async
|
|
320
|
-
const
|
|
321
|
-
return await this.client.
|
|
371
|
+
async deleteChatStickerSet() {
|
|
372
|
+
const chatId = this.#mustGetChatId();
|
|
373
|
+
return await this.client.deleteChatStickerSet(chatId);
|
|
322
374
|
}
|
|
323
375
|
/**
|
|
324
|
-
* Context-aware alias for {@link Client.
|
|
376
|
+
* Context-aware alias for {@link Client.deleteMessage}.
|
|
325
377
|
*/
|
|
326
|
-
async
|
|
327
|
-
const
|
|
328
|
-
|
|
329
|
-
(0, _0_deps_js_1.unreachable)();
|
|
330
|
-
}
|
|
331
|
-
return await this.client.banChatMember(chatId, senderId, params);
|
|
378
|
+
async deleteMessage(messageId, params) {
|
|
379
|
+
const chatId = this.#mustGetChatId();
|
|
380
|
+
return await this.client.deleteMessage(chatId, messageId, params);
|
|
332
381
|
}
|
|
333
382
|
/**
|
|
334
|
-
* Context-aware alias for {@link Client.
|
|
383
|
+
* Context-aware alias for {@link Client.deleteMessages}.
|
|
335
384
|
*/
|
|
336
|
-
async
|
|
337
|
-
const
|
|
338
|
-
|
|
339
|
-
(0, _0_deps_js_1.unreachable)();
|
|
340
|
-
}
|
|
341
|
-
return await this.client.kickChatMember(chatId, senderId);
|
|
385
|
+
async deleteMessages(messageIds, params) {
|
|
386
|
+
const chatId = this.#mustGetChatId();
|
|
387
|
+
return await this.client.deleteMessages(chatId, messageIds, params);
|
|
342
388
|
}
|
|
343
389
|
/**
|
|
344
|
-
* Context-aware alias for {@link Client.
|
|
390
|
+
* Context-aware alias for {@link Client.deleteScheduledMessage}.
|
|
345
391
|
*/
|
|
346
|
-
async
|
|
347
|
-
const
|
|
348
|
-
|
|
349
|
-
(0, _0_deps_js_1.unreachable)();
|
|
350
|
-
}
|
|
351
|
-
return await this.client.setChatMemberRights(chatId, senderId, params);
|
|
392
|
+
async deleteScheduledMessage(messageId) {
|
|
393
|
+
const chatId = this.#mustGetChatId();
|
|
394
|
+
return await this.client.deleteScheduledMessage(chatId, messageId);
|
|
352
395
|
}
|
|
353
396
|
/**
|
|
354
|
-
* Context-aware alias for {@link Client.
|
|
397
|
+
* Context-aware alias for {@link Client.deleteScheduledMessages}.
|
|
398
|
+
*/
|
|
399
|
+
async deleteScheduledMessages(messageIds) {
|
|
400
|
+
const chatId = this.#mustGetChatId();
|
|
401
|
+
return await this.client.deleteScheduledMessages(chatId, messageIds);
|
|
402
|
+
}
|
|
403
|
+
/**
|
|
404
|
+
* Context-aware alias for {@link Client.deleteStories}.
|
|
405
|
+
*/
|
|
406
|
+
async deleteStories(storyIds) {
|
|
407
|
+
const chatId = this.#mustGetChatId();
|
|
408
|
+
return await this.client.deleteStories(chatId, storyIds);
|
|
409
|
+
}
|
|
410
|
+
/**
|
|
411
|
+
* Context-aware alias for {@link Client.deleteStory}.
|
|
412
|
+
*/
|
|
413
|
+
async deleteStory(storyId) {
|
|
414
|
+
const chatId = this.#mustGetChatId();
|
|
415
|
+
return await this.client.deleteStory(chatId, storyId);
|
|
416
|
+
}
|
|
417
|
+
/**
|
|
418
|
+
* Context-aware alias for {@link Client.disableAntispam}.
|
|
419
|
+
*/
|
|
420
|
+
async disableAntispam() {
|
|
421
|
+
const chatId = this.#mustGetChatId();
|
|
422
|
+
return await this.client.disableAntispam(chatId);
|
|
423
|
+
}
|
|
424
|
+
/**
|
|
425
|
+
* Context-aware alias for {@link Client.disableBusinessBots}.
|
|
426
|
+
*/
|
|
427
|
+
async disableBusinessBots() {
|
|
428
|
+
const chatId = this.#mustGetChatId();
|
|
429
|
+
return await this.client.disableBusinessBots(chatId);
|
|
430
|
+
}
|
|
431
|
+
/**
|
|
432
|
+
* Context-aware alias for {@link Client.disableJoinRequests}.
|
|
433
|
+
*/
|
|
434
|
+
async disableJoinRequests() {
|
|
435
|
+
const chatId = this.#mustGetChatId();
|
|
436
|
+
return await this.client.disableJoinRequests(chatId);
|
|
437
|
+
}
|
|
438
|
+
/**
|
|
439
|
+
* Context-aware alias for {@link Client.disableSharing}.
|
|
355
440
|
*/
|
|
356
|
-
async
|
|
441
|
+
async disableSharing() {
|
|
357
442
|
const chatId = this.#mustGetChatId();
|
|
358
|
-
return await this.client.
|
|
443
|
+
return await this.client.disableSharing(chatId);
|
|
359
444
|
}
|
|
360
445
|
/**
|
|
361
|
-
* Context-aware alias for {@link Client.
|
|
446
|
+
* Context-aware alias for {@link Client.disableSignatures}.
|
|
362
447
|
*/
|
|
363
|
-
async
|
|
364
|
-
const
|
|
365
|
-
return await this.client.
|
|
448
|
+
async disableSignatures() {
|
|
449
|
+
const chatId = this.#mustGetChatId();
|
|
450
|
+
return await this.client.disableSignatures(chatId);
|
|
366
451
|
}
|
|
367
452
|
/**
|
|
368
|
-
* Context-aware alias for {@link Client.
|
|
453
|
+
* Context-aware alias for {@link Client.disableSlowMode}.
|
|
369
454
|
*/
|
|
370
|
-
async
|
|
455
|
+
async disableSlowMode() {
|
|
371
456
|
const chatId = this.#mustGetChatId();
|
|
372
|
-
return await this.client.
|
|
457
|
+
return await this.client.disableSlowMode(chatId);
|
|
373
458
|
}
|
|
374
459
|
/**
|
|
375
|
-
* Context-aware alias for {@link Client.
|
|
460
|
+
* Context-aware alias for {@link Client.disableTopics}.
|
|
376
461
|
*/
|
|
377
|
-
async
|
|
378
|
-
const
|
|
379
|
-
return await this.client.
|
|
462
|
+
async disableTopics() {
|
|
463
|
+
const chatId = this.#mustGetChatId();
|
|
464
|
+
return await this.client.disableTopics(chatId);
|
|
380
465
|
}
|
|
381
466
|
/**
|
|
382
467
|
* Context-aware alias for {@link Client.editInlineMessageCaption}.
|
|
@@ -386,18 +471,18 @@ class Context {
|
|
|
386
471
|
return await this.client.editInlineMessageCaption(inlineMessageId, params);
|
|
387
472
|
}
|
|
388
473
|
/**
|
|
389
|
-
* Context-aware alias for {@link Client.
|
|
474
|
+
* Context-aware alias for {@link Client.editInlineMessageLiveLocation}.
|
|
390
475
|
*/
|
|
391
|
-
async
|
|
476
|
+
async editInlineMessageLiveLocation(latitude, longitude, params) {
|
|
392
477
|
const inlineMessageId = this.#mustGetInlineMsgId();
|
|
393
|
-
return await this.client.
|
|
478
|
+
return await this.client.editInlineMessageLiveLocation(inlineMessageId, latitude, longitude, params);
|
|
394
479
|
}
|
|
395
480
|
/**
|
|
396
|
-
* Context-aware alias for {@link Client.
|
|
481
|
+
* Context-aware alias for {@link Client.editInlineMessageMedia}.
|
|
397
482
|
*/
|
|
398
|
-
async
|
|
483
|
+
async editInlineMessageMedia(media, params) {
|
|
399
484
|
const inlineMessageId = this.#mustGetInlineMsgId();
|
|
400
|
-
return await this.client.
|
|
485
|
+
return await this.client.editInlineMessageMedia(inlineMessageId, media, params);
|
|
401
486
|
}
|
|
402
487
|
/**
|
|
403
488
|
* Context-aware alias for {@link Client.editInlineMessageReplyMarkup}.
|
|
@@ -407,11 +492,11 @@ class Context {
|
|
|
407
492
|
return await this.client.editInlineMessageReplyMarkup(inlineMessageId, params);
|
|
408
493
|
}
|
|
409
494
|
/**
|
|
410
|
-
* Context-aware alias for {@link Client.
|
|
495
|
+
* Context-aware alias for {@link Client.editInlineMessageText}.
|
|
411
496
|
*/
|
|
412
|
-
async
|
|
413
|
-
const
|
|
414
|
-
return await this.client.
|
|
497
|
+
async editInlineMessageText(text, params) {
|
|
498
|
+
const inlineMessageId = this.#mustGetInlineMsgId();
|
|
499
|
+
return await this.client.editInlineMessageText(inlineMessageId, text, params);
|
|
415
500
|
}
|
|
416
501
|
/**
|
|
417
502
|
* Context-aware alias for {@link Client.editMessageCaption}.
|
|
@@ -421,18 +506,18 @@ class Context {
|
|
|
421
506
|
return await this.client.editMessageCaption(chatId, messageId, params);
|
|
422
507
|
}
|
|
423
508
|
/**
|
|
424
|
-
* Context-aware alias for {@link Client.
|
|
509
|
+
* Context-aware alias for {@link Client.editMessageLiveLocation}.
|
|
425
510
|
*/
|
|
426
|
-
async
|
|
511
|
+
async editMessageLiveLocation(messageId, latitude, longitude, params) {
|
|
427
512
|
const chatId = this.#mustGetChatId();
|
|
428
|
-
return await this.client.
|
|
513
|
+
return await this.client.editMessageLiveLocation(chatId, messageId, latitude, longitude, params);
|
|
429
514
|
}
|
|
430
515
|
/**
|
|
431
|
-
* Context-aware alias for {@link Client.
|
|
516
|
+
* Context-aware alias for {@link Client.editMessageMedia}.
|
|
432
517
|
*/
|
|
433
|
-
async
|
|
518
|
+
async editMessageMedia(messageId, media, params) {
|
|
434
519
|
const chatId = this.#mustGetChatId();
|
|
435
|
-
return await this.client.
|
|
520
|
+
return await this.client.editMessageMedia(chatId, messageId, media, params);
|
|
436
521
|
}
|
|
437
522
|
/**
|
|
438
523
|
* Context-aware alias for {@link Client.editMessageReplyMarkup}.
|
|
@@ -442,743 +527,749 @@ class Context {
|
|
|
442
527
|
return await this.client.editMessageReplyMarkup(chatId, messageId, params);
|
|
443
528
|
}
|
|
444
529
|
/**
|
|
445
|
-
* Context-aware alias for {@link Client.
|
|
446
|
-
*/
|
|
447
|
-
async answerCallbackQuery(params) {
|
|
448
|
-
if (!("callbackQuery" in this.update)) {
|
|
449
|
-
(0, _0_deps_js_1.unreachable)();
|
|
450
|
-
}
|
|
451
|
-
return await this.client.answerCallbackQuery(this.update.callbackQuery.id, params);
|
|
452
|
-
}
|
|
453
|
-
/**
|
|
454
|
-
* Context-aware alias for {@link Client.answerInlineQuery}.
|
|
530
|
+
* Context-aware alias for {@link Client.editMessageText}.
|
|
455
531
|
*/
|
|
456
|
-
async
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
}
|
|
460
|
-
return await this.client.answerInlineQuery(this.update.inlineQuery.id, results, params);
|
|
532
|
+
async editMessageText(messageId, text, params) {
|
|
533
|
+
const chatId = this.#mustGetChatId();
|
|
534
|
+
return await this.client.editMessageText(chatId, messageId, text, params);
|
|
461
535
|
}
|
|
462
536
|
/**
|
|
463
|
-
* Context-aware alias for {@link Client.
|
|
537
|
+
* Context-aware alias for {@link Client.editTopic}.
|
|
464
538
|
*/
|
|
465
|
-
async
|
|
539
|
+
async editTopic(topicId, title, params) {
|
|
466
540
|
const chatId = this.#mustGetChatId();
|
|
467
|
-
return await this.client.
|
|
541
|
+
return await this.client.editTopic(chatId, topicId, title, params);
|
|
468
542
|
}
|
|
469
543
|
/**
|
|
470
|
-
* Context-aware alias for {@link Client.
|
|
544
|
+
* Context-aware alias for {@link Client.enableAntispam}.
|
|
471
545
|
*/
|
|
472
|
-
async
|
|
546
|
+
async enableAntispam() {
|
|
473
547
|
const chatId = this.#mustGetChatId();
|
|
474
|
-
return await this.client.
|
|
548
|
+
return await this.client.enableAntispam(chatId);
|
|
475
549
|
}
|
|
476
550
|
/**
|
|
477
|
-
* Context-aware alias for {@link Client.
|
|
551
|
+
* Context-aware alias for {@link Client.enableBusinessBots}.
|
|
478
552
|
*/
|
|
479
|
-
async
|
|
553
|
+
async enableBusinessBots() {
|
|
480
554
|
const chatId = this.#mustGetChatId();
|
|
481
|
-
return await this.client.
|
|
555
|
+
return await this.client.enableBusinessBots(chatId);
|
|
482
556
|
}
|
|
483
557
|
/**
|
|
484
|
-
* Context-aware alias for {@link Client.
|
|
558
|
+
* Context-aware alias for {@link Client.enableJoinRequests}.
|
|
485
559
|
*/
|
|
486
|
-
async
|
|
560
|
+
async enableJoinRequests() {
|
|
487
561
|
const chatId = this.#mustGetChatId();
|
|
488
|
-
return await this.client.
|
|
562
|
+
return await this.client.enableJoinRequests(chatId);
|
|
489
563
|
}
|
|
490
564
|
/**
|
|
491
|
-
* Context-aware alias for {@link Client.
|
|
565
|
+
* Context-aware alias for {@link Client.enableSharing}.
|
|
492
566
|
*/
|
|
493
|
-
async
|
|
567
|
+
async enableSharing() {
|
|
494
568
|
const chatId = this.#mustGetChatId();
|
|
495
|
-
return await this.client.
|
|
569
|
+
return await this.client.enableSharing(chatId);
|
|
496
570
|
}
|
|
497
571
|
/**
|
|
498
|
-
* Context-aware alias for {@link Client.
|
|
572
|
+
* Context-aware alias for {@link Client.enableSignatures}.
|
|
499
573
|
*/
|
|
500
|
-
async
|
|
574
|
+
async enableSignatures(params) {
|
|
501
575
|
const chatId = this.#mustGetChatId();
|
|
502
|
-
return await this.client.
|
|
576
|
+
return await this.client.enableSignatures(chatId, params);
|
|
503
577
|
}
|
|
504
578
|
/**
|
|
505
|
-
* Context-aware alias for {@link Client.
|
|
579
|
+
* Context-aware alias for {@link Client.enableTopics}.
|
|
506
580
|
*/
|
|
507
|
-
async
|
|
581
|
+
async enableTopics(isShownAsTabs) {
|
|
508
582
|
const chatId = this.#mustGetChatId();
|
|
509
|
-
return await this.client.
|
|
583
|
+
return await this.client.enableTopics(chatId, isShownAsTabs);
|
|
510
584
|
}
|
|
511
585
|
/**
|
|
512
|
-
* Context-aware alias for {@link Client.
|
|
586
|
+
* Context-aware alias for {@link Client.forwardMessage}.
|
|
513
587
|
*/
|
|
514
|
-
async
|
|
515
|
-
const chatId = this.#
|
|
516
|
-
return await this.client.
|
|
588
|
+
async forward(to, params) {
|
|
589
|
+
const { chatId, messageId } = this.#mustGetMsg();
|
|
590
|
+
return await this.client.forwardMessage(chatId, to, messageId, params);
|
|
517
591
|
}
|
|
518
592
|
/**
|
|
519
|
-
* Context-aware alias for {@link Client.
|
|
593
|
+
* Context-aware alias for {@link Client.forwardMessage}.
|
|
520
594
|
*/
|
|
521
|
-
async
|
|
595
|
+
async forwardMessage(to, messageId, params) {
|
|
522
596
|
const chatId = this.#mustGetChatId();
|
|
523
|
-
return await this.client.
|
|
597
|
+
return await this.client.forwardMessage(chatId, to, messageId, params);
|
|
524
598
|
}
|
|
525
599
|
/**
|
|
526
|
-
* Context-aware alias for {@link Client.
|
|
600
|
+
* Context-aware alias for {@link Client.forwardMessages}.
|
|
527
601
|
*/
|
|
528
|
-
async
|
|
602
|
+
async forwardMessages(to, messageIds, params) {
|
|
529
603
|
const chatId = this.#mustGetChatId();
|
|
530
|
-
return await this.client.
|
|
604
|
+
return await this.client.forwardMessages(chatId, to, messageIds, params);
|
|
531
605
|
}
|
|
532
606
|
/**
|
|
533
|
-
* Context-aware alias for {@link Client.
|
|
607
|
+
* Context-aware alias for {@link Client.getBusinessConnection}.
|
|
534
608
|
*/
|
|
535
|
-
async
|
|
536
|
-
const
|
|
537
|
-
|
|
609
|
+
async getBusinessConnection() {
|
|
610
|
+
const { businessConnectionId } = this.#mustGetMsg();
|
|
611
|
+
if (!businessConnectionId) {
|
|
612
|
+
(0, _0_deps_js_1.unreachable)();
|
|
613
|
+
}
|
|
614
|
+
return await this.client.getBusinessConnection(businessConnectionId);
|
|
538
615
|
}
|
|
539
616
|
/**
|
|
540
|
-
* Context-aware alias for {@link Client.
|
|
617
|
+
* Context-aware alias for {@link Client.getChat}.
|
|
541
618
|
*/
|
|
542
|
-
async
|
|
619
|
+
async getChat() {
|
|
543
620
|
const chatId = this.#mustGetChatId();
|
|
544
|
-
return await this.client.
|
|
621
|
+
return await this.client.getChat(chatId);
|
|
545
622
|
}
|
|
546
623
|
/**
|
|
547
|
-
* Context-aware alias for {@link Client.
|
|
624
|
+
* Context-aware alias for {@link Client.getChatAdministrators}.
|
|
548
625
|
*/
|
|
549
|
-
async
|
|
626
|
+
async getChatAdministrators() {
|
|
550
627
|
const chatId = this.#mustGetChatId();
|
|
551
|
-
return await this.client.
|
|
628
|
+
return await this.client.getChatAdministrators(chatId);
|
|
552
629
|
}
|
|
553
630
|
/**
|
|
554
|
-
* Context-aware alias for {@link Client.
|
|
631
|
+
* Context-aware alias for {@link Client.getChatMember}.
|
|
555
632
|
*/
|
|
556
|
-
async
|
|
557
|
-
const
|
|
558
|
-
return await this.client.
|
|
633
|
+
async getChatMember(userId) {
|
|
634
|
+
const chatId = this.#mustGetChatId();
|
|
635
|
+
return await this.client.getChatMember(chatId, userId);
|
|
559
636
|
}
|
|
560
637
|
/**
|
|
561
|
-
* Context-aware alias for {@link Client.
|
|
638
|
+
* Context-aware alias for {@link Client.getChatMembers}.
|
|
562
639
|
*/
|
|
563
|
-
async
|
|
640
|
+
async getChatMembers(params) {
|
|
564
641
|
const chatId = this.#mustGetChatId();
|
|
565
|
-
return await this.client.
|
|
642
|
+
return await this.client.getChatMembers(chatId, params);
|
|
566
643
|
}
|
|
567
644
|
/**
|
|
568
|
-
* Context-aware alias for {@link Client.
|
|
645
|
+
* Context-aware alias for {@link Client.getChatSettings}.
|
|
569
646
|
*/
|
|
570
|
-
async
|
|
647
|
+
async getChatSettings() {
|
|
571
648
|
const chatId = this.#mustGetChatId();
|
|
572
|
-
return await this.client.
|
|
649
|
+
return await this.client.getChatSettings(chatId);
|
|
573
650
|
}
|
|
574
651
|
/**
|
|
575
|
-
* Context-aware alias for {@link Client.
|
|
652
|
+
* Context-aware alias for {@link Client.getClaimedGifts}.
|
|
576
653
|
*/
|
|
577
|
-
async
|
|
654
|
+
async getClaimedGifts(params) {
|
|
578
655
|
const chatId = this.#mustGetChatId();
|
|
579
|
-
return await this.client.
|
|
656
|
+
return await this.client.getClaimedGifts(chatId, params);
|
|
580
657
|
}
|
|
581
658
|
/**
|
|
582
|
-
* Context-aware alias for {@link Client.
|
|
659
|
+
* Context-aware alias for {@link Client.getChatSettings}.
|
|
583
660
|
*/
|
|
584
|
-
async
|
|
661
|
+
async getCommonChats() {
|
|
585
662
|
const chatId = this.#mustGetChatId();
|
|
586
|
-
return await this.client.
|
|
663
|
+
return await this.client.getCommonChats(chatId);
|
|
587
664
|
}
|
|
588
665
|
/**
|
|
589
|
-
* Context-aware alias for {@link Client.
|
|
666
|
+
* Context-aware alias for {@link Client.getCreatedInviteLinks}.
|
|
590
667
|
*/
|
|
591
|
-
async
|
|
668
|
+
async getCreatedInviteLinks(params) {
|
|
592
669
|
const chatId = this.#mustGetChatId();
|
|
593
|
-
return await this.client.
|
|
670
|
+
return await this.client.getCreatedInviteLinks(chatId, params);
|
|
594
671
|
}
|
|
595
672
|
/**
|
|
596
|
-
* Context-aware alias for {@link Client.
|
|
673
|
+
* Context-aware alias for {@link Client.getHistory}.
|
|
597
674
|
*/
|
|
598
|
-
async
|
|
675
|
+
async getHistory(params) {
|
|
599
676
|
const chatId = this.#mustGetChatId();
|
|
600
|
-
return await this.client.
|
|
677
|
+
return await this.client.getHistory(chatId, params);
|
|
601
678
|
}
|
|
602
679
|
/**
|
|
603
|
-
* Context-aware alias for {@link Client.
|
|
680
|
+
* Context-aware alias for {@link Client.getJoinRequests}.
|
|
604
681
|
*/
|
|
605
|
-
async
|
|
682
|
+
async getJoinRequests(params) {
|
|
606
683
|
const chatId = this.#mustGetChatId();
|
|
607
|
-
return await this.client.
|
|
684
|
+
return await this.client.getJoinRequests(chatId, params);
|
|
608
685
|
}
|
|
609
686
|
/**
|
|
610
|
-
* Context-aware alias for {@link Client.
|
|
687
|
+
* Context-aware alias for {@link Client.getMessage}.
|
|
611
688
|
*/
|
|
612
|
-
async
|
|
689
|
+
async getMessage(messageId) {
|
|
613
690
|
const chatId = this.#mustGetChatId();
|
|
614
|
-
return await this.client.
|
|
691
|
+
return await this.client.getMessage(chatId, messageId);
|
|
615
692
|
}
|
|
616
693
|
/**
|
|
617
|
-
* Context-aware alias for {@link Client.
|
|
694
|
+
* Context-aware alias for {@link Client.getMessageReactions}.
|
|
618
695
|
*/
|
|
619
|
-
async
|
|
696
|
+
async getMessageReactions(messageId) {
|
|
620
697
|
const chatId = this.#mustGetChatId();
|
|
621
|
-
|
|
622
|
-
params.chatId = chatId;
|
|
623
|
-
return await this.client.searchMessages(params);
|
|
698
|
+
return await this.client.getMessageReactions(chatId, messageId);
|
|
624
699
|
}
|
|
625
700
|
/**
|
|
626
|
-
* Context-aware alias for {@link Client.
|
|
701
|
+
* Context-aware alias for {@link Client.getMessages}.
|
|
627
702
|
*/
|
|
628
|
-
async
|
|
703
|
+
async getMessages(messageIds) {
|
|
629
704
|
const chatId = this.#mustGetChatId();
|
|
630
|
-
return await this.client.
|
|
705
|
+
return await this.client.getMessages(chatId, messageIds);
|
|
631
706
|
}
|
|
632
707
|
/**
|
|
633
|
-
* Context-aware alias for {@link Client.
|
|
708
|
+
* Context-aware alias for {@link Client.getSavedMessages}.
|
|
634
709
|
*/
|
|
635
|
-
async
|
|
710
|
+
async getSavedMessages(params) {
|
|
636
711
|
const chatId = this.#mustGetChatId();
|
|
637
|
-
return await this.client.
|
|
712
|
+
return await this.client.getSavedMessages(chatId, params);
|
|
638
713
|
}
|
|
639
714
|
/**
|
|
640
|
-
* Context-aware alias for {@link Client.
|
|
715
|
+
* Context-aware alias for {@link Client.getSimilarBots}.
|
|
641
716
|
*/
|
|
642
|
-
async
|
|
717
|
+
async getSimilarBots() {
|
|
643
718
|
const chatId = this.#mustGetChatId();
|
|
644
|
-
return await this.client.
|
|
719
|
+
return await this.client.getSimilarBots(chatId);
|
|
645
720
|
}
|
|
646
721
|
/**
|
|
647
|
-
* Context-aware alias for {@link Client.
|
|
722
|
+
* Context-aware alias for {@link Client.getSimilarChannels}.
|
|
648
723
|
*/
|
|
649
|
-
async
|
|
724
|
+
async getSimilarChannels() {
|
|
650
725
|
const chatId = this.#mustGetChatId();
|
|
651
|
-
return await this.client.
|
|
726
|
+
return await this.client.getSimilarChannels(chatId);
|
|
652
727
|
}
|
|
653
728
|
/**
|
|
654
|
-
* Context-aware alias for {@link Client.
|
|
729
|
+
* Context-aware alias for {@link Client.getStories}.
|
|
655
730
|
*/
|
|
656
|
-
async
|
|
657
|
-
|
|
731
|
+
async getStories(storyIds) {
|
|
732
|
+
const chatId = this.#mustGetChatId();
|
|
733
|
+
return await this.client.getStories(chatId, storyIds);
|
|
658
734
|
}
|
|
659
735
|
/**
|
|
660
|
-
* Context-aware alias for {@link Client.
|
|
736
|
+
* Context-aware alias for {@link Client.getStory}.
|
|
661
737
|
*/
|
|
662
|
-
async
|
|
663
|
-
|
|
738
|
+
async getStory(storyId) {
|
|
739
|
+
const chatId = this.#mustGetChatId();
|
|
740
|
+
return await this.client.getStory(chatId, storyId);
|
|
664
741
|
}
|
|
665
742
|
/**
|
|
666
|
-
* Context-aware alias for {@link Client.
|
|
743
|
+
* Context-aware alias for {@link Client.sendGift}.
|
|
667
744
|
*/
|
|
668
|
-
async
|
|
745
|
+
async gift(giftId, params) {
|
|
669
746
|
const chatId = this.#mustGetChatId();
|
|
670
|
-
return await this.client.
|
|
747
|
+
return await this.client.sendGift(chatId, giftId, params);
|
|
671
748
|
}
|
|
672
749
|
/**
|
|
673
|
-
* Context-aware alias for {@link Client.
|
|
750
|
+
* Context-aware alias for {@link Client.hideGeneralTopic}.
|
|
674
751
|
*/
|
|
675
|
-
async
|
|
752
|
+
async hideGeneralTopic() {
|
|
676
753
|
const chatId = this.#mustGetChatId();
|
|
677
|
-
return await this.client.
|
|
754
|
+
return await this.client.hideGeneralTopic(chatId);
|
|
678
755
|
}
|
|
679
756
|
/**
|
|
680
|
-
* Context-aware alias for {@link Client.
|
|
757
|
+
* Context-aware alias for {@link Client.hideMemberList}.
|
|
681
758
|
*/
|
|
682
|
-
async
|
|
759
|
+
async hideMemberList() {
|
|
683
760
|
const chatId = this.#mustGetChatId();
|
|
684
|
-
return await this.client.
|
|
761
|
+
return await this.client.hideMemberList(chatId);
|
|
685
762
|
}
|
|
686
763
|
/**
|
|
687
|
-
* Context-aware alias for {@link Client.
|
|
764
|
+
* Context-aware alias for {@link Client.kickChatMember}.
|
|
688
765
|
*/
|
|
689
|
-
async
|
|
766
|
+
async kickChatMember(memberId) {
|
|
690
767
|
const chatId = this.#mustGetChatId();
|
|
691
|
-
return await this.client.
|
|
768
|
+
return await this.client.kickChatMember(chatId, memberId);
|
|
692
769
|
}
|
|
693
770
|
/**
|
|
694
|
-
* Context-aware alias for {@link Client.
|
|
771
|
+
* Context-aware alias for {@link Client.kickChatMember}.
|
|
695
772
|
*/
|
|
696
|
-
async
|
|
697
|
-
const {
|
|
698
|
-
if (!
|
|
773
|
+
async kickSender() {
|
|
774
|
+
const { chatId, senderId } = this.#mustGetMsg();
|
|
775
|
+
if (!senderId) {
|
|
699
776
|
(0, _0_deps_js_1.unreachable)();
|
|
700
777
|
}
|
|
701
|
-
return await this.client.
|
|
778
|
+
return await this.client.kickChatMember(chatId, senderId);
|
|
702
779
|
}
|
|
703
780
|
/**
|
|
704
|
-
* Context-aware alias for {@link Client.
|
|
781
|
+
* Context-aware alias for {@link Client.leaveChat}.
|
|
705
782
|
*/
|
|
706
|
-
async
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
}
|
|
710
|
-
return await this.client.answerPreCheckoutQuery(this.update.preCheckoutQuery.id, ok, params);
|
|
783
|
+
async leaveChat() {
|
|
784
|
+
const chatId = this.#mustGetChatId();
|
|
785
|
+
return await this.client.leaveChat(chatId);
|
|
711
786
|
}
|
|
712
787
|
/**
|
|
713
|
-
* Context-aware alias for {@link Client.
|
|
788
|
+
* Context-aware alias for {@link Client.openChat}.
|
|
714
789
|
*/
|
|
715
|
-
async
|
|
716
|
-
const
|
|
717
|
-
|
|
718
|
-
(0, _0_deps_js_1.unreachable)();
|
|
719
|
-
}
|
|
720
|
-
return await this.client.approveJoinRequest(chatId, userId);
|
|
790
|
+
async open() {
|
|
791
|
+
const chatId = this.#mustGetChatId();
|
|
792
|
+
return await this.client.openChat(chatId);
|
|
721
793
|
}
|
|
722
794
|
/**
|
|
723
|
-
* Context-aware alias for {@link Client.
|
|
795
|
+
* Context-aware alias for {@link Client.pauseBusinessBotConnection}.
|
|
724
796
|
*/
|
|
725
|
-
async
|
|
726
|
-
const
|
|
727
|
-
|
|
728
|
-
(0, _0_deps_js_1.unreachable)();
|
|
729
|
-
}
|
|
730
|
-
return await this.client.declineJoinRequest(chatId, userId);
|
|
797
|
+
async pauseBusinessBotConnection() {
|
|
798
|
+
const chatId = this.#mustGetChatId();
|
|
799
|
+
return await this.client.pauseBusinessBotConnection(chatId);
|
|
731
800
|
}
|
|
732
801
|
/**
|
|
733
|
-
* Context-aware alias for {@link Client.
|
|
802
|
+
* Context-aware alias for {@link Client.pinMessage}.
|
|
734
803
|
*/
|
|
735
|
-
async
|
|
736
|
-
const { chatId,
|
|
737
|
-
|
|
738
|
-
(0, _0_deps_js_1.unreachable)();
|
|
739
|
-
}
|
|
740
|
-
return await this.client.setChatMemberTag(chatId, userId, params);
|
|
804
|
+
async pin(params) {
|
|
805
|
+
const { chatId, messageId, businessConnectionId } = this.#mustGetMsg();
|
|
806
|
+
return await this.client.pinMessage(chatId, messageId, { ...params, businessConnectionId });
|
|
741
807
|
}
|
|
742
808
|
/**
|
|
743
|
-
* Context-aware alias for {@link Client.
|
|
809
|
+
* Context-aware alias for {@link Client.pinMessage}.
|
|
744
810
|
*/
|
|
745
|
-
async
|
|
811
|
+
async pinMessage(messageId, params) {
|
|
746
812
|
const chatId = this.#mustGetChatId();
|
|
747
|
-
return await this.client.
|
|
813
|
+
return await this.client.pinMessage(chatId, messageId, params);
|
|
748
814
|
}
|
|
749
815
|
/**
|
|
750
|
-
* Context-aware alias for {@link Client.
|
|
816
|
+
* Context-aware alias for {@link Client.pinTopic}.
|
|
751
817
|
*/
|
|
752
|
-
async
|
|
818
|
+
async pinTopic(topicId) {
|
|
753
819
|
const chatId = this.#mustGetChatId();
|
|
754
|
-
return await this.client.
|
|
820
|
+
return await this.client.pinTopic(chatId, topicId);
|
|
755
821
|
}
|
|
756
822
|
/**
|
|
757
|
-
* Context-aware alias for {@link Client.
|
|
823
|
+
* Context-aware alias for {@link Client.promoteChatMember}.
|
|
758
824
|
*/
|
|
759
|
-
async
|
|
825
|
+
async promoteChatMember(userId, params) {
|
|
760
826
|
const chatId = this.#mustGetChatId();
|
|
761
|
-
return await this.client.
|
|
827
|
+
return await this.client.promoteChatMember(chatId, userId, params);
|
|
762
828
|
}
|
|
763
829
|
/**
|
|
764
|
-
* Context-aware alias for {@link Client.
|
|
830
|
+
* Context-aware alias for {@link Client.setReactions}.
|
|
765
831
|
*/
|
|
766
|
-
async
|
|
767
|
-
const chatId = this.#
|
|
768
|
-
return await this.client.
|
|
832
|
+
async react(reactions, params) {
|
|
833
|
+
const { chatId, messageId } = this.#mustGetMsg();
|
|
834
|
+
return await this.client.setReactions(chatId, messageId, reactions, params);
|
|
769
835
|
}
|
|
770
836
|
/**
|
|
771
|
-
* Context-aware alias for {@link Client.
|
|
837
|
+
* Context-aware alias for {@link Client.readMessages}.
|
|
772
838
|
*/
|
|
773
|
-
async
|
|
774
|
-
const chatId = this.#
|
|
775
|
-
return await this.client.
|
|
839
|
+
async read() {
|
|
840
|
+
const { chatId, messageId } = this.#mustGetMsg();
|
|
841
|
+
return await this.client.readMessages(chatId, messageId);
|
|
776
842
|
}
|
|
777
843
|
/**
|
|
778
|
-
* Context-aware alias for {@link Client.
|
|
844
|
+
* Context-aware alias for {@link Client.refundStarPayment}.
|
|
779
845
|
*/
|
|
780
|
-
async
|
|
846
|
+
async refundStarPayment(telegramPaymentChargeId) {
|
|
781
847
|
const chatId = this.#mustGetChatId();
|
|
782
|
-
return await this.client.
|
|
848
|
+
return await this.client.refundStarPayment(chatId, telegramPaymentChargeId);
|
|
783
849
|
}
|
|
784
850
|
/**
|
|
785
|
-
* Context-aware alias for {@link Client.
|
|
851
|
+
* Context-aware alias for {@link Client.deleteContact}.
|
|
786
852
|
*/
|
|
787
|
-
async
|
|
853
|
+
async removeAsContact() {
|
|
788
854
|
const chatId = this.#mustGetChatId();
|
|
789
|
-
return await this.client.
|
|
855
|
+
return await this.client.deleteContact(chatId);
|
|
790
856
|
}
|
|
791
857
|
/**
|
|
792
|
-
* Context-aware alias for {@link Client.
|
|
858
|
+
* Context-aware alias for {@link Client.removeReaction}.
|
|
793
859
|
*/
|
|
794
|
-
async
|
|
860
|
+
async removeReaction(messageId, reaction) {
|
|
795
861
|
const chatId = this.#mustGetChatId();
|
|
796
|
-
return await this.client.
|
|
862
|
+
return await this.client.removeReaction(chatId, messageId, reaction);
|
|
797
863
|
}
|
|
798
864
|
/**
|
|
799
|
-
* Context-aware alias for {@link Client.
|
|
865
|
+
* Context-aware alias for {@link Client.removeStoriesFromHighlights}.
|
|
800
866
|
*/
|
|
801
|
-
async
|
|
867
|
+
async removeStoriesFromHighlights(storyIds) {
|
|
802
868
|
const chatId = this.#mustGetChatId();
|
|
803
|
-
return await this.client.
|
|
869
|
+
return await this.client.removeStoriesFromHighlights(chatId, storyIds);
|
|
804
870
|
}
|
|
805
871
|
/**
|
|
806
|
-
* Context-aware alias for {@link Client.
|
|
872
|
+
* Context-aware alias for {@link Client.removeStoryFromHighlights}.
|
|
807
873
|
*/
|
|
808
|
-
async
|
|
874
|
+
async removeStoryFromHighlights(storyId) {
|
|
809
875
|
const chatId = this.#mustGetChatId();
|
|
810
|
-
return await this.client.
|
|
876
|
+
return await this.client.removeStoryFromHighlights(chatId, storyId);
|
|
811
877
|
}
|
|
812
878
|
/**
|
|
813
|
-
* Context-aware alias for {@link Client.
|
|
879
|
+
* Context-aware alias for {@link Client.reopenTopic}.
|
|
814
880
|
*/
|
|
815
|
-
async
|
|
881
|
+
async reopenTopic(topicId) {
|
|
816
882
|
const chatId = this.#mustGetChatId();
|
|
817
|
-
return await this.client.
|
|
883
|
+
return await this.client.reopenTopic(chatId, topicId);
|
|
818
884
|
}
|
|
819
885
|
/**
|
|
820
|
-
* Context-aware alias for {@link Client.
|
|
886
|
+
* Context-aware alias for {@link Client.sendMessage}.
|
|
821
887
|
*/
|
|
822
|
-
async
|
|
823
|
-
const chatId = this.#
|
|
824
|
-
|
|
888
|
+
async reply(text, params) {
|
|
889
|
+
const { chatId, messageId, businessConnectionId } = this.#mustGetMsg();
|
|
890
|
+
const replyTo = this.#getReplyTo(params?.isQuoted, chatId, messageId);
|
|
891
|
+
return await this.client.sendMessage(chatId, text, { ...params, ...replyTo, businessConnectionId });
|
|
825
892
|
}
|
|
826
893
|
/**
|
|
827
|
-
* Context-aware alias for {@link Client.
|
|
894
|
+
* Context-aware alias for {@link Client.sendAnimation}.
|
|
828
895
|
*/
|
|
829
|
-
async
|
|
830
|
-
const chatId = this.#
|
|
831
|
-
|
|
896
|
+
async replyAnimation(animation, params) {
|
|
897
|
+
const { chatId, messageId, businessConnectionId } = this.#mustGetMsg();
|
|
898
|
+
const replyTo = this.#getReplyTo(params?.isQuoted, chatId, messageId);
|
|
899
|
+
return await this.client.sendAnimation(chatId, animation, { ...params, ...replyTo, businessConnectionId });
|
|
832
900
|
}
|
|
833
901
|
/**
|
|
834
|
-
* Context-aware alias for {@link Client.
|
|
902
|
+
* Context-aware alias for {@link Client.sendAudio}.
|
|
835
903
|
*/
|
|
836
|
-
async
|
|
837
|
-
const chatId = this.#
|
|
838
|
-
|
|
904
|
+
async replyAudio(audio, params) {
|
|
905
|
+
const { chatId, messageId, businessConnectionId } = this.#mustGetMsg();
|
|
906
|
+
const replyTo = this.#getReplyTo(params?.isQuoted, chatId, messageId);
|
|
907
|
+
return await this.client.sendAudio(chatId, audio, { ...params, ...replyTo, businessConnectionId });
|
|
839
908
|
}
|
|
840
909
|
/**
|
|
841
|
-
* Context-aware alias for {@link Client.
|
|
910
|
+
* Context-aware alias for {@link Client.sendChecklist}.
|
|
842
911
|
*/
|
|
843
|
-
async
|
|
844
|
-
const chatId = this.#
|
|
845
|
-
|
|
912
|
+
async replyChecklist(title, items, params) {
|
|
913
|
+
const { chatId, messageId, businessConnectionId } = this.#mustGetMsg();
|
|
914
|
+
const replyTo = this.#getReplyTo(params?.isQuoted, chatId, messageId);
|
|
915
|
+
return await this.client.sendChecklist(chatId, title, items, { ...params, ...replyTo, businessConnectionId });
|
|
846
916
|
}
|
|
847
917
|
/**
|
|
848
|
-
* Context-aware alias for {@link Client.
|
|
918
|
+
* Context-aware alias for {@link Client.sendContact}.
|
|
849
919
|
*/
|
|
850
|
-
async
|
|
851
|
-
const chatId = this.#
|
|
852
|
-
|
|
920
|
+
async replyContact(firstName, number, params) {
|
|
921
|
+
const { chatId, messageId, businessConnectionId } = this.#mustGetMsg();
|
|
922
|
+
const replyTo = this.#getReplyTo(params?.isQuoted, chatId, messageId);
|
|
923
|
+
return await this.client.sendContact(chatId, firstName, number, { ...params, ...replyTo, businessConnectionId });
|
|
853
924
|
}
|
|
854
925
|
/**
|
|
855
|
-
* Context-aware alias for {@link Client.
|
|
926
|
+
* Context-aware alias for {@link Client.sendDice}.
|
|
856
927
|
*/
|
|
857
|
-
async
|
|
858
|
-
const chatId = this.#
|
|
859
|
-
|
|
928
|
+
async replyDice(params) {
|
|
929
|
+
const { chatId, messageId, businessConnectionId } = this.#mustGetMsg();
|
|
930
|
+
const replyTo = this.#getReplyTo(params?.isQuoted, chatId, messageId);
|
|
931
|
+
return await this.client.sendDice(chatId, { ...params, ...replyTo, businessConnectionId });
|
|
860
932
|
}
|
|
861
933
|
/**
|
|
862
|
-
* Context-aware alias for {@link Client.
|
|
934
|
+
* Context-aware alias for {@link Client.sendDocument}.
|
|
863
935
|
*/
|
|
864
|
-
async
|
|
865
|
-
const chatId = this.#
|
|
866
|
-
|
|
936
|
+
async replyDocument(document, params) {
|
|
937
|
+
const { chatId, messageId, businessConnectionId } = this.#mustGetMsg();
|
|
938
|
+
const replyTo = this.#getReplyTo(params?.isQuoted, chatId, messageId);
|
|
939
|
+
return await this.client.sendDocument(chatId, document, { ...params, ...replyTo, businessConnectionId });
|
|
867
940
|
}
|
|
868
941
|
/**
|
|
869
|
-
* Context-aware alias for {@link Client.
|
|
942
|
+
* Context-aware alias for {@link Client.sendMessageDraft}.
|
|
870
943
|
*/
|
|
871
|
-
async
|
|
872
|
-
const chatId = this.#
|
|
873
|
-
|
|
944
|
+
async replyDraft(draftId, text, params) {
|
|
945
|
+
const { chatId, messageId } = this.#mustGetMsg();
|
|
946
|
+
const replyTo = this.#getReplyTo(params?.isQuoted, chatId, messageId);
|
|
947
|
+
return await this.client.sendMessageDraft(chatId, draftId, text, { ...params, ...replyTo });
|
|
874
948
|
}
|
|
875
949
|
/**
|
|
876
|
-
* Context-aware alias for {@link Client.
|
|
950
|
+
* Context-aware alias for {@link Client.sendInvoice}.
|
|
877
951
|
*/
|
|
878
|
-
async
|
|
879
|
-
const chatId = this.#
|
|
880
|
-
|
|
952
|
+
async replyInvoice(title, description, payload, currency, prices, params) {
|
|
953
|
+
const { chatId, messageId, businessConnectionId } = this.#mustGetMsg();
|
|
954
|
+
const replyTo = this.#getReplyTo(params?.isQuoted, chatId, messageId);
|
|
955
|
+
return await this.client.sendInvoice(chatId, title, description, payload, currency, prices, { ...params, ...replyTo, businessConnectionId });
|
|
881
956
|
}
|
|
882
957
|
/**
|
|
883
|
-
* Context-aware alias for {@link Client.
|
|
958
|
+
* Context-aware alias for {@link Client.sendLocation}.
|
|
884
959
|
*/
|
|
885
|
-
async
|
|
886
|
-
const chatId = this.#
|
|
887
|
-
|
|
960
|
+
async replyLocation(latitude, longitude, params) {
|
|
961
|
+
const { chatId, messageId, businessConnectionId } = this.#mustGetMsg();
|
|
962
|
+
const replyTo = this.#getReplyTo(params?.isQuoted, chatId, messageId);
|
|
963
|
+
return await this.client.sendLocation(chatId, latitude, longitude, { ...params, ...replyTo, businessConnectionId });
|
|
888
964
|
}
|
|
889
965
|
/**
|
|
890
|
-
* Context-aware alias for {@link Client.
|
|
966
|
+
* Context-aware alias for {@link Client.sendMediaGroup}.
|
|
891
967
|
*/
|
|
892
|
-
async
|
|
893
|
-
const chatId = this.#
|
|
894
|
-
|
|
968
|
+
async replyMediaGroup(media, params) {
|
|
969
|
+
const { chatId, messageId, businessConnectionId } = this.#mustGetMsg();
|
|
970
|
+
const replyTo = this.#getReplyTo(params?.isQuoted, chatId, messageId);
|
|
971
|
+
return await this.client.sendMediaGroup(chatId, media, { ...params, ...replyTo, businessConnectionId });
|
|
895
972
|
}
|
|
896
973
|
/**
|
|
897
|
-
* Context-aware alias for {@link Client.
|
|
974
|
+
* Context-aware alias for {@link Client.sendPhoto}.
|
|
898
975
|
*/
|
|
899
|
-
async
|
|
900
|
-
const chatId = this.#
|
|
901
|
-
|
|
976
|
+
async replyPhoto(photo, params) {
|
|
977
|
+
const { chatId, messageId, businessConnectionId } = this.#mustGetMsg();
|
|
978
|
+
const replyTo = this.#getReplyTo(params?.isQuoted, chatId, messageId);
|
|
979
|
+
return await this.client.sendPhoto(chatId, photo, { ...params, ...replyTo, businessConnectionId });
|
|
902
980
|
}
|
|
903
981
|
/**
|
|
904
|
-
* Context-aware alias for {@link Client.
|
|
982
|
+
* Context-aware alias for {@link Client.sendPoll}.
|
|
905
983
|
*/
|
|
906
|
-
async
|
|
907
|
-
const chatId = this.#
|
|
908
|
-
|
|
984
|
+
async replyPoll(question, options, params) {
|
|
985
|
+
const { chatId, messageId, businessConnectionId } = this.#mustGetMsg();
|
|
986
|
+
const replyTo = this.#getReplyTo(params?.isQuoted, chatId, messageId);
|
|
987
|
+
return await this.client.sendPoll(chatId, question, options, { ...params, ...replyTo, businessConnectionId });
|
|
909
988
|
}
|
|
910
989
|
/**
|
|
911
|
-
* Context-aware alias for {@link Client.
|
|
990
|
+
* Context-aware alias for {@link Client.sendSticker}.
|
|
912
991
|
*/
|
|
913
|
-
async
|
|
914
|
-
const chatId = this.#
|
|
915
|
-
|
|
992
|
+
async replySticker(sticker, params) {
|
|
993
|
+
const { chatId, messageId, businessConnectionId } = this.#mustGetMsg();
|
|
994
|
+
const replyTo = this.#getReplyTo(params?.isQuoted, chatId, messageId);
|
|
995
|
+
return await this.client.sendSticker(chatId, sticker, { ...params, ...replyTo, businessConnectionId });
|
|
916
996
|
}
|
|
917
997
|
/**
|
|
918
|
-
* Context-aware alias for {@link Client.
|
|
998
|
+
* Context-aware alias for {@link Client.sendVenue}.
|
|
919
999
|
*/
|
|
920
|
-
async
|
|
921
|
-
const chatId = this.#
|
|
922
|
-
|
|
1000
|
+
async replyVenue(latitude, longitude, title, address, params) {
|
|
1001
|
+
const { chatId, messageId, businessConnectionId } = this.#mustGetMsg();
|
|
1002
|
+
const replyTo = this.#getReplyTo(params?.isQuoted, chatId, messageId);
|
|
1003
|
+
return await this.client.sendVenue(chatId, latitude, longitude, title, address, { ...params, ...replyTo, businessConnectionId });
|
|
923
1004
|
}
|
|
924
1005
|
/**
|
|
925
|
-
* Context-aware alias for {@link Client.
|
|
1006
|
+
* Context-aware alias for {@link Client.sendVideo}.
|
|
926
1007
|
*/
|
|
927
|
-
async
|
|
928
|
-
const chatId = this.#
|
|
929
|
-
|
|
1008
|
+
async replyVideo(video, params) {
|
|
1009
|
+
const { chatId, messageId, businessConnectionId } = this.#mustGetMsg();
|
|
1010
|
+
const replyTo = this.#getReplyTo(params?.isQuoted, chatId, messageId);
|
|
1011
|
+
return await this.client.sendVideo(chatId, video, { ...params, ...replyTo, businessConnectionId });
|
|
930
1012
|
}
|
|
931
1013
|
/**
|
|
932
|
-
* Context-aware alias for {@link Client.
|
|
1014
|
+
* Context-aware alias for {@link Client.sendVideoNote}.
|
|
933
1015
|
*/
|
|
934
|
-
async
|
|
935
|
-
const chatId = this.#
|
|
936
|
-
|
|
1016
|
+
async replyVideoNote(videoNote, params) {
|
|
1017
|
+
const { chatId, messageId, businessConnectionId } = this.#mustGetMsg();
|
|
1018
|
+
const replyTo = this.#getReplyTo(params?.isQuoted, chatId, messageId);
|
|
1019
|
+
return await this.client.sendVideoNote(chatId, videoNote, { ...params, ...replyTo, businessConnectionId });
|
|
937
1020
|
}
|
|
938
1021
|
/**
|
|
939
|
-
* Context-aware alias for {@link Client.
|
|
1022
|
+
* Context-aware alias for {@link Client.sendVoice}.
|
|
940
1023
|
*/
|
|
941
|
-
async
|
|
942
|
-
const chatId = this.#
|
|
943
|
-
|
|
1024
|
+
async replyVoice(voice, params) {
|
|
1025
|
+
const { chatId, messageId, businessConnectionId } = this.#mustGetMsg();
|
|
1026
|
+
const replyTo = this.#getReplyTo(params?.isQuoted, chatId, messageId);
|
|
1027
|
+
return await this.client.sendVoice(chatId, voice, { ...params, ...replyTo, businessConnectionId });
|
|
944
1028
|
}
|
|
945
1029
|
/**
|
|
946
|
-
* Context-aware alias for {@link Client.
|
|
1030
|
+
* Context-aware alias for {@link Client.resumeBusinessBotConnection}.
|
|
947
1031
|
*/
|
|
948
|
-
async
|
|
1032
|
+
async resumeBusinessBotConnection() {
|
|
949
1033
|
const chatId = this.#mustGetChatId();
|
|
950
|
-
return await this.client.
|
|
1034
|
+
return await this.client.resumeBusinessBotConnection(chatId);
|
|
951
1035
|
}
|
|
952
1036
|
/**
|
|
953
|
-
* Context-aware alias for {@link Client.
|
|
1037
|
+
* Context-aware alias for {@link Client.scheduleVideoChat}.
|
|
954
1038
|
*/
|
|
955
|
-
async
|
|
1039
|
+
async scheduleVideoChat(startAt, params) {
|
|
956
1040
|
const chatId = this.#mustGetChatId();
|
|
957
|
-
return await this.client.
|
|
1041
|
+
return await this.client.scheduleVideoChat(chatId, startAt, params);
|
|
958
1042
|
}
|
|
959
1043
|
/**
|
|
960
|
-
* Context-aware alias for {@link Client.
|
|
1044
|
+
* Context-aware alias for {@link Client.searchMessages}.
|
|
961
1045
|
*/
|
|
962
|
-
async
|
|
1046
|
+
async searchMessages(params) {
|
|
963
1047
|
const chatId = this.#mustGetChatId();
|
|
964
|
-
|
|
1048
|
+
params ??= {};
|
|
1049
|
+
params.chatId = chatId;
|
|
1050
|
+
return await this.client.searchMessages(params);
|
|
965
1051
|
}
|
|
966
1052
|
/**
|
|
967
|
-
* Context-aware alias for {@link Client.
|
|
1053
|
+
* Context-aware alias for {@link Client.sendChatAction}.
|
|
968
1054
|
*/
|
|
969
|
-
async
|
|
1055
|
+
async sendChatAction(action, params) {
|
|
970
1056
|
const chatId = this.#mustGetChatId();
|
|
971
|
-
return await this.client.
|
|
1057
|
+
return await this.client.sendChatAction(chatId, action, params);
|
|
972
1058
|
}
|
|
973
1059
|
/**
|
|
974
|
-
* Context-aware alias for {@link Client.
|
|
1060
|
+
* Context-aware alias for {@link Client.sendScheduledMessage}.
|
|
975
1061
|
*/
|
|
976
|
-
async
|
|
1062
|
+
async sendScheduledMessage(messageId) {
|
|
977
1063
|
const chatId = this.#mustGetChatId();
|
|
978
|
-
return await this.client.
|
|
1064
|
+
return await this.client.sendScheduledMessage(chatId, messageId);
|
|
979
1065
|
}
|
|
980
1066
|
/**
|
|
981
|
-
* Context-aware alias for {@link Client.
|
|
1067
|
+
* Context-aware alias for {@link Client.setAvailableReactions}.
|
|
982
1068
|
*/
|
|
983
|
-
async
|
|
1069
|
+
async setAvailableReactions(availableReactions) {
|
|
984
1070
|
const chatId = this.#mustGetChatId();
|
|
985
|
-
return await this.client.
|
|
1071
|
+
return await this.client.setAvailableReactions(chatId, availableReactions);
|
|
986
1072
|
}
|
|
987
1073
|
/**
|
|
988
|
-
* Context-aware alias for {@link Client.
|
|
1074
|
+
* Context-aware alias for {@link Client.setBoostsRequiredToCircumventRestrictions}.
|
|
989
1075
|
*/
|
|
990
|
-
async
|
|
1076
|
+
async setBoostsRequiredToCircumventRestrictions(boosts) {
|
|
991
1077
|
const chatId = this.#mustGetChatId();
|
|
992
|
-
return await this.client.
|
|
1078
|
+
return await this.client.setBoostsRequiredToCircumventRestrictions(chatId, boosts);
|
|
993
1079
|
}
|
|
994
1080
|
/**
|
|
995
|
-
* Context-aware alias for {@link Client.
|
|
1081
|
+
* Context-aware alias for {@link Client.setChatDescription}.
|
|
996
1082
|
*/
|
|
997
|
-
async
|
|
1083
|
+
async setChatDescription(description) {
|
|
998
1084
|
const chatId = this.#mustGetChatId();
|
|
999
|
-
return await this.client.
|
|
1085
|
+
return await this.client.setChatDescription(chatId, description);
|
|
1000
1086
|
}
|
|
1001
1087
|
/**
|
|
1002
|
-
* Context-aware alias for {@link Client.
|
|
1088
|
+
* Context-aware alias for {@link Client.setChatMemberRights}.
|
|
1003
1089
|
*/
|
|
1004
|
-
async
|
|
1090
|
+
async setChatMemberRights(memberId, params) {
|
|
1005
1091
|
const chatId = this.#mustGetChatId();
|
|
1006
|
-
return await this.client.
|
|
1092
|
+
return await this.client.setChatMemberRights(chatId, memberId, params);
|
|
1007
1093
|
}
|
|
1008
1094
|
/**
|
|
1009
|
-
* Context-aware alias for {@link Client.
|
|
1095
|
+
* Context-aware alias for {@link Client.setChatPhoto}.
|
|
1010
1096
|
*/
|
|
1011
|
-
async
|
|
1097
|
+
async setChatPhoto(photo, params) {
|
|
1012
1098
|
const chatId = this.#mustGetChatId();
|
|
1013
|
-
return await this.client.
|
|
1099
|
+
return await this.client.setChatPhoto(chatId, photo, params);
|
|
1014
1100
|
}
|
|
1015
1101
|
/**
|
|
1016
|
-
* Context-aware alias for {@link Client.
|
|
1102
|
+
* Context-aware alias for {@link Client.setChatStickerSet}.
|
|
1017
1103
|
*/
|
|
1018
|
-
async
|
|
1104
|
+
async setChatStickerSet(setName) {
|
|
1019
1105
|
const chatId = this.#mustGetChatId();
|
|
1020
|
-
return await this.client.
|
|
1106
|
+
return await this.client.setChatStickerSet(chatId, setName);
|
|
1021
1107
|
}
|
|
1022
1108
|
/**
|
|
1023
|
-
* Context-aware alias for {@link Client.
|
|
1109
|
+
* Context-aware alias for {@link Client.setChatTitle}.
|
|
1024
1110
|
*/
|
|
1025
|
-
async
|
|
1111
|
+
async setChatTitle(title) {
|
|
1026
1112
|
const chatId = this.#mustGetChatId();
|
|
1027
|
-
return await this.client.
|
|
1113
|
+
return await this.client.setChatTitle(chatId, title);
|
|
1028
1114
|
}
|
|
1029
1115
|
/**
|
|
1030
|
-
* Context-aware alias for {@link Client.
|
|
1116
|
+
* Context-aware alias for {@link Client.setDiscussionChat}.
|
|
1031
1117
|
*/
|
|
1032
|
-
async
|
|
1118
|
+
async setDiscussionChat(discussionChatId) {
|
|
1033
1119
|
const chatId = this.#mustGetChatId();
|
|
1034
|
-
return await this.client.
|
|
1120
|
+
return await this.client.setDiscussionChat(chatId, discussionChatId);
|
|
1035
1121
|
}
|
|
1036
1122
|
/**
|
|
1037
|
-
* Context-aware alias for {@link Client.
|
|
1123
|
+
* Context-aware alias for {@link Client.setChatMemberTag}.
|
|
1038
1124
|
*/
|
|
1039
|
-
async
|
|
1040
|
-
const chatId = this.#
|
|
1041
|
-
|
|
1125
|
+
async setMemberTag(params) {
|
|
1126
|
+
const { chatId, userId } = this.#mustGetMsg();
|
|
1127
|
+
if (!userId) {
|
|
1128
|
+
(0, _0_deps_js_1.unreachable)();
|
|
1129
|
+
}
|
|
1130
|
+
return await this.client.setChatMemberTag(chatId, userId, params);
|
|
1042
1131
|
}
|
|
1043
1132
|
/**
|
|
1044
|
-
* Context-aware alias for {@link Client.
|
|
1133
|
+
* Context-aware alias for {@link Client.setMessageTtl}.
|
|
1045
1134
|
*/
|
|
1046
|
-
async
|
|
1135
|
+
async setMessageTtl(messageTtl) {
|
|
1047
1136
|
const chatId = this.#mustGetChatId();
|
|
1048
|
-
return await this.client.
|
|
1137
|
+
return await this.client.setMessageTtl(chatId, messageTtl);
|
|
1049
1138
|
}
|
|
1050
1139
|
/**
|
|
1051
|
-
* Context-aware alias for {@link Client.
|
|
1140
|
+
* Context-aware alias for {@link Client.setReactions}.
|
|
1052
1141
|
*/
|
|
1053
|
-
async
|
|
1142
|
+
async setReactions(messageId, reactions, params) {
|
|
1054
1143
|
const chatId = this.#mustGetChatId();
|
|
1055
|
-
return await this.client.
|
|
1144
|
+
return await this.client.setReactions(chatId, messageId, reactions, params);
|
|
1056
1145
|
}
|
|
1057
1146
|
/**
|
|
1058
|
-
* Context-aware alias for {@link Client.
|
|
1147
|
+
* Context-aware alias for {@link Client.setChatMemberRights}.
|
|
1059
1148
|
*/
|
|
1060
|
-
async
|
|
1061
|
-
const chatId = this.#
|
|
1062
|
-
|
|
1149
|
+
async setSenderRights(params) {
|
|
1150
|
+
const { chatId, senderId } = this.#mustGetMsg();
|
|
1151
|
+
if (!senderId) {
|
|
1152
|
+
(0, _0_deps_js_1.unreachable)();
|
|
1153
|
+
}
|
|
1154
|
+
return await this.client.setChatMemberRights(chatId, senderId, params);
|
|
1063
1155
|
}
|
|
1064
1156
|
/**
|
|
1065
|
-
* Context-aware alias for {@link Client.
|
|
1157
|
+
* Context-aware alias for {@link Client.setSlowMode}.
|
|
1066
1158
|
*/
|
|
1067
|
-
async
|
|
1159
|
+
async setSlowMode(duration) {
|
|
1068
1160
|
const chatId = this.#mustGetChatId();
|
|
1069
|
-
return await this.client.
|
|
1161
|
+
return await this.client.setSlowMode(chatId, duration);
|
|
1070
1162
|
}
|
|
1071
1163
|
/**
|
|
1072
|
-
* Context-aware alias for {@link Client.
|
|
1164
|
+
* Context-aware alias for {@link Client.showGeneralTopic}.
|
|
1073
1165
|
*/
|
|
1074
|
-
async
|
|
1166
|
+
async showGeneralTopic() {
|
|
1075
1167
|
const chatId = this.#mustGetChatId();
|
|
1076
|
-
return await this.client.
|
|
1168
|
+
return await this.client.showGeneralTopic(chatId);
|
|
1077
1169
|
}
|
|
1078
1170
|
/**
|
|
1079
|
-
* Context-aware alias for {@link Client.
|
|
1171
|
+
* Context-aware alias for {@link Client.showMemberList}.
|
|
1080
1172
|
*/
|
|
1081
|
-
async
|
|
1173
|
+
async showMemberList() {
|
|
1082
1174
|
const chatId = this.#mustGetChatId();
|
|
1083
|
-
return await this.client.
|
|
1175
|
+
return await this.client.showMemberList(chatId);
|
|
1084
1176
|
}
|
|
1085
1177
|
/**
|
|
1086
|
-
* Context-aware alias for {@link Client.
|
|
1178
|
+
* Context-aware alias for {@link Client.startVideoChat}.
|
|
1087
1179
|
*/
|
|
1088
|
-
async
|
|
1180
|
+
async startVideoChat(params) {
|
|
1089
1181
|
const chatId = this.#mustGetChatId();
|
|
1090
|
-
return await this.client.
|
|
1182
|
+
return await this.client.startVideoChat(chatId, params);
|
|
1091
1183
|
}
|
|
1092
1184
|
/**
|
|
1093
|
-
* Context-aware alias for {@link Client.
|
|
1185
|
+
* Context-aware alias for {@link Client.stopPoll}.
|
|
1094
1186
|
*/
|
|
1095
|
-
async
|
|
1187
|
+
async stopPoll(messageId, params) {
|
|
1096
1188
|
const chatId = this.#mustGetChatId();
|
|
1097
|
-
return await this.client.
|
|
1189
|
+
return await this.client.stopPoll(chatId, messageId, params);
|
|
1098
1190
|
}
|
|
1099
1191
|
/**
|
|
1100
|
-
* Context-aware alias for {@link Client.
|
|
1192
|
+
* Context-aware alias for {@link Client.transcribeVoice}.
|
|
1101
1193
|
*/
|
|
1102
|
-
async
|
|
1194
|
+
async transcribeVoice(messageId) {
|
|
1103
1195
|
const chatId = this.#mustGetChatId();
|
|
1104
|
-
return await this.client.
|
|
1196
|
+
return await this.client.transcribeVoice(chatId, messageId);
|
|
1105
1197
|
}
|
|
1106
1198
|
/**
|
|
1107
|
-
* Context-aware alias for {@link Client.
|
|
1199
|
+
* Context-aware alias for {@link Client.transferChatOwnership}.
|
|
1108
1200
|
*/
|
|
1109
|
-
async
|
|
1201
|
+
async transferOwnership(userId, password) {
|
|
1110
1202
|
const chatId = this.#mustGetChatId();
|
|
1111
|
-
return await this.client.
|
|
1203
|
+
return await this.client.transferChatOwnership(chatId, userId, password);
|
|
1112
1204
|
}
|
|
1113
1205
|
/**
|
|
1114
|
-
* Context-aware alias for {@link Client.
|
|
1206
|
+
* Context-aware alias for {@link Client.unarchiveChat}.
|
|
1115
1207
|
*/
|
|
1116
|
-
async
|
|
1208
|
+
async unarchive() {
|
|
1117
1209
|
const chatId = this.#mustGetChatId();
|
|
1118
|
-
return await this.client.
|
|
1210
|
+
return await this.client.unarchiveChat(chatId);
|
|
1119
1211
|
}
|
|
1120
1212
|
/**
|
|
1121
|
-
* Context-aware alias for {@link Client.
|
|
1213
|
+
* Context-aware alias for {@link Client.unbanChatMember}.
|
|
1122
1214
|
*/
|
|
1123
|
-
async
|
|
1215
|
+
async unbanChatMember(memberId) {
|
|
1124
1216
|
const chatId = this.#mustGetChatId();
|
|
1125
|
-
return await this.client.
|
|
1217
|
+
return await this.client.unbanChatMember(chatId, memberId);
|
|
1126
1218
|
}
|
|
1127
1219
|
/**
|
|
1128
|
-
* Context-aware alias for {@link Client.
|
|
1220
|
+
* Context-aware alias for {@link Client.unblockUser}.
|
|
1129
1221
|
*/
|
|
1130
|
-
async
|
|
1131
|
-
|
|
1132
|
-
return await this.client.getStories(chatId, storyIds);
|
|
1222
|
+
async unblockUser() {
|
|
1223
|
+
return await this.client.unblockUser(this.#mustGetUserId());
|
|
1133
1224
|
}
|
|
1134
1225
|
/**
|
|
1135
|
-
* Context-aware alias for {@link Client.
|
|
1226
|
+
* Context-aware alias for {@link Client.uncheckChecklistItem}.
|
|
1136
1227
|
*/
|
|
1137
|
-
async
|
|
1228
|
+
async uncheckChecklistItem(messageId, item) {
|
|
1138
1229
|
const chatId = this.#mustGetChatId();
|
|
1139
|
-
return await this.client.
|
|
1230
|
+
return await this.client.uncheckChecklistItem(chatId, messageId, item);
|
|
1140
1231
|
}
|
|
1141
1232
|
/**
|
|
1142
|
-
* Context-aware alias for {@link Client.
|
|
1233
|
+
* Context-aware alias for {@link Client.uncheckChecklistItems}.
|
|
1143
1234
|
*/
|
|
1144
|
-
async
|
|
1235
|
+
async uncheckChecklistItems(messageId, items) {
|
|
1145
1236
|
const chatId = this.#mustGetChatId();
|
|
1146
|
-
return await this.client.
|
|
1237
|
+
return await this.client.uncheckChecklistItems(chatId, messageId, items);
|
|
1147
1238
|
}
|
|
1148
1239
|
/**
|
|
1149
|
-
* Context-aware alias for {@link Client.
|
|
1240
|
+
* Context-aware alias for {@link Client.unpinMessage}.
|
|
1150
1241
|
*/
|
|
1151
|
-
async
|
|
1152
|
-
const chatId = this.#
|
|
1153
|
-
return await this.client.
|
|
1242
|
+
async unpin() {
|
|
1243
|
+
const { chatId, messageId, businessConnectionId } = this.#mustGetMsg();
|
|
1244
|
+
return await this.client.unpinMessage(chatId, messageId, { businessConnectionId });
|
|
1154
1245
|
}
|
|
1155
1246
|
/**
|
|
1156
|
-
* Context-aware alias for {@link Client.
|
|
1247
|
+
* Context-aware alias for {@link Client.unpinMessage}.
|
|
1157
1248
|
*/
|
|
1158
|
-
async
|
|
1249
|
+
async unpinMessage(messageId) {
|
|
1159
1250
|
const chatId = this.#mustGetChatId();
|
|
1160
|
-
return await this.client.
|
|
1251
|
+
return await this.client.unpinMessage(chatId, messageId);
|
|
1161
1252
|
}
|
|
1162
1253
|
/**
|
|
1163
|
-
* Context-aware alias for {@link Client.
|
|
1254
|
+
* Context-aware alias for {@link Client.unpinMessages}.
|
|
1164
1255
|
*/
|
|
1165
|
-
async
|
|
1256
|
+
async unpinMessages() {
|
|
1166
1257
|
const chatId = this.#mustGetChatId();
|
|
1167
|
-
return await this.client.
|
|
1258
|
+
return await this.client.unpinMessages(chatId);
|
|
1168
1259
|
}
|
|
1169
1260
|
/**
|
|
1170
|
-
* Context-aware alias for {@link Client.
|
|
1261
|
+
* Context-aware alias for {@link Client.unpinTopic}.
|
|
1171
1262
|
*/
|
|
1172
|
-
async
|
|
1263
|
+
async unpinTopic(topicId) {
|
|
1173
1264
|
const chatId = this.#mustGetChatId();
|
|
1174
|
-
return await this.client.
|
|
1265
|
+
return await this.client.unpinTopic(chatId, topicId);
|
|
1175
1266
|
}
|
|
1176
1267
|
/**
|
|
1177
|
-
* Context-aware alias for {@link Client.
|
|
1268
|
+
* Context-aware alias for {@link Client.updateChecklist}.
|
|
1178
1269
|
*/
|
|
1179
|
-
async
|
|
1270
|
+
async updateChecklist(messageId, params) {
|
|
1180
1271
|
const chatId = this.#mustGetChatId();
|
|
1181
|
-
return await this.client.
|
|
1272
|
+
return await this.client.updateChecklist(chatId, messageId, params);
|
|
1182
1273
|
}
|
|
1183
1274
|
}
|
|
1184
1275
|
exports.Context = Context;
|