@telegram.ts/types 1.3.0 → 1.3.2

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/README.md CHANGED
@@ -5,10 +5,13 @@ The `@telegram.ts/types` package provides comprehensive type declarations for th
5
5
  This package is designed to simplify the development of Telegram bots using `telegramsjs` by providing accurate type annotations for all API methods and objects. It does not contain any executable code.
6
6
 
7
7
  Key Features:
8
+
8
9
  - Type annotations for all API methods and objects
9
10
  - Consistent with the Telegram Bot API documentation
10
11
  - Simplifies handling of JSON-serialized objects
11
12
  - Customization support for InputFile handling
12
13
  - Maintained and updated in sync with the Telegram Bot API
13
14
 
14
- Join the `telegramsjs` community and make building Telegram bots even easier with `@telegram.ts/types`!
15
+ Join the `telegramsjs` community and make building Telegram bots even easier with `@telegram.ts/types`!
16
+
17
+ `@telegram.ts/types` is based on the source code of [@grammyjs/types](https://www.npmjs.com/package/@grammyjs/types?activeTab=readme), with proper attribution and adherence to the original author's licensing terms.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@telegram.ts/types",
3
- "version": "1.3.0",
3
+ "version": "1.3.2",
4
4
  "description": "@telegram.ts/types: Comprehensive Type Declarations for Telegram Bot API with telegramsjs",
5
5
  "main": "src/index.js",
6
6
  "types": "src/index.d.ts",
@@ -23,4 +23,4 @@
23
23
  "src/*.d.ts",
24
24
  "src/index.js"
25
25
  ]
26
- }
26
+ }
@@ -1,6 +1,6 @@
1
1
  import type {
2
2
  InlineQueryResult,
3
- InlineQueryResultsButton
3
+ InlineQueryResultsButton,
4
4
  } from "./inlineTypes.js";
5
5
  import type {
6
6
  BotCommand,
@@ -15,13 +15,13 @@ import type {
15
15
  ForumTopic,
16
16
  UserFromGetMe,
17
17
  UserProfilePhotos,
18
- WebhookInfo
18
+ WebhookInfo,
19
19
  } from "./manageTypes.js";
20
20
  import type {
21
21
  ForceReply,
22
22
  InlineKeyboardMarkup,
23
23
  ReplyKeyboardMarkup,
24
- ReplyKeyboardRemove
24
+ ReplyKeyboardRemove,
25
25
  } from "./markupTypes.js";
26
26
  import type {
27
27
  GameHighScore,
@@ -33,35 +33,28 @@ import type {
33
33
  Poll,
34
34
  SentWebAppMessage,
35
35
  Sticker,
36
- StickerSet
36
+ StickerSet,
37
37
  } from "./messageTypes.js";
38
- import type {
39
- PassportElementError
40
- } from "./passportTypes.js";
41
- import type {
42
- LabeledPrice,
43
- ShippingOption
44
- } from "./invoiceTypes.js";
38
+ import type { PassportElementError } from "./passportTypes.js";
39
+ import type { LabeledPrice, ShippingOption } from "./invoiceTypes.js";
45
40
  import type {
46
41
  BotCommandScope,
47
42
  BotDescription,
48
43
  BotName,
49
44
  BotShortDescription,
50
- MenuButton
45
+ MenuButton,
51
46
  } from "./botCommandTypes.js";
52
- import type {
53
- Update
54
- } from "./updateTypes.js";
47
+ import type { Update } from "./updateTypes.js";
55
48
  /** Extracts the parameters of a given method name */
56
- type Params < F, M extends keyof ApiMethods < F>> = Parameters < ApiMethods < F > [M] >;
49
+ type Params<F, M extends keyof ApiMethods<F>> = Parameters<ApiMethods<F>[M]>;
57
50
  /** Utility type providing the argument type for the given method name or `{}` if the method does not take any parameters */
58
- export type Opts < F > = {
59
- [M in keyof ApiMethods < F >]: Params < F,
60
- M > [0] extends undefined ? {}: NonNullable < Params < F,
61
- M > [0] >;
51
+ export type Opts<F> = {
52
+ [M in keyof ApiMethods<F>]: Params<F, M>[0] extends undefined
53
+ ? {}
54
+ : NonNullable<Params<F, M>[0]>;
62
55
  };
63
56
  /** Wrapper type to bundle all methods of the Telegram Bot API */
64
- export type ApiMethods < F > = {
57
+ export type ApiMethods<F> = {
65
58
  /** Use this method to receive incoming updates using long polling (wiki). Returns an Array of Update objects.
66
59
 
67
60
  Notes
@@ -77,7 +70,7 @@ export type ApiMethods < F > = {
77
70
  /** A list of the update types you want your bot to receive. For example, specify [“message”, “edited_channel_post”, “callback_query”] to only receive updates of these types. See Update for a complete list of available update types. Specify an empty list to receive all update types except chat_member (default). If not specified, the previous setting will be used.
78
71
 
79
72
  Please note that this parameter doesn't affect updates created before the call to the getUpdates, so unwanted updates may be received for a short period of time. */
80
- allowed_updates?: ReadonlyArray < Exclude < keyof Update, "update_id">>;
73
+ allowed_updates?: ReadonlyArray<Exclude<keyof Update, "update_id">>;
81
74
  }): Update[];
82
75
  /** Use this method to specify a URL and receive incoming updates via an outgoing webhook. Whenever there is an update for the bot, we will send an HTTPS POST request to the specified URL, containing a JSON-serialized Update. In case of an unsuccessful request, we will give up after a reasonable amount of attempts. Returns True on success.
83
76
 
@@ -101,7 +94,7 @@ export type ApiMethods < F > = {
101
94
  /** A list of the update types you want your bot to receive. For example, specify [“message”, “edited_channel_post”, “callback_query”] to only receive updates of these types. See Update for a complete list of available update types. Specify an empty list to receive all update types except chat_member (default). If not specified, the previous setting will be used.
102
95
 
103
96
  Please note that this parameter doesn't affect updates created before the call to the setWebhook, so unwanted updates may be received for a short period of time. */
104
- allowed_updates?: ReadonlyArray < Exclude < keyof Update, "update_id">>;
97
+ allowed_updates?: ReadonlyArray<Exclude<keyof Update, "update_id">>;
105
98
  /** Pass True to drop all pending updates */
106
99
  drop_pending_updates?: boolean;
107
100
  /** A secret token to be sent in a header “X-Telegram-Bot-Api-Secret-Token” in every webhook request, 1-256 characters. Only characters A-Z, a-z, 0-9, _ and - are allowed. The header is useful to ensure that the request comes from a webhook set by you. */
@@ -143,7 +136,11 @@ export type ApiMethods < F > = {
143
136
  /** Pass True if the message should be sent even if the specified replied-to message is not found */
144
137
  allow_sending_without_reply?: boolean;
145
138
  /** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user. */
146
- reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
139
+ reply_markup?:
140
+ | InlineKeyboardMarkup
141
+ | ReplyKeyboardMarkup
142
+ | ReplyKeyboardRemove
143
+ | ForceReply;
147
144
  }): Message.TextMessage;
148
145
  /** Use this method to forward messages of any kind. Service messages can't be forwarded. On success, the sent Message is returned. */
149
146
  forwardMessage(args: {
@@ -185,7 +182,11 @@ export type ApiMethods < F > = {
185
182
  /** Pass True if the message should be sent even if the specified replied-to message is not found */
186
183
  allow_sending_without_reply?: boolean;
187
184
  /** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user. */
188
- reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
185
+ reply_markup?:
186
+ | InlineKeyboardMarkup
187
+ | ReplyKeyboardMarkup
188
+ | ReplyKeyboardRemove
189
+ | ForceReply;
189
190
  }): MessageId;
190
191
  /** Use this method to send photos. On success, the sent Message is returned. */
191
192
  sendPhoto(args: {
@@ -212,7 +213,11 @@ export type ApiMethods < F > = {
212
213
  /** Pass True if the message should be sent even if the specified replied-to message is not found */
213
214
  allow_sending_without_reply?: boolean;
214
215
  /** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user. */
215
- reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
216
+ reply_markup?:
217
+ | InlineKeyboardMarkup
218
+ | ReplyKeyboardMarkup
219
+ | ReplyKeyboardRemove
220
+ | ForceReply;
216
221
  }): Message.PhotoMessage;
217
222
  /** Use this method to send audio files, if you want Telegram clients to display them in the music player. Your audio must be in the .MP3 or .M4A format. On success, the sent Message is returned. Bots can currently send audio files of up to 50 MB in size, this limit may be changed in the future.
218
223
 
@@ -247,7 +252,11 @@ export type ApiMethods < F > = {
247
252
  /** Pass True if the message should be sent even if the specified replied-to message is not found */
248
253
  allow_sending_without_reply?: boolean;
249
254
  /** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user. */
250
- reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
255
+ reply_markup?:
256
+ | InlineKeyboardMarkup
257
+ | ReplyKeyboardMarkup
258
+ | ReplyKeyboardRemove
259
+ | ForceReply;
251
260
  }): Message.AudioMessage;
252
261
  /** Use this method to send general files. On success, the sent Message is returned. Bots can currently send files of any type of up to 50 MB in size, this limit may be changed in the future. */
253
262
  sendDocument(args: {
@@ -276,7 +285,11 @@ export type ApiMethods < F > = {
276
285
  /** Pass True if the message should be sent even if the specified replied-to message is not found */
277
286
  allow_sending_without_reply?: boolean;
278
287
  /** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user. */
279
- reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
288
+ reply_markup?:
289
+ | InlineKeyboardMarkup
290
+ | ReplyKeyboardMarkup
291
+ | ReplyKeyboardRemove
292
+ | ForceReply;
280
293
  }): Message.DocumentMessage;
281
294
  /** Use this method to send video files, Telegram clients support MPEG4 videos (other formats may be sent as Document). On success, the sent Message is returned. Bots can currently send video files of up to 50 MB in size, this limit may be changed in the future. */
282
295
  sendVideo(args: {
@@ -313,7 +326,11 @@ export type ApiMethods < F > = {
313
326
  /** Pass True if the message should be sent even if the specified replied-to message is not found */
314
327
  allow_sending_without_reply?: boolean;
315
328
  /** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user. */
316
- reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
329
+ reply_markup?:
330
+ | InlineKeyboardMarkup
331
+ | ReplyKeyboardMarkup
332
+ | ReplyKeyboardRemove
333
+ | ForceReply;
317
334
  }): Message.VideoMessage;
318
335
  /** Use this method to send animation files (GIF or H.264/MPEG-4 AVC video without sound). On success, the sent Message is returned. Bots can currently send animation files of up to 50 MB in size, this limit may be changed in the future. */
319
336
  sendAnimation(args: {
@@ -348,7 +365,11 @@ export type ApiMethods < F > = {
348
365
  /** Pass True if the message should be sent even if the specified replied-to message is not found */
349
366
  allow_sending_without_reply?: boolean;
350
367
  /** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user. */
351
- reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
368
+ reply_markup?:
369
+ | InlineKeyboardMarkup
370
+ | ReplyKeyboardMarkup
371
+ | ReplyKeyboardRemove
372
+ | ForceReply;
352
373
  }): Message.AnimationMessage;
353
374
  /** Use this method to send audio files, if you want Telegram clients to display the file as a playable voice message. For this to work, your audio must be in an .OGG file encoded with OPUS (other formats may be sent as Audio or Document). On success, the sent Message is returned. Bots can currently send voice messages of up to 50 MB in size, this limit may be changed in the future. */
354
375
  sendVoice(args: {
@@ -375,7 +396,11 @@ export type ApiMethods < F > = {
375
396
  /** Pass True if the message should be sent even if the specified replied-to message is not found */
376
397
  allow_sending_without_reply?: boolean;
377
398
  /** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user. */
378
- reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
399
+ reply_markup?:
400
+ | InlineKeyboardMarkup
401
+ | ReplyKeyboardMarkup
402
+ | ReplyKeyboardRemove
403
+ | ForceReply;
379
404
  }): Message.VoiceMessage;
380
405
  /** Use this method to send video messages. On success, the sent Message is returned.
381
406
  As of v.4.0, Telegram clients support rounded square MPEG4 videos of up to 1 minute long. */
@@ -401,7 +426,11 @@ export type ApiMethods < F > = {
401
426
  /** Pass True if the message should be sent even if the specified replied-to message is not found */
402
427
  allow_sending_without_reply?: boolean;
403
428
  /** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user. */
404
- reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
429
+ reply_markup?:
430
+ | InlineKeyboardMarkup
431
+ | ReplyKeyboardMarkup
432
+ | ReplyKeyboardRemove
433
+ | ForceReply;
405
434
  }): Message.VideoNoteMessage;
406
435
  /** Use this method to send a group of photos, videos, documents or audios as an album. Documents and audio files can be only grouped in an album with messages of the same type. On success, an array of Messages that were sent is returned. */
407
436
  sendMediaGroup(args: {
@@ -410,7 +439,12 @@ export type ApiMethods < F > = {
410
439
  /** An array describing messages to be sent, must include 2-10 items */
411
440
  /** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
412
441
  message_thread_id?: number;
413
- media: ReadonlyArray < InputMediaAudio < F > | InputMediaDocument < F > | InputMediaPhoto < F > | InputMediaVideo < F>>;
442
+ media: ReadonlyArray<
443
+ | InputMediaAudio<F>
444
+ | InputMediaDocument<F>
445
+ | InputMediaPhoto<F>
446
+ | InputMediaVideo<F>
447
+ >;
414
448
  /** Sends the messages silently. Users will receive a notification with no sound. */
415
449
  disable_notification?: boolean;
416
450
  /** Protects the contents of the sent messages from forwarding and saving */
@@ -419,7 +453,12 @@ export type ApiMethods < F > = {
419
453
  reply_to_message_id?: number;
420
454
  /** Pass True if the message should be sent even if the specified replied-to message is not found */
421
455
  allow_sending_without_reply?: boolean;
422
- }): Array < Message.AudioMessage | Message.DocumentMessage | Message.PhotoMessage | Message.VideoMessage >;
456
+ }): Array<
457
+ | Message.AudioMessage
458
+ | Message.DocumentMessage
459
+ | Message.PhotoMessage
460
+ | Message.VideoMessage
461
+ >;
423
462
  /** Use this method to send point on the map. On success, the sent Message is returned. */
424
463
  sendLocation(args: {
425
464
  /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
@@ -447,7 +486,11 @@ export type ApiMethods < F > = {
447
486
  /** Pass True if the message should be sent even if the specified replied-to message is not found */
448
487
  allow_sending_without_reply?: boolean;
449
488
  /** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user. */
450
- reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
489
+ reply_markup?:
490
+ | InlineKeyboardMarkup
491
+ | ReplyKeyboardMarkup
492
+ | ReplyKeyboardRemove
493
+ | ForceReply;
451
494
  }): Message.LocationMessage;
452
495
  /** Use this method to edit live location messages. A location can be edited until its live_period expires or editing is explicitly disabled by a call to stopMessageLiveLocation. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned. */
453
496
  editMessageLiveLocation(args: {
@@ -512,7 +555,11 @@ export type ApiMethods < F > = {
512
555
  /** Pass True if the message should be sent even if the specified replied-to message is not found */
513
556
  allow_sending_without_reply?: boolean;
514
557
  /** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user. */
515
- reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
558
+ reply_markup?:
559
+ | InlineKeyboardMarkup
560
+ | ReplyKeyboardMarkup
561
+ | ReplyKeyboardRemove
562
+ | ForceReply;
516
563
  }): Message.VenueMessage;
517
564
  /** Use this method to send phone contacts. On success, the sent Message is returned. */
518
565
  sendContact(args: {
@@ -537,7 +584,11 @@ export type ApiMethods < F > = {
537
584
  /** Pass True if the message should be sent even if the specified replied-to message is not found */
538
585
  allow_sending_without_reply?: boolean;
539
586
  /** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove keyboard or to force a reply from the user. */
540
- reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
587
+ reply_markup?:
588
+ | InlineKeyboardMarkup
589
+ | ReplyKeyboardMarkup
590
+ | ReplyKeyboardRemove
591
+ | ForceReply;
541
592
  }): Message.ContactMessage;
542
593
  /** Use this method to send a native poll. On success, the sent Message is returned. */
543
594
  sendPoll(args: {
@@ -578,7 +629,11 @@ export type ApiMethods < F > = {
578
629
  /** Pass True if the message should be sent even if the specified replied-to message is not found */
579
630
  allow_sending_without_reply?: boolean;
580
631
  /** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user. */
581
- reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
632
+ reply_markup?:
633
+ | InlineKeyboardMarkup
634
+ | ReplyKeyboardMarkup
635
+ | ReplyKeyboardRemove
636
+ | ForceReply;
582
637
  }): Message.PollMessage;
583
638
  /** Use this method to send an animated emoji that will display a random value. On success, the sent Message is returned. */
584
639
  sendDice(args: {
@@ -597,7 +652,11 @@ export type ApiMethods < F > = {
597
652
  /** Pass True if the message should be sent even if the specified replied-to message is not found */
598
653
  allow_sending_without_reply?: boolean;
599
654
  /** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user. */
600
- reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
655
+ reply_markup?:
656
+ | InlineKeyboardMarkup
657
+ | ReplyKeyboardMarkup
658
+ | ReplyKeyboardRemove
659
+ | ForceReply;
601
660
  }): Message.DiceMessage;
602
661
  /** Use this method when you need to tell the user that something is happening on the bot's side. The status is set for 5 seconds or less (when a message arrives from your bot, Telegram clients clear its typing status). Returns True on success.
603
662
 
@@ -608,7 +667,18 @@ export type ApiMethods < F > = {
608
667
  /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
609
668
  chat_id: number | string;
610
669
  /** 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. */
611
- action: "typing" | "upload_photo" | "record_video" | "upload_video" | "record_voice" | "upload_voice" | "upload_document" | "choose_sticker" | "find_location" | "record_video_note" | "upload_video_note";
670
+ action:
671
+ | "typing"
672
+ | "upload_photo"
673
+ | "record_video"
674
+ | "upload_video"
675
+ | "record_voice"
676
+ | "upload_voice"
677
+ | "upload_document"
678
+ | "choose_sticker"
679
+ | "find_location"
680
+ | "record_video_note"
681
+ | "upload_video_note";
612
682
  /** Unique identifier for the target message thread; supergroups only */
613
683
  message_thread_id?: number;
614
684
  }): true;
@@ -629,8 +699,8 @@ export type ApiMethods < F > = {
629
699
  file_id: string;
630
700
  }): File;
631
701
  /** 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.
632
- * @deprecated Use `banChatMember` instead. */
633
- kickChatMember: ApiMethods < F > ["banChatMember"];
702
+ * @deprecated Use `banChatMember` instead. */
703
+ kickChatMember: ApiMethods<F>["banChatMember"];
634
704
  /** 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. */
635
705
  banChatMember(args: {
636
706
  /** Unique identifier for the target group or username of the target supergroup or channel (in the format @channelusername) */
@@ -844,10 +914,10 @@ export type ApiMethods < F > = {
844
914
  getChatAdministrators(args: {
845
915
  /** Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername) */
846
916
  chat_id: number | string;
847
- }): Array < ChatMemberOwner | ChatMemberAdministrator >;
917
+ }): Array<ChatMemberOwner | ChatMemberAdministrator>;
848
918
  /** Use this method to get the number of members in a chat. Returns Int on success.
849
- * @deprecated Use `getChatMemberCount` instead. */
850
- getChatMembersCount: ApiMethods < F > ["getChatMemberCount"];
919
+ * @deprecated Use `getChatMemberCount` instead. */
920
+ getChatMembersCount: ApiMethods<F>["getChatMemberCount"];
851
921
  /** Use this method to get the number of members in a chat. Returns Int on success. */
852
922
  getChatMemberCount(args: {
853
923
  /** Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername) */
@@ -881,7 +951,13 @@ export type ApiMethods < F > = {
881
951
  /** Topic name, 1-128 characters */
882
952
  name: string;
883
953
  /** Color of the topic icon in RGB format. Currently, must be one of 7322096 (0x6FB9F0), 16766590 (0xFFD67E), 13338331 (0xCB86DB), 9367192 (0x8EEE98), 16749490 (0xFF93B2), or 16478047 (0xFB6F5F) */
884
- icon_color?: 0x6FB9F0 | 0xFFD67E | 0xCB86DB | 0x8EEE98 | 0xFF93B2 | 0xFB6F5F;
954
+ icon_color?:
955
+ | 0x6fb9f0
956
+ | 0xffd67e
957
+ | 0xcb86db
958
+ | 0x8eee98
959
+ | 0xff93b2
960
+ | 0xfb6f5f;
885
961
  /** Unique identifier of the custom emoji shown as the topic icon. Use getForumTopicIconStickers to get all allowed custom emoji identifiers. */
886
962
  icon_custom_emoji_id?: string;
887
963
  }): ForumTopic;
@@ -1096,7 +1172,7 @@ export type ApiMethods < F > = {
1096
1172
  /** Required if chat_id and message_id are not specified. Identifier of the inline message */
1097
1173
  inline_message_id?: string;
1098
1174
  /** An object for a new media content of the message */
1099
- media: InputMedia < F >;
1175
+ media: InputMedia<F>;
1100
1176
  /** An object for a new inline keyboard. */
1101
1177
  reply_markup?: InlineKeyboardMarkup;
1102
1178
  }): (Update.Edited & Message) | true;
@@ -1155,7 +1231,11 @@ export type ApiMethods < F > = {
1155
1231
  /** Pass True if the message should be sent even if the specified replied-to message is not found */
1156
1232
  allow_sending_without_reply?: boolean;
1157
1233
  /** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user. */
1158
- reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
1234
+ reply_markup?:
1235
+ | InlineKeyboardMarkup
1236
+ | ReplyKeyboardMarkup
1237
+ | ReplyKeyboardRemove
1238
+ | ForceReply;
1159
1239
  }): Message.StickerMessage;
1160
1240
  /** Use this method to get a sticker set. On success, a StickerSet object is returned. */
1161
1241
  getStickerSet(args: {
@@ -1185,7 +1265,7 @@ export type ApiMethods < F > = {
1185
1265
  /** Sticker set title, 1-64 characters */
1186
1266
  title: string;
1187
1267
  /** A list of 1-50 initial stickers to be added to the sticker set */
1188
- stickers: InputSticker < F > [];
1268
+ stickers: InputSticker<F>[];
1189
1269
  /** Format of the sticker, must be one of “static”, “animated”, “video” */
1190
1270
  sticker_format: "static" | "animated" | "video";
1191
1271
  /** Type of stickers in the set, pass “regular”, “mask”, or “custom_emoji”. By default, a regular sticker set is created. */
@@ -1200,7 +1280,7 @@ export type ApiMethods < F > = {
1200
1280
  /** Sticker set name */
1201
1281
  name: string;
1202
1282
  /** An object with information about the added sticker. If exactly the same sticker had already been added to the set, then the set isn't changed. */
1203
- sticker: InputSticker < F >;
1283
+ sticker: InputSticker<F>;
1204
1284
  }): true;
1205
1285
  /** Use this method to move a sticker in a set created by the bot to a specific position. Returns True on success. */
1206
1286
  setStickerPositionInSet(args: {
@@ -1470,7 +1550,7 @@ export type ApiMethods < F > = {
1470
1550
  }): GameHighScore[];
1471
1551
  };
1472
1552
  /** This object describes a sticker to be added to a sticker set. */
1473
- export interface InputSticker < F > {
1553
+ export interface InputSticker<F> {
1474
1554
  /** The added sticker. Pass a file_id as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. Animated and video stickers can't be uploaded via HTTP URL. */
1475
1555
  sticker: F | string;
1476
1556
  /** List of 1-20 emoji associated with the sticker */
@@ -1486,9 +1566,14 @@ export interface InputSticker < F > {
1486
1566
  - InputMediaAudio
1487
1567
  - InputMediaPhoto
1488
1568
  - InputMediaVideo */
1489
- export type InputMedia < F > = InputMediaAnimation < F > | InputMediaDocument < F > | InputMediaAudio < F > | InputMediaPhoto < F > | InputMediaVideo < F >;
1569
+ export type InputMedia<F> =
1570
+ | InputMediaAnimation<F>
1571
+ | InputMediaDocument<F>
1572
+ | InputMediaAudio<F>
1573
+ | InputMediaPhoto<F>
1574
+ | InputMediaVideo<F>;
1490
1575
  /** Represents a photo to be sent. */
1491
- export interface InputMediaPhoto < F > {
1576
+ export interface InputMediaPhoto<F> {
1492
1577
  /** Type of the result, must be photo */
1493
1578
  type: "photo";
1494
1579
  /** 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. */
@@ -1503,7 +1588,7 @@ export interface InputMediaPhoto < F > {
1503
1588
  has_spoiler?: boolean;
1504
1589
  }
1505
1590
  /** Represents a video to be sent. */
1506
- export interface InputMediaVideo < F > {
1591
+ export interface InputMediaVideo<F> {
1507
1592
  /** Type of the result, must be video */
1508
1593
  type: "video";
1509
1594
  /** 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. */
@@ -1528,7 +1613,7 @@ export interface InputMediaVideo < F > {
1528
1613
  has_spoiler?: boolean;
1529
1614
  }
1530
1615
  /** Represents an animation file (GIF or H.264/MPEG-4 AVC video without sound) to be sent. */
1531
- export interface InputMediaAnimation < F > {
1616
+ export interface InputMediaAnimation<F> {
1532
1617
  /** Type of the result, must be animation */
1533
1618
  type: "animation";
1534
1619
  /** 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. */
@@ -1551,7 +1636,7 @@ export interface InputMediaAnimation < F > {
1551
1636
  has_spoiler?: boolean;
1552
1637
  }
1553
1638
  /** Represents an audio file to be treated as music to be sent. */
1554
- export interface InputMediaAudio < F > {
1639
+ export interface InputMediaAudio<F> {
1555
1640
  /** Type of the result, must be audio */
1556
1641
  type: "audio";
1557
1642
  /** 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. */
@@ -1572,7 +1657,7 @@ export interface InputMediaAudio < F > {
1572
1657
  title?: string;
1573
1658
  }
1574
1659
  /** Represents a general file to be sent. */
1575
- export interface InputMediaDocument < F > {
1660
+ export interface InputMediaDocument<F> {
1576
1661
  /** Type of the result, must be document */
1577
1662
  type: "document";
1578
1663
  /** 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. */
@@ -1588,4 +1673,4 @@ export interface InputMediaDocument < F > {
1588
1673
  /** Disables automatic server-side content type detection for files uploaded using multipart/form-data. Always true, if the document is sent as part of an album. */
1589
1674
  disable_content_type_detection?: boolean;
1590
1675
  }
1591
- export {};
1676
+ export {};