@grammyjs/types 3.22.2 → 3.24.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/methods.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import type { InputChecklist } from "./checklist.js";
2
2
  import type { InlineQueryResult, InlineQueryResultsButton } from "./inline.js";
3
3
  import type { LanguageCode } from "./langs.js";
4
- import type { AcceptedGiftTypes, BotCommand, BusinessConnection, ChatAdministratorRights, ChatFullInfo, ChatInviteLink, ChatMember, ChatMemberAdministrator, ChatMemberOwner, ChatPermissions, ForumTopic, UserChatBoosts, UserFromGetMe, UserProfilePhotos, WebhookInfo } from "./manage.js";
4
+ import type { AcceptedGiftTypes, BotCommand, BusinessConnection, ChatAdministratorRights, ChatFullInfo, ChatInviteLink, ChatMember, ChatMemberAdministrator, ChatMemberOwner, ChatPermissions, ForumTopic, UserChatBoosts, UserFromGetMe, UserProfileAudios, UserProfilePhotos, WebhookInfo } from "./manage.js";
5
5
  import type { ForceReply, InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove } from "./markup.js";
6
6
  import type { File, GameHighScore, InputPollOption, LinkPreviewOptions, MaskPosition, Message, MessageEntity, MessageId, ParseMode, Poll, PreparedInlineMessage, ReactionType, ReplyParameters, SentWebAppMessage, Sticker, StickerSet, Story, SuggestedPostParameters } from "./message.js";
7
7
  import type { PassportElementError } from "./passport.js";
@@ -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 @channelusername) */
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 the forum; for forum supergroups only */
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 @channelusername) */
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 the forum; for forum supergroups only */
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 @channelusername) */
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 @channelusername) */
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 the forum; for forum supergroups only */
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 @channelusername) */
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 @channelusername) */
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 the forum; for forum supergroups only */
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 @channelusername) */
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 @channelusername) */
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 the forum; for forum supergroups only */
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 @channelusername) */
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 @channelusername) */
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 the forum; for forum supergroups only */
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 @channelusername) */
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 the forum; for forum supergroups only */
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 @channelusername) */
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 the forum; for forum supergroups only */
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 @channelusername) */
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 the forum; for forum supergroups only */
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 @channelusername) */
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 the forum; for forum supergroups only */
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 @channelusername) */
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 the forum; for forum supergroups only */
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 @channelusername) */
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 the forum; for forum supergroups only */
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 @channelusername) */
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 the forum; for forum supergroups only */
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 @channelusername) */
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 the forum; for forum supergroups only */
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 @channelusername) */
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 @channelusername) */
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 @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. */
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 @channelusername) */
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 the forum; for forum supergroups only */
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 @channelusername) */
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 the forum; for forum supergroups only */
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 @channelusername). Polls can't be sent to channel direct messages chats. */
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 the forum; for forum supergroups only */
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 @channelusername) */
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 the forum; for forum supergroups only */
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 @supergroupusername). Channel chats and channel direct messages chats aren't supported. */
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 @channelusername) */
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;
@@ -862,6 +883,15 @@ export type ApiMethods<F> = {
862
883
  /** Limits the number of photos to be retrieved. Values between 1-100 are accepted. Defaults to 100. */
863
884
  limit?: number;
864
885
  }): UserProfilePhotos;
886
+ /** Use this method to get a list of profile audios for a user. Returns a UserProfileAudios object. */
887
+ getUserProfileAudios(args: {
888
+ /** Unique identifier of the target user */
889
+ user_id: number;
890
+ /** Sequential number of the first audio to be returned. By default, all audios are returned. */
891
+ offset?: number;
892
+ /** Limits the number of audios to be retrieved. Values between 1-100 are accepted. Defaults to 100. */
893
+ limit?: number;
894
+ }): UserProfileAudios;
865
895
  /** Changes the emoji status for a given user that previously allowed the bot to manage their emoji status via the Mini App method requestEmojiStatusAccess. Returns True on success. */
866
896
  setUserEmojiStatus(args: {
867
897
  /** Unique identifier of the target user */
@@ -883,7 +913,7 @@ export type ApiMethods<F> = {
883
913
  kickChatMember: ApiMethods<F>["banChatMember"];
884
914
  /** 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
915
  banChatMember(args: {
886
- /** Unique identifier for the target group or username of the target supergroup or channel (in the format @channelusername) */
916
+ /** Unique identifier for the target group or username of the target supergroup or channel (in the format `@channelusername`) */
887
917
  chat_id: number | string;
888
918
  /** Unique identifier of the target user */
889
919
  user_id: number;
@@ -894,7 +924,7 @@ export type ApiMethods<F> = {
894
924
  }): true;
895
925
  /** 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
926
  unbanChatMember(args: {
897
- /** Unique identifier for the target group or username of the target supergroup or channel (in the format @channelusername) */
927
+ /** Unique identifier for the target group or username of the target supergroup or channel (in the format `@channelusername`) */
898
928
  chat_id: number | string;
899
929
  /** Unique identifier of the target user */
900
930
  user_id: number;
@@ -903,7 +933,7 @@ export type ApiMethods<F> = {
903
933
  }): true;
904
934
  /** 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
935
  restrictChatMember(args: {
906
- /** Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername) */
936
+ /** Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`) */
907
937
  chat_id: number | string;
908
938
  /** Unique identifier of the target user */
909
939
  user_id: number;
@@ -916,7 +946,7 @@ export type ApiMethods<F> = {
916
946
  }): true;
917
947
  /** 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
948
  promoteChatMember(args: {
919
- /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
949
+ /** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
920
950
  chat_id: number | string;
921
951
  /** Unique identifier of the target user */
922
952
  user_id: number;
@@ -928,7 +958,7 @@ export type ApiMethods<F> = {
928
958
  can_delete_messages?: boolean;
929
959
  /** Pass True if the administrator can manage video chats */
930
960
  can_manage_video_chats?: boolean;
931
- /** Pass True if the administrator can restrict, ban or unban chat members, or access supergroup statistics */
961
+ /** 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
962
  can_restrict_members?: boolean;
933
963
  /** 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
964
  can_promote_members?: boolean;
@@ -955,7 +985,7 @@ export type ApiMethods<F> = {
955
985
  }): true;
956
986
  /** Use this method to set a custom title for an administrator in a supergroup promoted by the bot. Returns True on success. */
957
987
  setChatAdministratorCustomTitle(args: {
958
- /** Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername) */
988
+ /** Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`) */
959
989
  chat_id: number | string;
960
990
  /** Unique identifier of the target user */
961
991
  user_id: number;
@@ -964,21 +994,21 @@ export type ApiMethods<F> = {
964
994
  }): true;
965
995
  /** 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
996
  banChatSenderChat(args: {
967
- /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
997
+ /** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
968
998
  chat_id: number | string;
969
999
  /** Unique identifier of the target sender chat */
970
1000
  sender_chat_id: number;
971
1001
  }): true;
972
1002
  /** 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
1003
  unbanChatSenderChat(args: {
974
- /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
1004
+ /** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
975
1005
  chat_id: number | string;
976
1006
  /** Unique identifier of the target sender chat */
977
1007
  sender_chat_id: number;
978
1008
  }): true;
979
1009
  /** 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
1010
  setChatPermissions(args: {
981
- /** Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername) */
1011
+ /** Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`) */
982
1012
  chat_id: number | string;
983
1013
  /** An object for new default chat permissions */
984
1014
  permissions: ChatPermissions;
@@ -989,12 +1019,12 @@ export type ApiMethods<F> = {
989
1019
 
990
1020
  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
1021
  exportChatInviteLink(args: {
992
- /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
1022
+ /** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
993
1023
  chat_id: number | string;
994
1024
  }): string;
995
1025
  /** 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
1026
  createChatInviteLink(args: {
997
- /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
1027
+ /** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
998
1028
  chat_id: number | string;
999
1029
  /** Invite link name; 0-32 characters */
1000
1030
  name?: string;
@@ -1007,7 +1037,7 @@ export type ApiMethods<F> = {
1007
1037
  }): ChatInviteLink;
1008
1038
  /** 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
1039
  editChatInviteLink(args: {
1010
- /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
1040
+ /** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
1011
1041
  chat_id: number | string;
1012
1042
  /** The invite link to edit */
1013
1043
  invite_link: string;
@@ -1022,7 +1052,7 @@ export type ApiMethods<F> = {
1022
1052
  }): ChatInviteLink;
1023
1053
  /** 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
1054
  createChatSubscriptionInviteLink(args: {
1025
- /** Unique identifier for the target channel chat or username of the target channel (in the format @channelusername) */
1055
+ /** Unique identifier for the target channel chat or username of the target channel (in the format `@channelusername`) */
1026
1056
  chat_id: number | string;
1027
1057
  /** Invite link name; 0-32 characters */
1028
1058
  name?: string;
@@ -1033,7 +1063,7 @@ export type ApiMethods<F> = {
1033
1063
  }): ChatInviteLink;
1034
1064
  /** 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
1065
  editChatSubscriptionInviteLink(args: {
1036
- /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
1066
+ /** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
1037
1067
  chat_id: number | string;
1038
1068
  /** The invite link to edit */
1039
1069
  invite_link: string;
@@ -1042,21 +1072,21 @@ export type ApiMethods<F> = {
1042
1072
  }): ChatInviteLink;
1043
1073
  /** 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
1074
  revokeChatInviteLink(args: {
1045
- /** Unique identifier of the target chat or username of the target channel (in the format @channelusername) */
1075
+ /** Unique identifier of the target chat or username of the target channel (in the format `@channelusername`) */
1046
1076
  chat_id: number | string;
1047
1077
  /** The invite link to revoke */
1048
1078
  invite_link: string;
1049
1079
  }): ChatInviteLink;
1050
1080
  /** 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
1081
  approveChatJoinRequest(args: {
1052
- /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
1082
+ /** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
1053
1083
  chat_id: number | string;
1054
1084
  /** Unique identifier of the target user */
1055
1085
  user_id: number;
1056
1086
  }): true;
1057
1087
  /** 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
1088
  declineChatJoinRequest(args: {
1059
- /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
1089
+ /** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
1060
1090
  chat_id: number | string;
1061
1091
  /** Unique identifier of the target user */
1062
1092
  user_id: number;
@@ -1081,26 +1111,26 @@ export type ApiMethods<F> = {
1081
1111
  }): true;
1082
1112
  /** 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
1113
  setChatPhoto(args: {
1084
- /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
1114
+ /** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
1085
1115
  chat_id: number | string;
1086
1116
  /** New chat photo, uploaded using multipart/form-data */
1087
1117
  photo: F;
1088
1118
  }): true;
1089
1119
  /** 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
1120
  deleteChatPhoto(args: {
1091
- /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
1121
+ /** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
1092
1122
  chat_id: number | string;
1093
1123
  }): true;
1094
1124
  /** 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
1125
  setChatTitle(args: {
1096
- /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
1126
+ /** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
1097
1127
  chat_id: number | string;
1098
1128
  /** New chat title, 1-128 characters */
1099
1129
  title: string;
1100
1130
  }): true;
1101
1131
  /** 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
1132
  setChatDescription(args: {
1103
- /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
1133
+ /** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
1104
1134
  chat_id: number | string;
1105
1135
  /** New chat description, 0-255 characters */
1106
1136
  description?: string;
@@ -1109,7 +1139,7 @@ export type ApiMethods<F> = {
1109
1139
  pinChatMessage(args: {
1110
1140
  /** Unique identifier of the business connection on behalf of which the message will be pinned */
1111
1141
  business_connection_id?: string;
1112
- /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
1142
+ /** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
1113
1143
  chat_id: number | string;
1114
1144
  /** Identifier of a message to pin */
1115
1145
  message_id: number;
@@ -1120,29 +1150,29 @@ export type ApiMethods<F> = {
1120
1150
  unpinChatMessage(args: {
1121
1151
  /** Unique identifier of the business connection on behalf of which the message will be unpinned */
1122
1152
  business_connection_id?: string;
1123
- /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
1153
+ /** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
1124
1154
  chat_id: number | string;
1125
1155
  /** 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
1156
  message_id?: number;
1127
1157
  }): true;
1128
1158
  /** 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
1159
  unpinAllChatMessages(args: {
1130
- /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
1160
+ /** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
1131
1161
  chat_id: number | string;
1132
1162
  }): true;
1133
1163
  /** Use this method for your bot to leave a group, supergroup or channel. Returns True on success. */
1134
1164
  leaveChat(args: {
1135
- /** 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. */
1165
+ /** 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
1166
  chat_id: number | string;
1137
1167
  }): true;
1138
1168
  /** Use this method to get up-to-date information about the chat. Returns a ChatFullInfo object on success. */
1139
1169
  getChat(args: {
1140
- /** Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername) */
1170
+ /** Unique identifier for the target chat or username of the target supergroup or channel (in the format `@channelusername`) */
1141
1171
  chat_id: number | string;
1142
1172
  }): ChatFullInfo;
1143
1173
  /** Use this method to get a list of administrators in a chat, which aren't bots. Returns an Array of ChatMember objects. */
1144
1174
  getChatAdministrators(args: {
1145
- /** Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername) */
1175
+ /** Unique identifier for the target chat or username of the target supergroup or channel (in the format `@channelusername`) */
1146
1176
  chat_id: number | string;
1147
1177
  }): Array<ChatMemberOwner | ChatMemberAdministrator>;
1148
1178
  /** Use this method to get the number of members in a chat. Returns Int on success.
@@ -1150,33 +1180,33 @@ export type ApiMethods<F> = {
1150
1180
  getChatMembersCount: ApiMethods<F>["getChatMemberCount"];
1151
1181
  /** Use this method to get the number of members in a chat. Returns Int on success. */
1152
1182
  getChatMemberCount(args: {
1153
- /** Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername) */
1183
+ /** Unique identifier for the target chat or username of the target supergroup or channel (in the format `@channelusername`) */
1154
1184
  chat_id: number | string;
1155
1185
  }): number;
1156
1186
  /** 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
1187
  getChatMember(args: {
1158
- /** Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername) */
1188
+ /** Unique identifier for the target chat or username of the target supergroup or channel (in the format `@channelusername`) */
1159
1189
  chat_id: number | string;
1160
1190
  /** Unique identifier of the target user */
1161
1191
  user_id: number;
1162
1192
  }): ChatMember;
1163
1193
  /** 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
1194
  setChatStickerSet(args: {
1165
- /** Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername) */
1195
+ /** Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`) */
1166
1196
  chat_id: number | string;
1167
1197
  /** Name of the sticker set to be set as the group sticker set */
1168
1198
  sticker_set_name: string;
1169
1199
  }): true;
1170
1200
  /** 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
1201
  deleteChatStickerSet(args: {
1172
- /** Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername) */
1202
+ /** Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`) */
1173
1203
  chat_id: number | string;
1174
1204
  }): true;
1175
1205
  /** 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
1206
  getForumTopicIconStickers(): Sticker[];
1177
- /** 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. */
1207
+ /** Use this method to create 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 right. Returns information about the created topic as a ForumTopic object. */
1178
1208
  createForumTopic(args: {
1179
- /** Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername) */
1209
+ /** Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`) */
1180
1210
  chat_id: number | string;
1181
1211
  /** Topic name, 1-128 characters */
1182
1212
  name: string;
@@ -1185,9 +1215,9 @@ export type ApiMethods<F> = {
1185
1215
  /** Unique identifier of the custom emoji shown as the topic icon. Use getForumTopicIconStickers to get all allowed custom emoji identifiers. */
1186
1216
  icon_custom_emoji_id?: string;
1187
1217
  }): ForumTopic;
1188
- /** Use this method to edit name and icon of 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, unless it is the creator of the topic. Returns True on success. */
1218
+ /** 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
1219
  editForumTopic(args: {
1190
- /** Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername) */
1220
+ /** Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`) */
1191
1221
  chat_id: number | string;
1192
1222
  /** Unique identifier for the target message thread of the forum topic */
1193
1223
  message_thread_id: number;
@@ -1198,67 +1228,67 @@ export type ApiMethods<F> = {
1198
1228
  }): true;
1199
1229
  /** 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
1230
  closeForumTopic(args: {
1201
- /** Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername) */
1231
+ /** Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`) */
1202
1232
  chat_id: number | string;
1203
1233
  /** Unique identifier for the target message thread of the forum topic */
1204
1234
  message_thread_id: number;
1205
1235
  }): true;
1206
1236
  /** 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
1237
  reopenForumTopic(args: {
1208
- /** Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername) */
1238
+ /** Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`) */
1209
1239
  chat_id: number | string;
1210
1240
  /** Unique identifier for the target message thread of the forum topic */
1211
1241
  message_thread_id: number;
1212
1242
  }): true;
1213
- /** Use this method to delete a forum topic along with all its messages in a forum 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. */
1243
+ /** 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
1244
  deleteForumTopic(args: {
1215
- /** Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername) */
1245
+ /** Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`) */
1216
1246
  chat_id: number | string;
1217
1247
  /** Unique identifier for the target message thread of the forum topic */
1218
1248
  message_thread_id: number;
1219
1249
  }): true;
1220
- /** Use this method to clear the list of pinned messages in a 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. */
1250
+ /** 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
1251
  unpinAllForumTopicMessages(args: {
1222
- /** Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername) */
1252
+ /** Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`) */
1223
1253
  chat_id: number | string;
1224
1254
  /** Unique identifier for the target message thread of the forum topic */
1225
1255
  message_thread_id: number;
1226
1256
  }): true;
1227
1257
  /** 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
1258
  editGeneralForumTopic(args: {
1229
- /** Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername) */
1259
+ /** Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`) */
1230
1260
  chat_id: number | string;
1231
1261
  /** New topic name, 1-128 characters */
1232
1262
  name: string;
1233
1263
  }): true;
1234
1264
  /** 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
1265
  closeGeneralForumTopic(args: {
1236
- /** Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername) */
1266
+ /** Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`) */
1237
1267
  chat_id: number | string;
1238
1268
  }): true;
1239
1269
  /** 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
1270
  reopenGeneralForumTopic(args: {
1241
- /** Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername) */
1271
+ /** Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`) */
1242
1272
  chat_id: number | string;
1243
1273
  }): true;
1244
1274
  /** 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
1275
  hideGeneralForumTopic(args: {
1246
- /** Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername) */
1276
+ /** Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`) */
1247
1277
  chat_id: number | string;
1248
1278
  }): true;
1249
1279
  /** 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
1280
  unhideGeneralForumTopic(args: {
1251
- /** Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername) */
1281
+ /** Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`) */
1252
1282
  chat_id: number | string;
1253
1283
  }): true;
1254
1284
  /** 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
1285
  unpinAllGeneralForumTopicMessages(args: {
1256
- /** Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername) */
1286
+ /** Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`) */
1257
1287
  chat_id: number | string;
1258
1288
  }): true;
1259
1289
  /** 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
1290
 
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 @BotFather and accept the terms. Otherwise, you may use links like t.me/your_bot?start=XXXX that open your bot with a parameter. */
1291
+ 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
1292
  answerCallbackQuery(args: {
1263
1293
  /** Unique identifier for the query to be answered */
1264
1294
  callback_query_id: string;
@@ -1266,7 +1296,7 @@ export type ApiMethods<F> = {
1266
1296
  text?: string;
1267
1297
  /** 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
1298
  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 @BotFather, specify the URL that opens your game - note that this will only work if the query comes from a callback_game button.
1299
+ /** 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
1300
 
1271
1301
  Otherwise, you may use links like t.me/your_bot?start=XXXX that open your bot with a parameter. */
1272
1302
  url?: string;
@@ -1275,11 +1305,57 @@ export type ApiMethods<F> = {
1275
1305
  }): true;
1276
1306
  /** 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
1307
  getUserChatBoosts(args: {
1278
- /** Unique identifier for the chat or username of the channel (in the format @channelusername) */
1308
+ /** Unique identifier for the chat or username of the channel (in the format `@channelusername`) */
1279
1309
  chat_id: number | string;
1280
1310
  /** Unique identifier of the target user */
1281
1311
  user_id: number;
1282
1312
  }): UserChatBoosts;
1313
+ /** Returns the gifts owned and hosted by a user. Returns OwnedGifts on success. */
1314
+ getUserGifts(args: {
1315
+ /** Unique identifier of the user */
1316
+ user_id: number;
1317
+ /** Pass True to exclude gifts that can be purchased an unlimited number of times */
1318
+ exclude_unlimited?: boolean;
1319
+ /** Pass True to exclude gifts that can be purchased a limited number of times and can be upgraded to unique */
1320
+ exclude_limited_upgradable?: boolean;
1321
+ /** Pass True to exclude gifts that can be purchased a limited number of times and can't be upgraded to unique */
1322
+ exclude_limited_non_upgradable?: boolean;
1323
+ /** Pass True to exclude gifts that were assigned from the TON blockchain and can't be resold or transferred in Telegram */
1324
+ exclude_from_blockchain?: boolean;
1325
+ /** Pass True to exclude unique gifts */
1326
+ exclude_unique?: boolean;
1327
+ /** Pass True to sort results by gift price instead of send date. Sorting is applied before pagination. */
1328
+ sort_by_price?: boolean;
1329
+ /** Offset of the first entry to return as received from the previous request; use an empty string to get the first chunk of results */
1330
+ offset?: string;
1331
+ /** The maximum number of gifts to be returned; 1-100. Defaults to 100 */
1332
+ limit?: number;
1333
+ }): OwnedGifts;
1334
+ /** Returns the gifts owned by a chat. Returns OwnedGifts on success. */
1335
+ getChatGifts(args: {
1336
+ /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
1337
+ chat_id: number | string;
1338
+ /** 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. */
1339
+ exclude_unsaved?: boolean;
1340
+ /** 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. */
1341
+ exclude_saved?: boolean;
1342
+ /** Pass True to exclude gifts that can be purchased an unlimited number of times */
1343
+ exclude_unlimited?: boolean;
1344
+ /** Pass True to exclude gifts that can be purchased a limited number of times and can be upgraded to unique */
1345
+ exclude_limited_upgradable?: boolean;
1346
+ /** Pass True to exclude gifts that can be purchased a limited number of times and can't be upgraded to unique */
1347
+ exclude_limited_non_upgradable?: boolean;
1348
+ /** Pass True to exclude gifts that were assigned from the TON blockchain and can't be resold or transferred in Telegram */
1349
+ exclude_from_blockchain?: boolean;
1350
+ /** Pass True to exclude unique gifts */
1351
+ exclude_unique?: boolean;
1352
+ /** Pass True to sort results by gift price instead of send date. Sorting is applied before pagination. */
1353
+ sort_by_price?: boolean;
1354
+ /** Offset of the first entry to return as received from the previous request; use an empty string to get the first chunk of results */
1355
+ offset?: string;
1356
+ /** The maximum number of gifts to be returned; 1-100. Defaults to 100 */
1357
+ limit?: number;
1358
+ }): OwnedGifts;
1283
1359
  /** Use this method to get information about the connection of the bot with a business account. Returns a BusinessConnection object on success. */
1284
1360
  getBusinessConnection(args: {
1285
1361
  /** Unique identifier of the business connection */
@@ -1344,6 +1420,13 @@ export type ApiMethods<F> = {
1344
1420
  /** A two-letter ISO 639-1 language code or an empty string */
1345
1421
  language_code?: LanguageCode;
1346
1422
  }): BotShortDescription;
1423
+ /** Changes the profile photo of the bot. Returns True on success. */
1424
+ setMyProfilePhoto(args: {
1425
+ /** The new profile photo to set */
1426
+ photo: InputProfilePhoto<F>;
1427
+ }): true;
1428
+ /** Removes the profile photo of the bot. Requires no parameters. Returns True on success. */
1429
+ removeMyProfilePhoto(): true;
1347
1430
  /** Use this method to change the bot's menu button in a private chat, or the default menu button. Returns True on success. */
1348
1431
  setChatMenuButton(args: {
1349
1432
  /** Unique identifier for the target private chat. If not specified, default bot's menu button will be changed */
@@ -1374,7 +1457,7 @@ export type ApiMethods<F> = {
1374
1457
  editMessageText(args: {
1375
1458
  /** Unique identifier of the business connection on behalf of which the message to be edited was sent */
1376
1459
  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 @channelusername) */
1460
+ /** 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
1461
  chat_id?: number | string;
1379
1462
  /** Required if inline_message_id is not specified. Identifier of the message to edit */
1380
1463
  message_id?: number;
@@ -1395,7 +1478,7 @@ export type ApiMethods<F> = {
1395
1478
  editMessageCaption(args: {
1396
1479
  /** Unique identifier of the business connection on behalf of which the message to be edited was sent */
1397
1480
  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 @channelusername) */
1481
+ /** 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
1482
  chat_id?: number | string;
1400
1483
  /** Required if inline_message_id is not specified. Identifier of the message to edit */
1401
1484
  message_id?: number;
@@ -1416,7 +1499,7 @@ export type ApiMethods<F> = {
1416
1499
  editMessageMedia(args: {
1417
1500
  /** Unique identifier of the business connection on behalf of which the message to be edited was sent */
1418
1501
  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 @channelusername) */
1502
+ /** 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
1503
  chat_id?: number | string;
1421
1504
  /** Required if inline_message_id is not specified. Identifier of the message to edit */
1422
1505
  message_id?: number;
@@ -1431,7 +1514,7 @@ export type ApiMethods<F> = {
1431
1514
  editMessageReplyMarkup(args: {
1432
1515
  /** Unique identifier of the business connection on behalf of which the message to be edited was sent */
1433
1516
  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 @channelusername) */
1517
+ /** 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
1518
  chat_id?: number | string;
1436
1519
  /** Required if inline_message_id is not specified. Identifier of the message to edit */
1437
1520
  message_id?: number;
@@ -1444,7 +1527,7 @@ export type ApiMethods<F> = {
1444
1527
  stopPoll(args: {
1445
1528
  /** Unique identifier of the business connection on behalf of which the message to be edited was sent */
1446
1529
  business_connection_id?: string;
1447
- /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
1530
+ /** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
1448
1531
  chat_id: number | string;
1449
1532
  /** Identifier of the original message with the poll */
1450
1533
  message_id: number;
@@ -1463,14 +1546,14 @@ export type ApiMethods<F> = {
1463
1546
  - 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
1547
  Returns True on success. */
1465
1548
  deleteMessage(args: {
1466
- /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
1549
+ /** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
1467
1550
  chat_id: number | string;
1468
1551
  /** Identifier of the message to delete */
1469
1552
  message_id: number;
1470
1553
  }): true;
1471
1554
  /** Use this method to delete multiple messages simultaneously. Returns True on success. */
1472
1555
  deleteMessages(args: {
1473
- /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
1556
+ /** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
1474
1557
  chat_id: number | string;
1475
1558
  /** A list of 1-100 identifiers of messages to delete. See deleteMessage for limitations on which messages can be deleted */
1476
1559
  message_ids: number[];
@@ -1552,8 +1635,12 @@ export type ApiMethods<F> = {
1552
1635
  exclude_saved?: boolean;
1553
1636
  /** Pass True to exclude gifts that can be purchased an unlimited number of times */
1554
1637
  exclude_unlimited?: boolean;
1555
- /** Pass True to exclude gifts that can be purchased a limited number of times */
1556
- exclude_limited?: boolean;
1638
+ /** Pass True to exclude gifts that can be purchased a limited number of times and can be upgraded to unique */
1639
+ exclude_limited_upgradable?: boolean;
1640
+ /** Pass True to exclude gifts that can be purchased a limited number of times and can't be upgraded to unique */
1641
+ exclude_limited_non_upgradable?: boolean;
1642
+ /** Pass True to exclude gifts that were assigned from the TON blockchain and can't be resold or transferred in Telegram */
1643
+ exclude_from_blockchain?: boolean;
1557
1644
  /** Pass True to exclude unique gifts */
1558
1645
  exclude_unique?: boolean;
1559
1646
  /** Pass True to sort results by gift price instead of send date. Sorting is applied before pagination. */
@@ -1613,6 +1700,21 @@ export type ApiMethods<F> = {
1613
1700
  /** Pass True if the content of the story must be protected from forwarding and screenshotting */
1614
1701
  protect_content?: boolean;
1615
1702
  }): Story;
1703
+ /** 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. */
1704
+ repostStory(args: {
1705
+ /** Unique identifier of the business connection */
1706
+ business_connection_id: string;
1707
+ /** Unique identifier of the chat which posted the story that should be reposted */
1708
+ from_chat_id: number;
1709
+ /** Unique identifier of the story that should be reposted */
1710
+ from_story_id: number;
1711
+ /** Period after which the story is moved to the archive, in seconds; must be one of 6 * 3600, 12 * 3600, 86400, or 2 * 86400 */
1712
+ active_period: number;
1713
+ /** Pass True to keep the story accessible after it expires */
1714
+ post_to_chat_page?: boolean;
1715
+ /** Pass True if the content of the story must be protected from forwarding and screenshotting */
1716
+ protect_content?: boolean;
1717
+ }): Story;
1616
1718
  /** 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
1719
  editStory(args: {
1618
1720
  /** Unique identifier of the business connection */
@@ -1641,9 +1743,9 @@ export type ApiMethods<F> = {
1641
1743
  sendSticker(args: {
1642
1744
  /** Unique identifier of the business connection on behalf of which the message will be sent */
1643
1745
  business_connection_id?: string;
1644
- /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
1746
+ /** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
1645
1747
  chat_id: number | string;
1646
- /** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
1748
+ /** 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
1749
  message_thread_id?: number;
1648
1750
  /** 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
1751
  direct_messages_topic_id?: number;
@@ -1791,7 +1893,7 @@ export type ApiMethods<F> = {
1791
1893
  sendGift(args: {
1792
1894
  /** Required if chat_id is not specified. Unique identifier of the target user who will receive the gift. */
1793
1895
  user_id?: number;
1794
- /** 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. */
1896
+ /** 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
1897
  chat_id?: number | string;
1796
1898
  /** Identifier of the gift */
1797
1899
  gift_id: string;
@@ -1803,7 +1905,7 @@ export type ApiMethods<F> = {
1803
1905
  text_parse_mode?: ParseMode;
1804
1906
  /** A list of special entities that appear in the gift text. It can be specified instead of text_parse_mode. Entities other than “bold”, “italic”, “underline”, “strikethrough”, “spoiler”, and “custom_emoji” are ignored. */
1805
1907
  text_entities?: MessageEntity[];
1806
- }): Gifts;
1908
+ }): true;
1807
1909
  /** Gifts a Telegram Premium subscription to the given user. Returns True on success. */
1808
1910
  giftPremiumSubscription(args: {
1809
1911
  /** Unique identifier of the target user who will receive a Telegram Premium subscription */
@@ -1861,9 +1963,9 @@ export type ApiMethods<F> = {
1861
1963
  }): PreparedInlineMessage;
1862
1964
  /** Use this method to send invoices. On success, the sent Message is returned. */
1863
1965
  sendInvoice(args: {
1864
- /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
1966
+ /** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
1865
1967
  chat_id: number | string;
1866
- /** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
1968
+ /** 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
1969
  message_thread_id?: number;
1868
1970
  /** 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
1971
  direct_messages_topic_id?: number;
@@ -1936,7 +2038,7 @@ export type ApiMethods<F> = {
1936
2038
  description: string;
1937
2039
  /** Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use it for your internal processes. */
1938
2040
  payload: string;
1939
- /** Payment provider token, obtained via @BotFather. Pass an empty string for payments in Telegram Stars. */
2041
+ /** Payment provider token, obtained via `@BotFather`. Pass an empty string for payments in Telegram Stars. */
1940
2042
  provider_token?: string;
1941
2043
  /** Three-letter ISO 4217 currency code, see more on currencies */
1942
2044
  currency: string;
@@ -2025,7 +2127,7 @@ export type ApiMethods<F> = {
2025
2127
  }): true;
2026
2128
  /** Verifies a chat on behalf of the organization which is represented by the bot. Returns True on success. */
2027
2129
  verifyChat(args: {
2028
- /** Unique identifier for the target chat or username of the target channel (in the format @channelusername). Channel direct messages chats can't be verified. */
2130
+ /** 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
2131
  chat_id: number | string;
2030
2132
  /** Custom description for the verification; 0-70 characters. Must be empty if the organization isn't allowed to provide a custom verification description. */
2031
2133
  custom_description?: string;
@@ -2037,7 +2139,7 @@ export type ApiMethods<F> = {
2037
2139
  }): true;
2038
2140
  /** Removes verification from a chat that is currently verified on behalf of the organization represented by the bot. Returns True on success. */
2039
2141
  removeChatVerification(args: {
2040
- /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
2142
+ /** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
2041
2143
  chat_id: number | string;
2042
2144
  }): true;
2043
2145
  /** 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 +2166,7 @@ export type ApiMethods<F> = {
2064
2166
  business_connection_id?: string;
2065
2167
  /** Unique identifier for the target chat. Games can't be sent to channel direct messages chats and channel chats. */
2066
2168
  chat_id: number;
2067
- /** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
2169
+ /** 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
2170
  message_thread_id?: number;
2069
2171
  /** Short name of the game, serves as the unique identifier for the game. Set up your games via BotFather. */
2070
2172
  game_short_name: string;
@@ -2264,7 +2366,7 @@ export interface InputPaidMediaVideo<F> {
2264
2366
  /** 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
2367
  media: F | string;
2266
2368
  /** 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 | string;
2369
+ thumbnail?: F;
2268
2370
  /** 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
2371
  cover?: F | string;
2270
2372
  /** Start timestamp for the video in the message */