@telegram.ts/types 1.5.0 → 1.6.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@telegram.ts/types",
3
- "version": "1.5.0",
3
+ "version": "1.6.0",
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",
@@ -144,7 +144,7 @@ export type ApiMethods<F> = {
144
144
  | ReplyKeyboardRemove
145
145
  | ForceReply;
146
146
  }): Message.TextMessage;
147
- /** 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. **/
147
+ /** 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. **/
148
148
  forwardMessage(args: {
149
149
  /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
150
150
  chat_id: number | string;
@@ -194,7 +194,7 @@ export type ApiMethods<F> = {
194
194
  disable_notification?: boolean;
195
195
  /** Protects the contents of the sent message from forwarding and saving */
196
196
  protect_content?: boolean;
197
- /** Description of the message to reply to */
197
+ /** Description of the message to reply to */
198
198
  reply_parameters?: ReplyParameters;
199
199
  /** 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. */
200
200
  reply_markup?:
@@ -203,7 +203,7 @@ export type ApiMethods<F> = {
203
203
  | ReplyKeyboardRemove
204
204
  | ForceReply;
205
205
  }): MessageId;
206
- /** 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, 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. */
206
+ /** 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, 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. */
207
207
  copyMessages(args: {
208
208
  /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
209
209
  chat_id: number | string;
@@ -240,7 +240,7 @@ export type ApiMethods<F> = {
240
240
  disable_notification?: boolean;
241
241
  /** Protects the contents of the sent message from forwarding and saving */
242
242
  protect_content?: boolean;
243
- /** Description of the message to reply to */
243
+ /** Description of the message to reply to */
244
244
  reply_parameters?: ReplyParameters;
245
245
  /** 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
246
  reply_markup?:
@@ -277,7 +277,7 @@ export type ApiMethods<F> = {
277
277
  disable_notification?: boolean;
278
278
  /** Protects the contents of the sent message from forwarding and saving */
279
279
  protect_content?: boolean;
280
- /** Description of the message to reply to */
280
+ /** Description of the message to reply to */
281
281
  reply_parameters?: ReplyParameters;
282
282
  /** 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. */
283
283
  reply_markup?:
@@ -308,7 +308,7 @@ export type ApiMethods<F> = {
308
308
  disable_notification?: boolean;
309
309
  /** Protects the contents of the sent message from forwarding and saving */
310
310
  protect_content?: boolean;
311
- /** Description of the message to reply to */
311
+ /** Description of the message to reply to */
312
312
  reply_parameters?: ReplyParameters;
313
313
  /** 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. */
314
314
  reply_markup?:
@@ -347,7 +347,7 @@ export type ApiMethods<F> = {
347
347
  disable_notification?: boolean;
348
348
  /** Protects the contents of the sent message from forwarding and saving */
349
349
  protect_content?: boolean;
350
- /** Description of the message to reply to */
350
+ /** Description of the message to reply to */
351
351
  reply_parameters?: ReplyParameters;
352
352
  /** 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. */
353
353
  reply_markup?:
@@ -384,7 +384,7 @@ export type ApiMethods<F> = {
384
384
  disable_notification?: boolean;
385
385
  /** Protects the contents of the sent message from forwarding and saving */
386
386
  protect_content?: boolean;
387
- /** Description of the message to reply to */
387
+ /** Description of the message to reply to */
388
388
  reply_parameters?: ReplyParameters;
389
389
  /** 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. */
390
390
  reply_markup?:
@@ -413,7 +413,7 @@ export type ApiMethods<F> = {
413
413
  disable_notification?: boolean;
414
414
  /** Protects the contents of the sent message from forwarding and saving */
415
415
  protect_content?: boolean;
416
- /** Description of the message to reply to */
416
+ /** Description of the message to reply to */
417
417
  reply_parameters?: ReplyParameters;
418
418
  /** 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. */
419
419
  reply_markup?:
@@ -441,7 +441,7 @@ export type ApiMethods<F> = {
441
441
  disable_notification?: boolean;
442
442
  /** Protects the contents of the sent message from forwarding and saving */
443
443
  protect_content?: boolean;
444
- /** Description of the message to reply to */
444
+ /** Description of the message to reply to */
445
445
  reply_parameters?: ReplyParameters;
446
446
  /** 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. */
447
447
  reply_markup?:
@@ -467,7 +467,7 @@ export type ApiMethods<F> = {
467
467
  disable_notification?: boolean;
468
468
  /** Protects the contents of the sent messages from forwarding and saving */
469
469
  protect_content?: boolean;
470
- /** Description of the message to reply to */
470
+ /** Description of the message to reply to */
471
471
  reply_parameters?: ReplyParameters;
472
472
  }): Array<
473
473
  | Message.AudioMessage
@@ -497,7 +497,7 @@ export type ApiMethods<F> = {
497
497
  disable_notification?: boolean;
498
498
  /** Protects the contents of the sent message from forwarding and saving */
499
499
  protect_content?: boolean;
500
- /** Description of the message to reply to */
500
+ /** Description of the message to reply to */
501
501
  reply_parameters?: ReplyParameters;
502
502
  /** 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. */
503
503
  reply_markup?:
@@ -564,7 +564,7 @@ export type ApiMethods<F> = {
564
564
  disable_notification?: boolean;
565
565
  /** Protects the contents of the sent message from forwarding and saving */
566
566
  protect_content?: boolean;
567
- /** Description of the message to reply to */
567
+ /** Description of the message to reply to */
568
568
  reply_parameters?: ReplyParameters;
569
569
  /** 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. */
570
570
  reply_markup?:
@@ -591,7 +591,7 @@ export type ApiMethods<F> = {
591
591
  disable_notification?: boolean;
592
592
  /** Protects the contents of the sent message from forwarding and saving */
593
593
  protect_content?: boolean;
594
- /** Description of the message to reply to */
594
+ /** Description of the message to reply to */
595
595
  reply_parameters?: ReplyParameters;
596
596
  /** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove keyboard or to force a reply from the user. */
597
597
  reply_markup?:
@@ -634,7 +634,7 @@ export type ApiMethods<F> = {
634
634
  disable_notification?: boolean;
635
635
  /** Protects the contents of the sent message from forwarding and saving */
636
636
  protect_content?: boolean;
637
- /** Description of the message to reply to */
637
+ /** Description of the message to reply to */
638
638
  reply_parameters?: ReplyParameters;
639
639
  /** 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. */
640
640
  reply_markup?:
@@ -655,7 +655,7 @@ export type ApiMethods<F> = {
655
655
  disable_notification?: boolean;
656
656
  /** Protects the contents of the sent message from forwarding */
657
657
  protect_content?: boolean;
658
- /** Description of the message to reply to */
658
+ /** Description of the message to reply to */
659
659
  reply_parameters?: ReplyParameters;
660
660
  /** 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. */
661
661
  reply_markup?:
@@ -664,7 +664,7 @@ export type ApiMethods<F> = {
664
664
  | ReplyKeyboardRemove
665
665
  | ForceReply;
666
666
  }): Message.DiceMessage;
667
-
667
+
668
668
  /** Use this method to change the chosen reactions on a message. Service messages 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. In albums, bots must react to the first message. Returns True on success. */
669
669
  setMessageReaction(args: {
670
670
  /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
@@ -929,7 +929,7 @@ export type ApiMethods<F> = {
929
929
  /** Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername) */
930
930
  chat_id: number | string;
931
931
  }): true;
932
- /** Use this method to get up to date information about the chat. Returns a Chat object on success. */
932
+ /** Use this method to get up to date information about the chat. Returns a Chat object on success. */
933
933
  getChat(args: {
934
934
  /** Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername) */
935
935
  chat_id: number | string;
@@ -1248,7 +1248,7 @@ export type ApiMethods<F> = {
1248
1248
  /** Identifier of the message to delete */
1249
1249
  message_id: number;
1250
1250
  }): true;
1251
- /** Use this method to delete multiple messages simultaneously. Returns True on success. */
1251
+ /** Use this method to delete multiple messages simultaneously. Returns True on success. */
1252
1252
  deleteMessages(args: {
1253
1253
  /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
1254
1254
  chat_id: number | string;
@@ -1269,7 +1269,7 @@ export type ApiMethods<F> = {
1269
1269
  disable_notification?: boolean;
1270
1270
  /** Protects the contents of the sent message from forwarding and saving */
1271
1271
  protect_content?: boolean;
1272
- /** Description of the message to reply to */
1272
+ /** Description of the message to reply to */
1273
1273
  reply_parameters?: ReplyParameters;
1274
1274
  /** 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. */
1275
1275
  reply_markup?:
@@ -1461,7 +1461,7 @@ export type ApiMethods<F> = {
1461
1461
  disable_notification?: boolean;
1462
1462
  /** Protects the contents of the sent message from forwarding and saving */
1463
1463
  protect_content?: boolean;
1464
- /** Description of the message to reply to */
1464
+ /** Description of the message to reply to */
1465
1465
  reply_parameters?: ReplyParameters;
1466
1466
  /** 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. */
1467
1467
  reply_markup?: InlineKeyboardMarkup;
@@ -1550,7 +1550,7 @@ export type ApiMethods<F> = {
1550
1550
  disable_notification?: boolean;
1551
1551
  /** Protects the contents of the sent message from forwarding and saving */
1552
1552
  protect_content?: boolean;
1553
- /** Description of the message to reply to */
1553
+ /** Description of the message to reply to */
1554
1554
  reply_parameters?: ReplyParameters;
1555
1555
  /** 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. */
1556
1556
  reply_markup?: InlineKeyboardMarkup;
@@ -604,7 +604,7 @@ export interface InputTextMessageContent {
604
604
  parse_mode?: ParseMode;
605
605
  /** List of special entities that appear in message text, which can be specified instead of parse_mode */
606
606
  entities?: MessageEntity[];
607
- /** Link preview generation options for the message */
607
+ /** Link preview generation options for the message */
608
608
  link_preview_options?: LinkPreviewOptions;
609
609
  }
610
610
  /** Represents the content of a location message to be sent as the result of an inline query. */
@@ -1,4 +1,9 @@
1
- import type { Location, Message, PhotoSize, ReactionType } from "./messageTypes";
1
+ import type {
2
+ Location,
3
+ Message,
4
+ PhotoSize,
5
+ ReactionType,
6
+ } from "./messageTypes";
2
7
  import type { Update } from "./updateTypes";
3
8
 
4
9
  /** Describes the current status of a webhook. */
@@ -92,7 +97,9 @@ export declare namespace Chat {
92
97
  }
93
98
  /** Internal type representing super group chats. */
94
99
  export interface SupergroupChat
95
- extends AbstractChat, UserNameChat, TitleChat {
100
+ extends AbstractChat,
101
+ UserNameChat,
102
+ TitleChat {
96
103
  type: "supergroup";
97
104
  /** True, if the supergroup chat is a forum (has topics enabled) */
98
105
  is_forum?: true;
@@ -132,8 +139,6 @@ export declare namespace Chat {
132
139
  interface MultiUserGetChat {
133
140
  /** Default chat member permissions, for groups and supergroups. Returned only in getChat. */
134
141
  permissions?: ChatPermissions;
135
- /** True, if the bot can change the group sticker set. Returned only in getChat. */
136
- can_set_sticker_set?: true;
137
142
  }
138
143
  /** Internal type holding properties that those private and channel chats returned from `getChat` share. */
139
144
  interface NonMultiUserGetChat {
@@ -155,7 +160,10 @@ export declare namespace Chat {
155
160
  // ==> GET CHATS
156
161
  /** Internal type representing private chats returned from `getChat`. */
157
162
  export interface PrivateGetChat
158
- extends PrivateChat, GetChat, NonGroupGetChat, NonMultiUserGetChat {
163
+ extends PrivateChat,
164
+ GetChat,
165
+ NonGroupGetChat,
166
+ NonMultiUserGetChat {
159
167
  /** Bio of the other party in a private chat. Returned only in getChat. */
160
168
  bio?: string;
161
169
  /** 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. */
@@ -165,11 +173,13 @@ export declare namespace Chat {
165
173
  }
166
174
  /** Internal type representing group chats returned from `getChat`. */
167
175
  export interface GroupGetChat
168
- extends GroupChat, GetChat, NonPrivateGetChat, MultiUserGetChat {}
176
+ extends GroupChat,
177
+ GetChat,
178
+ NonPrivateGetChat,
179
+ MultiUserGetChat {}
169
180
  /** Internal type representing supergroup chats returned from `getChat`. */
170
181
  export interface SupergroupGetChat
171
- extends
172
- SupergroupChat,
182
+ extends SupergroupChat,
173
183
  GetChat,
174
184
  NonGroupGetChat,
175
185
  NonPrivateGetChat,
@@ -181,19 +191,24 @@ export declare namespace Chat {
181
191
  join_by_request?: true;
182
192
  /** For supergroups, the minimum allowed delay between consecutive messages sent by each unpriviledged user; in seconds. Returned only in getChat. */
183
193
  slow_mode_delay?: number;
194
+ /** For supergroups, the minimum number of boosts that a non-administrator user needs to add in order to ignore slow mode and chat permissions. Returned only in getChat. */
195
+ unrestrict_boost_count?: number;
184
196
  /** True, if new chat members will have access to old messages; available only to chat administrators. Returned only in getChat. */
185
197
  has_visible_history?: boolean;
186
198
  /** True, if aggressive anti-spam checks are enabled in the supergroup. The field is only available to chat administrators. Returned only in getChat. */
187
199
  has_aggressive_anti_spam_enabled?: true;
188
200
  /** For supergroups, name of group sticker set. Returned only in getChat. */
189
201
  sticker_set_name?: string;
202
+ /** True, if the bot can change the group sticker set. Returned only in getChat. */
203
+ can_set_sticker_set?: true;
204
+ /** For supergroups, the name of the group's custom emoji sticker set. Custom emoji from this set can be used by all users and bots in the group. Returned only in getChat. */
205
+ custom_emoji_sticker_set_name?: string;
190
206
  /** For supergroups, the location to which the supergroup is connected. Returned only in getChat. */
191
207
  location?: ChatLocation;
192
208
  }
193
209
  /** Internal type representing channel chats returned from `getChat`. */
194
210
  export interface ChannelGetChat
195
- extends
196
- ChannelChat,
211
+ extends ChannelChat,
197
212
  GetChat,
198
213
  NonGroupGetChat,
199
214
  NonPrivateGetChat,
@@ -266,7 +281,7 @@ export interface ChatInviteLink {
266
281
  export interface ChatAdministratorRights {
267
282
  /** True, if the user's presence in the chat is hidden */
268
283
  is_anonymous: boolean;
269
- /** True, if the administrator can access the chat event log, boost list in channels, see channel members, report spam messages, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege */
284
+ /** True, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages and ignore slow mode. Implied by any other administrator privilege. */
270
285
  can_manage_chat: boolean;
271
286
  /** True, if the administrator can delete messages of other users */
272
287
  can_delete_messages: boolean;
@@ -286,9 +301,9 @@ export interface ChatAdministratorRights {
286
301
  can_edit_messages?: boolean;
287
302
  /** True, if the user is allowed to pin messages; groups and supergroups only */
288
303
  can_pin_messages?: boolean;
289
- /** True, if the administrator can post stories in the channel; channels only */
304
+ /** True, if the administrator can post stories to the chat */
290
305
  can_post_stories?: boolean;
291
- /** True, if the administrator can edit stories posted by other users; channels only */
306
+ /** True, if the administrator can edit stories posted by other users */
292
307
  can_edit_stories?: boolean;
293
308
  /** True, if the administrator can delete stories posted by other users; channels only */
294
309
  can_delete_stories?: boolean;
@@ -351,7 +366,7 @@ export interface ChatMemberAdministrator {
351
366
  can_be_edited: boolean;
352
367
  /** True, if the user's presence in the chat is hidden */
353
368
  is_anonymous: boolean;
354
- /** True, if the administrator can access the chat event log, boost list in channels, see channel members, report spam messages, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege */
369
+ /** True, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages and ignore slow mode. Implied by any other administrator privilege. */
355
370
  can_manage_chat: boolean;
356
371
  /** True, if the administrator can delete messages of other users */
357
372
  can_delete_messages: boolean;
@@ -371,11 +386,11 @@ export interface ChatMemberAdministrator {
371
386
  can_edit_messages?: boolean;
372
387
  /** True, if the user is allowed to pin messages; groups and supergroups only */
373
388
  can_pin_messages?: boolean;
374
- /** True, if the administrator can post stories in the channel; channels only */
389
+ /** True, if the administrator can post stories to the chat */
375
390
  can_post_stories?: boolean;
376
- /** True, if the administrator can edit stories posted by other users; channels only */
391
+ /** True, if the administrator can edit stories posted by other users */
377
392
  can_edit_stories?: boolean;
378
- /** True, if the administrator can delete stories posted by other users; channels only */
393
+ /** True, if the administrator can delete stories posted by other users */
379
394
  can_delete_stories?: boolean;
380
395
  /** True, if the user is allowed to create, rename, close, and reopen forum topics; supergroups only */
381
396
  can_manage_topics?: boolean;
@@ -595,4 +610,4 @@ export interface ChatBoostRemoved {
595
610
  export interface UserChatBoosts {
596
611
  /** The list of boosts added to the chat by the user */
597
612
  boosts: ChatBoost[];
598
- }
613
+ }
@@ -23,6 +23,8 @@ export declare namespace Message {
23
23
  is_topic_message?: boolean;
24
24
  }
25
25
  export interface CommonMessage extends ServiceMessage {
26
+ /** If the sender of the message boosted the chat, the number of boosts added by the user */
27
+ sender_boost_count?: number;
26
28
  /** Information about the original message for forwarded messages */
27
29
  forward_origin?: MessageOrigin;
28
30
  /** True, if the message is a channel post that was automatically forwarded to the connected discussion group */
@@ -33,6 +35,8 @@ export declare namespace Message {
33
35
  external_reply?: ExternalReplyInfo;
34
36
  /** For replies that quote part of the original message, the quoted part of the message */
35
37
  quote?: TextQuote;
38
+ /** For replies to a story, the original message */
39
+ reply_to_story?: Story;
36
40
  /** Bot through which the message was sent */
37
41
  via_bot?: User;
38
42
  /** Date the message was last edited in Unix time */
@@ -75,92 +79,67 @@ export declare namespace Message {
75
79
  export type PollMessage = CommonMessage & MsgWith<"poll">;
76
80
  export type LocationMessage = CommonMessage & MsgWith<"location">;
77
81
  export type VenueMessage = LocationMessage & MsgWith<"venue">;
78
- export type NewChatMembersMessage =
79
- & ServiceMessage
80
- & MsgWith<"new_chat_members">;
81
- export type LeftChatMemberMessage =
82
- & ServiceMessage
83
- & MsgWith<"left_chat_member">;
82
+ export type NewChatMembersMessage = ServiceMessage &
83
+ MsgWith<"new_chat_members">;
84
+ export type LeftChatMemberMessage = ServiceMessage &
85
+ MsgWith<"left_chat_member">;
84
86
  export type NewChatTitleMessage = ServiceMessage & MsgWith<"new_chat_title">;
85
87
  export type NewChatPhotoMessage = ServiceMessage & MsgWith<"new_chat_photo">;
86
- export type DeleteChatPhotoMessage =
87
- & ServiceMessage
88
- & MsgWith<"delete_chat_photo">;
89
- export type GroupChatCreatedMessage =
90
- & ServiceMessage
91
- & MsgWith<"group_chat_created">;
92
- export type SupergroupChatCreated =
93
- & ServiceMessage
94
- & MsgWith<"supergroup_chat_created">;
95
- export type ChannelChatCreatedMessage =
96
- & ServiceMessage
97
- & MsgWith<"channel_chat_created">;
98
- export type MessageAutoDeleteTimerChangedMessage =
99
- & ServiceMessage
100
- & MsgWith<"message_auto_delete_timer_changed">;
101
- export type MigrateToChatIdMessage =
102
- & ServiceMessage
103
- & MsgWith<"migrate_to_chat_id">;
104
- export type MigrateFromChatIdMessage =
105
- & ServiceMessage
106
- & MsgWith<"migrate_from_chat_id">;
88
+ export type DeleteChatPhotoMessage = ServiceMessage &
89
+ MsgWith<"delete_chat_photo">;
90
+ export type GroupChatCreatedMessage = ServiceMessage &
91
+ MsgWith<"group_chat_created">;
92
+ export type SupergroupChatCreated = ServiceMessage &
93
+ MsgWith<"supergroup_chat_created">;
94
+ export type ChannelChatCreatedMessage = ServiceMessage &
95
+ MsgWith<"channel_chat_created">;
96
+ export type MessageAutoDeleteTimerChangedMessage = ServiceMessage &
97
+ MsgWith<"message_auto_delete_timer_changed">;
98
+ export type MigrateToChatIdMessage = ServiceMessage &
99
+ MsgWith<"migrate_to_chat_id">;
100
+ export type MigrateFromChatIdMessage = ServiceMessage &
101
+ MsgWith<"migrate_from_chat_id">;
107
102
  export type PinnedMessageMessage = ServiceMessage & MsgWith<"pinned_message">;
108
103
  export type InvoiceMessage = ServiceMessage & MsgWith<"invoice">;
109
- export type SuccessfulPaymentMessage =
110
- & ServiceMessage
111
- & MsgWith<"successful_payment">;
104
+ export type SuccessfulPaymentMessage = ServiceMessage &
105
+ MsgWith<"successful_payment">;
112
106
  export type UsersSharedMessage = ServiceMessage & MsgWith<"users_shared">;
113
107
  export type ChatSharedMessage = ServiceMessage & MsgWith<"chat_shared">;
114
- export type ConnectedWebsiteMessage =
115
- & ServiceMessage
116
- & MsgWith<"connected_website">;
117
- export type WriteAccessAllowedMessage =
118
- & ServiceMessage
119
- & MsgWith<"write_access_allowed">;
108
+ export type ConnectedWebsiteMessage = ServiceMessage &
109
+ MsgWith<"connected_website">;
110
+ export type WriteAccessAllowedMessage = ServiceMessage &
111
+ MsgWith<"write_access_allowed">;
120
112
  export type PassportDataMessage = ServiceMessage & MsgWith<"passport_data">;
121
- export type ProximityAlertTriggeredMessage =
122
- & ServiceMessage
123
- & MsgWith<"proximity_alert_triggered">;
124
- export type ForumTopicCreatedMessage =
125
- & ServiceMessage
126
- & MsgWith<"forum_topic_created">;
127
- export type ForumTopicEditedMessage =
128
- & ServiceMessage
129
- & MsgWith<"forum_topic_edited">;
130
- export type ForumTopicClosedMessage =
131
- & ServiceMessage
132
- & MsgWith<"forum_topic_closed">;
133
- export type ForumTopicReopenedMessage =
134
- & ServiceMessage
135
- & MsgWith<"forum_topic_reopened">;
136
- export type GeneralForumTopicHiddenMessage =
137
- & ServiceMessage
138
- & MsgWith<"general_forum_topic_hidden">;
139
- export type GeneralForumTopicUnhiddenMessage =
140
- & ServiceMessage
141
- & MsgWith<"general_forum_topic_unhidden">;
142
- export type GiveawayCreatedMessage =
143
- & ServiceMessage
144
- & MsgWith<"giveaway_created">;
113
+ export type ProximityAlertTriggeredMessage = ServiceMessage &
114
+ MsgWith<"proximity_alert_triggered">;
115
+ export type BoostAddedMessage = ServiceMessage & MsgWith<"boost_added">;
116
+ export type ForumTopicCreatedMessage = ServiceMessage &
117
+ MsgWith<"forum_topic_created">;
118
+ export type ForumTopicEditedMessage = ServiceMessage &
119
+ MsgWith<"forum_topic_edited">;
120
+ export type ForumTopicClosedMessage = ServiceMessage &
121
+ MsgWith<"forum_topic_closed">;
122
+ export type ForumTopicReopenedMessage = ServiceMessage &
123
+ MsgWith<"forum_topic_reopened">;
124
+ export type GeneralForumTopicHiddenMessage = ServiceMessage &
125
+ MsgWith<"general_forum_topic_hidden">;
126
+ export type GeneralForumTopicUnhiddenMessage = ServiceMessage &
127
+ MsgWith<"general_forum_topic_unhidden">;
128
+ export type GiveawayCreatedMessage = ServiceMessage &
129
+ MsgWith<"giveaway_created">;
145
130
  export type GiveawayMessage = ServiceMessage & MsgWith<"giveaway">;
146
- export type GiveawayWinnersMessage =
147
- & ServiceMessage
148
- & MsgWith<"giveaway_winners">;
149
- export type GiveawayCompletedMessage =
150
- & ServiceMessage
151
- & MsgWith<"giveaway_completed">;
152
- export type VideoChatScheduledMessage =
153
- & ServiceMessage
154
- & MsgWith<"video_chat_scheduled">;
155
- export type VideoChatStartedMessage =
156
- & ServiceMessage
157
- & MsgWith<"video_chat_started">;
158
- export type VideoChatEndedMessage =
159
- & ServiceMessage
160
- & MsgWith<"video_chat_ended">;
161
- export type VideoChatParticipantsInvitedMessage =
162
- & ServiceMessage
163
- & MsgWith<"video_chat_participants_invited">;
131
+ export type GiveawayWinnersMessage = ServiceMessage &
132
+ MsgWith<"giveaway_winners">;
133
+ export type GiveawayCompletedMessage = ServiceMessage &
134
+ MsgWith<"giveaway_completed">;
135
+ export type VideoChatScheduledMessage = ServiceMessage &
136
+ MsgWith<"video_chat_scheduled">;
137
+ export type VideoChatStartedMessage = ServiceMessage &
138
+ MsgWith<"video_chat_started">;
139
+ export type VideoChatEndedMessage = ServiceMessage &
140
+ MsgWith<"video_chat_ended">;
141
+ export type VideoChatParticipantsInvitedMessage = ServiceMessage &
142
+ MsgWith<"video_chat_participants_invited">;
164
143
  export type WebAppDataMessage = ServiceMessage & MsgWith<"web_app_data">;
165
144
  }
166
145
 
@@ -241,6 +220,8 @@ export interface Message extends Message.MediaMessage {
241
220
  passport_data?: PassportData;
242
221
  /** Service message. A user in the chat triggered another user's proximity alert while sharing Live Location. */
243
222
  proximity_alert_triggered?: ProximityAlertTriggered;
223
+ /** Service message: user boosted the chat */
224
+ boost_added?: ChatBoostAdded;
244
225
  /** Service message: forum topic created */
245
226
  forum_topic_created?: ForumTopicCreated;
246
227
  /** Service message: forum topic edited */
@@ -286,8 +267,8 @@ export interface SentWebAppMessage {
286
267
  }
287
268
 
288
269
  /** This object describes a message that was deleted or is otherwise inaccessible to the bot. */
289
- export interface InaccessibleMessage extends
290
- Omit<
270
+ export interface InaccessibleMessage
271
+ extends Omit<
291
272
  // TypeScript cannot discriminate union types based on `0` and `number` so
292
273
  // we work around this by including all other properties here. This mostly
293
274
  // negates the benefit of having this interface in the first place, but not
@@ -307,9 +288,7 @@ export interface InaccessibleMessage extends
307
288
  /** This object describes a message that can be inaccessible to the bot. It can be one of
308
289
  - Message
309
290
  - InaccessibleMessage */
310
- export type MaybeInaccessibleMessage =
311
- | Message
312
- | InaccessibleMessage;
291
+ export type MaybeInaccessibleMessage = Message | InaccessibleMessage;
313
292
 
314
293
  /** The Bot API supports basic formatting for messages. You can use bold, italic, underlined, strikethrough, spoiler text, block quotations as well as inline links and pre-formatted code in your bots' messages. Telegram clients will render them accordingly. You can specify text entities directly, or use markdown-style or HTML-style formatting.
315
294
 
@@ -350,7 +329,9 @@ pre-formatted fixed-width code block written in the Python programming language
350
329
  ```
351
330
  >Block quotation started
352
331
  >Block quotation continued
353
- >The last line of the block quotation
332
+ >The last line of the block quotation**
333
+ >The second block quotation started right after the previous\r
334
+ >The third block quotation started right after the previous
354
335
  ```
355
336
  Please note:
356
337
 
@@ -840,8 +821,13 @@ export interface Venue {
840
821
  google_place_type?: string;
841
822
  }
842
823
 
843
- /** This object represents a message about a forwarded story in the chat. Currently holds no information. */
844
- export interface Story {}
824
+ /** This object represents a story. */
825
+ export interface Story {
826
+ /** Chat that posted the story */
827
+ chat: Chat;
828
+ /** Unique identifier for the story in the chat */
829
+ id: number;
830
+ }
845
831
 
846
832
  /** This object represents the content of a service message, sent whenever a user in the chat triggers a proximity alert set by another user. */
847
833
  export interface ProximityAlertTriggered {
@@ -889,6 +875,12 @@ export interface GeneralForumTopicHidden {}
889
875
  /** This object represents a service message about General forum topic unhidden in the chat. Currently holds no information. */
890
876
  export interface GeneralForumTopicUnhidden {}
891
877
 
878
+ /** This object represents a service message about a user boosting a chat. */
879
+ export interface ChatBoostAdded {
880
+ /** Number of boosts added by the user */
881
+ boost_count: number;
882
+ }
883
+
892
884
  /** This object contains information about the user whose identifier was shared with the bot using a KeyboardButtonRequestUsers button. */
893
885
  export interface UsersShared {
894
886
  /** Identifier of the request */
@@ -1245,4 +1237,4 @@ export interface MessageReactionCountUpdated {
1245
1237
  date: number;
1246
1238
  /** List of reactions that are present on the message */
1247
1239
  reactions: ReactionCount[];
1248
- }
1240
+ }
@@ -31,7 +31,7 @@ export interface ApiSuccess<T> {
31
31
  * Describes additional parameters provided in an API error response.
32
32
  */
33
33
  export interface ResponseParameters {
34
- /** The group has been migrated to a supergroup with the specified identifier. */
34
+ /** The group has been migrated to a supergroup with the specified identifier. */
35
35
  migrate_to_chat_id?: number;
36
36
  /**
37
37
  * In case of exceeding flood control, the number of seconds left to wait before the request can be repeated.
@@ -78,10 +78,10 @@ export interface Update {
78
78
  * New version of a channel post known to the bot that has been edited.
79
79
  */
80
80
  edited_channel_post?: Message & Update.Edited & Update.Channel;
81
-
81
+
82
82
  /** A reaction to a message was changed by a user. The bot must be an administrator in the chat and must explicitly specify "message_reaction" in the list of allowed_updates to receive these updates. The update isn't received for reactions set by bots. */
83
83
  message_reaction?: MessageReactionUpdated;
84
-
84
+
85
85
  /** Reactions to a message with anonymous reactions were changed. The bot must be an administrator in the chat and must explicitly specify "message_reaction_count" in the list of allowed_updates to receive these updates. */
86
86
  message_reaction_count?: MessageReactionCountUpdated;
87
87
 
@@ -139,10 +139,10 @@ export interface Update {
139
139
  * The bot must have the can_invite_users administrator right in the chat to receive these updates.
140
140
  */
141
141
  chat_join_request?: ChatJoinRequest;
142
-
142
+
143
143
  /** A chat boost was added or changed. The bot must be an administrator in the chat to receive these updates. */
144
144
  chat_boost?: ChatBoostUpdated;
145
-
145
+
146
146
  /** A boost was removed from a chat. The bot must be an administrator in the chat to receive these updates. */
147
147
  removed_chat_boost?: ChatBoostRemoved;
148
148
  }