@telegram.ts/types 1.24.0 → 1.25.1
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/package.json +2 -2
- package/src/apiMethodsTypes.d.ts +207 -153
- package/src/checkListTask.d.ts +4 -2
- package/src/inlineTypes.d.ts +1 -0
- package/src/invoiceTypes.d.ts +80 -27
- package/src/manageTypes.d.ts +93 -50
- package/src/messageTypes.d.ts +13 -5
package/src/apiMethodsTypes.d.ts
CHANGED
|
@@ -102,7 +102,7 @@ export type ApiMethods = {
|
|
|
102
102
|
/** HTTPS URL to send updates to. Use an empty string to remove webhook integration */
|
|
103
103
|
url: string;
|
|
104
104
|
/** Upload your public key certificate so that the root certificate in use can be checked. See our self-signed guide for details. */
|
|
105
|
-
certificate?: Buffer | ReadStream
|
|
105
|
+
certificate?: Buffer | ReadStream;
|
|
106
106
|
/** The fixed IP address which will be used to send webhook requests instead of the IP address resolved through DNS */
|
|
107
107
|
ip_address?: string;
|
|
108
108
|
/** The maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery, 1-100. Defaults to 40. Use lower values to limit the load on your bot's server, and higher values to increase your bot's throughput. */
|
|
@@ -139,9 +139,9 @@ export type ApiMethods = {
|
|
|
139
139
|
sendMessage(args: {
|
|
140
140
|
/** Unique identifier of the business connection on behalf of which the message will be sent */
|
|
141
141
|
business_connection_id?: string;
|
|
142
|
-
/** Unique identifier for the target chat or username of the target channel (in the format
|
|
142
|
+
/** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
|
|
143
143
|
chat_id: number | string;
|
|
144
|
-
/** Unique identifier for the target message thread (topic) of
|
|
144
|
+
/** Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only */
|
|
145
145
|
message_thread_id?: number;
|
|
146
146
|
/** Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat */
|
|
147
147
|
direct_messages_topic_id?: number;
|
|
@@ -171,22 +171,38 @@ export type ApiMethods = {
|
|
|
171
171
|
| ReplyKeyboardMarkup
|
|
172
172
|
| ReplyKeyboardRemove
|
|
173
173
|
| ForceReply;
|
|
174
|
-
/** @deprecated Use `reply_parameters` instead. */
|
|
175
|
-
reply_to_message_id?: number;
|
|
176
174
|
}): Message.TextMessage;
|
|
177
175
|
|
|
176
|
+
/** Use this method to stream a partial message to a user while the message is being generated; supported only for bots with forum topic mode enabled. Returns True on success. */
|
|
177
|
+
sendMessageDraft(args: {
|
|
178
|
+
/** Unique identifier for the target private chat */
|
|
179
|
+
chat_id: number;
|
|
180
|
+
/** Unique identifier for the target message thread */
|
|
181
|
+
message_thread_id?: number;
|
|
182
|
+
/** Unique identifier of the message draft; must be non-zero. Changes of drafts with the same identifier are animated */
|
|
183
|
+
draft_id: number;
|
|
184
|
+
/** Text of the message to be sent, 1-4096 characters after entities parsing */
|
|
185
|
+
text: string;
|
|
186
|
+
/** Mode for parsing entities in the message text. See formatting options for more details. */
|
|
187
|
+
parse_mode?: ParseMode;
|
|
188
|
+
/** A list of special entities that appear in message text, which can be specified instead of parse_mode */
|
|
189
|
+
entities?: MessageEntity[];
|
|
190
|
+
}): true;
|
|
191
|
+
|
|
178
192
|
/** Use this method to forward messages of any kind. Service messages and messages with protected content can't be forwarded. On success, the sent Message is returned. */
|
|
179
193
|
forwardMessage(args: {
|
|
180
|
-
/** Unique identifier for the target chat or username of the target channel (in the format
|
|
194
|
+
/** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
|
|
181
195
|
chat_id: number | string;
|
|
182
|
-
/** Unique identifier for the target message thread (topic) of
|
|
196
|
+
/** Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only */
|
|
183
197
|
message_thread_id?: number;
|
|
184
198
|
/** Identifier of the direct messages topic to which the message will be forwarded; required if the message is forwarded to a direct messages chat */
|
|
185
199
|
direct_messages_topic_id?: number;
|
|
186
|
-
/** Unique identifier for the chat where the original message was sent (or channel username in the format
|
|
200
|
+
/** Unique identifier for the chat where the original message was sent (or channel username in the format `@channelusername`) */
|
|
187
201
|
from_chat_id: number | string;
|
|
188
202
|
/** New start timestamp for the copied video in the message */
|
|
189
203
|
video_start_timestamp?: number;
|
|
204
|
+
/** Unique identifier of the message effect to be added to the message; only available when forwarding to private chats */
|
|
205
|
+
message_effect_id?: string;
|
|
190
206
|
/** An object containing the parameters of the suggested post to send; for direct messages chats only */
|
|
191
207
|
suggested_post_parameters?: SuggestedPostParameters;
|
|
192
208
|
/** Sends the message silently. Users will receive a notification with no sound. */
|
|
@@ -199,13 +215,13 @@ export type ApiMethods = {
|
|
|
199
215
|
|
|
200
216
|
/** Use this method to forward multiple messages of any kind. If some of the specified messages can't be found or forwarded, they are skipped. Service messages and messages with protected content can't be forwarded. Album grouping is kept for forwarded messages. On success, an array of MessageId of the sent messages is returned. */
|
|
201
217
|
forwardMessages(args: {
|
|
202
|
-
/** Unique identifier for the target chat or username of the target channel (in the format
|
|
218
|
+
/** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
|
|
203
219
|
chat_id: number | string;
|
|
204
|
-
/** Unique identifier for the target message thread (topic) of
|
|
220
|
+
/** Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only */
|
|
205
221
|
message_thread_id?: number;
|
|
206
222
|
/** Identifier of the direct messages topic to which the messages will be forwarded; required if the messages are forwarded to a direct messages chat */
|
|
207
223
|
direct_messages_topic_id?: number;
|
|
208
|
-
/** Unique identifier for the chat where the original messages were sent (or channel username in the format
|
|
224
|
+
/** Unique identifier for the chat where the original messages were sent (or channel username in the format `@channelusername`) */
|
|
209
225
|
from_chat_id: number | string;
|
|
210
226
|
/** A list of 1-100 identifiers of messages in the chat from_chat_id to forward. The identifiers must be specified in a strictly increasing order. */
|
|
211
227
|
message_ids: number[];
|
|
@@ -217,13 +233,13 @@ export type ApiMethods = {
|
|
|
217
233
|
|
|
218
234
|
/** Use this method to copy messages of any kind. Service messages, paid media messages, giveaway messages, giveaway winners messages, and invoice messages can't be copied. A quiz poll can be copied only if the value of the field correct_option_id is known to the bot. The method is analogous to the method forwardMessage, but the copied message doesn't have a link to the original message. Returns the MessageId of the sent message on success. */
|
|
219
235
|
copyMessage(args: {
|
|
220
|
-
/** Unique identifier for the target chat or username of the target channel (in the format
|
|
236
|
+
/** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
|
|
221
237
|
chat_id: number | string;
|
|
222
|
-
/** Unique identifier for the target message thread (topic) of
|
|
238
|
+
/** Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only */
|
|
223
239
|
message_thread_id?: number;
|
|
224
240
|
/** Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat */
|
|
225
241
|
direct_messages_topic_id?: number;
|
|
226
|
-
/** Unique identifier for the chat where the original message was sent (or channel username in the format
|
|
242
|
+
/** Unique identifier for the chat where the original message was sent (or channel username in the format `@channelusername`) */
|
|
227
243
|
from_chat_id: number | string;
|
|
228
244
|
/** Message identifier in the chat specified in from_chat_id */
|
|
229
245
|
message_id: number;
|
|
@@ -243,6 +259,8 @@ export type ApiMethods = {
|
|
|
243
259
|
protect_content?: boolean;
|
|
244
260
|
/** Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance */
|
|
245
261
|
allow_paid_broadcast?: boolean;
|
|
262
|
+
/** Unique identifier of the message effect to be added to the message; only available when copying to private chats */
|
|
263
|
+
message_effect_id?: string;
|
|
246
264
|
/** An object containing the parameters of the suggested post to send; for direct messages chats only. If the message is sent as a reply to another suggested post, then that suggested post is automatically declined. */
|
|
247
265
|
suggested_post_parameters?: SuggestedPostParameters;
|
|
248
266
|
/** Description of the message to reply to */
|
|
@@ -253,19 +271,17 @@ export type ApiMethods = {
|
|
|
253
271
|
| ReplyKeyboardMarkup
|
|
254
272
|
| ReplyKeyboardRemove
|
|
255
273
|
| ForceReply;
|
|
256
|
-
/** @deprecated Use `reply_parameters` instead. */
|
|
257
|
-
reply_to_message_id?: number;
|
|
258
274
|
}): MessageId;
|
|
259
275
|
|
|
260
276
|
/** Use this method to copy messages of any kind. If some of the specified messages can't be found or copied, they are skipped. Service messages, paid media messages, giveaway messages, giveaway winners messages, and invoice messages can't be copied. A quiz poll can be copied only if the value of the field correct_option_id is known to the bot. The method is analogous to the method forwardMessages, but the copied messages don't have a link to the original message. Album grouping is kept for copied messages. On success, an array of MessageId of the sent messages is returned. */
|
|
261
277
|
copyMessages(args: {
|
|
262
|
-
/** Unique identifier for the target chat or username of the target channel (in the format
|
|
278
|
+
/** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
|
|
263
279
|
chat_id: number | string;
|
|
264
|
-
/** Unique identifier for the target message thread (topic) of
|
|
280
|
+
/** Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only */
|
|
265
281
|
message_thread_id?: number;
|
|
266
282
|
/** Identifier of the direct messages topic to which the messages will be sent; required if the messages are sent to a direct messages chat */
|
|
267
283
|
direct_messages_topic_id?: number;
|
|
268
|
-
/** Unique identifier for the chat where the original messages were sent (or channel username in the format
|
|
284
|
+
/** Unique identifier for the chat where the original messages were sent (or channel username in the format `@channelusername`) */
|
|
269
285
|
from_chat_id: number | string;
|
|
270
286
|
/** A list of 1-100 identifiers of messages in the chat from_chat_id to copy. The identifiers must be specified in a strictly increasing order. */
|
|
271
287
|
message_ids: number[];
|
|
@@ -281,9 +297,9 @@ export type ApiMethods = {
|
|
|
281
297
|
sendPhoto(args: {
|
|
282
298
|
/** Unique identifier of the business connection on behalf of which the message will be sent */
|
|
283
299
|
business_connection_id?: string;
|
|
284
|
-
/** Unique identifier for the target chat or username of the target channel (in the format
|
|
300
|
+
/** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
|
|
285
301
|
chat_id: number | string;
|
|
286
|
-
/** Unique identifier for the target message thread (topic) of
|
|
302
|
+
/** Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only */
|
|
287
303
|
message_thread_id?: number;
|
|
288
304
|
/** Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat */
|
|
289
305
|
direct_messages_topic_id?: number;
|
|
@@ -317,8 +333,6 @@ export type ApiMethods = {
|
|
|
317
333
|
| ReplyKeyboardMarkup
|
|
318
334
|
| ReplyKeyboardRemove
|
|
319
335
|
| ForceReply;
|
|
320
|
-
/** @deprecated Use `reply_parameters` instead. */
|
|
321
|
-
reply_to_message_id?: number;
|
|
322
336
|
}): Message.PhotoMessage;
|
|
323
337
|
|
|
324
338
|
/** Use this method to send audio files, if you want Telegram clients to display them in the music player. Your audio must be in the .MP3 or .M4A format. On success, the sent Message is returned. Bots can currently send audio files of up to 50 MB in size, this limit may be changed in the future.
|
|
@@ -327,9 +341,9 @@ export type ApiMethods = {
|
|
|
327
341
|
sendAudio(args: {
|
|
328
342
|
/** Unique identifier of the business connection on behalf of which the message will be sent */
|
|
329
343
|
business_connection_id?: string;
|
|
330
|
-
/** Unique identifier for the target chat or username of the target channel (in the format
|
|
344
|
+
/** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
|
|
331
345
|
chat_id: number | string;
|
|
332
|
-
/** Unique identifier for the target message thread (topic) of
|
|
346
|
+
/** Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only */
|
|
333
347
|
message_thread_id?: number;
|
|
334
348
|
/** Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat */
|
|
335
349
|
direct_messages_topic_id?: number;
|
|
@@ -367,17 +381,15 @@ export type ApiMethods = {
|
|
|
367
381
|
| ReplyKeyboardMarkup
|
|
368
382
|
| ReplyKeyboardRemove
|
|
369
383
|
| ForceReply;
|
|
370
|
-
/** @deprecated Use `reply_parameters` instead. */
|
|
371
|
-
reply_to_message_id?: number;
|
|
372
384
|
}): Message.AudioMessage;
|
|
373
385
|
|
|
374
386
|
/** Use this method to send general files. On success, the sent Message is returned. Bots can currently send files of any type of up to 50 MB in size, this limit may be changed in the future. */
|
|
375
387
|
sendDocument(args: {
|
|
376
388
|
/** Unique identifier of the business connection on behalf of which the message will be sent */
|
|
377
389
|
business_connection_id?: string;
|
|
378
|
-
/** Unique identifier for the target chat or username of the target channel (in the format
|
|
390
|
+
/** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
|
|
379
391
|
chat_id: number | string;
|
|
380
|
-
/** Unique identifier for the target message thread (topic) of
|
|
392
|
+
/** Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only */
|
|
381
393
|
message_thread_id?: number;
|
|
382
394
|
/** Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat */
|
|
383
395
|
direct_messages_topic_id?: number;
|
|
@@ -411,17 +423,15 @@ export type ApiMethods = {
|
|
|
411
423
|
| ReplyKeyboardMarkup
|
|
412
424
|
| ReplyKeyboardRemove
|
|
413
425
|
| ForceReply;
|
|
414
|
-
/** @deprecated Use `reply_parameters` instead. */
|
|
415
|
-
reply_to_message_id?: number;
|
|
416
426
|
}): Message.DocumentMessage;
|
|
417
427
|
|
|
418
428
|
/** Use this method to send video files, Telegram clients support MPEG4 videos (other formats may be sent as Document). On success, the sent Message is returned. Bots can currently send video files of up to 50 MB in size, this limit may be changed in the future. */
|
|
419
429
|
sendVideo(args: {
|
|
420
430
|
/** Unique identifier of the business connection on behalf of which the message will be sent */
|
|
421
431
|
business_connection_id?: string;
|
|
422
|
-
/** Unique identifier for the target chat or username of the target channel (in the format
|
|
432
|
+
/** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
|
|
423
433
|
chat_id: number | string;
|
|
424
|
-
/** Unique identifier for the target message thread (topic) of
|
|
434
|
+
/** Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only */
|
|
425
435
|
message_thread_id?: number;
|
|
426
436
|
/** Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat */
|
|
427
437
|
direct_messages_topic_id?: number;
|
|
@@ -469,17 +479,15 @@ export type ApiMethods = {
|
|
|
469
479
|
| ReplyKeyboardMarkup
|
|
470
480
|
| ReplyKeyboardRemove
|
|
471
481
|
| ForceReply;
|
|
472
|
-
/** @deprecated Use `reply_parameters` instead. */
|
|
473
|
-
reply_to_message_id?: number;
|
|
474
482
|
}): Message.VideoMessage;
|
|
475
483
|
|
|
476
484
|
/** Use this method to send animation files (GIF or H.264/MPEG-4 AVC video without sound). On success, the sent Message is returned. Bots can currently send animation files of up to 50 MB in size, this limit may be changed in the future. */
|
|
477
485
|
sendAnimation(args: {
|
|
478
486
|
/** Unique identifier of the business connection on behalf of which the message will be sent */
|
|
479
487
|
business_connection_id?: string;
|
|
480
|
-
/** Unique identifier for the target chat or username of the target channel (in the format
|
|
488
|
+
/** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
|
|
481
489
|
chat_id: number | string;
|
|
482
|
-
/** Unique identifier for the target message thread (topic) of
|
|
490
|
+
/** Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only */
|
|
483
491
|
message_thread_id?: number;
|
|
484
492
|
/** Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat */
|
|
485
493
|
direct_messages_topic_id?: number;
|
|
@@ -521,17 +529,15 @@ export type ApiMethods = {
|
|
|
521
529
|
| ReplyKeyboardMarkup
|
|
522
530
|
| ReplyKeyboardRemove
|
|
523
531
|
| ForceReply;
|
|
524
|
-
/** @deprecated Use `reply_parameters` instead. */
|
|
525
|
-
reply_to_message_id?: number;
|
|
526
532
|
}): Message.AnimationMessage;
|
|
527
533
|
|
|
528
534
|
/** Use this method to send audio files, if you want Telegram clients to display the file as a playable voice message. For this to work, your audio must be in an .OGG file encoded with OPUS, or in .MP3 format, or in .M4A format (other formats may be sent as Audio or Document). On success, the sent Message is returned. Bots can currently send voice messages of up to 50 MB in size, this limit may be changed in the future. */
|
|
529
535
|
sendVoice(args: {
|
|
530
536
|
/** Unique identifier of the business connection on behalf of which the message will be sent */
|
|
531
537
|
business_connection_id?: string;
|
|
532
|
-
/** Unique identifier for the target chat or username of the target channel (in the format
|
|
538
|
+
/** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
|
|
533
539
|
chat_id: number | string;
|
|
534
|
-
/** Unique identifier for the target message thread (topic) of
|
|
540
|
+
/** Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only */
|
|
535
541
|
message_thread_id?: number;
|
|
536
542
|
/** Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat */
|
|
537
543
|
direct_messages_topic_id?: number;
|
|
@@ -563,8 +569,6 @@ export type ApiMethods = {
|
|
|
563
569
|
| ReplyKeyboardMarkup
|
|
564
570
|
| ReplyKeyboardRemove
|
|
565
571
|
| ForceReply;
|
|
566
|
-
/** @deprecated Use `reply_parameters` instead. */
|
|
567
|
-
reply_to_message_id?: number;
|
|
568
572
|
}): Message.VoiceMessage;
|
|
569
573
|
|
|
570
574
|
/** Use this method to send video messages. On success, the sent Message is returned.
|
|
@@ -572,9 +576,9 @@ export type ApiMethods = {
|
|
|
572
576
|
sendVideoNote(args: {
|
|
573
577
|
/** Unique identifier of the business connection on behalf of which the message will be sent */
|
|
574
578
|
business_connection_id?: string;
|
|
575
|
-
/** Unique identifier for the target chat or username of the target channel (in the format
|
|
579
|
+
/** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
|
|
576
580
|
chat_id: number | string;
|
|
577
|
-
/** Unique identifier for the target message thread (topic) of
|
|
581
|
+
/** Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only */
|
|
578
582
|
message_thread_id?: number;
|
|
579
583
|
/** Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat */
|
|
580
584
|
direct_messages_topic_id?: number;
|
|
@@ -604,17 +608,15 @@ export type ApiMethods = {
|
|
|
604
608
|
| ReplyKeyboardMarkup
|
|
605
609
|
| ReplyKeyboardRemove
|
|
606
610
|
| ForceReply;
|
|
607
|
-
/** @deprecated Use `reply_parameters` instead. */
|
|
608
|
-
reply_to_message_id?: number;
|
|
609
611
|
}): Message.VideoNoteMessage;
|
|
610
612
|
|
|
611
613
|
/** Use this method to send a group of photos, videos, documents or audios as an album. Documents and audio files can be only grouped in an album with messages of the same type. On success, an array of Messages that were sent is returned. */
|
|
612
614
|
sendMediaGroup(args: {
|
|
613
615
|
/** Unique identifier of the business connection on behalf of which the message will be sent */
|
|
614
616
|
business_connection_id?: string;
|
|
615
|
-
/** Unique identifier for the target chat or username of the target channel (in the format
|
|
617
|
+
/** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
|
|
616
618
|
chat_id: number | string;
|
|
617
|
-
/** Unique identifier for the target message thread (topic) of
|
|
619
|
+
/** Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only */
|
|
618
620
|
message_thread_id?: number;
|
|
619
621
|
/** Identifier of the direct messages topic to which the messages will be sent; required if the messages are sent to a direct messages chat */
|
|
620
622
|
direct_messages_topic_id?: number;
|
|
@@ -632,8 +634,6 @@ export type ApiMethods = {
|
|
|
632
634
|
message_effect_id?: string;
|
|
633
635
|
/** Description of the message to reply to */
|
|
634
636
|
reply_parameters?: ReplyParameters;
|
|
635
|
-
/** @deprecated Use `reply_parameters` instead. */
|
|
636
|
-
reply_to_message_id?: number;
|
|
637
637
|
}): Array<
|
|
638
638
|
| Message.AudioMessage
|
|
639
639
|
| Message.DocumentMessage
|
|
@@ -645,9 +645,9 @@ export type ApiMethods = {
|
|
|
645
645
|
sendLocation(args: {
|
|
646
646
|
/** Unique identifier of the business connection on behalf of which the message will be sent */
|
|
647
647
|
business_connection_id?: string;
|
|
648
|
-
/** Unique identifier for the target chat or username of the target channel (in the format
|
|
648
|
+
/** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
|
|
649
649
|
chat_id: number | string;
|
|
650
|
-
/** Unique identifier for the target message thread (topic) of
|
|
650
|
+
/** Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only */
|
|
651
651
|
message_thread_id?: number;
|
|
652
652
|
/** Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat */
|
|
653
653
|
direct_messages_topic_id?: number;
|
|
@@ -681,15 +681,13 @@ export type ApiMethods = {
|
|
|
681
681
|
| ReplyKeyboardMarkup
|
|
682
682
|
| ReplyKeyboardRemove
|
|
683
683
|
| ForceReply;
|
|
684
|
-
/** @deprecated Use `reply_parameters` instead. */
|
|
685
|
-
reply_to_message_id?: number;
|
|
686
684
|
}): Message.LocationMessage;
|
|
687
685
|
|
|
688
686
|
/** Use this method to edit live location messages. A location can be edited until its live_period expires or editing is explicitly disabled by a call to stopMessageLiveLocation. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned. */
|
|
689
687
|
editMessageLiveLocation(args: {
|
|
690
688
|
/** Unique identifier of the business connection on behalf of which the message to be edited was sent */
|
|
691
689
|
business_connection_id?: string;
|
|
692
|
-
/** Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format
|
|
690
|
+
/** Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
|
|
693
691
|
chat_id?: number | string;
|
|
694
692
|
/** Required if inline_message_id is not specified. Identifier of the message to edit */
|
|
695
693
|
message_id?: number;
|
|
@@ -715,7 +713,7 @@ export type ApiMethods = {
|
|
|
715
713
|
stopMessageLiveLocation(args: {
|
|
716
714
|
/** Unique identifier of the business connection on behalf of which the message to be edited was sent */
|
|
717
715
|
business_connection_id?: string;
|
|
718
|
-
/** Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format
|
|
716
|
+
/** Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
|
|
719
717
|
chat_id?: number | string;
|
|
720
718
|
/** Required if inline_message_id is not specified. Identifier of the message with live location to stop */
|
|
721
719
|
message_id?: number;
|
|
@@ -729,8 +727,10 @@ export type ApiMethods = {
|
|
|
729
727
|
sendPaidMedia(args: {
|
|
730
728
|
/** Unique identifier of the business connection on behalf of which the message to be edited was sent */
|
|
731
729
|
business_connection_id?: string;
|
|
732
|
-
/** Unique identifier for the target chat or username of the target channel (in the format
|
|
730
|
+
/** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`). If the chat is a channel, all Telegram Star proceeds from this media will be credited to the chat's balance. Otherwise, they will be credited to the bot's balance. */
|
|
733
731
|
chat_id: number | string;
|
|
732
|
+
/** Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only */
|
|
733
|
+
message_thread_id?: number;
|
|
734
734
|
/** Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat */
|
|
735
735
|
direct_messages_topic_id?: number;
|
|
736
736
|
/** The number of Telegram Stars that must be paid to buy access to the media; 1-2500 */
|
|
@@ -769,9 +769,9 @@ export type ApiMethods = {
|
|
|
769
769
|
sendVenue(args: {
|
|
770
770
|
/** Unique identifier of the business connection on behalf of which the message will be sent */
|
|
771
771
|
business_connection_id?: string;
|
|
772
|
-
/** Unique identifier for the target chat or username of the target channel (in the format
|
|
772
|
+
/** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
|
|
773
773
|
chat_id: number | string;
|
|
774
|
-
/** Unique identifier for the target message thread (topic) of
|
|
774
|
+
/** Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only */
|
|
775
775
|
message_thread_id?: number;
|
|
776
776
|
/** Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat */
|
|
777
777
|
direct_messages_topic_id?: number;
|
|
@@ -809,17 +809,15 @@ export type ApiMethods = {
|
|
|
809
809
|
| ReplyKeyboardMarkup
|
|
810
810
|
| ReplyKeyboardRemove
|
|
811
811
|
| ForceReply;
|
|
812
|
-
/** @deprecated Use `reply_parameters` instead. */
|
|
813
|
-
reply_to_message_id?: number;
|
|
814
812
|
}): Message.VenueMessage;
|
|
815
813
|
|
|
816
814
|
/** Use this method to send phone contacts. On success, the sent Message is returned. */
|
|
817
815
|
sendContact(args: {
|
|
818
816
|
/** Unique identifier of the business connection on behalf of which the message will be sent */
|
|
819
817
|
business_connection_id?: string;
|
|
820
|
-
/** Unique identifier for the target chat or username of the target channel (in the format
|
|
818
|
+
/** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
|
|
821
819
|
chat_id: number | string;
|
|
822
|
-
/** Unique identifier for the target message thread (topic) of
|
|
820
|
+
/** Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only */
|
|
823
821
|
message_thread_id?: number;
|
|
824
822
|
/** Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat */
|
|
825
823
|
direct_messages_topic_id?: number;
|
|
@@ -849,17 +847,15 @@ export type ApiMethods = {
|
|
|
849
847
|
| ReplyKeyboardMarkup
|
|
850
848
|
| ReplyKeyboardRemove
|
|
851
849
|
| ForceReply;
|
|
852
|
-
/** @deprecated Use `reply_parameters` instead. */
|
|
853
|
-
reply_to_message_id?: number;
|
|
854
850
|
}): Message.ContactMessage;
|
|
855
851
|
|
|
856
852
|
/** Use this method to send a native poll. On success, the sent Message is returned. */
|
|
857
853
|
sendPoll(args: {
|
|
858
854
|
/** Unique identifier of the business connection on behalf of which the message will be sent */
|
|
859
855
|
business_connection_id?: string;
|
|
860
|
-
/** Unique identifier for the target chat or username of the target channel (in the format
|
|
856
|
+
/** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`). Polls can't be sent to channel direct messages chats. */
|
|
861
857
|
chat_id: number | string;
|
|
862
|
-
/** Unique identifier for the target message thread (topic) of
|
|
858
|
+
/** Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only */
|
|
863
859
|
message_thread_id?: number;
|
|
864
860
|
/** Poll question, 1-300 characters */
|
|
865
861
|
question: string;
|
|
@@ -905,8 +901,6 @@ export type ApiMethods = {
|
|
|
905
901
|
| ReplyKeyboardMarkup
|
|
906
902
|
| ReplyKeyboardRemove
|
|
907
903
|
| ForceReply;
|
|
908
|
-
/** @deprecated Use `reply_parameters` instead. */
|
|
909
|
-
reply_to_message_id?: number;
|
|
910
904
|
}): Message.PollMessage;
|
|
911
905
|
|
|
912
906
|
/** Use this method to send a checklist on behalf of a connected business account. On success, the sent Message is returned. */
|
|
@@ -947,9 +941,9 @@ export type ApiMethods = {
|
|
|
947
941
|
sendDice(args: {
|
|
948
942
|
/** Unique identifier of the business connection on behalf of which the message will be sent */
|
|
949
943
|
business_connection_id?: string;
|
|
950
|
-
/** Unique identifier for the target chat or username of the target channel (in the format
|
|
944
|
+
/** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
|
|
951
945
|
chat_id: number | string;
|
|
952
|
-
/** Unique identifier for the target message thread (topic) of
|
|
946
|
+
/** Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only */
|
|
953
947
|
message_thread_id?: number;
|
|
954
948
|
/** Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat */
|
|
955
949
|
direct_messages_topic_id?: number;
|
|
@@ -980,8 +974,6 @@ export type ApiMethods = {
|
|
|
980
974
|
| ReplyKeyboardMarkup
|
|
981
975
|
| ReplyKeyboardRemove
|
|
982
976
|
| ForceReply;
|
|
983
|
-
/** @deprecated Use `reply_parameters` instead. */
|
|
984
|
-
reply_to_message_id?: number;
|
|
985
977
|
}): Message.DiceMessage;
|
|
986
978
|
|
|
987
979
|
/** Use this method when you need to tell the user that something is happening on the bot's side. The status is set for 5 seconds or less (when a message arrives from your bot, Telegram clients clear its typing status). Returns True on success.
|
|
@@ -992,8 +984,10 @@ export type ApiMethods = {
|
|
|
992
984
|
sendChatAction(args: {
|
|
993
985
|
/** Unique identifier of the business connection on behalf of which the action will be sent */
|
|
994
986
|
business_connection_id?: string;
|
|
995
|
-
/** Unique identifier for the target chat or username of the target supergroup (in the format
|
|
987
|
+
/** Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`). Channel chats and channel direct messages chats aren't supported. */
|
|
996
988
|
chat_id: number | string;
|
|
989
|
+
/** Unique identifier for the target message thread or topic of a forum; for supergroups and private chats of bots with forum topic mode enabled only */
|
|
990
|
+
message_thread_id?: number;
|
|
997
991
|
/** Type of action to broadcast. Choose one, depending on what the user is about to receive: typing for text messages, upload_photo for photos, record_video or upload_video for videos, record_voice or upload_voice for voice notes, upload_document for general files, choose_sticker for stickers, find_location for location data, record_video_note or upload_video_note for video notes. */
|
|
998
992
|
action:
|
|
999
993
|
| "typing"
|
|
@@ -1007,13 +1001,11 @@ export type ApiMethods = {
|
|
|
1007
1001
|
| "find_location"
|
|
1008
1002
|
| "record_video_note"
|
|
1009
1003
|
| "upload_video_note";
|
|
1010
|
-
/** Unique identifier for the target message thread; for supergroups only */
|
|
1011
|
-
message_thread_id?: number;
|
|
1012
1004
|
}): true;
|
|
1013
1005
|
|
|
1014
1006
|
/** Use this method to change the chosen reactions on a message. Service messages of some types can't be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. Bots can't use paid reactions. Returns True on success. */
|
|
1015
1007
|
setMessageReaction(args: {
|
|
1016
|
-
/** Unique identifier for the target chat or username of the target channel (in the format
|
|
1008
|
+
/** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
|
|
1017
1009
|
chat_id: number | string;
|
|
1018
1010
|
/** Identifier of the target message */
|
|
1019
1011
|
message_id: number;
|
|
@@ -1053,7 +1045,7 @@ export type ApiMethods = {
|
|
|
1053
1045
|
|
|
1054
1046
|
/** Use this method to ban a user in a group, a supergroup or a channel. In the case of supergroups and channels, the user will not be able to return to the chat on their own using invite links, etc., unless unbanned first. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns True on success. */
|
|
1055
1047
|
banChatMember(args: {
|
|
1056
|
-
/** Unique identifier for the target group or username of the target supergroup or channel (in the format
|
|
1048
|
+
/** Unique identifier for the target group or username of the target supergroup or channel (in the format `@channelusername`) */
|
|
1057
1049
|
chat_id: number | string;
|
|
1058
1050
|
/** Unique identifier of the target user */
|
|
1059
1051
|
user_id: number;
|
|
@@ -1065,7 +1057,7 @@ export type ApiMethods = {
|
|
|
1065
1057
|
|
|
1066
1058
|
/** Use this method to unban a previously banned user in a supergroup or channel. The user will not return to the group or channel automatically, but will be able to join via link, etc. The bot must be an administrator for this to work. By default, this method guarantees that after the call the user is not a member of the chat, but will be able to join it. So if the user is a member of the chat they will also be removed from the chat. If you don't want this, use the parameter only_if_banned. Returns True on success. */
|
|
1067
1059
|
unbanChatMember(args: {
|
|
1068
|
-
/** Unique identifier for the target group or username of the target supergroup or channel (in the format
|
|
1060
|
+
/** Unique identifier for the target group or username of the target supergroup or channel (in the format `@channelusername`) */
|
|
1069
1061
|
chat_id: number | string;
|
|
1070
1062
|
/** Unique identifier of the target user */
|
|
1071
1063
|
user_id: number;
|
|
@@ -1075,7 +1067,7 @@ export type ApiMethods = {
|
|
|
1075
1067
|
|
|
1076
1068
|
/** Use this method to restrict a user in a supergroup. The bot must be an administrator in the supergroup for this to work and must have the appropriate administrator rights. Pass True for all permissions to lift restrictions from a user. Returns True on success. */
|
|
1077
1069
|
restrictChatMember(args: {
|
|
1078
|
-
/** Unique identifier for the target chat or username of the target supergroup (in the format
|
|
1070
|
+
/** Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`) */
|
|
1079
1071
|
chat_id: number | string;
|
|
1080
1072
|
/** Unique identifier of the target user */
|
|
1081
1073
|
user_id: number;
|
|
@@ -1089,7 +1081,7 @@ export type ApiMethods = {
|
|
|
1089
1081
|
|
|
1090
1082
|
/** Use this method to promote or demote a user in a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Pass False for all boolean parameters to demote a user. Returns True on success. */
|
|
1091
1083
|
promoteChatMember(args: {
|
|
1092
|
-
/** Unique identifier for the target chat or username of the target channel (in the format
|
|
1084
|
+
/** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
|
|
1093
1085
|
chat_id: number | string;
|
|
1094
1086
|
/** Unique identifier of the target user */
|
|
1095
1087
|
user_id: number;
|
|
@@ -1101,7 +1093,7 @@ export type ApiMethods = {
|
|
|
1101
1093
|
can_delete_messages?: boolean;
|
|
1102
1094
|
/** Pass True if the administrator can manage video chats */
|
|
1103
1095
|
can_manage_video_chats?: boolean;
|
|
1104
|
-
/** Pass True if the administrator can restrict, ban or unban chat members, or access supergroup statistics */
|
|
1096
|
+
/** Pass True if the administrator can restrict, ban or unban chat members, or access supergroup statistics. For backward compatibility, defaults to True for promotions of channel administrators */
|
|
1105
1097
|
can_restrict_members?: boolean;
|
|
1106
1098
|
/** Pass True if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have promoted, directly or indirectly (promoted by administrators that were appointed by him) */
|
|
1107
1099
|
can_promote_members?: boolean;
|
|
@@ -1129,7 +1121,7 @@ export type ApiMethods = {
|
|
|
1129
1121
|
|
|
1130
1122
|
/** Use this method to set a custom title for an administrator in a supergroup promoted by the bot. Returns True on success. */
|
|
1131
1123
|
setChatAdministratorCustomTitle(args: {
|
|
1132
|
-
/** Unique identifier for the target chat or username of the target supergroup (in the format
|
|
1124
|
+
/** Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`) */
|
|
1133
1125
|
chat_id: number | string;
|
|
1134
1126
|
/** Unique identifier of the target user */
|
|
1135
1127
|
user_id: number;
|
|
@@ -1139,7 +1131,7 @@ export type ApiMethods = {
|
|
|
1139
1131
|
|
|
1140
1132
|
/** Use this method to ban a channel chat in a supergroup or a channel. Until the chat is unbanned, the owner of the banned chat won't be able to send messages on behalf of any of their channels. The bot must be an administrator in the supergroup or channel for this to work and must have the appropriate administrator rights. Returns True on success. */
|
|
1141
1133
|
banChatSenderChat(args: {
|
|
1142
|
-
/** Unique identifier for the target chat or username of the target channel (in the format
|
|
1134
|
+
/** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
|
|
1143
1135
|
chat_id: number | string;
|
|
1144
1136
|
/** Unique identifier of the target sender chat */
|
|
1145
1137
|
sender_chat_id: number;
|
|
@@ -1147,7 +1139,7 @@ export type ApiMethods = {
|
|
|
1147
1139
|
|
|
1148
1140
|
/** Use this method to unban a previously banned channel chat in a supergroup or channel. The bot must be an administrator for this to work and must have the appropriate administrator rights. Returns True on success. */
|
|
1149
1141
|
unbanChatSenderChat(args: {
|
|
1150
|
-
/** Unique identifier for the target chat or username of the target channel (in the format
|
|
1142
|
+
/** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
|
|
1151
1143
|
chat_id: number | string;
|
|
1152
1144
|
/** Unique identifier of the target sender chat */
|
|
1153
1145
|
sender_chat_id: number;
|
|
@@ -1155,7 +1147,7 @@ export type ApiMethods = {
|
|
|
1155
1147
|
|
|
1156
1148
|
/** Use this method to set default chat permissions for all members. The bot must be an administrator in the group or a supergroup for this to work and must have the can_restrict_members administrator rights. Returns True on success. */
|
|
1157
1149
|
setChatPermissions(args: {
|
|
1158
|
-
/** Unique identifier for the target chat or username of the target supergroup (in the format
|
|
1150
|
+
/** Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`) */
|
|
1159
1151
|
chat_id: number | string;
|
|
1160
1152
|
/** An object for new default chat permissions */
|
|
1161
1153
|
permissions: ChatPermissions;
|
|
@@ -1167,13 +1159,13 @@ export type ApiMethods = {
|
|
|
1167
1159
|
|
|
1168
1160
|
Note: Each administrator in a chat generates their own invite links. Bots can't use invite links generated by other administrators. If you want your bot to work with invite links, it will need to generate its own link using exportChatInviteLink or by calling the getChat method. If your bot needs to generate a new primary invite link replacing its previous one, use exportChatInviteLink again. */
|
|
1169
1161
|
exportChatInviteLink(args: {
|
|
1170
|
-
/** Unique identifier for the target chat or username of the target channel (in the format
|
|
1162
|
+
/** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
|
|
1171
1163
|
chat_id: number | string;
|
|
1172
1164
|
}): string;
|
|
1173
1165
|
|
|
1174
1166
|
/** Use this method to create an additional invite link for a chat. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. The link can be revoked using the method revokeChatInviteLink. Returns the new invite link as ChatInviteLink object. */
|
|
1175
1167
|
createChatInviteLink(args: {
|
|
1176
|
-
/** Unique identifier for the target chat or username of the target channel (in the format
|
|
1168
|
+
/** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
|
|
1177
1169
|
chat_id: number | string;
|
|
1178
1170
|
/** Invite link name; 0-32 characters */
|
|
1179
1171
|
name?: string;
|
|
@@ -1187,7 +1179,7 @@ export type ApiMethods = {
|
|
|
1187
1179
|
|
|
1188
1180
|
/** Use this method to edit a non-primary invite link created by the bot. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the edited invite link as a ChatInviteLink object. */
|
|
1189
1181
|
editChatInviteLink(args: {
|
|
1190
|
-
/** Unique identifier for the target chat or username of the target channel (in the format
|
|
1182
|
+
/** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
|
|
1191
1183
|
chat_id: number | string;
|
|
1192
1184
|
/** The invite link to edit */
|
|
1193
1185
|
invite_link: string;
|
|
@@ -1203,7 +1195,7 @@ export type ApiMethods = {
|
|
|
1203
1195
|
|
|
1204
1196
|
/** Use this method to create a subscription invite link for a channel chat. The bot must have the can_invite_users administrator rights. The link can be edited using the method editChatSubscriptionInviteLink or revoked using the method revokeChatInviteLink. Returns the new invite link as a ChatInviteLink object. */
|
|
1205
1197
|
createChatSubscriptionInviteLink(args: {
|
|
1206
|
-
/** Unique identifier for the target channel chat or username of the target channel (in the format
|
|
1198
|
+
/** Unique identifier for the target channel chat or username of the target channel (in the format `@channelusername`) */
|
|
1207
1199
|
chat_id: number | string;
|
|
1208
1200
|
/** Invite link name; 0-32 characters */
|
|
1209
1201
|
name?: string;
|
|
@@ -1215,7 +1207,7 @@ export type ApiMethods = {
|
|
|
1215
1207
|
|
|
1216
1208
|
/** Use this method to edit a subscription invite link created by the bot. The bot must have the can_invite_users administrator rights. Returns the edited invite link as a ChatInviteLink object. */
|
|
1217
1209
|
editChatSubscriptionInviteLink(args: {
|
|
1218
|
-
/** Unique identifier for the target chat or username of the target channel (in the format
|
|
1210
|
+
/** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
|
|
1219
1211
|
chat_id: number | string;
|
|
1220
1212
|
/** The invite link to edit */
|
|
1221
1213
|
invite_link: string;
|
|
@@ -1225,7 +1217,7 @@ export type ApiMethods = {
|
|
|
1225
1217
|
|
|
1226
1218
|
/** Use this method to revoke an invite link created by the bot. If the primary link is revoked, a new link is automatically generated. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the revoked invite link as ChatInviteLink object. */
|
|
1227
1219
|
revokeChatInviteLink(args: {
|
|
1228
|
-
/** Unique identifier of the target chat or username of the target channel (in the format
|
|
1220
|
+
/** Unique identifier of the target chat or username of the target channel (in the format `@channelusername`) */
|
|
1229
1221
|
chat_id: number | string;
|
|
1230
1222
|
/** The invite link to revoke */
|
|
1231
1223
|
invite_link: string;
|
|
@@ -1233,7 +1225,7 @@ export type ApiMethods = {
|
|
|
1233
1225
|
|
|
1234
1226
|
/** Use this method to approve a chat join request. The bot must be an administrator in the chat for this to work and must have the can_invite_users administrator right. Returns True on success. */
|
|
1235
1227
|
approveChatJoinRequest(args: {
|
|
1236
|
-
/** Unique identifier for the target chat or username of the target channel (in the format
|
|
1228
|
+
/** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
|
|
1237
1229
|
chat_id: number | string;
|
|
1238
1230
|
/** Unique identifier of the target user */
|
|
1239
1231
|
user_id: number;
|
|
@@ -1241,7 +1233,7 @@ export type ApiMethods = {
|
|
|
1241
1233
|
|
|
1242
1234
|
/** Use this method to decline a chat join request. The bot must be an administrator in the chat for this to work and must have the can_invite_users administrator right. Returns True on success. */
|
|
1243
1235
|
declineChatJoinRequest(args: {
|
|
1244
|
-
/** Unique identifier for the target chat or username of the target channel (in the format
|
|
1236
|
+
/** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
|
|
1245
1237
|
chat_id: number | string;
|
|
1246
1238
|
/** Unique identifier of the target user */
|
|
1247
1239
|
user_id: number;
|
|
@@ -1269,21 +1261,21 @@ export type ApiMethods = {
|
|
|
1269
1261
|
|
|
1270
1262
|
/** Use this method to set a new profile photo for the chat. Photos can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns True on success. */
|
|
1271
1263
|
setChatPhoto(args: {
|
|
1272
|
-
/** Unique identifier for the target chat or username of the target channel (in the format
|
|
1264
|
+
/** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
|
|
1273
1265
|
chat_id: number | string;
|
|
1274
1266
|
/** New chat photo, uploaded using multipart/form-data */
|
|
1275
|
-
photo: Buffer | ReadStream
|
|
1267
|
+
photo: Buffer | ReadStream;
|
|
1276
1268
|
}): true;
|
|
1277
1269
|
|
|
1278
1270
|
/** Use this method to delete a chat photo. Photos can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns True on success. */
|
|
1279
1271
|
deleteChatPhoto(args: {
|
|
1280
|
-
/** Unique identifier for the target chat or username of the target channel (in the format
|
|
1272
|
+
/** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
|
|
1281
1273
|
chat_id: number | string;
|
|
1282
1274
|
}): true;
|
|
1283
1275
|
|
|
1284
1276
|
/** Use this method to change the title of a chat. Titles can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns True on success. */
|
|
1285
1277
|
setChatTitle(args: {
|
|
1286
|
-
/** Unique identifier for the target chat or username of the target channel (in the format
|
|
1278
|
+
/** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
|
|
1287
1279
|
chat_id: number | string;
|
|
1288
1280
|
/** New chat title, 1-128 characters */
|
|
1289
1281
|
title: string;
|
|
@@ -1291,7 +1283,7 @@ export type ApiMethods = {
|
|
|
1291
1283
|
|
|
1292
1284
|
/** Use this method to change the description of a group, a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns True on success. */
|
|
1293
1285
|
setChatDescription(args: {
|
|
1294
|
-
/** Unique identifier for the target chat or username of the target channel (in the format
|
|
1286
|
+
/** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
|
|
1295
1287
|
chat_id: number | string;
|
|
1296
1288
|
/** New chat description, 0-255 characters */
|
|
1297
1289
|
description?: string;
|
|
@@ -1301,7 +1293,7 @@ export type ApiMethods = {
|
|
|
1301
1293
|
pinChatMessage(args: {
|
|
1302
1294
|
/** Unique identifier of the business connection on behalf of which the message will be pinned */
|
|
1303
1295
|
business_connection_id?: string;
|
|
1304
|
-
/** Unique identifier for the target chat or username of the target channel (in the format
|
|
1296
|
+
/** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
|
|
1305
1297
|
chat_id: number | string;
|
|
1306
1298
|
/** Identifier of a message to pin */
|
|
1307
1299
|
message_id: number;
|
|
@@ -1313,7 +1305,7 @@ export type ApiMethods = {
|
|
|
1313
1305
|
unpinChatMessage(args: {
|
|
1314
1306
|
/** Unique identifier of the business connection on behalf of which the message will be unpinned */
|
|
1315
1307
|
business_connection_id?: string;
|
|
1316
|
-
/** Unique identifier for the target chat or username of the target channel (in the format
|
|
1308
|
+
/** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
|
|
1317
1309
|
chat_id: number | string;
|
|
1318
1310
|
/** Identifier of the message to unpin. Required if business_connection_id is specified. If not specified, the most recent pinned message (by sending date) will be unpinned. */
|
|
1319
1311
|
message_id?: number;
|
|
@@ -1321,37 +1313,37 @@ export type ApiMethods = {
|
|
|
1321
1313
|
|
|
1322
1314
|
/** Use this method to clear the list of pinned messages in a chat. In private chats and channel direct messages chats, no additional rights are required to unpin all pinned messages. Conversely, the bot must be an administrator with the 'can_pin_messages' right or the 'can_edit_messages' right to unpin all pinned messages in groups and channels respectively. Returns True on success. */
|
|
1323
1315
|
unpinAllChatMessages(args: {
|
|
1324
|
-
/** Unique identifier for the target chat or username of the target channel (in the format
|
|
1316
|
+
/** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
|
|
1325
1317
|
chat_id: number | string;
|
|
1326
1318
|
}): true;
|
|
1327
1319
|
|
|
1328
1320
|
/** Use this method for your bot to leave a group, supergroup or channel. Returns True on success. */
|
|
1329
1321
|
leaveChat(args: {
|
|
1330
|
-
/** Unique identifier for the target chat or username of the target supergroup or channel (in the format
|
|
1322
|
+
/** Unique identifier for the target chat or username of the target supergroup or channel (in the format `@channelusername`). Channel direct messages chats aren't supported; leave the corresponding channel instead. */
|
|
1331
1323
|
chat_id: number | string;
|
|
1332
1324
|
}): true;
|
|
1333
1325
|
|
|
1334
1326
|
/** Use this method to get up-to-date information about the chat. Returns a ChatFullInfo object on success. */
|
|
1335
1327
|
getChat(args: {
|
|
1336
|
-
/** Unique identifier for the target chat or username of the target supergroup or channel (in the format
|
|
1328
|
+
/** Unique identifier for the target chat or username of the target supergroup or channel (in the format `@channelusername`) */
|
|
1337
1329
|
chat_id: number | string;
|
|
1338
1330
|
}): ChatFullInfo;
|
|
1339
1331
|
|
|
1340
1332
|
/** Use this method to get a list of administrators in a chat, which aren't bots. Returns an Array of ChatMember objects. */
|
|
1341
1333
|
getChatAdministrators(args: {
|
|
1342
|
-
/** Unique identifier for the target chat or username of the target supergroup or channel (in the format
|
|
1334
|
+
/** Unique identifier for the target chat or username of the target supergroup or channel (in the format `@channelusername`) */
|
|
1343
1335
|
chat_id: number | string;
|
|
1344
1336
|
}): Array<ChatMemberOwner | ChatMemberAdministrator>;
|
|
1345
1337
|
|
|
1346
1338
|
/** Use this method to get the number of members in a chat. Returns Int on success. */
|
|
1347
1339
|
getChatMemberCount(args: {
|
|
1348
|
-
/** Unique identifier for the target chat or username of the target supergroup or channel (in the format
|
|
1340
|
+
/** Unique identifier for the target chat or username of the target supergroup or channel (in the format `@channelusername`) */
|
|
1349
1341
|
chat_id: number | string;
|
|
1350
1342
|
}): number;
|
|
1351
1343
|
|
|
1352
1344
|
/** Use this method to get information about a member of a chat. The method is only guaranteed to work for other users if the bot is an administrator in the chat. Returns a ChatMember object on success. */
|
|
1353
1345
|
getChatMember(args: {
|
|
1354
|
-
/** Unique identifier for the target chat or username of the target supergroup or channel (in the format
|
|
1346
|
+
/** Unique identifier for the target chat or username of the target supergroup or channel (in the format `@channelusername`) */
|
|
1355
1347
|
chat_id: number | string;
|
|
1356
1348
|
/** Unique identifier of the target user */
|
|
1357
1349
|
user_id: number;
|
|
@@ -1359,7 +1351,7 @@ export type ApiMethods = {
|
|
|
1359
1351
|
|
|
1360
1352
|
/** Use this method to set a new group sticker set for a supergroup. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Use the field can_set_sticker_set ly returned in getChat requests to check if the bot can use this method. Returns True on success. */
|
|
1361
1353
|
setChatStickerSet(args: {
|
|
1362
|
-
/** Unique identifier for the target chat or username of the target supergroup (in the format
|
|
1354
|
+
/** Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`) */
|
|
1363
1355
|
chat_id: number | string;
|
|
1364
1356
|
/** Name of the sticker set to be set as the group sticker set */
|
|
1365
1357
|
sticker_set_name: string;
|
|
@@ -1367,7 +1359,7 @@ export type ApiMethods = {
|
|
|
1367
1359
|
|
|
1368
1360
|
/** Use this method to delete a group sticker set from a supergroup. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Use the field can_set_sticker_set ly returned in getChat requests to check if the bot can use this method. Returns True on success. */
|
|
1369
1361
|
deleteChatStickerSet(args: {
|
|
1370
|
-
/** Unique identifier for the target chat or username of the target supergroup (in the format
|
|
1362
|
+
/** Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`) */
|
|
1371
1363
|
chat_id: number | string;
|
|
1372
1364
|
}): true;
|
|
1373
1365
|
|
|
@@ -1375,7 +1367,7 @@ export type ApiMethods = {
|
|
|
1375
1367
|
getForumTopicIconStickers(): Sticker[];
|
|
1376
1368
|
/** Use this method to create a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. Returns information about the created topic as a ForumTopic object. */
|
|
1377
1369
|
createForumTopic(args: {
|
|
1378
|
-
/** Unique identifier for the target chat or username of the target supergroup (in the format
|
|
1370
|
+
/** Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`) */
|
|
1379
1371
|
chat_id: number | string;
|
|
1380
1372
|
/** Topic name, 1-128 characters */
|
|
1381
1373
|
name: string;
|
|
@@ -1391,9 +1383,9 @@ export type ApiMethods = {
|
|
|
1391
1383
|
icon_custom_emoji_id?: string;
|
|
1392
1384
|
}): ForumTopic;
|
|
1393
1385
|
|
|
1394
|
-
/** Use this method to edit name and icon of a topic in a forum supergroup chat.
|
|
1386
|
+
/** Use this method to edit name and icon of a topic in a forum supergroup chat or a private chat with a user. In the case of a supergroup chat the bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights, unless it is the creator of the topic. Returns True on success. */
|
|
1395
1387
|
editForumTopic(args: {
|
|
1396
|
-
/** Unique identifier for the target chat or username of the target supergroup (in the format
|
|
1388
|
+
/** Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`) */
|
|
1397
1389
|
chat_id: number | string;
|
|
1398
1390
|
/** Unique identifier for the target message thread of the forum topic */
|
|
1399
1391
|
message_thread_id: number;
|
|
@@ -1405,7 +1397,7 @@ export type ApiMethods = {
|
|
|
1405
1397
|
|
|
1406
1398
|
/** Use this method to close an open topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights, unless it is the creator of the topic. Returns True on success. */
|
|
1407
1399
|
closeForumTopic(args: {
|
|
1408
|
-
/** Unique identifier for the target chat or username of the target supergroup (in the format
|
|
1400
|
+
/** Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`) */
|
|
1409
1401
|
chat_id: number | string;
|
|
1410
1402
|
/** Unique identifier for the target message thread of the forum topic */
|
|
1411
1403
|
message_thread_id: number;
|
|
@@ -1413,23 +1405,23 @@ export type ApiMethods = {
|
|
|
1413
1405
|
|
|
1414
1406
|
/** Use this method to reopen a closed topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights, unless it is the creator of the topic. Returns True on success. */
|
|
1415
1407
|
reopenForumTopic(args: {
|
|
1416
|
-
/** Unique identifier for the target chat or username of the target supergroup (in the format
|
|
1408
|
+
/** Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`) */
|
|
1417
1409
|
chat_id: number | string;
|
|
1418
1410
|
/** Unique identifier for the target message thread of the forum topic */
|
|
1419
1411
|
message_thread_id: number;
|
|
1420
1412
|
}): true;
|
|
1421
1413
|
|
|
1422
|
-
/** Use this method to delete a forum topic along with all its messages in a forum supergroup chat.
|
|
1414
|
+
/** Use this method to delete a forum topic along with all its messages in a forum supergroup chat or a private chat with a user. In the case of a supergroup chat the bot must be an administrator in the chat for this to work and must have the can_delete_messages administrator rights. Returns True on success. */
|
|
1423
1415
|
deleteForumTopic(args: {
|
|
1424
|
-
/** Unique identifier for the target chat or username of the target supergroup (in the format
|
|
1416
|
+
/** Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`) */
|
|
1425
1417
|
chat_id: number | string;
|
|
1426
1418
|
/** Unique identifier for the target message thread of the forum topic */
|
|
1427
1419
|
message_thread_id: number;
|
|
1428
1420
|
}): true;
|
|
1429
1421
|
|
|
1430
|
-
/** Use this method to clear the list of pinned messages in a forum topic.
|
|
1422
|
+
/** Use this method to clear the list of pinned messages in a forum topic in a forum supergroup chat or a private chat with a user. In the case of a supergroup chat the bot must be an administrator in the chat for this to work and must have the can_pin_messages administrator right in the supergroup. Returns True on success. */
|
|
1431
1423
|
unpinAllForumTopicMessages(args: {
|
|
1432
|
-
/** Unique identifier for the target chat or username of the target supergroup (in the format
|
|
1424
|
+
/** Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`) */
|
|
1433
1425
|
chat_id: number | string;
|
|
1434
1426
|
/** Unique identifier for the target message thread of the forum topic */
|
|
1435
1427
|
message_thread_id: number;
|
|
@@ -1437,7 +1429,7 @@ export type ApiMethods = {
|
|
|
1437
1429
|
|
|
1438
1430
|
/** Use this method to edit the name of the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. Returns True on success. */
|
|
1439
1431
|
editGeneralForumTopic(args: {
|
|
1440
|
-
/** Unique identifier for the target chat or username of the target supergroup (in the format
|
|
1432
|
+
/** Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`) */
|
|
1441
1433
|
chat_id: number | string;
|
|
1442
1434
|
/** New topic name, 1-128 characters */
|
|
1443
1435
|
name: string;
|
|
@@ -1445,37 +1437,37 @@ export type ApiMethods = {
|
|
|
1445
1437
|
|
|
1446
1438
|
/** Use this method to close an open 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. Returns True on success. */
|
|
1447
1439
|
closeGeneralForumTopic(args: {
|
|
1448
|
-
/** Unique identifier for the target chat or username of the target supergroup (in the format
|
|
1440
|
+
/** Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`) */
|
|
1449
1441
|
chat_id: number | string;
|
|
1450
1442
|
}): true;
|
|
1451
1443
|
|
|
1452
1444
|
/** Use this method to reopen a closed 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. The topic will be automatically unhidden if it was hidden. Returns True on success. */
|
|
1453
1445
|
reopenGeneralForumTopic(args: {
|
|
1454
|
-
/** Unique identifier for the target chat or username of the target supergroup (in the format
|
|
1446
|
+
/** Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`) */
|
|
1455
1447
|
chat_id: number | string;
|
|
1456
1448
|
}): true;
|
|
1457
1449
|
|
|
1458
1450
|
/** Use this method to hide the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. The topic will be automatically closed if it was open. Returns True on success. */
|
|
1459
1451
|
hideGeneralForumTopic(args: {
|
|
1460
|
-
/** Unique identifier for the target chat or username of the target supergroup (in the format
|
|
1452
|
+
/** Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`) */
|
|
1461
1453
|
chat_id: number | string;
|
|
1462
1454
|
}): true;
|
|
1463
1455
|
|
|
1464
1456
|
/** Use this method to unhide the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. Returns True on success. */
|
|
1465
1457
|
unhideGeneralForumTopic(args: {
|
|
1466
|
-
/** Unique identifier for the target chat or username of the target supergroup (in the format
|
|
1458
|
+
/** Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`) */
|
|
1467
1459
|
chat_id: number | string;
|
|
1468
1460
|
}): true;
|
|
1469
1461
|
|
|
1470
1462
|
/** Use this method to clear the list of pinned messages in a General forum topic. The bot must be an administrator in the chat for this to work and must have the can_pin_messages administrator right in the supergroup. Returns True on success. */
|
|
1471
1463
|
unpinAllGeneralForumTopicMessages(args: {
|
|
1472
|
-
/** Unique identifier for the target chat or username of the target supergroup (in the format
|
|
1464
|
+
/** Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`) */
|
|
1473
1465
|
chat_id: number | string;
|
|
1474
1466
|
}): true;
|
|
1475
1467
|
|
|
1476
1468
|
/** Use this method to send answers to callback queries sent from inline keyboards. The answer will be displayed to the user as a notification at the top of the chat screen or as an alert. On success, True is returned.
|
|
1477
1469
|
|
|
1478
|
-
Alternatively, the user can be redirected to the specified Game URL. For this option to work, you must first create a game for your bot via
|
|
1470
|
+
Alternatively, the user can be redirected to the specified Game URL. For this option to work, you must first create a game for your bot via `@BotFather` and accept the terms. Otherwise, you may use links like t.me/your_bot?start=XXXX that open your bot with a parameter. */
|
|
1479
1471
|
answerCallbackQuery(args: {
|
|
1480
1472
|
/** Unique identifier for the query to be answered */
|
|
1481
1473
|
callback_query_id: string;
|
|
@@ -1483,7 +1475,7 @@ export type ApiMethods = {
|
|
|
1483
1475
|
text?: string;
|
|
1484
1476
|
/** If True, an alert will be shown by the client instead of a notification at the top of the chat screen. Defaults to false. */
|
|
1485
1477
|
show_alert?: boolean;
|
|
1486
|
-
/** URL that will be opened by the user's client. If you have created a Game and accepted the conditions via
|
|
1478
|
+
/** URL that will be opened by the user's client. If you have created a Game and accepted the conditions via `@BotFather`, specify the URL that opens your game - note that this will only work if the query comes from a callback_game button.
|
|
1487
1479
|
|
|
1488
1480
|
Otherwise, you may use links like t.me/your_bot?start=XXXX that open your bot with a parameter. */
|
|
1489
1481
|
url?: string;
|
|
@@ -1493,12 +1485,60 @@ export type ApiMethods = {
|
|
|
1493
1485
|
|
|
1494
1486
|
/** Use this method to get the list of boosts added to a chat by a user. Requires administrator rights in the chat. Returns a UserChatBoosts object. */
|
|
1495
1487
|
getUserChatBoosts(args: {
|
|
1496
|
-
/** Unique identifier for the chat or username of the channel (in the format
|
|
1488
|
+
/** Unique identifier for the chat or username of the channel (in the format `@channelusername`) */
|
|
1497
1489
|
chat_id: number | string;
|
|
1498
1490
|
/** Unique identifier of the target user */
|
|
1499
1491
|
user_id: number;
|
|
1500
1492
|
}): UserChatBoosts;
|
|
1501
1493
|
|
|
1494
|
+
/** Returns the gifts owned and hosted by a user. Returns OwnedGifts on success. */
|
|
1495
|
+
getUserGifts(args: {
|
|
1496
|
+
/** Unique identifier of the user */
|
|
1497
|
+
user_id: number;
|
|
1498
|
+
/** Pass True to exclude gifts that can be purchased an unlimited number of times */
|
|
1499
|
+
exclude_unlimited?: boolean;
|
|
1500
|
+
/** Pass True to exclude gifts that can be purchased a limited number of times and can be upgraded to unique */
|
|
1501
|
+
exclude_limited_upgradable?: boolean;
|
|
1502
|
+
/** Pass True to exclude gifts that can be purchased a limited number of times and can't be upgraded to unique */
|
|
1503
|
+
exclude_limited_non_upgradable?: boolean;
|
|
1504
|
+
/** Pass True to exclude gifts that were assigned from the TON blockchain and can't be resold or transferred in Telegram */
|
|
1505
|
+
exclude_from_blockchain?: boolean;
|
|
1506
|
+
/** Pass True to exclude unique gifts */
|
|
1507
|
+
exclude_unique?: boolean;
|
|
1508
|
+
/** Pass True to sort results by gift price instead of send date. Sorting is applied before pagination. */
|
|
1509
|
+
sort_by_price?: boolean;
|
|
1510
|
+
/** Offset of the first entry to return as received from the previous request; use an empty string to get the first chunk of results */
|
|
1511
|
+
offset?: string;
|
|
1512
|
+
/** The maximum number of gifts to be returned; 1-100. Defaults to 100 */
|
|
1513
|
+
limit?: number;
|
|
1514
|
+
}): OwnedGifts;
|
|
1515
|
+
|
|
1516
|
+
/** Returns the gifts owned by a chat. Returns OwnedGifts on success. */
|
|
1517
|
+
getChatGifts(args: {
|
|
1518
|
+
/** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
|
|
1519
|
+
chat_id: number | string;
|
|
1520
|
+
/** Pass True to exclude gifts that aren't saved to the chat's profile page. Always True, unless the bot has the can_post_messages administrator right in the channel. */
|
|
1521
|
+
exclude_unsaved?: boolean;
|
|
1522
|
+
/** Pass True to exclude gifts that are saved to the chat's profile page. Always False, unless the bot has the can_post_messages administrator right in the channel. */
|
|
1523
|
+
exclude_saved?: boolean;
|
|
1524
|
+
/** Pass True to exclude gifts that can be purchased an unlimited number of times */
|
|
1525
|
+
exclude_unlimited?: boolean;
|
|
1526
|
+
/** Pass True to exclude gifts that can be purchased a limited number of times and can be upgraded to unique */
|
|
1527
|
+
exclude_limited_upgradable?: boolean;
|
|
1528
|
+
/** Pass True to exclude gifts that can be purchased a limited number of times and can't be upgraded to unique */
|
|
1529
|
+
exclude_limited_non_upgradable?: boolean;
|
|
1530
|
+
/** Pass True to exclude gifts that were assigned from the TON blockchain and can't be resold or transferred in Telegram */
|
|
1531
|
+
exclude_from_blockchain?: boolean;
|
|
1532
|
+
/** Pass True to exclude unique gifts */
|
|
1533
|
+
exclude_unique?: boolean;
|
|
1534
|
+
/** Pass True to sort results by gift price instead of send date. Sorting is applied before pagination. */
|
|
1535
|
+
sort_by_price?: boolean;
|
|
1536
|
+
/** Offset of the first entry to return as received from the previous request; use an empty string to get the first chunk of results */
|
|
1537
|
+
offset?: string;
|
|
1538
|
+
/** The maximum number of gifts to be returned; 1-100. Defaults to 100 */
|
|
1539
|
+
limit?: number;
|
|
1540
|
+
}): OwnedGifts;
|
|
1541
|
+
|
|
1502
1542
|
/** Use this method to get information about the connection of the bot with a business account. Returns a BusinessConnection object on success. */
|
|
1503
1543
|
getBusinessConnection(args: {
|
|
1504
1544
|
/** Unique identifier of the business connection */
|
|
@@ -1608,7 +1648,7 @@ export type ApiMethods = {
|
|
|
1608
1648
|
editMessageText(args: {
|
|
1609
1649
|
/** Unique identifier of the business connection on behalf of which the message to be edited was sent */
|
|
1610
1650
|
business_connection_id?: string;
|
|
1611
|
-
/** Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format
|
|
1651
|
+
/** Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
|
|
1612
1652
|
chat_id?: number | string;
|
|
1613
1653
|
/** Required if inline_message_id is not specified. Identifier of the message to edit */
|
|
1614
1654
|
message_id?: number;
|
|
@@ -1630,7 +1670,7 @@ export type ApiMethods = {
|
|
|
1630
1670
|
editMessageCaption(args: {
|
|
1631
1671
|
/** Unique identifier of the business connection on behalf of which the message to be edited was sent */
|
|
1632
1672
|
business_connection_id?: string;
|
|
1633
|
-
/** Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format
|
|
1673
|
+
/** Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
|
|
1634
1674
|
chat_id?: number | string;
|
|
1635
1675
|
/** Required if inline_message_id is not specified. Identifier of the message to edit */
|
|
1636
1676
|
message_id?: number;
|
|
@@ -1652,7 +1692,7 @@ export type ApiMethods = {
|
|
|
1652
1692
|
editMessageMedia(args: {
|
|
1653
1693
|
/** Unique identifier of the business connection on behalf of which the message to be edited was sent */
|
|
1654
1694
|
business_connection_id?: string;
|
|
1655
|
-
/** Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format
|
|
1695
|
+
/** Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
|
|
1656
1696
|
chat_id?: number | string;
|
|
1657
1697
|
/** Required if inline_message_id is not specified. Identifier of the message to edit */
|
|
1658
1698
|
message_id?: number;
|
|
@@ -1668,7 +1708,7 @@ export type ApiMethods = {
|
|
|
1668
1708
|
editMessageReplyMarkup(args: {
|
|
1669
1709
|
/** Unique identifier of the business connection on behalf of which the message to be edited was sent */
|
|
1670
1710
|
business_connection_id?: string;
|
|
1671
|
-
/** Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format
|
|
1711
|
+
/** Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
|
|
1672
1712
|
chat_id?: number | string;
|
|
1673
1713
|
/** Required if inline_message_id is not specified. Identifier of the message to edit */
|
|
1674
1714
|
message_id?: number;
|
|
@@ -1682,7 +1722,7 @@ export type ApiMethods = {
|
|
|
1682
1722
|
stopPoll(args: {
|
|
1683
1723
|
/** Unique identifier of the business connection on behalf of which the message to be edited was sent */
|
|
1684
1724
|
business_connection_id?: string;
|
|
1685
|
-
/** Unique identifier for the target chat or username of the target channel (in the format
|
|
1725
|
+
/** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
|
|
1686
1726
|
chat_id: number | string;
|
|
1687
1727
|
/** Identifier of the original message with the poll */
|
|
1688
1728
|
message_id: number;
|
|
@@ -1702,7 +1742,7 @@ export type ApiMethods = {
|
|
|
1702
1742
|
- If the bot has can_manage_direct_messages administrator right in a channel, it can delete any message in the corresponding direct messages chat.
|
|
1703
1743
|
Returns True on success. */
|
|
1704
1744
|
deleteMessage(args: {
|
|
1705
|
-
/** Unique identifier for the target chat or username of the target channel (in the format
|
|
1745
|
+
/** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
|
|
1706
1746
|
chat_id: number | string;
|
|
1707
1747
|
/** Identifier of the message to delete */
|
|
1708
1748
|
message_id: number;
|
|
@@ -1710,7 +1750,7 @@ export type ApiMethods = {
|
|
|
1710
1750
|
|
|
1711
1751
|
/** Use this method to delete multiple messages simultaneously. Returns True on success. */
|
|
1712
1752
|
deleteMessages(args: {
|
|
1713
|
-
/** Unique identifier for the target chat or username of the target channel (in the format
|
|
1753
|
+
/** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
|
|
1714
1754
|
chat_id: number | string;
|
|
1715
1755
|
/** A list of 1-100 identifiers of messages to delete. See deleteMessage for limitations on which messages can be deleted */
|
|
1716
1756
|
message_ids: number[];
|
|
@@ -1802,8 +1842,12 @@ export type ApiMethods = {
|
|
|
1802
1842
|
exclude_saved?: boolean;
|
|
1803
1843
|
/** Pass True to exclude gifts that can be purchased an unlimited number of times */
|
|
1804
1844
|
exclude_unlimited?: boolean;
|
|
1805
|
-
/** Pass True to exclude gifts that can be purchased a limited number of times */
|
|
1806
|
-
|
|
1845
|
+
/** Pass True to exclude gifts that can be purchased a limited number of times and can be upgraded to unique */
|
|
1846
|
+
exclude_limited_upgradable?: boolean;
|
|
1847
|
+
/** Pass True to exclude gifts that can be purchased a limited number of times and can't be upgraded to unique */
|
|
1848
|
+
exclude_limited_non_upgradable?: boolean;
|
|
1849
|
+
/** Pass True to exclude gifts that were assigned from the TON blockchain and can't be resold or transferred in Telegram */
|
|
1850
|
+
exclude_from_blockchain?: boolean;
|
|
1807
1851
|
/** Pass True to exclude unique gifts */
|
|
1808
1852
|
exclude_unique?: boolean;
|
|
1809
1853
|
/** Pass True to sort results by gift price instead of send date. Sorting is applied before pagination. */
|
|
@@ -1868,6 +1912,22 @@ export type ApiMethods = {
|
|
|
1868
1912
|
protect_content?: boolean;
|
|
1869
1913
|
}): Story;
|
|
1870
1914
|
|
|
1915
|
+
/** Reposts a story on behalf of a business account from another business account. Both business accounts must be managed by the same bot, and the story on the source account must have been posted (or reposted) by the bot. Requires the can_manage_stories business bot right for both business accounts. Returns Story on success. */
|
|
1916
|
+
repostStory(args: {
|
|
1917
|
+
/** Unique identifier of the business connection */
|
|
1918
|
+
business_connection_id: string;
|
|
1919
|
+
/** Unique identifier of the chat which posted the story that should be reposted */
|
|
1920
|
+
from_chat_id: number;
|
|
1921
|
+
/** Unique identifier of the story that should be reposted */
|
|
1922
|
+
from_story_id: number;
|
|
1923
|
+
/** Period after which the story is moved to the archive, in seconds; must be one of 6 * 3600, 12 * 3600, 86400, or 2 * 86400 */
|
|
1924
|
+
active_period: number;
|
|
1925
|
+
/** Pass True to keep the story accessible after it expires */
|
|
1926
|
+
post_to_chat_page?: boolean;
|
|
1927
|
+
/** Pass True if the content of the story must be protected from forwarding and screenshotting */
|
|
1928
|
+
protect_content?: boolean;
|
|
1929
|
+
}): Story;
|
|
1930
|
+
|
|
1871
1931
|
/** Edits a story previously posted by the bot on behalf of a managed business account. Requires the can_manage_stories business bot right. Returns Story on success. */
|
|
1872
1932
|
editStory(args: {
|
|
1873
1933
|
/** Unique identifier of the business connection */
|
|
@@ -1898,9 +1958,9 @@ export type ApiMethods = {
|
|
|
1898
1958
|
sendSticker(args: {
|
|
1899
1959
|
/** Unique identifier of the business connection on behalf of which the message will be sent */
|
|
1900
1960
|
business_connection_id?: string;
|
|
1901
|
-
/** Unique identifier for the target chat or username of the target channel (in the format
|
|
1961
|
+
/** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
|
|
1902
1962
|
chat_id: number | string;
|
|
1903
|
-
/** Unique identifier for the target message thread (topic) of
|
|
1963
|
+
/** Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only */
|
|
1904
1964
|
message_thread_id?: number;
|
|
1905
1965
|
/** Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat */
|
|
1906
1966
|
direct_messages_topic_id?: number;
|
|
@@ -1926,8 +1986,6 @@ export type ApiMethods = {
|
|
|
1926
1986
|
| ReplyKeyboardMarkup
|
|
1927
1987
|
| ReplyKeyboardRemove
|
|
1928
1988
|
| ForceReply;
|
|
1929
|
-
/** @deprecated Use `reply_parameters` instead. */
|
|
1930
|
-
reply_to_message_id?: number;
|
|
1931
1989
|
}): Message.StickerMessage;
|
|
1932
1990
|
|
|
1933
1991
|
/** Use this method to get a sticker set. On success, a StickerSet object is returned. */
|
|
@@ -1949,7 +2007,7 @@ export type ApiMethods = {
|
|
|
1949
2007
|
/** Format of the sticker, must be one of “static”, “animated”, “video” */
|
|
1950
2008
|
sticker_format: "static" | "animated" | "video";
|
|
1951
2009
|
/** A file with the sticker in .WEBP, .PNG, .TGS, or .WEBM format. See https://core.telegram.org/stickers for technical requirements. */
|
|
1952
|
-
sticker: Buffer | ReadStream
|
|
2010
|
+
sticker: Buffer | ReadStream;
|
|
1953
2011
|
}): File;
|
|
1954
2012
|
|
|
1955
2013
|
/** Use this method to create a new sticker set owned by a user. The bot will be able to edit the sticker set thus created. Returns True on success. */
|
|
@@ -2069,7 +2127,7 @@ export type ApiMethods = {
|
|
|
2069
2127
|
sendGift(args: {
|
|
2070
2128
|
/** Required if chat_id is not specified. Unique identifier of the target user who will receive the gift. */
|
|
2071
2129
|
user_id?: number;
|
|
2072
|
-
/** Required if user_id is not specified. Unique identifier for the chat or username of the channel (in the format
|
|
2130
|
+
/** Required if user_id is not specified. Unique identifier for the chat or username of the channel (in the format `@channelusername`) that will receive the gift. */
|
|
2073
2131
|
chat_id?: number | string;
|
|
2074
2132
|
/** Identifier of the gift */
|
|
2075
2133
|
gift_id: string;
|
|
@@ -2144,9 +2202,9 @@ export type ApiMethods = {
|
|
|
2144
2202
|
|
|
2145
2203
|
/** Use this method to send invoices. On success, the sent Message is returned. */
|
|
2146
2204
|
sendInvoice(args: {
|
|
2147
|
-
/** Unique identifier for the target chat or username of the target channel (in the format
|
|
2205
|
+
/** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
|
|
2148
2206
|
chat_id: number | string;
|
|
2149
|
-
/** Unique identifier for the target message thread (topic) of
|
|
2207
|
+
/** Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only */
|
|
2150
2208
|
message_thread_id?: number;
|
|
2151
2209
|
/** Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat */
|
|
2152
2210
|
direct_messages_topic_id?: number;
|
|
@@ -2206,8 +2264,6 @@ export type ApiMethods = {
|
|
|
2206
2264
|
reply_parameters?: ReplyParameters;
|
|
2207
2265
|
/** An object for an inline keyboard. If empty, one 'Pay total price' button will be shown. If not empty, the first button must be a Pay button. */
|
|
2208
2266
|
reply_markup?: InlineKeyboardMarkup;
|
|
2209
|
-
/** @deprecated Use `reply_parameters` instead. */
|
|
2210
|
-
reply_to_message_id?: number;
|
|
2211
2267
|
}): Message.InvoiceMessage;
|
|
2212
2268
|
|
|
2213
2269
|
/** Use this method to create a link for an invoice. Returns the created invoice link as String on success. */
|
|
@@ -2220,7 +2276,7 @@ export type ApiMethods = {
|
|
|
2220
2276
|
description: string;
|
|
2221
2277
|
/** Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use it for your internal processes. */
|
|
2222
2278
|
payload: string;
|
|
2223
|
-
/** Payment provider token, obtained via
|
|
2279
|
+
/** Payment provider token, obtained via `@BotFather`. Pass an empty string for payments in Telegram Stars. */
|
|
2224
2280
|
provider_token?: string;
|
|
2225
2281
|
/** Three-letter ISO 4217 currency code, see more on currencies */
|
|
2226
2282
|
currency: string;
|
|
@@ -2316,7 +2372,7 @@ export type ApiMethods = {
|
|
|
2316
2372
|
|
|
2317
2373
|
/** Verifies a chat on behalf of the organization which is represented by the bot. Returns True on success. */
|
|
2318
2374
|
verifyChat(args: {
|
|
2319
|
-
/** Unique identifier for the target chat or username of the target channel (in the format
|
|
2375
|
+
/** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`). Channel direct messages chats can't be verified. */
|
|
2320
2376
|
chat_id: number | string;
|
|
2321
2377
|
/** Custom description for the verification; 0-70 characters. Must be empty if the organization isn't allowed to provide a custom verification description. */
|
|
2322
2378
|
custom_description?: string;
|
|
@@ -2330,7 +2386,7 @@ export type ApiMethods = {
|
|
|
2330
2386
|
|
|
2331
2387
|
/** Removes verification from a chat that is currently verified on behalf of the organization represented by the bot. Returns True on success. */
|
|
2332
2388
|
removeChatVerification(args: {
|
|
2333
|
-
/** Unique identifier for the target chat or username of the target channel (in the format
|
|
2389
|
+
/** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
|
|
2334
2390
|
chat_id: number | string;
|
|
2335
2391
|
}): true;
|
|
2336
2392
|
|
|
@@ -2360,7 +2416,7 @@ export type ApiMethods = {
|
|
|
2360
2416
|
business_connection_id?: string;
|
|
2361
2417
|
/** Unique identifier for the target chat. Games can't be sent to channel direct messages chats and channel chats. */
|
|
2362
2418
|
chat_id: number;
|
|
2363
|
-
/** Unique identifier for the target message thread (topic) of
|
|
2419
|
+
/** Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only */
|
|
2364
2420
|
message_thread_id?: number;
|
|
2365
2421
|
/** Short name of the game, serves as the unique identifier for the game. Set up your games via BotFather. */
|
|
2366
2422
|
game_short_name: string;
|
|
@@ -2376,8 +2432,6 @@ export type ApiMethods = {
|
|
|
2376
2432
|
reply_parameters?: ReplyParameters;
|
|
2377
2433
|
/** An object for an inline keyboard. If empty, one 'Play game_title' button will be shown. If not empty, the first button must launch the game. */
|
|
2378
2434
|
reply_markup?: InlineKeyboardMarkup;
|
|
2379
|
-
/** @deprecated Use `reply_parameters` instead. */
|
|
2380
|
-
reply_to_message_id?: number;
|
|
2381
2435
|
}): Message.GameMessage;
|
|
2382
2436
|
|
|
2383
2437
|
/** Use this method to set the score of the specified user in a game message. On success, if the message is not an inline message, the Message is returned, otherwise True is returned. Returns an error, if the new score is not greater than the user's current score in the chat and force is False. */
|