@grammyjs/types 2.8.0 → 2.9.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/README.md CHANGED
@@ -82,7 +82,7 @@ The actual type definitions themselves are never different.
82
82
  1. No formatting.
83
83
  We do not leverage the markdown capabilities of JSDoc for the sake of easier copying and thus reduced maintenance efforts.
84
84
  2. No mentions of `JSON-serialized`.
85
- As underlying libraries handle serialization, these words are removed from the explantions.
85
+ As underlying libraries handle serialization, these words are removed from the explanations.
86
86
  3. No mentions of integer numbers that exceed 2^31 but not 2^51.
87
87
  All numbers are 64-bit floats in JS, so this is irrelevant.
88
88
  Note that JS bit operators cast numbers to 32-bit integers and back, but we deliberately ignore this because people who use bit operators on identifiers or file sizes should know what they're doing, and they should also know that it's a bad idea.
package/inline.d.ts CHANGED
@@ -78,7 +78,7 @@ export interface InlineQueryResultArticle {
78
78
  reply_markup?: InlineKeyboardMarkup;
79
79
  /** URL of the result */
80
80
  url?: string;
81
- /** Pass True, if you don't want the URL to be shown in the message */
81
+ /** Pass True if you don't want the URL to be shown in the message */
82
82
  hide_url?: boolean;
83
83
  /** Short description of the result */
84
84
  description?: string;
@@ -691,19 +691,19 @@ export interface InputInvoiceMessageContent {
691
691
  photo_width?: number;
692
692
  /** Photo height */
693
693
  photo_height?: number;
694
- /** Pass True, if you require the user's full name to complete the order */
694
+ /** Pass True if you require the user's full name to complete the order */
695
695
  need_name?: boolean;
696
- /** Pass True, if you require the user's phone number to complete the order */
696
+ /** Pass True if you require the user's phone number to complete the order */
697
697
  need_phone_number?: boolean;
698
- /** Pass True, if you require the user's email address to complete the order */
698
+ /** Pass True if you require the user's email address to complete the order */
699
699
  need_email?: boolean;
700
- /** Pass True, if you require the user's shipping address to complete the order */
700
+ /** Pass True if you require the user's shipping address to complete the order */
701
701
  need_shipping_address?: boolean;
702
- /** Pass True, if the user's phone number should be sent to provider */
702
+ /** Pass True if the user's phone number should be sent to provider */
703
703
  send_phone_number_to_provider?: boolean;
704
- /** Pass True, if the user's email address should be sent to provider */
704
+ /** Pass True if the user's email address should be sent to provider */
705
705
  send_email_to_provider?: boolean;
706
- /** Pass True, if the final price depends on the shipping method */
706
+ /** Pass True if the final price depends on the shipping method */
707
707
  is_flexible?: boolean;
708
708
  }
709
709
 
package/manage.d.ts CHANGED
@@ -143,6 +143,8 @@ export namespace Chat {
143
143
  bio?: string;
144
144
  /** True, if privacy settings of the other party in the private chat allows to use tg://user?id=<user_id> links only in chats with the user. Returned only in getChat. */
145
145
  has_private_forwards?: true;
146
+ /** True, if the privacy settings of the other party restrict sending voice and video note messages in the private chat. Returned only in getChat. */
147
+ has_restricted_voice_and_video_messages?: true;
146
148
  }
147
149
  /** Internal type representing group chats returned from `getChat`. */
148
150
  export interface GroupGetChat extends GroupChat, MultiUserGetChat {}
package/markup.d.ts CHANGED
@@ -69,7 +69,7 @@ export type InlineKeyboardButton =
69
69
  /** This object represents a parameter of the inline keyboard button used to automatically authorize a user. Serves as a great replacement for the Telegram Login Widget when the user is coming from Telegram. All the user needs to do is tap/click a button and confirm that they want to log in.
70
70
  Telegram apps support these buttons as of version 5.7. */
71
71
  export interface LoginUrl {
72
- /** An HTTP URL to be opened with user authorization data added to the query string when the button is pressed. If the user refuses to provide authorization data, the original URL without information about the user will be opened. The data added is the same as described in Receiving authorization data.
72
+ /** An HTTPS URL to be opened with user authorization data added to the query string when the button is pressed. If the user refuses to provide authorization data, the original URL without information about the user will be opened. The data added is the same as described in Receiving authorization data.
73
73
 
74
74
  NOTE: You must always check the hash of the received data to verify the authentication and the integrity of the data as described in Checking authorization. */
75
75
  url: string;
package/message.d.ts CHANGED
@@ -315,7 +315,7 @@ export type ParseMode = "Markdown" | "MarkdownV2" | "HTML";
315
315
 
316
316
  export namespace MessageEntity {
317
317
  interface AbstractMessageEntity {
318
- /** Type of the entity. Currently, can be “mention” (@username), “hashtag” (#hashtag), “cashtag” ($USD), “bot_command” (/start@jobs_bot), “url” (https://telegram.org), “email” (do-not-reply@telegram.org), “phone_number” (+1-212-555-0123), “bold” (bold text), “italic” (italic text), “underline” (underlined text), “strikethrough” (strikethrough text), “spoiler” (spoiler message), “code” (monowidth string), “pre” (monowidth block), “text_link” (for clickable text URLs), “text_mention” (for users without usernames) */
318
+ /** Type of the entity. Currently, can be “mention” (@username), “hashtag” (#hashtag), “cashtag” ($USD), “bot_command” (/start@jobs_bot), “url” (https://telegram.org), “email” (do-not-reply@telegram.org), “phone_number” (+1-212-555-0123), “bold” (bold text), “italic” (italic text), “underline” (underlined text), “strikethrough” (strikethrough text), “spoiler” (spoiler message), “code” (monowidth string), “pre” (monowidth block), “text_link” (for clickable text URLs), “text_mention” (for users without usernames), “custom_emoji” (for inline custom emoji stickers) */
319
319
  type: string;
320
320
  /** Offset in UTF-16 code units to the start of the entity */
321
321
  offset: number;
@@ -338,6 +338,11 @@ export namespace MessageEntity {
338
338
  | "spoiler"
339
339
  | "code";
340
340
  }
341
+ export interface PreMessageEntity extends AbstractMessageEntity {
342
+ type: "pre";
343
+ /** For “pre” only, the programming language of the entity text */
344
+ language?: string;
345
+ }
341
346
  export interface TextLinkMessageEntity extends AbstractMessageEntity {
342
347
  type: "text_link";
343
348
  /** For “text_link” only, URL that will be opened after user taps on the text */
@@ -348,16 +353,17 @@ export namespace MessageEntity {
348
353
  /** For “text_mention” only, the mentioned user */
349
354
  user: User;
350
355
  }
351
- export interface PreMessageEntity extends AbstractMessageEntity {
352
- type: "pre";
353
- /** For “pre” only, the programming language of the entity text */
354
- language?: string;
356
+ export interface CustomEmojiMessageEntity extends AbstractMessageEntity {
357
+ type: "custom_emoji";
358
+ /** For “custom_emoji” only, unique identifier of the custom emoji. Use getCustomEmojiStickers to get full information about the sticker */
359
+ custom_emoji_id: string;
355
360
  }
356
361
  }
357
362
 
358
363
  /** This object represents one special entity in a text message. For example, hashtags, usernames, URLs, etc. */
359
364
  export type MessageEntity =
360
365
  | MessageEntity.CommonMessageEntity
366
+ | MessageEntity.CustomEmojiMessageEntity
361
367
  | MessageEntity.PreMessageEntity
362
368
  | MessageEntity.TextLinkMessageEntity
363
369
  | MessageEntity.TextMentionMessageEntity;
@@ -643,6 +649,8 @@ export interface Sticker {
643
649
  file_id: string;
644
650
  /** Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file. */
645
651
  file_unique_id: string;
652
+ /** Type of the sticker, currently one of “regular”, “mask”, “custom_emoji”. The type of the sticker is independent from its format, which is determined by the fields is_animated and is_video. */
653
+ type: "regular" | "mask" | "custom_emoji";
646
654
  /** Sticker width */
647
655
  width: number;
648
656
  /** Sticker height */
@@ -657,10 +665,12 @@ export interface Sticker {
657
665
  emoji?: string;
658
666
  /** Name of the sticker set to which the sticker belongs */
659
667
  set_name?: string;
660
- /** Premium animation for the sticker, if the sticker is premium */
668
+ /** For premium regular stickers, premium animation for the sticker */
661
669
  premium_animation?: File;
662
670
  /** For mask stickers, the position where the mask should be placed */
663
671
  mask_position?: MaskPosition;
672
+ /** For custom emoji stickers, unique identifier of the custom emoji */
673
+ custom_emoji_id?: string;
664
674
  /** File size in bytes */
665
675
  file_size?: number;
666
676
  }
@@ -671,12 +681,12 @@ export interface StickerSet {
671
681
  name: string;
672
682
  /** Sticker set title */
673
683
  title: string;
684
+ /** Type of stickers in the set, currently one of “regular”, “mask”, “custom_emoji” */
685
+ sticker_type: "regular" | "mask" | "custom_emoji";
674
686
  /** True, if the sticker set contains animated stickers */
675
687
  is_animated: boolean;
676
688
  /** True, if the sticker set contains video stickers */
677
689
  is_video: boolean;
678
- /** True, if the sticker set contains masks */
679
- contains_masks: boolean;
680
690
  /** List of all set stickers */
681
691
  stickers: Sticker[];
682
692
  /** Sticker set thumbnail in the .WEBP, .TGS, or .WEBM format */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@grammyjs/types",
3
- "version": "2.8.0",
3
+ "version": "2.9.0",
4
4
  "description": "Telegram Bot API type declarations for grammY",
5
5
  "main": "index.js",
6
6
  "repository": {
package/proxied.d.ts CHANGED
@@ -12,6 +12,8 @@ import {
12
12
  ChatFromGetChat,
13
13
  ChatInviteLink,
14
14
  ChatMember,
15
+ ChatMemberAdministrator,
16
+ ChatMemberOwner,
15
17
  ChatPermissions,
16
18
  File,
17
19
  UserFromGetMe,
@@ -27,6 +29,7 @@ import {
27
29
  ParseMode,
28
30
  Poll,
29
31
  SentWebAppMessage,
32
+ Sticker,
30
33
  StickerSet,
31
34
  } from "./message";
32
35
  import { PassportElementError } from "./passport";
@@ -48,7 +51,7 @@ export interface InputFileProxy<F> {
48
51
 
49
52
  /** Wrapper type to bundle all methods of the Telegram API */
50
53
  Telegram: {
51
- /** Use this method to receive incoming updates using long polling (wiki). An Array of Update objects is returned.
54
+ /** Use this method to receive incoming updates using long polling (wiki). Returns an Array of Update objects.
52
55
 
53
56
  Notes
54
57
  1. This method will not work if an outgoing webhook is set up.
@@ -86,12 +89,13 @@ export interface InputFileProxy<F> {
86
89
  /** The maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery, 1-100. Defaults to 40. Use lower values to limit the load on your bot's server, and higher values to increase your bot's throughput. */
87
90
  max_connections?: number;
88
91
  /** 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.
89
- 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. */
90
- allowed_updates?: ReadonlyArray<Exclude<keyof Update, "update_id">>;
91
- /** Pass True to drop all pending updates */
92
- drop_pending_updates?: boolean;
93
- /** 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. */
94
- secret_token?: string;
92
+
93
+ 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. */
94
+ allowed_updates?: ReadonlyArray<Exclude<keyof Update, "update_id">>;
95
+ /** Pass True to drop all pending updates */
96
+ drop_pending_updates?: boolean;
97
+ /** 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. */
98
+ secret_token?: string;
95
99
  }): true;
96
100
 
97
101
  /** Use this method to remove webhook integration if you decide to switch back to getUpdates. Returns True on success. */
@@ -130,7 +134,7 @@ export interface InputFileProxy<F> {
130
134
  protect_content?: boolean;
131
135
  /** If the message is a reply, ID of the original message */
132
136
  reply_to_message_id?: number;
133
- /** Pass True, if the message should be sent even if the specified replied-to message is not found */
137
+ /** Pass True if the message should be sent even if the specified replied-to message is not found */
134
138
  allow_sending_without_reply?: boolean;
135
139
  /** 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. */
136
140
  reply_markup?:
@@ -154,7 +158,7 @@ export interface InputFileProxy<F> {
154
158
  message_id: number;
155
159
  }): Message;
156
160
 
157
- /** Use this method to copy messages of any kind. Service messages and invoice messages can't be copied. 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. */
161
+ /** Use this method to copy messages of any kind. Service 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. */
158
162
  copyMessage(args: {
159
163
  /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
160
164
  chat_id: number | string;
@@ -174,7 +178,7 @@ export interface InputFileProxy<F> {
174
178
  protect_content?: boolean;
175
179
  /** If the message is a reply, ID of the original message */
176
180
  reply_to_message_id?: number;
177
- /** Pass True, if the message should be sent even if the specified replied-to message is not found */
181
+ /** Pass True if the message should be sent even if the specified replied-to message is not found */
178
182
  allow_sending_without_reply?: boolean;
179
183
  /** 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. */
180
184
  reply_markup?:
@@ -202,7 +206,7 @@ export interface InputFileProxy<F> {
202
206
  protect_content?: boolean;
203
207
  /** If the message is a reply, ID of the original message */
204
208
  reply_to_message_id?: number;
205
- /** Pass True, if the message should be sent even if the specified replied-to message is not found */
209
+ /** Pass True if the message should be sent even if the specified replied-to message is not found */
206
210
  allow_sending_without_reply?: boolean;
207
211
  /** 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. */
208
212
  reply_markup?:
@@ -240,7 +244,7 @@ export interface InputFileProxy<F> {
240
244
  protect_content?: boolean;
241
245
  /** If the message is a reply, ID of the original message */
242
246
  reply_to_message_id?: number;
243
- /** Pass True, if the message should be sent even if the specified replied-to message is not found */
247
+ /** Pass True if the message should be sent even if the specified replied-to message is not found */
244
248
  allow_sending_without_reply?: boolean;
245
249
  /** 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. */
246
250
  reply_markup?:
@@ -272,7 +276,7 @@ export interface InputFileProxy<F> {
272
276
  protect_content?: boolean;
273
277
  /** If the message is a reply, ID of the original message */
274
278
  reply_to_message_id?: number;
275
- /** Pass True, if the message should be sent even if the specified replied-to message is not found */
279
+ /** Pass True if the message should be sent even if the specified replied-to message is not found */
276
280
  allow_sending_without_reply?: boolean;
277
281
  /** 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. */
278
282
  reply_markup?:
@@ -302,7 +306,7 @@ export interface InputFileProxy<F> {
302
306
  parse_mode?: ParseMode;
303
307
  /** A list of special entities that appear in the caption, which can be specified instead of parse_mode */
304
308
  caption_entities?: MessageEntity[];
305
- /** Pass True, if the uploaded video is suitable for streaming */
309
+ /** Pass True if the uploaded video is suitable for streaming */
306
310
  supports_streaming?: boolean;
307
311
  /** Sends the message silently. Users will receive a notification with no sound. */
308
312
  disable_notification?: boolean;
@@ -310,7 +314,7 @@ export interface InputFileProxy<F> {
310
314
  protect_content?: boolean;
311
315
  /** If the message is a reply, ID of the original message */
312
316
  reply_to_message_id?: number;
313
- /** Pass True, if the message should be sent even if the specified replied-to message is not found */
317
+ /** Pass True if the message should be sent even if the specified replied-to message is not found */
314
318
  allow_sending_without_reply?: boolean;
315
319
  /** 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
320
  reply_markup?:
@@ -346,7 +350,7 @@ export interface InputFileProxy<F> {
346
350
  protect_content?: boolean;
347
351
  /** If the message is a reply, ID of the original message */
348
352
  reply_to_message_id?: number;
349
- /** Pass True, if the message should be sent even if the specified replied-to message is not found */
353
+ /** Pass True if the message should be sent even if the specified replied-to message is not found */
350
354
  allow_sending_without_reply?: boolean;
351
355
  /** 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. */
352
356
  reply_markup?:
@@ -376,7 +380,7 @@ export interface InputFileProxy<F> {
376
380
  protect_content?: boolean;
377
381
  /** If the message is a reply, ID of the original message */
378
382
  reply_to_message_id?: number;
379
- /** Pass True, if the message should be sent even if the specified replied-to message is not found */
383
+ /** Pass True if the message should be sent even if the specified replied-to message is not found */
380
384
  allow_sending_without_reply?: boolean;
381
385
  /** 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. */
382
386
  reply_markup?:
@@ -405,7 +409,7 @@ export interface InputFileProxy<F> {
405
409
  protect_content?: boolean;
406
410
  /** If the message is a reply, ID of the original message */
407
411
  reply_to_message_id?: number;
408
- /** Pass True, if the message should be sent even if the specified replied-to message is not found */
412
+ /** Pass True if the message should be sent even if the specified replied-to message is not found */
409
413
  allow_sending_without_reply?: boolean;
410
414
  /** 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. */
411
415
  reply_markup?:
@@ -432,7 +436,7 @@ export interface InputFileProxy<F> {
432
436
  protect_content?: boolean;
433
437
  /** If messages are a reply, ID of the original message */
434
438
  reply_to_message_id?: number;
435
- /** Pass True, if the message should be sent even if the specified replied-to message is not found */
439
+ /** Pass True if the message should be sent even if the specified replied-to message is not found */
436
440
  allow_sending_without_reply?: boolean;
437
441
  }): Array<
438
442
  | Message.AudioMessage
@@ -463,7 +467,7 @@ export interface InputFileProxy<F> {
463
467
  protect_content?: boolean;
464
468
  /** If the message is a reply, ID of the original message */
465
469
  reply_to_message_id?: number;
466
- /** Pass True, if the message should be sent even if the specified replied-to message is not found */
470
+ /** Pass True if the message should be sent even if the specified replied-to message is not found */
467
471
  allow_sending_without_reply?: boolean;
468
472
  /** 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. */
469
473
  reply_markup?:
@@ -533,7 +537,7 @@ export interface InputFileProxy<F> {
533
537
  protect_content?: boolean;
534
538
  /** If the message is a reply, ID of the original message */
535
539
  reply_to_message_id?: number;
536
- /** Pass True, if the message should be sent even if the specified replied-to message is not found */
540
+ /** Pass True if the message should be sent even if the specified replied-to message is not found */
537
541
  allow_sending_without_reply?: boolean;
538
542
  /** 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. */
539
543
  reply_markup?:
@@ -561,7 +565,7 @@ export interface InputFileProxy<F> {
561
565
  protect_content?: boolean;
562
566
  /** If the message is a reply, ID of the original message */
563
567
  reply_to_message_id?: number;
564
- /** Pass True, if the message should be sent even if the specified replied-to message is not found */
568
+ /** Pass True if the message should be sent even if the specified replied-to message is not found */
565
569
  allow_sending_without_reply?: boolean;
566
570
  /** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove keyboard or to force a reply from the user. */
567
571
  reply_markup?:
@@ -597,7 +601,7 @@ export interface InputFileProxy<F> {
597
601
  open_period?: number;
598
602
  /** Point in time (Unix timestamp) when the poll will be automatically closed. Must be at least 5 and no more than 600 seconds in the future. Can't be used together with open_period. */
599
603
  close_date?: number;
600
- /** Pass True, if the poll needs to be immediately closed. This can be useful for poll preview. */
604
+ /** Pass True if the poll needs to be immediately closed. This can be useful for poll preview. */
601
605
  is_closed?: boolean;
602
606
  /** Sends the message silently. Users will receive a notification with no sound. */
603
607
  disable_notification?: boolean;
@@ -605,7 +609,7 @@ export interface InputFileProxy<F> {
605
609
  protect_content?: boolean;
606
610
  /** If the message is a reply, ID of the original message */
607
611
  reply_to_message_id?: number;
608
- /** Pass True, if the message should be sent even if the specified replied-to message is not found */
612
+ /** Pass True if the message should be sent even if the specified replied-to message is not found */
609
613
  allow_sending_without_reply?: boolean;
610
614
  /** 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. */
611
615
  reply_markup?:
@@ -627,7 +631,7 @@ export interface InputFileProxy<F> {
627
631
  protect_content?: boolean;
628
632
  /** If the message is a reply, ID of the original message */
629
633
  reply_to_message_id?: number;
630
- /** Pass True, if the message should be sent even if the specified replied-to message is not found */
634
+ /** Pass True if the message should be sent even if the specified replied-to message is not found */
631
635
  allow_sending_without_reply?: boolean;
632
636
  /** 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. */
633
637
  reply_markup?:
@@ -722,27 +726,27 @@ export interface InputFileProxy<F> {
722
726
  chat_id: number | string;
723
727
  /** Unique identifier of the target user */
724
728
  user_id: number;
725
- /** Pass True, if the administrator's presence in the chat is hidden */
729
+ /** Pass True if the administrator's presence in the chat is hidden */
726
730
  is_anonymous?: boolean;
727
- /** Pass True, if the administrator can access the chat event log, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege */
731
+ /** Pass True if the administrator can access the chat event log, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege */
728
732
  can_manage_chat?: boolean;
729
- /** Pass True, if the administrator can create channel posts, channels only */
733
+ /** Pass True if the administrator can create channel posts, channels only */
730
734
  can_post_messages?: boolean;
731
- /** Pass True, if the administrator can edit messages of other users and can pin messages, channels only */
735
+ /** Pass True if the administrator can edit messages of other users and can pin messages, channels only */
732
736
  can_edit_messages?: boolean;
733
- /** Pass True, if the administrator can delete messages of other users */
737
+ /** Pass True if the administrator can delete messages of other users */
734
738
  can_delete_messages?: boolean;
735
- /** Pass True, if the administrator can manage video chats */
739
+ /** Pass True if the administrator can manage video chats */
736
740
  can_manage_video_chats?: boolean;
737
- /** Pass True, if the administrator can restrict, ban or unban chat members */
741
+ /** Pass True if the administrator can restrict, ban or unban chat members */
738
742
  can_restrict_members?: boolean;
739
- /** Pass True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by him) */
743
+ /** Pass True if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by him) */
740
744
  can_promote_members?: boolean;
741
- /** Pass True, if the administrator can change chat title, photo and other settings */
745
+ /** Pass True if the administrator can change chat title, photo and other settings */
742
746
  can_change_info?: boolean;
743
- /** Pass True, if the administrator can invite new users to the chat */
747
+ /** Pass True if the administrator can invite new users to the chat */
744
748
  can_invite_users?: boolean;
745
- /** Pass True, if the administrator can pin messages, supergroups only */
749
+ /** Pass True if the administrator can pin messages, supergroups only */
746
750
  can_pin_messages?: boolean;
747
751
  }): true;
748
752
 
@@ -878,7 +882,7 @@ export interface InputFileProxy<F> {
878
882
  chat_id: number | string;
879
883
  /** Identifier of a message to pin */
880
884
  message_id: number;
881
- /** Pass True, if it is not necessary to send a notification to all chat members about the new pinned message. Notifications are always disabled in channels and private chats. */
885
+ /** Pass True if it is not necessary to send a notification to all chat members about the new pinned message. Notifications are always disabled in channels and private chats. */
882
886
  disable_notification?: boolean;
883
887
  }): true;
884
888
 
@@ -908,11 +912,11 @@ export interface InputFileProxy<F> {
908
912
  chat_id: number | string;
909
913
  }): ChatFromGetChat;
910
914
 
911
- /** Use this method to get a list of administrators in a chat. On success, returns an Array of ChatMember objects that contains information about all chat administrators except other bots. If the chat is a group or a supergroup and no administrators were appointed, only the creator will be returned. */
915
+ /** Use this method to get a list of administrators in a chat, which aren't bots. Returns an Array of ChatMember objects. */
912
916
  getChatAdministrators(args: {
913
917
  /** Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername) */
914
918
  chat_id: number | string;
915
- }): ChatMember[];
919
+ }): Array<ChatMemberOwner | ChatMemberAdministrator>;
916
920
 
917
921
  /** Use this method to get the number of members in a chat. Returns Int on success.
918
922
  * @deprecated Use `getChatMemberCount` instead. */
@@ -982,7 +986,7 @@ export interface InputFileProxy<F> {
982
986
  language_code?: string;
983
987
  }): true;
984
988
 
985
- /** Use this method to get the current list of the bot's commands for the given scope and user language. Returns Array of BotCommand on success. If commands aren't set, an empty list is returned. */
989
+ /** Use this method to get the current list of the bot's commands for the given scope and user language. Returns an Array of BotCommand objects. If commands aren't set, an empty list is returned. */
986
990
  getMyCommands(args: {
987
991
  /** An object, describing scope of users. Defaults to BotCommandScopeDefault. */
988
992
  scope?: BotCommandScope;
@@ -1126,7 +1130,7 @@ export interface InputFileProxy<F> {
1126
1130
  protect_content?: boolean;
1127
1131
  /** If the message is a reply, ID of the original message */
1128
1132
  reply_to_message_id?: number;
1129
- /** Pass True, if the message should be sent even if the specified replied-to message is not found */
1133
+ /** Pass True if the message should be sent even if the specified replied-to message is not found */
1130
1134
  allow_sending_without_reply?: boolean;
1131
1135
  /** 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. */
1132
1136
  reply_markup?:
@@ -1142,6 +1146,12 @@ export interface InputFileProxy<F> {
1142
1146
  name: string;
1143
1147
  }): StickerSet;
1144
1148
 
1149
+ /** Use this method to get information about custom emoji stickers by their identifiers. Returns an Array of Sticker objects. */
1150
+ getCustomEmojiStickers(args: {
1151
+ /** List of custom emoji identifiers. At most 200 custom emoji identifiers can be specified. */
1152
+ custom_emoji_ids: string[];
1153
+ }): Sticker[];
1154
+
1145
1155
  /** Use this method to upload a .PNG file with a sticker for later use in createNewStickerSet and addStickerToSet methods (can be used multiple times). Returns the uploaded File on success. */
1146
1156
  uploadStickerFile(args: {
1147
1157
  /** User identifier of sticker file owner */
@@ -1164,10 +1174,10 @@ export interface InputFileProxy<F> {
1164
1174
  tgs_sticker?: F;
1165
1175
  /** WEBM video with the sticker, uploaded using multipart/form-data. See https://core.telegram.org/stickers#video-sticker-requirements for technical requirements */
1166
1176
  webm_sticker?: F;
1177
+ /** Type of stickers in the set, pass “regular” or “mask”. Custom emoji sticker sets can't be created via the Bot API at the moment. By default, a regular sticker set is created. */
1178
+ sticker_type?: "regular" | "mask";
1167
1179
  /** One or more emoji corresponding to the sticker */
1168
1180
  emojis: string;
1169
- /** Pass True, if a set of mask stickers should be created */
1170
- contains_masks?: boolean;
1171
1181
  /** An object for position where the mask should be placed on faces */
1172
1182
  mask_position?: MaskPosition;
1173
1183
  }): true;
@@ -1225,7 +1235,7 @@ export interface InputFileProxy<F> {
1225
1235
  results: readonly InlineQueryResult[];
1226
1236
  /** The maximum amount of time in seconds that the result of the inline query may be cached on the server. Defaults to 300. */
1227
1237
  cache_time?: number;
1228
- /** Pass True, if results may be cached on the server side only for the user that sent the query. By default, results may be returned to any user who sends the same query */
1238
+ /** Pass True if results may be cached on the server side only for the user that sent the query. By default, results may be returned to any user who sends the same query */
1229
1239
  is_personal?: boolean;
1230
1240
  /** Pass the offset that a client should send in the next query with the same text to receive more results. Pass an empty string if there are no more results or if you don't support pagination. Offset length can't exceed 64 bytes. */
1231
1241
  next_offset?: string;
@@ -1275,19 +1285,19 @@ export interface InputFileProxy<F> {
1275
1285
  photo_width?: number;
1276
1286
  /** Photo height */
1277
1287
  photo_height?: number;
1278
- /** Pass True, if you require the user's full name to complete the order */
1288
+ /** Pass True if you require the user's full name to complete the order */
1279
1289
  need_name?: boolean;
1280
- /** Pass True, if you require the user's phone number to complete the order */
1290
+ /** Pass True if you require the user's phone number to complete the order */
1281
1291
  need_phone_number?: boolean;
1282
- /** Pass True, if you require the user's email address to complete the order */
1292
+ /** Pass True if you require the user's email address to complete the order */
1283
1293
  need_email?: boolean;
1284
- /** Pass True, if you require the user's shipping address to complete the order */
1294
+ /** Pass True if you require the user's shipping address to complete the order */
1285
1295
  need_shipping_address?: boolean;
1286
- /** Pass True, if the user's phone number should be sent to provider */
1296
+ /** Pass True if the user's phone number should be sent to provider */
1287
1297
  send_phone_number_to_provider?: boolean;
1288
- /** Pass True, if the user's email address should be sent to provider */
1298
+ /** Pass True if the user's email address should be sent to provider */
1289
1299
  send_email_to_provider?: boolean;
1290
- /** Pass True, if the final price depends on the shipping method */
1300
+ /** Pass True if the final price depends on the shipping method */
1291
1301
  is_flexible?: boolean;
1292
1302
  /** Sends the message silently. Users will receive a notification with no sound. */
1293
1303
  disable_notification?: boolean;
@@ -1295,7 +1305,7 @@ export interface InputFileProxy<F> {
1295
1305
  protect_content?: boolean;
1296
1306
  /** If the message is a reply, ID of the original message */
1297
1307
  reply_to_message_id?: number;
1298
- /** Pass True, if the message should be sent even if the specified replied-to message is not found */
1308
+ /** Pass True if the message should be sent even if the specified replied-to message is not found */
1299
1309
  allow_sending_without_reply?: boolean;
1300
1310
  /** An object for an inline keyboard. If empty, one 'Pay total price' button will be shown. If not empty, the first button must be a Pay button. */
1301
1311
  reply_markup?: InlineKeyboardMarkup;
@@ -1329,19 +1339,19 @@ export interface InputFileProxy<F> {
1329
1339
  photo_width?: number;
1330
1340
  /** Photo height */
1331
1341
  photo_height?: number;
1332
- /** Pass True, if you require the user's full name to complete the order */
1342
+ /** Pass True if you require the user's full name to complete the order */
1333
1343
  need_name?: boolean;
1334
- /** Pass True, if you require the user's phone number to complete the order */
1344
+ /** Pass True if you require the user's phone number to complete the order */
1335
1345
  need_phone_number?: boolean;
1336
- /** Pass True, if you require the user's email address to complete the order */
1346
+ /** Pass True if you require the user's email address to complete the order */
1337
1347
  need_email?: boolean;
1338
- /** Pass True, if you require the user's shipping address to complete the order */
1348
+ /** Pass True if you require the user's shipping address to complete the order */
1339
1349
  need_shipping_address?: boolean;
1340
- /** Pass True, if the user's phone number should be sent to the provider */
1350
+ /** Pass True if the user's phone number should be sent to the provider */
1341
1351
  send_phone_number_to_provider?: boolean;
1342
- /** Pass True, if the user's email address should be sent to the provider */
1352
+ /** Pass True if the user's email address should be sent to the provider */
1343
1353
  send_email_to_provider?: boolean;
1344
- /** Pass True, if the final price depends on the shipping method */
1354
+ /** Pass True if the final price depends on the shipping method */
1345
1355
  is_flexible?: boolean;
1346
1356
  }): string;
1347
1357
 
@@ -1349,7 +1359,7 @@ export interface InputFileProxy<F> {
1349
1359
  answerShippingQuery(args: {
1350
1360
  /** Unique identifier for the query to be answered */
1351
1361
  shipping_query_id: string;
1352
- /** Specify True if delivery to the specified address is possible and False if there are any problems (for example, if delivery to the specified address is not possible) */
1362
+ /** Pass True if delivery to the specified address is possible and False if there are any problems (for example, if delivery to the specified address is not possible) */
1353
1363
  ok: boolean;
1354
1364
  /** Required if ok is True. An array of available shipping options. */
1355
1365
  shipping_options?: readonly ShippingOption[];
@@ -1389,7 +1399,7 @@ export interface InputFileProxy<F> {
1389
1399
  protect_content?: boolean;
1390
1400
  /** If the message is a reply, ID of the original message */
1391
1401
  reply_to_message_id?: number;
1392
- /** Pass True, if the message should be sent even if the specified replied-to message is not found */
1402
+ /** Pass True if the message should be sent even if the specified replied-to message is not found */
1393
1403
  allow_sending_without_reply?: boolean;
1394
1404
  /** An object for an inline keyboard. If empty, one 'Play game_title' button will be shown. If not empty, the first button must launch the game. */
1395
1405
  reply_markup?: InlineKeyboardMarkup;
@@ -1401,9 +1411,9 @@ export interface InputFileProxy<F> {
1401
1411
  user_id: number;
1402
1412
  /** New score, must be non-negative */
1403
1413
  score: number;
1404
- /** Pass True, if the high score is allowed to decrease. This can be useful when fixing mistakes or banning cheaters */
1414
+ /** Pass True if the high score is allowed to decrease. This can be useful when fixing mistakes or banning cheaters */
1405
1415
  force?: boolean;
1406
- /** Pass True, if the game message should not be automatically edited to include the current scoreboard */
1416
+ /** Pass True if the game message should not be automatically edited to include the current scoreboard */
1407
1417
  disable_edit_message?: boolean;
1408
1418
  /** Required if inline_message_id is not specified. Unique identifier for the target chat */
1409
1419
  chat_id?: number;
@@ -1413,7 +1423,7 @@ export interface InputFileProxy<F> {
1413
1423
  inline_message_id?: string;
1414
1424
  }): (Update.Edited & Message.GameMessage) | true;
1415
1425
 
1416
- /** Use this method to get data for high score tables. Will return the score of the specified user and several of their neighbors in a game. On success, returns an Array of GameHighScore objects.
1426
+ /** Use this method to get data for high score tables. Will return the score of the specified user and several of their neighbors in a game. Returns an Array of GameHighScore objects.
1417
1427
 
1418
1428
  This method will currently return scores for the target user, plus two of their closest neighbors on each side. Will also return the top three users if the user and their neighbors are not among them. Please note that this behavior is subject to change. */
1419
1429
  getGameHighScores(args: {
@@ -1475,7 +1485,7 @@ export interface InputFileProxy<F> {
1475
1485
  height?: number;
1476
1486
  /** Video duration in seconds */
1477
1487
  duration?: number;
1478
- /** Pass True, if the uploaded video is suitable for streaming */
1488
+ /** Pass True if the uploaded video is suitable for streaming */
1479
1489
  supports_streaming?: boolean;
1480
1490
  };
1481
1491