@grammyjs/types 3.22.1 → 3.23.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/checklist.d.ts +4 -2
- package/inline.d.ts +2 -2
- package/manage.d.ts +56 -14
- package/markup.d.ts +3 -3
- package/message.d.ts +12 -7
- package/methods.d.ts +201 -115
- package/package.json +1 -1
- package/payment.d.ts +63 -9
- package/settings.d.ts +3 -3
package/methods.d.ts
CHANGED
|
@@ -79,9 +79,9 @@ export type ApiMethods<F> = {
|
|
|
79
79
|
sendMessage(args: {
|
|
80
80
|
/** Unique identifier of the business connection on behalf of which the message will be sent */
|
|
81
81
|
business_connection_id?: string;
|
|
82
|
-
/** Unique identifier for the target chat or username of the target channel (in the format
|
|
82
|
+
/** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
|
|
83
83
|
chat_id: number | string;
|
|
84
|
-
/** Unique identifier for the target message thread (topic) of
|
|
84
|
+
/** 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 */
|
|
85
85
|
message_thread_id?: number;
|
|
86
86
|
/** Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat */
|
|
87
87
|
direct_messages_topic_id?: number;
|
|
@@ -110,18 +110,35 @@ export type ApiMethods<F> = {
|
|
|
110
110
|
/** @deprecated Use `reply_parameters` instead. */
|
|
111
111
|
reply_to_message_id?: number;
|
|
112
112
|
}): Message.TextMessage;
|
|
113
|
+
/** 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. */
|
|
114
|
+
sendMessageDraft(args: {
|
|
115
|
+
/** Unique identifier for the target private chat */
|
|
116
|
+
chat_id: number;
|
|
117
|
+
/** Unique identifier for the target message thread */
|
|
118
|
+
message_thread_id?: number;
|
|
119
|
+
/** Unique identifier of the message draft; must be non-zero. Changes of drafts with the same identifier are animated */
|
|
120
|
+
draft_id: number;
|
|
121
|
+
/** Text of the message to be sent, 1-4096 characters after entities parsing */
|
|
122
|
+
text: string;
|
|
123
|
+
/** Mode for parsing entities in the message text. See formatting options for more details. */
|
|
124
|
+
parse_mode?: ParseMode;
|
|
125
|
+
/** A list of special entities that appear in message text, which can be specified instead of parse_mode */
|
|
126
|
+
entities?: MessageEntity[];
|
|
127
|
+
}): true;
|
|
113
128
|
/** 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. */
|
|
114
129
|
forwardMessage(args: {
|
|
115
|
-
/** Unique identifier for the target chat or username of the target channel (in the format
|
|
130
|
+
/** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
|
|
116
131
|
chat_id: number | string;
|
|
117
|
-
/** Unique identifier for the target message thread (topic) of
|
|
132
|
+
/** 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 */
|
|
118
133
|
message_thread_id?: number;
|
|
119
134
|
/** Identifier of the direct messages topic to which the message will be forwarded; required if the message is forwarded to a direct messages chat */
|
|
120
135
|
direct_messages_topic_id?: number;
|
|
121
|
-
/** Unique identifier for the chat where the original message was sent (or channel username in the format
|
|
136
|
+
/** Unique identifier for the chat where the original message was sent (or channel username in the format `@channelusername`) */
|
|
122
137
|
from_chat_id: number | string;
|
|
123
138
|
/** New start timestamp for the copied video in the message */
|
|
124
139
|
video_start_timestamp?: number;
|
|
140
|
+
/** Unique identifier of the message effect to be added to the message; only available when forwarding to private chats */
|
|
141
|
+
message_effect_id?: string;
|
|
125
142
|
/** An object containing the parameters of the suggested post to send; for direct messages chats only */
|
|
126
143
|
suggested_post_parameters?: SuggestedPostParameters;
|
|
127
144
|
/** Sends the message silently. Users will receive a notification with no sound. */
|
|
@@ -133,13 +150,13 @@ export type ApiMethods<F> = {
|
|
|
133
150
|
}): Message;
|
|
134
151
|
/** 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. */
|
|
135
152
|
forwardMessages(args: {
|
|
136
|
-
/** Unique identifier for the target chat or username of the target channel (in the format
|
|
153
|
+
/** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
|
|
137
154
|
chat_id: number | string;
|
|
138
|
-
/** Unique identifier for the target message thread (topic) of
|
|
155
|
+
/** 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 */
|
|
139
156
|
message_thread_id?: number;
|
|
140
157
|
/** Identifier of the direct messages topic to which the messages will be forwarded; required if the messages are forwarded to a direct messages chat */
|
|
141
158
|
direct_messages_topic_id?: number;
|
|
142
|
-
/** Unique identifier for the chat where the original messages were sent (or channel username in the format
|
|
159
|
+
/** Unique identifier for the chat where the original messages were sent (or channel username in the format `@channelusername`) */
|
|
143
160
|
from_chat_id: number | string;
|
|
144
161
|
/** 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. */
|
|
145
162
|
message_ids: number[];
|
|
@@ -150,13 +167,13 @@ export type ApiMethods<F> = {
|
|
|
150
167
|
}): MessageId[];
|
|
151
168
|
/** 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. */
|
|
152
169
|
copyMessage(args: {
|
|
153
|
-
/** Unique identifier for the target chat or username of the target channel (in the format
|
|
170
|
+
/** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
|
|
154
171
|
chat_id: number | string;
|
|
155
|
-
/** Unique identifier for the target message thread (topic) of
|
|
172
|
+
/** 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 */
|
|
156
173
|
message_thread_id?: number;
|
|
157
174
|
/** Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat */
|
|
158
175
|
direct_messages_topic_id?: number;
|
|
159
|
-
/** Unique identifier for the chat where the original message was sent (or channel username in the format
|
|
176
|
+
/** Unique identifier for the chat where the original message was sent (or channel username in the format `@channelusername`) */
|
|
160
177
|
from_chat_id: number | string;
|
|
161
178
|
/** Message identifier in the chat specified in from_chat_id */
|
|
162
179
|
message_id: number;
|
|
@@ -176,6 +193,8 @@ export type ApiMethods<F> = {
|
|
|
176
193
|
protect_content?: boolean;
|
|
177
194
|
/** 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 */
|
|
178
195
|
allow_paid_broadcast?: boolean;
|
|
196
|
+
/** Unique identifier of the message effect to be added to the message; only available when copying to private chats */
|
|
197
|
+
message_effect_id?: string;
|
|
179
198
|
/** 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. */
|
|
180
199
|
suggested_post_parameters?: SuggestedPostParameters;
|
|
181
200
|
/** Description of the message to reply to */
|
|
@@ -187,13 +206,13 @@ export type ApiMethods<F> = {
|
|
|
187
206
|
}): MessageId;
|
|
188
207
|
/** 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. */
|
|
189
208
|
copyMessages(args: {
|
|
190
|
-
/** Unique identifier for the target chat or username of the target channel (in the format
|
|
209
|
+
/** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
|
|
191
210
|
chat_id: number | string;
|
|
192
|
-
/** Unique identifier for the target message thread (topic) of
|
|
211
|
+
/** 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 */
|
|
193
212
|
message_thread_id?: number;
|
|
194
213
|
/** Identifier of the direct messages topic to which the messages will be sent; required if the messages are sent to a direct messages chat */
|
|
195
214
|
direct_messages_topic_id?: number;
|
|
196
|
-
/** Unique identifier for the chat where the original messages were sent (or channel username in the format
|
|
215
|
+
/** Unique identifier for the chat where the original messages were sent (or channel username in the format `@channelusername`) */
|
|
197
216
|
from_chat_id: number | string;
|
|
198
217
|
/** 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. */
|
|
199
218
|
message_ids: number[];
|
|
@@ -208,9 +227,9 @@ export type ApiMethods<F> = {
|
|
|
208
227
|
sendPhoto(args: {
|
|
209
228
|
/** Unique identifier of the business connection on behalf of which the message will be sent */
|
|
210
229
|
business_connection_id?: string;
|
|
211
|
-
/** Unique identifier for the target chat or username of the target channel (in the format
|
|
230
|
+
/** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
|
|
212
231
|
chat_id: number | string;
|
|
213
|
-
/** Unique identifier for the target message thread (topic) of
|
|
232
|
+
/** 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 */
|
|
214
233
|
message_thread_id?: number;
|
|
215
234
|
/** Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat */
|
|
216
235
|
direct_messages_topic_id?: number;
|
|
@@ -249,9 +268,9 @@ export type ApiMethods<F> = {
|
|
|
249
268
|
sendAudio(args: {
|
|
250
269
|
/** Unique identifier of the business connection on behalf of which the message will be sent */
|
|
251
270
|
business_connection_id?: string;
|
|
252
|
-
/** Unique identifier for the target chat or username of the target channel (in the format
|
|
271
|
+
/** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
|
|
253
272
|
chat_id: number | string;
|
|
254
|
-
/** Unique identifier for the target message thread (topic) of
|
|
273
|
+
/** 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 */
|
|
255
274
|
message_thread_id?: number;
|
|
256
275
|
/** Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat */
|
|
257
276
|
direct_messages_topic_id?: number;
|
|
@@ -292,9 +311,9 @@ export type ApiMethods<F> = {
|
|
|
292
311
|
sendDocument(args: {
|
|
293
312
|
/** Unique identifier of the business connection on behalf of which the message will be sent */
|
|
294
313
|
business_connection_id?: string;
|
|
295
|
-
/** Unique identifier for the target chat or username of the target channel (in the format
|
|
314
|
+
/** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
|
|
296
315
|
chat_id: number | string;
|
|
297
|
-
/** Unique identifier for the target message thread (topic) of
|
|
316
|
+
/** 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 */
|
|
298
317
|
message_thread_id?: number;
|
|
299
318
|
/** Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat */
|
|
300
319
|
direct_messages_topic_id?: number;
|
|
@@ -331,9 +350,9 @@ export type ApiMethods<F> = {
|
|
|
331
350
|
sendVideo(args: {
|
|
332
351
|
/** Unique identifier of the business connection on behalf of which the message will be sent */
|
|
333
352
|
business_connection_id?: string;
|
|
334
|
-
/** Unique identifier for the target chat or username of the target channel (in the format
|
|
353
|
+
/** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
|
|
335
354
|
chat_id: number | string;
|
|
336
|
-
/** Unique identifier for the target message thread (topic) of
|
|
355
|
+
/** 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 */
|
|
337
356
|
message_thread_id?: number;
|
|
338
357
|
/** Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat */
|
|
339
358
|
direct_messages_topic_id?: number;
|
|
@@ -384,9 +403,9 @@ export type ApiMethods<F> = {
|
|
|
384
403
|
sendAnimation(args: {
|
|
385
404
|
/** Unique identifier of the business connection on behalf of which the message will be sent */
|
|
386
405
|
business_connection_id?: string;
|
|
387
|
-
/** Unique identifier for the target chat or username of the target channel (in the format
|
|
406
|
+
/** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
|
|
388
407
|
chat_id: number | string;
|
|
389
|
-
/** Unique identifier for the target message thread (topic) of
|
|
408
|
+
/** 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 */
|
|
390
409
|
message_thread_id?: number;
|
|
391
410
|
/** Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat */
|
|
392
411
|
direct_messages_topic_id?: number;
|
|
@@ -431,9 +450,9 @@ export type ApiMethods<F> = {
|
|
|
431
450
|
sendVoice(args: {
|
|
432
451
|
/** Unique identifier of the business connection on behalf of which the message will be sent */
|
|
433
452
|
business_connection_id?: string;
|
|
434
|
-
/** Unique identifier for the target chat or username of the target channel (in the format
|
|
453
|
+
/** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
|
|
435
454
|
chat_id: number | string;
|
|
436
|
-
/** Unique identifier for the target message thread (topic) of
|
|
455
|
+
/** 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 */
|
|
437
456
|
message_thread_id?: number;
|
|
438
457
|
/** Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat */
|
|
439
458
|
direct_messages_topic_id?: number;
|
|
@@ -469,9 +488,9 @@ export type ApiMethods<F> = {
|
|
|
469
488
|
sendVideoNote(args: {
|
|
470
489
|
/** Unique identifier of the business connection on behalf of which the message will be sent */
|
|
471
490
|
business_connection_id?: string;
|
|
472
|
-
/** Unique identifier for the target chat or username of the target channel (in the format
|
|
491
|
+
/** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
|
|
473
492
|
chat_id: number | string;
|
|
474
|
-
/** Unique identifier for the target message thread (topic) of
|
|
493
|
+
/** 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 */
|
|
475
494
|
message_thread_id?: number;
|
|
476
495
|
/** Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat */
|
|
477
496
|
direct_messages_topic_id?: number;
|
|
@@ -504,9 +523,9 @@ export type ApiMethods<F> = {
|
|
|
504
523
|
sendMediaGroup(args: {
|
|
505
524
|
/** Unique identifier of the business connection on behalf of which the message will be sent */
|
|
506
525
|
business_connection_id?: string;
|
|
507
|
-
/** Unique identifier for the target chat or username of the target channel (in the format
|
|
526
|
+
/** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
|
|
508
527
|
chat_id: number | string;
|
|
509
|
-
/** Unique identifier for the target message thread (topic) of
|
|
528
|
+
/** 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 */
|
|
510
529
|
message_thread_id?: number;
|
|
511
530
|
/** Identifier of the direct messages topic to which the messages will be sent; required if the messages are sent to a direct messages chat */
|
|
512
531
|
direct_messages_topic_id?: number;
|
|
@@ -529,9 +548,9 @@ export type ApiMethods<F> = {
|
|
|
529
548
|
sendLocation(args: {
|
|
530
549
|
/** Unique identifier of the business connection on behalf of which the message will be sent */
|
|
531
550
|
business_connection_id?: string;
|
|
532
|
-
/** Unique identifier for the target chat or username of the target channel (in the format
|
|
551
|
+
/** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
|
|
533
552
|
chat_id: number | string;
|
|
534
|
-
/** Unique identifier for the target message thread (topic) of
|
|
553
|
+
/** 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
554
|
message_thread_id?: number;
|
|
536
555
|
/** 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
556
|
direct_messages_topic_id?: number;
|
|
@@ -568,7 +587,7 @@ export type ApiMethods<F> = {
|
|
|
568
587
|
editMessageLiveLocation(args: {
|
|
569
588
|
/** Unique identifier of the business connection on behalf of which the message to be edited was sent */
|
|
570
589
|
business_connection_id?: string;
|
|
571
|
-
/** Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format
|
|
590
|
+
/** Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
|
|
572
591
|
chat_id?: number | string;
|
|
573
592
|
/** Required if inline_message_id is not specified. Identifier of the message to edit */
|
|
574
593
|
message_id?: number;
|
|
@@ -593,7 +612,7 @@ export type ApiMethods<F> = {
|
|
|
593
612
|
stopMessageLiveLocation(args: {
|
|
594
613
|
/** Unique identifier of the business connection on behalf of which the message to be edited was sent */
|
|
595
614
|
business_connection_id?: string;
|
|
596
|
-
/** Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format
|
|
615
|
+
/** Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
|
|
597
616
|
chat_id?: number | string;
|
|
598
617
|
/** Required if inline_message_id is not specified. Identifier of the message with live location to stop */
|
|
599
618
|
message_id?: number;
|
|
@@ -606,8 +625,10 @@ export type ApiMethods<F> = {
|
|
|
606
625
|
sendPaidMedia(args: {
|
|
607
626
|
/** Unique identifier of the business connection on behalf of which the message to be edited was sent */
|
|
608
627
|
business_connection_id?: string;
|
|
609
|
-
/** Unique identifier for the target chat or username of the target channel (in the format
|
|
628
|
+
/** 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. */
|
|
610
629
|
chat_id: number | string;
|
|
630
|
+
/** 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 */
|
|
631
|
+
message_thread_id?: number;
|
|
611
632
|
/** Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat */
|
|
612
633
|
direct_messages_topic_id?: number;
|
|
613
634
|
/** The number of Telegram Stars that must be paid to buy access to the media; 1-2500 */
|
|
@@ -641,9 +662,9 @@ export type ApiMethods<F> = {
|
|
|
641
662
|
sendVenue(args: {
|
|
642
663
|
/** Unique identifier of the business connection on behalf of which the message will be sent */
|
|
643
664
|
business_connection_id?: string;
|
|
644
|
-
/** Unique identifier for the target chat or username of the target channel (in the format
|
|
665
|
+
/** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
|
|
645
666
|
chat_id: number | string;
|
|
646
|
-
/** Unique identifier for the target message thread (topic) of
|
|
667
|
+
/** 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 */
|
|
647
668
|
message_thread_id?: number;
|
|
648
669
|
/** Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat */
|
|
649
670
|
direct_messages_topic_id?: number;
|
|
@@ -684,9 +705,9 @@ export type ApiMethods<F> = {
|
|
|
684
705
|
sendContact(args: {
|
|
685
706
|
/** Unique identifier of the business connection on behalf of which the message will be sent */
|
|
686
707
|
business_connection_id?: string;
|
|
687
|
-
/** Unique identifier for the target chat or username of the target channel (in the format
|
|
708
|
+
/** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
|
|
688
709
|
chat_id: number | string;
|
|
689
|
-
/** Unique identifier for the target message thread (topic) of
|
|
710
|
+
/** 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 */
|
|
690
711
|
message_thread_id?: number;
|
|
691
712
|
/** Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat */
|
|
692
713
|
direct_messages_topic_id?: number;
|
|
@@ -719,9 +740,9 @@ export type ApiMethods<F> = {
|
|
|
719
740
|
sendPoll(args: {
|
|
720
741
|
/** Unique identifier of the business connection on behalf of which the message will be sent */
|
|
721
742
|
business_connection_id?: string;
|
|
722
|
-
/** Unique identifier for the target chat or username of the target channel (in the format
|
|
743
|
+
/** 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. */
|
|
723
744
|
chat_id: number | string;
|
|
724
|
-
/** Unique identifier for the target message thread (topic) of
|
|
745
|
+
/** 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 */
|
|
725
746
|
message_thread_id?: number;
|
|
726
747
|
/** Poll question, 1-300 characters */
|
|
727
748
|
question: string;
|
|
@@ -802,9 +823,9 @@ export type ApiMethods<F> = {
|
|
|
802
823
|
sendDice(args: {
|
|
803
824
|
/** Unique identifier of the business connection on behalf of which the message will be sent */
|
|
804
825
|
business_connection_id?: string;
|
|
805
|
-
/** Unique identifier for the target chat or username of the target channel (in the format
|
|
826
|
+
/** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
|
|
806
827
|
chat_id: number | string;
|
|
807
|
-
/** Unique identifier for the target message thread (topic) of
|
|
828
|
+
/** 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 */
|
|
808
829
|
message_thread_id?: number;
|
|
809
830
|
/** Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat */
|
|
810
831
|
direct_messages_topic_id?: number;
|
|
@@ -835,16 +856,16 @@ export type ApiMethods<F> = {
|
|
|
835
856
|
sendChatAction(args: {
|
|
836
857
|
/** Unique identifier of the business connection on behalf of which the action will be sent */
|
|
837
858
|
business_connection_id?: string;
|
|
838
|
-
/** Unique identifier for the target chat or username of the target supergroup (in the format
|
|
859
|
+
/** 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. */
|
|
839
860
|
chat_id: number | string;
|
|
861
|
+
/** 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 */
|
|
862
|
+
message_thread_id?: number;
|
|
840
863
|
/** 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. */
|
|
841
864
|
action: "typing" | "upload_photo" | "record_video" | "upload_video" | "record_voice" | "upload_voice" | "upload_document" | "choose_sticker" | "find_location" | "record_video_note" | "upload_video_note";
|
|
842
|
-
/** Unique identifier for the target message thread; for supergroups only */
|
|
843
|
-
message_thread_id?: number;
|
|
844
865
|
}): true;
|
|
845
866
|
/** 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. */
|
|
846
867
|
setMessageReaction(args: {
|
|
847
|
-
/** Unique identifier for the target chat or username of the target channel (in the format
|
|
868
|
+
/** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
|
|
848
869
|
chat_id: number | string;
|
|
849
870
|
/** Identifier of the target message */
|
|
850
871
|
message_id: number;
|
|
@@ -883,7 +904,7 @@ export type ApiMethods<F> = {
|
|
|
883
904
|
kickChatMember: ApiMethods<F>["banChatMember"];
|
|
884
905
|
/** 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. */
|
|
885
906
|
banChatMember(args: {
|
|
886
|
-
/** Unique identifier for the target group or username of the target supergroup or channel (in the format
|
|
907
|
+
/** Unique identifier for the target group or username of the target supergroup or channel (in the format `@channelusername`) */
|
|
887
908
|
chat_id: number | string;
|
|
888
909
|
/** Unique identifier of the target user */
|
|
889
910
|
user_id: number;
|
|
@@ -894,7 +915,7 @@ export type ApiMethods<F> = {
|
|
|
894
915
|
}): true;
|
|
895
916
|
/** 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. */
|
|
896
917
|
unbanChatMember(args: {
|
|
897
|
-
/** Unique identifier for the target group or username of the target supergroup or channel (in the format
|
|
918
|
+
/** Unique identifier for the target group or username of the target supergroup or channel (in the format `@channelusername`) */
|
|
898
919
|
chat_id: number | string;
|
|
899
920
|
/** Unique identifier of the target user */
|
|
900
921
|
user_id: number;
|
|
@@ -903,7 +924,7 @@ export type ApiMethods<F> = {
|
|
|
903
924
|
}): true;
|
|
904
925
|
/** 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. */
|
|
905
926
|
restrictChatMember(args: {
|
|
906
|
-
/** Unique identifier for the target chat or username of the target supergroup (in the format
|
|
927
|
+
/** Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`) */
|
|
907
928
|
chat_id: number | string;
|
|
908
929
|
/** Unique identifier of the target user */
|
|
909
930
|
user_id: number;
|
|
@@ -916,7 +937,7 @@ export type ApiMethods<F> = {
|
|
|
916
937
|
}): true;
|
|
917
938
|
/** 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. */
|
|
918
939
|
promoteChatMember(args: {
|
|
919
|
-
/** Unique identifier for the target chat or username of the target channel (in the format
|
|
940
|
+
/** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
|
|
920
941
|
chat_id: number | string;
|
|
921
942
|
/** Unique identifier of the target user */
|
|
922
943
|
user_id: number;
|
|
@@ -928,7 +949,7 @@ export type ApiMethods<F> = {
|
|
|
928
949
|
can_delete_messages?: boolean;
|
|
929
950
|
/** Pass True if the administrator can manage video chats */
|
|
930
951
|
can_manage_video_chats?: boolean;
|
|
931
|
-
/** Pass True if the administrator can restrict, ban or unban chat members, or access supergroup statistics */
|
|
952
|
+
/** 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 */
|
|
932
953
|
can_restrict_members?: boolean;
|
|
933
954
|
/** 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) */
|
|
934
955
|
can_promote_members?: boolean;
|
|
@@ -955,7 +976,7 @@ export type ApiMethods<F> = {
|
|
|
955
976
|
}): true;
|
|
956
977
|
/** Use this method to set a custom title for an administrator in a supergroup promoted by the bot. Returns True on success. */
|
|
957
978
|
setChatAdministratorCustomTitle(args: {
|
|
958
|
-
/** Unique identifier for the target chat or username of the target supergroup (in the format
|
|
979
|
+
/** Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`) */
|
|
959
980
|
chat_id: number | string;
|
|
960
981
|
/** Unique identifier of the target user */
|
|
961
982
|
user_id: number;
|
|
@@ -964,21 +985,21 @@ export type ApiMethods<F> = {
|
|
|
964
985
|
}): true;
|
|
965
986
|
/** 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. */
|
|
966
987
|
banChatSenderChat(args: {
|
|
967
|
-
/** Unique identifier for the target chat or username of the target channel (in the format
|
|
988
|
+
/** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
|
|
968
989
|
chat_id: number | string;
|
|
969
990
|
/** Unique identifier of the target sender chat */
|
|
970
991
|
sender_chat_id: number;
|
|
971
992
|
}): true;
|
|
972
993
|
/** 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. */
|
|
973
994
|
unbanChatSenderChat(args: {
|
|
974
|
-
/** Unique identifier for the target chat or username of the target channel (in the format
|
|
995
|
+
/** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
|
|
975
996
|
chat_id: number | string;
|
|
976
997
|
/** Unique identifier of the target sender chat */
|
|
977
998
|
sender_chat_id: number;
|
|
978
999
|
}): true;
|
|
979
1000
|
/** 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. */
|
|
980
1001
|
setChatPermissions(args: {
|
|
981
|
-
/** Unique identifier for the target chat or username of the target supergroup (in the format
|
|
1002
|
+
/** Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`) */
|
|
982
1003
|
chat_id: number | string;
|
|
983
1004
|
/** An object for new default chat permissions */
|
|
984
1005
|
permissions: ChatPermissions;
|
|
@@ -989,12 +1010,12 @@ export type ApiMethods<F> = {
|
|
|
989
1010
|
|
|
990
1011
|
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. */
|
|
991
1012
|
exportChatInviteLink(args: {
|
|
992
|
-
/** Unique identifier for the target chat or username of the target channel (in the format
|
|
1013
|
+
/** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
|
|
993
1014
|
chat_id: number | string;
|
|
994
1015
|
}): string;
|
|
995
1016
|
/** 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. */
|
|
996
1017
|
createChatInviteLink(args: {
|
|
997
|
-
/** Unique identifier for the target chat or username of the target channel (in the format
|
|
1018
|
+
/** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
|
|
998
1019
|
chat_id: number | string;
|
|
999
1020
|
/** Invite link name; 0-32 characters */
|
|
1000
1021
|
name?: string;
|
|
@@ -1007,7 +1028,7 @@ export type ApiMethods<F> = {
|
|
|
1007
1028
|
}): ChatInviteLink;
|
|
1008
1029
|
/** 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. */
|
|
1009
1030
|
editChatInviteLink(args: {
|
|
1010
|
-
/** Unique identifier for the target chat or username of the target channel (in the format
|
|
1031
|
+
/** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
|
|
1011
1032
|
chat_id: number | string;
|
|
1012
1033
|
/** The invite link to edit */
|
|
1013
1034
|
invite_link: string;
|
|
@@ -1022,7 +1043,7 @@ export type ApiMethods<F> = {
|
|
|
1022
1043
|
}): ChatInviteLink;
|
|
1023
1044
|
/** 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. */
|
|
1024
1045
|
createChatSubscriptionInviteLink(args: {
|
|
1025
|
-
/** Unique identifier for the target channel chat or username of the target channel (in the format
|
|
1046
|
+
/** Unique identifier for the target channel chat or username of the target channel (in the format `@channelusername`) */
|
|
1026
1047
|
chat_id: number | string;
|
|
1027
1048
|
/** Invite link name; 0-32 characters */
|
|
1028
1049
|
name?: string;
|
|
@@ -1033,7 +1054,7 @@ export type ApiMethods<F> = {
|
|
|
1033
1054
|
}): ChatInviteLink;
|
|
1034
1055
|
/** 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. */
|
|
1035
1056
|
editChatSubscriptionInviteLink(args: {
|
|
1036
|
-
/** Unique identifier for the target chat or username of the target channel (in the format
|
|
1057
|
+
/** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
|
|
1037
1058
|
chat_id: number | string;
|
|
1038
1059
|
/** The invite link to edit */
|
|
1039
1060
|
invite_link: string;
|
|
@@ -1042,21 +1063,21 @@ export type ApiMethods<F> = {
|
|
|
1042
1063
|
}): ChatInviteLink;
|
|
1043
1064
|
/** 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. */
|
|
1044
1065
|
revokeChatInviteLink(args: {
|
|
1045
|
-
/** Unique identifier of the target chat or username of the target channel (in the format
|
|
1066
|
+
/** Unique identifier of the target chat or username of the target channel (in the format `@channelusername`) */
|
|
1046
1067
|
chat_id: number | string;
|
|
1047
1068
|
/** The invite link to revoke */
|
|
1048
1069
|
invite_link: string;
|
|
1049
1070
|
}): ChatInviteLink;
|
|
1050
1071
|
/** 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. */
|
|
1051
1072
|
approveChatJoinRequest(args: {
|
|
1052
|
-
/** Unique identifier for the target chat or username of the target channel (in the format
|
|
1073
|
+
/** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
|
|
1053
1074
|
chat_id: number | string;
|
|
1054
1075
|
/** Unique identifier of the target user */
|
|
1055
1076
|
user_id: number;
|
|
1056
1077
|
}): true;
|
|
1057
1078
|
/** 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. */
|
|
1058
1079
|
declineChatJoinRequest(args: {
|
|
1059
|
-
/** Unique identifier for the target chat or username of the target channel (in the format
|
|
1080
|
+
/** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
|
|
1060
1081
|
chat_id: number | string;
|
|
1061
1082
|
/** Unique identifier of the target user */
|
|
1062
1083
|
user_id: number;
|
|
@@ -1081,26 +1102,26 @@ export type ApiMethods<F> = {
|
|
|
1081
1102
|
}): true;
|
|
1082
1103
|
/** 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. */
|
|
1083
1104
|
setChatPhoto(args: {
|
|
1084
|
-
/** Unique identifier for the target chat or username of the target channel (in the format
|
|
1105
|
+
/** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
|
|
1085
1106
|
chat_id: number | string;
|
|
1086
1107
|
/** New chat photo, uploaded using multipart/form-data */
|
|
1087
1108
|
photo: F;
|
|
1088
1109
|
}): true;
|
|
1089
1110
|
/** 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. */
|
|
1090
1111
|
deleteChatPhoto(args: {
|
|
1091
|
-
/** Unique identifier for the target chat or username of the target channel (in the format
|
|
1112
|
+
/** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
|
|
1092
1113
|
chat_id: number | string;
|
|
1093
1114
|
}): true;
|
|
1094
1115
|
/** 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. */
|
|
1095
1116
|
setChatTitle(args: {
|
|
1096
|
-
/** Unique identifier for the target chat or username of the target channel (in the format
|
|
1117
|
+
/** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
|
|
1097
1118
|
chat_id: number | string;
|
|
1098
1119
|
/** New chat title, 1-128 characters */
|
|
1099
1120
|
title: string;
|
|
1100
1121
|
}): true;
|
|
1101
1122
|
/** 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. */
|
|
1102
1123
|
setChatDescription(args: {
|
|
1103
|
-
/** Unique identifier for the target chat or username of the target channel (in the format
|
|
1124
|
+
/** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
|
|
1104
1125
|
chat_id: number | string;
|
|
1105
1126
|
/** New chat description, 0-255 characters */
|
|
1106
1127
|
description?: string;
|
|
@@ -1109,7 +1130,7 @@ export type ApiMethods<F> = {
|
|
|
1109
1130
|
pinChatMessage(args: {
|
|
1110
1131
|
/** Unique identifier of the business connection on behalf of which the message will be pinned */
|
|
1111
1132
|
business_connection_id?: string;
|
|
1112
|
-
/** Unique identifier for the target chat or username of the target channel (in the format
|
|
1133
|
+
/** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
|
|
1113
1134
|
chat_id: number | string;
|
|
1114
1135
|
/** Identifier of a message to pin */
|
|
1115
1136
|
message_id: number;
|
|
@@ -1120,29 +1141,29 @@ export type ApiMethods<F> = {
|
|
|
1120
1141
|
unpinChatMessage(args: {
|
|
1121
1142
|
/** Unique identifier of the business connection on behalf of which the message will be unpinned */
|
|
1122
1143
|
business_connection_id?: string;
|
|
1123
|
-
/** Unique identifier for the target chat or username of the target channel (in the format
|
|
1144
|
+
/** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
|
|
1124
1145
|
chat_id: number | string;
|
|
1125
1146
|
/** 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. */
|
|
1126
1147
|
message_id?: number;
|
|
1127
1148
|
}): true;
|
|
1128
1149
|
/** 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. */
|
|
1129
1150
|
unpinAllChatMessages(args: {
|
|
1130
|
-
/** Unique identifier for the target chat or username of the target channel (in the format
|
|
1151
|
+
/** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
|
|
1131
1152
|
chat_id: number | string;
|
|
1132
1153
|
}): true;
|
|
1133
1154
|
/** Use this method for your bot to leave a group, supergroup or channel. Returns True on success. */
|
|
1134
1155
|
leaveChat(args: {
|
|
1135
|
-
/** Unique identifier for the target chat or username of the target supergroup or channel (in the format
|
|
1156
|
+
/** 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. */
|
|
1136
1157
|
chat_id: number | string;
|
|
1137
1158
|
}): true;
|
|
1138
1159
|
/** Use this method to get up-to-date information about the chat. Returns a ChatFullInfo object on success. */
|
|
1139
1160
|
getChat(args: {
|
|
1140
|
-
/** Unique identifier for the target chat or username of the target supergroup or channel (in the format
|
|
1161
|
+
/** Unique identifier for the target chat or username of the target supergroup or channel (in the format `@channelusername`) */
|
|
1141
1162
|
chat_id: number | string;
|
|
1142
1163
|
}): ChatFullInfo;
|
|
1143
1164
|
/** Use this method to get a list of administrators in a chat, which aren't bots. Returns an Array of ChatMember objects. */
|
|
1144
1165
|
getChatAdministrators(args: {
|
|
1145
|
-
/** Unique identifier for the target chat or username of the target supergroup or channel (in the format
|
|
1166
|
+
/** Unique identifier for the target chat or username of the target supergroup or channel (in the format `@channelusername`) */
|
|
1146
1167
|
chat_id: number | string;
|
|
1147
1168
|
}): Array<ChatMemberOwner | ChatMemberAdministrator>;
|
|
1148
1169
|
/** Use this method to get the number of members in a chat. Returns Int on success.
|
|
@@ -1150,33 +1171,33 @@ export type ApiMethods<F> = {
|
|
|
1150
1171
|
getChatMembersCount: ApiMethods<F>["getChatMemberCount"];
|
|
1151
1172
|
/** Use this method to get the number of members in a chat. Returns Int on success. */
|
|
1152
1173
|
getChatMemberCount(args: {
|
|
1153
|
-
/** Unique identifier for the target chat or username of the target supergroup or channel (in the format
|
|
1174
|
+
/** Unique identifier for the target chat or username of the target supergroup or channel (in the format `@channelusername`) */
|
|
1154
1175
|
chat_id: number | string;
|
|
1155
1176
|
}): number;
|
|
1156
1177
|
/** 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. */
|
|
1157
1178
|
getChatMember(args: {
|
|
1158
|
-
/** Unique identifier for the target chat or username of the target supergroup or channel (in the format
|
|
1179
|
+
/** Unique identifier for the target chat or username of the target supergroup or channel (in the format `@channelusername`) */
|
|
1159
1180
|
chat_id: number | string;
|
|
1160
1181
|
/** Unique identifier of the target user */
|
|
1161
1182
|
user_id: number;
|
|
1162
1183
|
}): ChatMember;
|
|
1163
1184
|
/** 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. */
|
|
1164
1185
|
setChatStickerSet(args: {
|
|
1165
|
-
/** Unique identifier for the target chat or username of the target supergroup (in the format
|
|
1186
|
+
/** Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`) */
|
|
1166
1187
|
chat_id: number | string;
|
|
1167
1188
|
/** Name of the sticker set to be set as the group sticker set */
|
|
1168
1189
|
sticker_set_name: string;
|
|
1169
1190
|
}): true;
|
|
1170
1191
|
/** 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. */
|
|
1171
1192
|
deleteChatStickerSet(args: {
|
|
1172
|
-
/** Unique identifier for the target chat or username of the target supergroup (in the format
|
|
1193
|
+
/** Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`) */
|
|
1173
1194
|
chat_id: number | string;
|
|
1174
1195
|
}): true;
|
|
1175
1196
|
/** Use this method to get custom emoji stickers, which can be used as a forum topic icon by any user. Requires no parameters. Returns an Array of Sticker objects. */
|
|
1176
1197
|
getForumTopicIconStickers(): Sticker[];
|
|
1177
1198
|
/** 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. */
|
|
1178
1199
|
createForumTopic(args: {
|
|
1179
|
-
/** Unique identifier for the target chat or username of the target supergroup (in the format
|
|
1200
|
+
/** Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`) */
|
|
1180
1201
|
chat_id: number | string;
|
|
1181
1202
|
/** Topic name, 1-128 characters */
|
|
1182
1203
|
name: string;
|
|
@@ -1185,9 +1206,9 @@ export type ApiMethods<F> = {
|
|
|
1185
1206
|
/** Unique identifier of the custom emoji shown as the topic icon. Use getForumTopicIconStickers to get all allowed custom emoji identifiers. */
|
|
1186
1207
|
icon_custom_emoji_id?: string;
|
|
1187
1208
|
}): ForumTopic;
|
|
1188
|
-
/** Use this method to edit name and icon of a topic in a forum supergroup chat.
|
|
1209
|
+
/** 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. */
|
|
1189
1210
|
editForumTopic(args: {
|
|
1190
|
-
/** Unique identifier for the target chat or username of the target supergroup (in the format
|
|
1211
|
+
/** Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`) */
|
|
1191
1212
|
chat_id: number | string;
|
|
1192
1213
|
/** Unique identifier for the target message thread of the forum topic */
|
|
1193
1214
|
message_thread_id: number;
|
|
@@ -1198,67 +1219,67 @@ export type ApiMethods<F> = {
|
|
|
1198
1219
|
}): true;
|
|
1199
1220
|
/** 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. */
|
|
1200
1221
|
closeForumTopic(args: {
|
|
1201
|
-
/** Unique identifier for the target chat or username of the target supergroup (in the format
|
|
1222
|
+
/** Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`) */
|
|
1202
1223
|
chat_id: number | string;
|
|
1203
1224
|
/** Unique identifier for the target message thread of the forum topic */
|
|
1204
1225
|
message_thread_id: number;
|
|
1205
1226
|
}): true;
|
|
1206
1227
|
/** 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. */
|
|
1207
1228
|
reopenForumTopic(args: {
|
|
1208
|
-
/** Unique identifier for the target chat or username of the target supergroup (in the format
|
|
1229
|
+
/** Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`) */
|
|
1209
1230
|
chat_id: number | string;
|
|
1210
1231
|
/** Unique identifier for the target message thread of the forum topic */
|
|
1211
1232
|
message_thread_id: number;
|
|
1212
1233
|
}): true;
|
|
1213
|
-
/** Use this method to delete a forum topic along with all its messages in a forum supergroup chat.
|
|
1234
|
+
/** 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. */
|
|
1214
1235
|
deleteForumTopic(args: {
|
|
1215
|
-
/** Unique identifier for the target chat or username of the target supergroup (in the format
|
|
1236
|
+
/** Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`) */
|
|
1216
1237
|
chat_id: number | string;
|
|
1217
1238
|
/** Unique identifier for the target message thread of the forum topic */
|
|
1218
1239
|
message_thread_id: number;
|
|
1219
1240
|
}): true;
|
|
1220
|
-
/** Use this method to clear the list of pinned messages in a forum topic.
|
|
1241
|
+
/** 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. */
|
|
1221
1242
|
unpinAllForumTopicMessages(args: {
|
|
1222
|
-
/** Unique identifier for the target chat or username of the target supergroup (in the format
|
|
1243
|
+
/** Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`) */
|
|
1223
1244
|
chat_id: number | string;
|
|
1224
1245
|
/** Unique identifier for the target message thread of the forum topic */
|
|
1225
1246
|
message_thread_id: number;
|
|
1226
1247
|
}): true;
|
|
1227
1248
|
/** 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. */
|
|
1228
1249
|
editGeneralForumTopic(args: {
|
|
1229
|
-
/** Unique identifier for the target chat or username of the target supergroup (in the format
|
|
1250
|
+
/** Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`) */
|
|
1230
1251
|
chat_id: number | string;
|
|
1231
1252
|
/** New topic name, 1-128 characters */
|
|
1232
1253
|
name: string;
|
|
1233
1254
|
}): true;
|
|
1234
1255
|
/** 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. */
|
|
1235
1256
|
closeGeneralForumTopic(args: {
|
|
1236
|
-
/** Unique identifier for the target chat or username of the target supergroup (in the format
|
|
1257
|
+
/** Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`) */
|
|
1237
1258
|
chat_id: number | string;
|
|
1238
1259
|
}): true;
|
|
1239
1260
|
/** 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. */
|
|
1240
1261
|
reopenGeneralForumTopic(args: {
|
|
1241
|
-
/** Unique identifier for the target chat or username of the target supergroup (in the format
|
|
1262
|
+
/** Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`) */
|
|
1242
1263
|
chat_id: number | string;
|
|
1243
1264
|
}): true;
|
|
1244
1265
|
/** 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. */
|
|
1245
1266
|
hideGeneralForumTopic(args: {
|
|
1246
|
-
/** Unique identifier for the target chat or username of the target supergroup (in the format
|
|
1267
|
+
/** Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`) */
|
|
1247
1268
|
chat_id: number | string;
|
|
1248
1269
|
}): true;
|
|
1249
1270
|
/** 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. */
|
|
1250
1271
|
unhideGeneralForumTopic(args: {
|
|
1251
|
-
/** Unique identifier for the target chat or username of the target supergroup (in the format
|
|
1272
|
+
/** Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`) */
|
|
1252
1273
|
chat_id: number | string;
|
|
1253
1274
|
}): true;
|
|
1254
1275
|
/** 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. */
|
|
1255
1276
|
unpinAllGeneralForumTopicMessages(args: {
|
|
1256
|
-
/** Unique identifier for the target chat or username of the target supergroup (in the format
|
|
1277
|
+
/** Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`) */
|
|
1257
1278
|
chat_id: number | string;
|
|
1258
1279
|
}): true;
|
|
1259
1280
|
/** 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.
|
|
1260
1281
|
|
|
1261
|
-
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
|
|
1282
|
+
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. */
|
|
1262
1283
|
answerCallbackQuery(args: {
|
|
1263
1284
|
/** Unique identifier for the query to be answered */
|
|
1264
1285
|
callback_query_id: string;
|
|
@@ -1266,7 +1287,7 @@ export type ApiMethods<F> = {
|
|
|
1266
1287
|
text?: string;
|
|
1267
1288
|
/** If True, an alert will be shown by the client instead of a notification at the top of the chat screen. Defaults to false. */
|
|
1268
1289
|
show_alert?: boolean;
|
|
1269
|
-
/** URL that will be opened by the user's client. If you have created a Game and accepted the conditions via
|
|
1290
|
+
/** 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.
|
|
1270
1291
|
|
|
1271
1292
|
Otherwise, you may use links like t.me/your_bot?start=XXXX that open your bot with a parameter. */
|
|
1272
1293
|
url?: string;
|
|
@@ -1275,11 +1296,57 @@ export type ApiMethods<F> = {
|
|
|
1275
1296
|
}): true;
|
|
1276
1297
|
/** 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. */
|
|
1277
1298
|
getUserChatBoosts(args: {
|
|
1278
|
-
/** Unique identifier for the chat or username of the channel (in the format
|
|
1299
|
+
/** Unique identifier for the chat or username of the channel (in the format `@channelusername`) */
|
|
1279
1300
|
chat_id: number | string;
|
|
1280
1301
|
/** Unique identifier of the target user */
|
|
1281
1302
|
user_id: number;
|
|
1282
1303
|
}): UserChatBoosts;
|
|
1304
|
+
/** Returns the gifts owned and hosted by a user. Returns OwnedGifts on success. */
|
|
1305
|
+
getUserGifts(args: {
|
|
1306
|
+
/** Unique identifier of the user */
|
|
1307
|
+
user_id: number;
|
|
1308
|
+
/** Pass True to exclude gifts that can be purchased an unlimited number of times */
|
|
1309
|
+
exclude_unlimited?: boolean;
|
|
1310
|
+
/** Pass True to exclude gifts that can be purchased a limited number of times and can be upgraded to unique */
|
|
1311
|
+
exclude_limited_upgradable?: boolean;
|
|
1312
|
+
/** Pass True to exclude gifts that can be purchased a limited number of times and can't be upgraded to unique */
|
|
1313
|
+
exclude_limited_non_upgradable?: boolean;
|
|
1314
|
+
/** Pass True to exclude gifts that were assigned from the TON blockchain and can't be resold or transferred in Telegram */
|
|
1315
|
+
exclude_from_blockchain?: boolean;
|
|
1316
|
+
/** Pass True to exclude unique gifts */
|
|
1317
|
+
exclude_unique?: boolean;
|
|
1318
|
+
/** Pass True to sort results by gift price instead of send date. Sorting is applied before pagination. */
|
|
1319
|
+
sort_by_price?: boolean;
|
|
1320
|
+
/** Offset of the first entry to return as received from the previous request; use an empty string to get the first chunk of results */
|
|
1321
|
+
offset?: string;
|
|
1322
|
+
/** The maximum number of gifts to be returned; 1-100. Defaults to 100 */
|
|
1323
|
+
limit?: number;
|
|
1324
|
+
}): OwnedGifts;
|
|
1325
|
+
/** Returns the gifts owned by a chat. Returns OwnedGifts on success. */
|
|
1326
|
+
getChatGifts(args: {
|
|
1327
|
+
/** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
|
|
1328
|
+
chat_id: number | string;
|
|
1329
|
+
/** 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. */
|
|
1330
|
+
exclude_unsaved?: boolean;
|
|
1331
|
+
/** 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. */
|
|
1332
|
+
exclude_saved?: boolean;
|
|
1333
|
+
/** Pass True to exclude gifts that can be purchased an unlimited number of times */
|
|
1334
|
+
exclude_unlimited?: boolean;
|
|
1335
|
+
/** Pass True to exclude gifts that can be purchased a limited number of times and can be upgraded to unique */
|
|
1336
|
+
exclude_limited_upgradable?: boolean;
|
|
1337
|
+
/** Pass True to exclude gifts that can be purchased a limited number of times and can't be upgraded to unique */
|
|
1338
|
+
exclude_limited_non_upgradable?: boolean;
|
|
1339
|
+
/** Pass True to exclude gifts that were assigned from the TON blockchain and can't be resold or transferred in Telegram */
|
|
1340
|
+
exclude_from_blockchain?: boolean;
|
|
1341
|
+
/** Pass True to exclude unique gifts */
|
|
1342
|
+
exclude_unique?: boolean;
|
|
1343
|
+
/** Pass True to sort results by gift price instead of send date. Sorting is applied before pagination. */
|
|
1344
|
+
sort_by_price?: boolean;
|
|
1345
|
+
/** Offset of the first entry to return as received from the previous request; use an empty string to get the first chunk of results */
|
|
1346
|
+
offset?: string;
|
|
1347
|
+
/** The maximum number of gifts to be returned; 1-100. Defaults to 100 */
|
|
1348
|
+
limit?: number;
|
|
1349
|
+
}): OwnedGifts;
|
|
1283
1350
|
/** Use this method to get information about the connection of the bot with a business account. Returns a BusinessConnection object on success. */
|
|
1284
1351
|
getBusinessConnection(args: {
|
|
1285
1352
|
/** Unique identifier of the business connection */
|
|
@@ -1374,7 +1441,7 @@ export type ApiMethods<F> = {
|
|
|
1374
1441
|
editMessageText(args: {
|
|
1375
1442
|
/** Unique identifier of the business connection on behalf of which the message to be edited was sent */
|
|
1376
1443
|
business_connection_id?: string;
|
|
1377
|
-
/** Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format
|
|
1444
|
+
/** Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
|
|
1378
1445
|
chat_id?: number | string;
|
|
1379
1446
|
/** Required if inline_message_id is not specified. Identifier of the message to edit */
|
|
1380
1447
|
message_id?: number;
|
|
@@ -1395,7 +1462,7 @@ export type ApiMethods<F> = {
|
|
|
1395
1462
|
editMessageCaption(args: {
|
|
1396
1463
|
/** Unique identifier of the business connection on behalf of which the message to be edited was sent */
|
|
1397
1464
|
business_connection_id?: string;
|
|
1398
|
-
/** Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format
|
|
1465
|
+
/** Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
|
|
1399
1466
|
chat_id?: number | string;
|
|
1400
1467
|
/** Required if inline_message_id is not specified. Identifier of the message to edit */
|
|
1401
1468
|
message_id?: number;
|
|
@@ -1416,7 +1483,7 @@ export type ApiMethods<F> = {
|
|
|
1416
1483
|
editMessageMedia(args: {
|
|
1417
1484
|
/** Unique identifier of the business connection on behalf of which the message to be edited was sent */
|
|
1418
1485
|
business_connection_id?: string;
|
|
1419
|
-
/** Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format
|
|
1486
|
+
/** Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
|
|
1420
1487
|
chat_id?: number | string;
|
|
1421
1488
|
/** Required if inline_message_id is not specified. Identifier of the message to edit */
|
|
1422
1489
|
message_id?: number;
|
|
@@ -1431,7 +1498,7 @@ export type ApiMethods<F> = {
|
|
|
1431
1498
|
editMessageReplyMarkup(args: {
|
|
1432
1499
|
/** Unique identifier of the business connection on behalf of which the message to be edited was sent */
|
|
1433
1500
|
business_connection_id?: string;
|
|
1434
|
-
/** Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format
|
|
1501
|
+
/** Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
|
|
1435
1502
|
chat_id?: number | string;
|
|
1436
1503
|
/** Required if inline_message_id is not specified. Identifier of the message to edit */
|
|
1437
1504
|
message_id?: number;
|
|
@@ -1444,7 +1511,7 @@ export type ApiMethods<F> = {
|
|
|
1444
1511
|
stopPoll(args: {
|
|
1445
1512
|
/** Unique identifier of the business connection on behalf of which the message to be edited was sent */
|
|
1446
1513
|
business_connection_id?: string;
|
|
1447
|
-
/** Unique identifier for the target chat or username of the target channel (in the format
|
|
1514
|
+
/** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
|
|
1448
1515
|
chat_id: number | string;
|
|
1449
1516
|
/** Identifier of the original message with the poll */
|
|
1450
1517
|
message_id: number;
|
|
@@ -1463,14 +1530,14 @@ export type ApiMethods<F> = {
|
|
|
1463
1530
|
- If the bot has can_manage_direct_messages administrator right in a channel, it can delete any message in the corresponding direct messages chat.
|
|
1464
1531
|
Returns True on success. */
|
|
1465
1532
|
deleteMessage(args: {
|
|
1466
|
-
/** Unique identifier for the target chat or username of the target channel (in the format
|
|
1533
|
+
/** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
|
|
1467
1534
|
chat_id: number | string;
|
|
1468
1535
|
/** Identifier of the message to delete */
|
|
1469
1536
|
message_id: number;
|
|
1470
1537
|
}): true;
|
|
1471
1538
|
/** Use this method to delete multiple messages simultaneously. Returns True on success. */
|
|
1472
1539
|
deleteMessages(args: {
|
|
1473
|
-
/** Unique identifier for the target chat or username of the target channel (in the format
|
|
1540
|
+
/** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
|
|
1474
1541
|
chat_id: number | string;
|
|
1475
1542
|
/** A list of 1-100 identifiers of messages to delete. See deleteMessage for limitations on which messages can be deleted */
|
|
1476
1543
|
message_ids: number[];
|
|
@@ -1552,8 +1619,12 @@ export type ApiMethods<F> = {
|
|
|
1552
1619
|
exclude_saved?: boolean;
|
|
1553
1620
|
/** Pass True to exclude gifts that can be purchased an unlimited number of times */
|
|
1554
1621
|
exclude_unlimited?: boolean;
|
|
1555
|
-
/** Pass True to exclude gifts that can be purchased a limited number of times */
|
|
1556
|
-
|
|
1622
|
+
/** Pass True to exclude gifts that can be purchased a limited number of times and can be upgraded to unique */
|
|
1623
|
+
exclude_limited_upgradable?: boolean;
|
|
1624
|
+
/** Pass True to exclude gifts that can be purchased a limited number of times and can't be upgraded to unique */
|
|
1625
|
+
exclude_limited_non_upgradable?: boolean;
|
|
1626
|
+
/** Pass True to exclude gifts that were assigned from the TON blockchain and can't be resold or transferred in Telegram */
|
|
1627
|
+
exclude_from_blockchain?: boolean;
|
|
1557
1628
|
/** Pass True to exclude unique gifts */
|
|
1558
1629
|
exclude_unique?: boolean;
|
|
1559
1630
|
/** Pass True to sort results by gift price instead of send date. Sorting is applied before pagination. */
|
|
@@ -1613,6 +1684,21 @@ export type ApiMethods<F> = {
|
|
|
1613
1684
|
/** Pass True if the content of the story must be protected from forwarding and screenshotting */
|
|
1614
1685
|
protect_content?: boolean;
|
|
1615
1686
|
}): Story;
|
|
1687
|
+
/** 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. */
|
|
1688
|
+
repostStory(args: {
|
|
1689
|
+
/** Unique identifier of the business connection */
|
|
1690
|
+
business_connection_id: string;
|
|
1691
|
+
/** Unique identifier of the chat which posted the story that should be reposted */
|
|
1692
|
+
from_chat_id: number;
|
|
1693
|
+
/** Unique identifier of the story that should be reposted */
|
|
1694
|
+
from_story_id: number;
|
|
1695
|
+
/** Period after which the story is moved to the archive, in seconds; must be one of 6 * 3600, 12 * 3600, 86400, or 2 * 86400 */
|
|
1696
|
+
active_period: number;
|
|
1697
|
+
/** Pass True to keep the story accessible after it expires */
|
|
1698
|
+
post_to_chat_page?: boolean;
|
|
1699
|
+
/** Pass True if the content of the story must be protected from forwarding and screenshotting */
|
|
1700
|
+
protect_content?: boolean;
|
|
1701
|
+
}): Story;
|
|
1616
1702
|
/** 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. */
|
|
1617
1703
|
editStory(args: {
|
|
1618
1704
|
/** Unique identifier of the business connection */
|
|
@@ -1641,9 +1727,9 @@ export type ApiMethods<F> = {
|
|
|
1641
1727
|
sendSticker(args: {
|
|
1642
1728
|
/** Unique identifier of the business connection on behalf of which the message will be sent */
|
|
1643
1729
|
business_connection_id?: string;
|
|
1644
|
-
/** Unique identifier for the target chat or username of the target channel (in the format
|
|
1730
|
+
/** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
|
|
1645
1731
|
chat_id: number | string;
|
|
1646
|
-
/** Unique identifier for the target message thread (topic) of
|
|
1732
|
+
/** 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 */
|
|
1647
1733
|
message_thread_id?: number;
|
|
1648
1734
|
/** Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat */
|
|
1649
1735
|
direct_messages_topic_id?: number;
|
|
@@ -1791,7 +1877,7 @@ export type ApiMethods<F> = {
|
|
|
1791
1877
|
sendGift(args: {
|
|
1792
1878
|
/** Required if chat_id is not specified. Unique identifier of the target user who will receive the gift. */
|
|
1793
1879
|
user_id?: number;
|
|
1794
|
-
/** Required if user_id is not specified. Unique identifier for the chat or username of the channel (in the format
|
|
1880
|
+
/** 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. */
|
|
1795
1881
|
chat_id?: number | string;
|
|
1796
1882
|
/** Identifier of the gift */
|
|
1797
1883
|
gift_id: string;
|
|
@@ -1861,9 +1947,9 @@ export type ApiMethods<F> = {
|
|
|
1861
1947
|
}): PreparedInlineMessage;
|
|
1862
1948
|
/** Use this method to send invoices. On success, the sent Message is returned. */
|
|
1863
1949
|
sendInvoice(args: {
|
|
1864
|
-
/** Unique identifier for the target chat or username of the target channel (in the format
|
|
1950
|
+
/** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
|
|
1865
1951
|
chat_id: number | string;
|
|
1866
|
-
/** Unique identifier for the target message thread (topic) of
|
|
1952
|
+
/** 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 */
|
|
1867
1953
|
message_thread_id?: number;
|
|
1868
1954
|
/** Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat */
|
|
1869
1955
|
direct_messages_topic_id?: number;
|
|
@@ -1936,7 +2022,7 @@ export type ApiMethods<F> = {
|
|
|
1936
2022
|
description: string;
|
|
1937
2023
|
/** Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use it for your internal processes. */
|
|
1938
2024
|
payload: string;
|
|
1939
|
-
/** Payment provider token, obtained via
|
|
2025
|
+
/** Payment provider token, obtained via `@BotFather`. Pass an empty string for payments in Telegram Stars. */
|
|
1940
2026
|
provider_token?: string;
|
|
1941
2027
|
/** Three-letter ISO 4217 currency code, see more on currencies */
|
|
1942
2028
|
currency: string;
|
|
@@ -2025,7 +2111,7 @@ export type ApiMethods<F> = {
|
|
|
2025
2111
|
}): true;
|
|
2026
2112
|
/** Verifies a chat on behalf of the organization which is represented by the bot. Returns True on success. */
|
|
2027
2113
|
verifyChat(args: {
|
|
2028
|
-
/** Unique identifier for the target chat or username of the target channel (in the format
|
|
2114
|
+
/** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`). Channel direct messages chats can't be verified. */
|
|
2029
2115
|
chat_id: number | string;
|
|
2030
2116
|
/** Custom description for the verification; 0-70 characters. Must be empty if the organization isn't allowed to provide a custom verification description. */
|
|
2031
2117
|
custom_description?: string;
|
|
@@ -2037,7 +2123,7 @@ export type ApiMethods<F> = {
|
|
|
2037
2123
|
}): true;
|
|
2038
2124
|
/** Removes verification from a chat that is currently verified on behalf of the organization represented by the bot. Returns True on success. */
|
|
2039
2125
|
removeChatVerification(args: {
|
|
2040
|
-
/** Unique identifier for the target chat or username of the target channel (in the format
|
|
2126
|
+
/** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
|
|
2041
2127
|
chat_id: number | string;
|
|
2042
2128
|
}): true;
|
|
2043
2129
|
/** Marks incoming message as read on behalf of a business account. Requires the can_read_messages business bot right. Returns True on success. */
|
|
@@ -2064,7 +2150,7 @@ export type ApiMethods<F> = {
|
|
|
2064
2150
|
business_connection_id?: string;
|
|
2065
2151
|
/** Unique identifier for the target chat. Games can't be sent to channel direct messages chats and channel chats. */
|
|
2066
2152
|
chat_id: number;
|
|
2067
|
-
/** Unique identifier for the target message thread (topic) of
|
|
2153
|
+
/** 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 */
|
|
2068
2154
|
message_thread_id?: number;
|
|
2069
2155
|
/** Short name of the game, serves as the unique identifier for the game. Set up your games via BotFather. */
|
|
2070
2156
|
game_short_name: string;
|
|
@@ -2264,7 +2350,7 @@ export interface InputPaidMediaVideo<F> {
|
|
|
2264
2350
|
/** File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files » */
|
|
2265
2351
|
media: F | string;
|
|
2266
2352
|
/** Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files » */
|
|
2267
|
-
thumbnail?: F
|
|
2353
|
+
thumbnail?: F;
|
|
2268
2354
|
/** Cover for the video in the message. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name. */
|
|
2269
2355
|
cover?: F | string;
|
|
2270
2356
|
/** Start timestamp for the video in the message */
|