nyx-bot-client 1.0.0 → 1.0.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.
Files changed (62) hide show
  1. package/@types/BackgroundFillSolid.ts +1 -1
  2. package/@types/BackgroundTypePattern.ts +2 -2
  3. package/@types/BackgroundTypeWallpaper.ts +2 -2
  4. package/@types/BotAccessSettings.ts +18 -0
  5. package/@types/ChatMemberRestricted.ts +5 -0
  6. package/@types/ChatPermissions.ts +8 -1
  7. package/@types/ExternalReplyInfo.ts +6 -0
  8. package/@types/ForumTopic.ts +1 -1
  9. package/@types/ForumTopicCreated.ts +1 -1
  10. package/@types/Giveaway.ts +2 -2
  11. package/@types/GiveawayCompleted.ts +3 -3
  12. package/@types/InlineQueryResultArticle.ts +3 -3
  13. package/@types/InlineQueryResultGif.ts +1 -1
  14. package/@types/InlineQueryResultMpeg4Gif.ts +1 -1
  15. package/@types/InlineQueryResultVenue.ts +5 -0
  16. package/@types/InlineQueryResultsButton.ts +1 -1
  17. package/@types/InputInvoiceMessageContent.ts +1 -1
  18. package/@types/InputMedia.ts +4 -1
  19. package/@types/InputMediaLivePhoto.ts +54 -0
  20. package/@types/InputMediaLocation.ts +26 -0
  21. package/@types/InputMediaSticker.ts +26 -0
  22. package/@types/InputMediaVenue.ts +52 -0
  23. package/@types/InputPaidMedia.ts +6 -1
  24. package/@types/InputPaidMediaLivePhoto.ts +29 -0
  25. package/@types/InputPollMedia.ts +33 -0
  26. package/@types/InputPollOption.ts +6 -1
  27. package/@types/InputPollOptionMedia.ts +30 -0
  28. package/@types/KeyboardButton.ts +9 -1
  29. package/@types/KeyboardButtonRequestChat.ts +2 -2
  30. package/@types/KeyboardButtonRequestManagedBot.ts +22 -0
  31. package/@types/LivePhoto.ts +51 -0
  32. package/@types/ManagedBotCreated.ts +13 -0
  33. package/@types/ManagedBotUpdated.ts +18 -0
  34. package/@types/Message.ts +51 -0
  35. package/@types/MessageReactionUpdated.ts +2 -2
  36. package/@types/OrderInfo.ts +1 -1
  37. package/@types/OwnedGiftUnique.ts +2 -2
  38. package/@types/PaidMedia.ts +8 -2
  39. package/@types/PaidMediaLivePhoto.ts +18 -0
  40. package/@types/PaidMediaVideo.ts +1 -1
  41. package/@types/PaidMessagePriceChanged.ts +4 -8
  42. package/@types/Poll.ts +41 -4
  43. package/@types/PollAnswer.ts +7 -2
  44. package/@types/PollMedia.ts +63 -0
  45. package/@types/PollOption.ts +28 -2
  46. package/@types/PollOptionAdded.ts +29 -0
  47. package/@types/PollOptionDeleted.ts +29 -0
  48. package/@types/PreparedKeyboardButton.ts +11 -0
  49. package/@types/ReplyKeyboardMarkup.ts +1 -1
  50. package/@types/ReplyParameters.ts +7 -2
  51. package/@types/SentGuestMessage.ts +11 -0
  52. package/@types/SentWebAppMessage.ts +1 -1
  53. package/@types/SwitchInlineQueryChosenChat.ts +1 -1
  54. package/@types/TextQuote.ts +2 -2
  55. package/@types/Update.ts +13 -1
  56. package/@types/User.ts +11 -2
  57. package/@types/WebhookInfo.ts +1 -1
  58. package/@types/index.ts +18 -0
  59. package/biome.json +1 -1
  60. package/bun.lock +23 -23
  61. package/package.json +8 -8
  62. package/utils/methods.ts +168 -0
@@ -0,0 +1,13 @@
1
+ import type { User } from "./";
2
+
3
+ /**
4
+ * ## ManagedBotCreated
5
+ * This object contains information about the bot that was created to be managed by the current bot.
6
+ * @see https://core.telegram.org/bots/api#managedbotcreated
7
+ */
8
+ export type ManagedBotCreated = {
9
+ /**
10
+ * Information about the bot. The bot's token can be fetched using the method getManagedBotToken.
11
+ */
12
+ bot: User;
13
+ };
@@ -0,0 +1,18 @@
1
+ import type { User } from "./";
2
+
3
+ /**
4
+ * ## ManagedBotUpdated
5
+ * This object contains information about the creation or token update of a bot that is managed by the current bot.
6
+ * @see https://core.telegram.org/bots/api#managedbotupdated
7
+ */
8
+ export type ManagedBotUpdated = {
9
+ /**
10
+ * User that created the bot
11
+ */
12
+ user: User;
13
+
14
+ /**
15
+ * Information about the bot. Token of the bot can be fetched using the method getManagedBotToken.
16
+ */
17
+ bot: User;
18
+ };
package/@types/Message.ts CHANGED
@@ -31,7 +31,9 @@ import type {
31
31
  InlineKeyboardMarkup,
32
32
  Invoice,
33
33
  LinkPreviewOptions,
34
+ LivePhoto,
34
35
  Location,
36
+ ManagedBotCreated,
35
37
  MaybeInaccessibleMessage,
36
38
  MessageAutoDeleteTimerChanged,
37
39
  MessageEntity,
@@ -41,6 +43,8 @@ import type {
41
43
  PassportData,
42
44
  PhotoSize,
43
45
  Poll,
46
+ PollOptionAdded,
47
+ PollOptionDeleted,
44
48
  ProximityAlertTriggered,
45
49
  RefundedPayment,
46
50
  Sticker,
@@ -125,6 +129,13 @@ export type Message = {
125
129
  */
126
130
  date: number;
127
131
 
132
+ /**
133
+ * Optional. The unique identifier for the guest query. Use this identifier with the method answerGuestQuery to send
134
+ * a response message. If non-empty, the message belongs to the chat where the guest bot was summoned, which may not
135
+ * coincide with other existing bot chats sharing the same identifier.
136
+ */
137
+ guest_query_id?: string;
138
+
128
139
  /**
129
140
  * Optional. Unique identifier of the business connection from which the message was received. If non-empty, the
130
141
  * message belongs to a chat of the corresponding business account that is independent from any potential bot chat
@@ -178,11 +189,26 @@ export type Message = {
178
189
  */
179
190
  reply_to_checklist_task_id?: number;
180
191
 
192
+ /**
193
+ * Optional. Persistent identifier of the specific poll option that is being replied to
194
+ */
195
+ reply_to_poll_option_id?: string;
196
+
181
197
  /**
182
198
  * Optional. Bot through which the message was sent
183
199
  */
184
200
  via_bot?: User;
185
201
 
202
+ /**
203
+ * Optional. For a message sent by a guest bot, this is the user whose original message triggered the bot's response
204
+ */
205
+ guest_bot_caller_user?: User;
206
+
207
+ /**
208
+ * Optional. For a message sent by a guest bot, this is the chat whose original message triggered the bot's response
209
+ */
210
+ guest_bot_caller_chat?: Chat;
211
+
186
212
  /**
187
213
  * Optional. Date the message was last edited in Unix time
188
214
  */
@@ -264,6 +290,12 @@ export type Message = {
264
290
  */
265
291
  document?: Document;
266
292
 
293
+ /**
294
+ * Optional. Message is a live photo, information about the live photo. For backward compatibility, when this field
295
+ * is set, the photo field will also be set
296
+ */
297
+ live_photo?: LivePhoto;
298
+
267
299
  /**
268
300
  * Optional. Message contains paid media; information about the paid media
269
301
  */
@@ -577,11 +609,26 @@ export type Message = {
577
609
  */
578
610
  giveaway_completed?: GiveawayCompleted;
579
611
 
612
+ /**
613
+ * Optional. Service message: user created a bot that will be managed by the current bot
614
+ */
615
+ managed_bot_created?: ManagedBotCreated;
616
+
580
617
  /**
581
618
  * Optional. Service message: the price for paid messages has changed in the chat
582
619
  */
583
620
  paid_message_price_changed?: PaidMessagePriceChanged;
584
621
 
622
+ /**
623
+ * Optional. Service message: answer option was added to a poll
624
+ */
625
+ poll_option_added?: PollOptionAdded;
626
+
627
+ /**
628
+ * Optional. Service message: answer option was deleted from a poll
629
+ */
630
+ poll_option_deleted?: PollOptionDeleted;
631
+
585
632
  /**
586
633
  * Optional. Service message: a suggested post was approved
587
634
  */
@@ -644,6 +691,7 @@ export const messageTypes = [
644
691
  "animation",
645
692
  "audio",
646
693
  "document",
694
+ "live_photo",
647
695
  "paid_media",
648
696
  "photo",
649
697
  "sticker",
@@ -699,7 +747,10 @@ export const messageTypes = [
699
747
  "giveaway",
700
748
  "giveaway_winners",
701
749
  "giveaway_completed",
750
+ "managed_bot_created",
702
751
  "paid_message_price_changed",
752
+ "poll_option_added",
753
+ "poll_option_deleted",
703
754
  "suggested_post_approved",
704
755
  "suggested_post_approval_failed",
705
756
  "suggested_post_declined",
@@ -19,12 +19,12 @@ export type MessageReactionUpdated = {
19
19
  /**
20
20
  * Optional. The user that changed the reaction, if the user isn't anonymous
21
21
  */
22
- user: User;
22
+ user?: User;
23
23
 
24
24
  /**
25
25
  * Optional. The chat on behalf of which the reaction was changed, if the user is anonymous
26
26
  */
27
- actor_chat: Chat;
27
+ actor_chat?: Chat;
28
28
 
29
29
  /**
30
30
  * Date of the change in Unix time
@@ -24,5 +24,5 @@ export type OrderInfo = {
24
24
  /**
25
25
  * Optional. User shipping address
26
26
  */
27
- shipping_address: ShippingAddress;
27
+ shipping_address?: ShippingAddress;
28
28
  };
@@ -1,4 +1,4 @@
1
- import type { Gift, User } from "./";
1
+ import type { UniqueGift, User } from "./";
2
2
 
3
3
  /**
4
4
  * ## OwnedGiftUnique
@@ -14,7 +14,7 @@ export type OwnedGiftUnique = {
14
14
  /**
15
15
  * Information about the unique gift
16
16
  */
17
- gift: Gift;
17
+ gift: UniqueGift;
18
18
 
19
19
  /**
20
20
  * Optional. Unique identifier of the gift for the bot; for gifts received on behalf of business accounts only
@@ -1,3 +1,4 @@
1
+ import type { PaidMediaLivePhoto } from "./PaidMediaLivePhoto";
1
2
  import type { PaidMediaPhoto } from "./PaidMediaPhoto";
2
3
  import type { PaidMediaPreview } from "./PaidMediaPreview";
3
4
  import type { PaidMediaVideo } from "./PaidMediaVideo";
@@ -5,9 +6,14 @@ import type { PaidMediaVideo } from "./PaidMediaVideo";
5
6
  /**
6
7
  * ## PaidMedia
7
8
  * This object describes paid media. Currently, it can be one of
8
- * - PaidMediaPreview
9
+ * - PaidMediaLivePhoto
9
10
  * - PaidMediaPhoto
11
+ * - PaidMediaPreview
10
12
  * - PaidMediaVideo
11
13
  * @see https://core.telegram.org/bots/api#paidmedia
12
14
  */
13
- export type PaidMedia = PaidMediaPreview | PaidMediaPhoto | PaidMediaVideo;
15
+ export type PaidMedia =
16
+ | PaidMediaLivePhoto
17
+ | PaidMediaPhoto
18
+ | PaidMediaPreview
19
+ | PaidMediaVideo;
@@ -0,0 +1,18 @@
1
+ import type { LivePhoto } from "./LivePhoto";
2
+
3
+ /**
4
+ * ## PaidMediaLivePhoto
5
+ * The paid media is a live photo.
6
+ * @see https://core.telegram.org/bots/api#paidmedialivephoto
7
+ */
8
+ export type PaidMediaLivePhoto = {
9
+ /**
10
+ * Type of the paid media, always “live_photo”
11
+ */
12
+ type: "live_photo";
13
+
14
+ /**
15
+ * The photo
16
+ */
17
+ live_photo: LivePhoto;
18
+ };
@@ -14,5 +14,5 @@ export type PaidMediaVideo = {
14
14
  /**
15
15
  * The video
16
16
  */
17
- photo: Video[];
17
+ video: Video;
18
18
  };
@@ -1,16 +1,12 @@
1
1
  /**
2
2
  * ## PaidMessagePriceChanged
3
- * This object represents a service message about a change in the price for paid messages in a chat.
3
+ * Describes a service message about a change in the price of paid messages within a chat.
4
4
  * @see https://core.telegram.org/bots/api#paidmessagepricechanged
5
5
  */
6
6
  export type PaidMessagePriceChanged = {
7
7
  /**
8
- * New price for paid messages in the chat, in the smallest units of the currency (integer, not float). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json for the number of digits past the decimal point for each currency (https://core.telegram.org/bots/payments/currencies.json), it may be different for each currency.
8
+ * The new number of Telegram Stars that must be paid by non-administrator users of the supergroup chat for each
9
+ * sent message
9
10
  */
10
- amount: number;
11
-
12
- /**
13
- * Three-letter ISO 4217 currency code
14
- */
15
- currency: string;
11
+ paid_message_star_count: number;
16
12
  };
package/@types/Poll.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { MessageEntity, PollOption } from "./";
1
+ import type { MessageEntity, PollMedia, PollOption } from "./";
2
2
 
3
3
  /**
4
4
  * ## Poll
@@ -53,10 +53,27 @@ export type Poll = {
53
53
  allows_multiple_answers: boolean;
54
54
 
55
55
  /**
56
- * Optional. 0-based identifier of the correct answer option. Available only for polls in the quiz mode, which are
57
- * closed, or was sent (not forwarded) by the bot or to the private chat with the bot.
56
+ * True, if the poll allows to change the chosen answer options
58
57
  */
59
- correct_option_id?: number;
58
+ allows_revoting: boolean;
59
+
60
+ /**
61
+ * True if voting is limited to users who have been members of the chat where the poll was originally sent for more
62
+ * than 24 hours
63
+ */
64
+ members_only: boolean;
65
+
66
+ /**
67
+ * Optional. A list of two-letter ISO 3166-1 alpha-2 country codes indicating the countries from which users can vote
68
+ * in the poll. If omitted, then users from any country can participate in the poll.
69
+ */
70
+ country_codes?: string[];
71
+
72
+ /**
73
+ * Optional. Array of 0-based identifiers of the correct answer options. Available only for polls in quiz mode which
74
+ * are closed or were sent (not forwarded) by the bot or to the private chat with the bot.
75
+ */
76
+ correct_option_ids?: number[];
60
77
 
61
78
  /**
62
79
  * Optional. Text that is shown when a user chooses an incorrect answer or taps on the lamp icon in a quiz-style poll,
@@ -69,6 +86,11 @@ export type Poll = {
69
86
  */
70
87
  explanation_entities?: MessageEntity[];
71
88
 
89
+ /**
90
+ * Optional. Media added to the quiz explanation
91
+ */
92
+ explanation_media?: PollMedia;
93
+
72
94
  /**
73
95
  * Optional. Amount of time in seconds the poll will be active after creation
74
96
  */
@@ -78,4 +100,19 @@ export type Poll = {
78
100
  * Optional. Point in time (Unix timestamp) when the poll will be automatically closed
79
101
  */
80
102
  close_date?: number;
103
+
104
+ /**
105
+ * Optional. Description of the poll; for polls inside the Message object only
106
+ */
107
+ description?: string;
108
+
109
+ /**
110
+ * Optional. Special entities like usernames, URLs, bot commands, etc. that appear in the description
111
+ */
112
+ description_entities?: MessageEntity[];
113
+
114
+ /**
115
+ * Optional. Media added to the poll description; for polls inside the Message object only
116
+ */
117
+ media?: PollMedia;
81
118
  };
@@ -14,15 +14,20 @@ export type PollAnswer = {
14
14
  /**
15
15
  * Optional. The chat that changed the answer to the poll, if the voter is anonymous
16
16
  */
17
- voter_chat: Chat;
17
+ voter_chat?: Chat;
18
18
 
19
19
  /**
20
20
  * Optional. The user that changed the answer to the poll, if the voter isn't anonymous
21
21
  */
22
- user: User;
22
+ user?: User;
23
23
 
24
24
  /**
25
25
  * 0-based identifiers of chosen answer options. May be empty if the vote was retracted.
26
26
  */
27
27
  option_ids: number[];
28
+
29
+ /**
30
+ * Persistent identifiers of the chosen answer options. May be empty if the vote was retracted.
31
+ */
32
+ option_persistent_ids: string[];
28
33
  };
@@ -0,0 +1,63 @@
1
+ import type {
2
+ Animation,
3
+ Audio,
4
+ Document,
5
+ LivePhoto,
6
+ Location,
7
+ PhotoSize,
8
+ Sticker,
9
+ Venue,
10
+ Video,
11
+ } from "./";
12
+
13
+ /**
14
+ * ## PollMedia
15
+ * At most one of the optional fields can be present in any given object.
16
+ * @see https://core.telegram.org/bots/api#pollmedia
17
+ */
18
+ export type PollMedia = {
19
+ /**
20
+ * Optional. Media is an animation, information about the animation
21
+ */
22
+ animation?: Animation;
23
+
24
+ /**
25
+ * Optional. Media is an audio file, information about the file; currently, can't be received in a poll option
26
+ */
27
+ audio?: Audio;
28
+
29
+ /**
30
+ * Optional. Media is a general file, information about the file; currently, can't be received in a poll option
31
+ */
32
+ document?: Document;
33
+
34
+ /**
35
+ * Optional. Media is a live photo, information about the live photo
36
+ */
37
+ live_photo?: LivePhoto;
38
+
39
+ /**
40
+ * Optional. Media is a shared location, information about the location
41
+ */
42
+ location?: Location;
43
+
44
+ /**
45
+ * Optional. Media is a photo, available sizes of the photo
46
+ */
47
+ photo?: PhotoSize[];
48
+
49
+ /**
50
+ * Optional. Media is a sticker, information about the sticker; currently, for poll options only
51
+ */
52
+ sticker?: Sticker;
53
+
54
+ /**
55
+ * Optional. Media is a venue, information about the venue
56
+ */
57
+ venue?: Venue;
58
+
59
+ /**
60
+ * Optional. Media is a video, information about the video
61
+ */
62
+ video?: Video;
63
+ };
@@ -1,4 +1,4 @@
1
- import type { MessageEntity } from "./MessageEntity";
1
+ import type { Chat, MessageEntity, PollMedia, User } from "./";
2
2
 
3
3
  /**
4
4
  * ## PollOption
@@ -6,6 +6,11 @@ import type { MessageEntity } from "./MessageEntity";
6
6
  * @see https://core.telegram.org/bots/api#polloption
7
7
  */
8
8
  export type PollOption = {
9
+ /**
10
+ * Unique identifier of the option, persistent on option addition and deletion
11
+ */
12
+ persistent_id: string;
13
+
9
14
  /**
10
15
  * Option text, 1-100 characters
11
16
  */
@@ -18,7 +23,28 @@ export type PollOption = {
18
23
  text_entities?: MessageEntity[];
19
24
 
20
25
  /**
21
- * Number of users that voted for this option
26
+ * Optional. Media added to the poll option
27
+ */
28
+ media?: PollMedia;
29
+
30
+ /**
31
+ * Number of users who voted for this option; may be 0 if unknown
22
32
  */
23
33
  voter_count: number;
34
+
35
+ /**
36
+ * Optional. User who added the option; omitted if the option wasn't added by a user after poll creation
37
+ */
38
+ added_by_user?: User;
39
+
40
+ /**
41
+ * Optional. Chat that added the option; omitted if the option wasn't added by a chat after poll creation
42
+ */
43
+ added_by_chat?: Chat;
44
+
45
+ /**
46
+ * Optional. Point in time (Unix timestamp) when the option was added; omitted if the option existed in the original
47
+ * poll
48
+ */
49
+ addition_date?: number;
24
50
  };
@@ -0,0 +1,29 @@
1
+ import type { MaybeInaccessibleMessage, MessageEntity } from "./";
2
+
3
+ /**
4
+ * ## PollOptionAdded
5
+ * Describes a service message about an option added to a poll.
6
+ * @see https://core.telegram.org/bots/api#polloptionadded
7
+ */
8
+ export type PollOptionAdded = {
9
+ /**
10
+ * Optional. Message containing the poll to which the option was added, if known. Note that the Message object in this
11
+ * field will not contain the reply_to_message field even if it itself is a reply.
12
+ */
13
+ poll_message?: MaybeInaccessibleMessage;
14
+
15
+ /**
16
+ * Unique identifier of the added option
17
+ */
18
+ option_persistent_id: string;
19
+
20
+ /**
21
+ * Option text
22
+ */
23
+ option_text: string;
24
+
25
+ /**
26
+ * Optional. Special entities that appear in the option_text
27
+ */
28
+ option_text_entities?: MessageEntity[];
29
+ };
@@ -0,0 +1,29 @@
1
+ import type { MaybeInaccessibleMessage, MessageEntity } from "./";
2
+
3
+ /**
4
+ * ## PollOptionDeleted
5
+ * Describes a service message about an option deleted from a poll.
6
+ * @see https://core.telegram.org/bots/api#polloptiondeleted
7
+ */
8
+ export type PollOptionDeleted = {
9
+ /**
10
+ * Optional. Message containing the poll from which the option was deleted, if known. Note that the Message object in
11
+ * this field will not contain the reply_to_message field even if it itself is a reply.
12
+ */
13
+ poll_message?: MaybeInaccessibleMessage;
14
+
15
+ /**
16
+ * Unique identifier of the deleted option
17
+ */
18
+ option_persistent_id: string;
19
+
20
+ /**
21
+ * Option text
22
+ */
23
+ option_text: string;
24
+
25
+ /**
26
+ * Optional. Special entities that appear in the option_text
27
+ */
28
+ option_text_entities?: MessageEntity[];
29
+ };
@@ -0,0 +1,11 @@
1
+ /**
2
+ * ## PreparedKeyboardButton
3
+ * Describes a keyboard button to be used by a user of a Mini App.
4
+ * @see https://core.telegram.org/bots/api#preparedkeyboardbutton
5
+ */
6
+ export type PreparedKeyboardButton = {
7
+ /**
8
+ * Unique identifier of the keyboard button
9
+ */
10
+ id: string;
11
+ };
@@ -10,7 +10,7 @@ export type ReplyKeyboardMarkup = {
10
10
  /**
11
11
  * Array of button rows, each represented by an Array of KeyboardButton objects
12
12
  */
13
- keyboard?: KeyboardButton[][];
13
+ keyboard: KeyboardButton[][];
14
14
 
15
15
  /**
16
16
  * Optional. Requests clients to always show the keyboard when the regular keyboard is hidden. Defaults to false, in
@@ -1,4 +1,4 @@
1
- import type { ParseMode } from "./index";
1
+ import type { MessageEntity, ParseMode } from "./index";
2
2
 
3
3
  /**
4
4
  * ## ReplyParameters
@@ -40,7 +40,7 @@ export type ReplyParameters = {
40
40
  * Optional. A JSON-serialized list of special entities that appear in the quote. It can be specified instead of
41
41
  * quote_parse_mode.
42
42
  */
43
- quote_entities?: string; // todo: JSON Array of MessageEntity
43
+ quote_entities?: MessageEntity[];
44
44
 
45
45
  /**
46
46
  * Optional. Position of the quote in the original message in UTF-16 code units
@@ -51,4 +51,9 @@ export type ReplyParameters = {
51
51
  * Optional. Identifier of the specific checklist task to be replied to
52
52
  */
53
53
  checklist_task_id?: number;
54
+
55
+ /**
56
+ * Optional. Persistent identifier of the specific poll option to be replied to
57
+ */
58
+ poll_option_id?: string;
54
59
  };
@@ -0,0 +1,11 @@
1
+ /**
2
+ * ## SentGuestMessage
3
+ * Describes an inline message sent by a guest bot.
4
+ * @see https://core.telegram.org/bots/api#sentguestmessage
5
+ */
6
+ export type SentGuestMessage = {
7
+ /**
8
+ * Identifier of the sent inline message
9
+ */
10
+ inline_message_id: string;
11
+ };
@@ -8,5 +8,5 @@ export type SentWebAppMessage = {
8
8
  * Optional. Identifier of the sent inline message. Available only if there is an inline keyboard attached to the
9
9
  * message.
10
10
  */
11
- inline_message_id: string;
11
+ inline_message_id?: string;
12
12
  };
@@ -9,7 +9,7 @@ export type SwitchInlineQueryChosenChat = {
9
9
  * Optional. The default inline query to be inserted in the input field. If left empty, only the bot's username will
10
10
  * be inserted
11
11
  */
12
- query: string;
12
+ query?: string;
13
13
 
14
14
  /**
15
15
  * Optional. True, if private chats with users can be chosen
@@ -15,7 +15,7 @@ export type TextQuote = {
15
15
  * Optional. Special entities that appear in the quote. Currently, only bold, italic, underline, strikethrough,
16
16
  * spoiler, and custom_emoji entities are kept in quotes.
17
17
  */
18
- entities: MessageEntity[];
18
+ entities?: MessageEntity[];
19
19
 
20
20
  /**
21
21
  * Approximate quote position in the original message in UTF-16 code units as specified by the sender
@@ -26,5 +26,5 @@ export type TextQuote = {
26
26
  * Optional. True, if the quote was chosen manually by the message sender. Otherwise, the quote was added
27
27
  * automatically by the server.
28
28
  */
29
- is_manual: boolean;
29
+ is_manual?: true;
30
30
  };
package/@types/Update.ts CHANGED
@@ -1,4 +1,3 @@
1
- import type { AtMostOne } from "../utils";
2
1
  import type {
3
2
  BusinessConnection,
4
3
  BusinessMessagesDeleted,
@@ -9,6 +8,7 @@ import type {
9
8
  ChatMemberUpdated,
10
9
  ChosenInlineResult,
11
10
  InlineQuery,
11
+ ManagedBotUpdated,
12
12
  Message,
13
13
  MessageReactionCountUpdated,
14
14
  MessageReactionUpdated,
@@ -18,6 +18,7 @@ import type {
18
18
  PreCheckoutQuery,
19
19
  ShippingQuery,
20
20
  } from "./";
21
+ import type { AtMostOne } from "./utils";
21
22
 
22
23
  /**
23
24
  * @see https://core.telegram.org/bots/api#update
@@ -66,6 +67,12 @@ export type EventTypes = {
66
67
  */
67
68
  deleted_business_messages: BusinessMessagesDeleted;
68
69
 
70
+ /**
71
+ * New guest message. The bot can use the field Message.guest_query_id and the method answerGuestQuery to send a
72
+ * message in response.
73
+ */
74
+ guest_message: Message;
75
+
69
76
  /**
70
77
  * A reaction to a message was changed by a user. The bot must be an administrator in the chat and must explicitly
71
78
  * specify "message_reaction" in the list of allowed_updates to receive these updates. The update isn't received for
@@ -149,6 +156,11 @@ export type EventTypes = {
149
156
  * A boost was removed from a chat. The bot must be an administrator in the chat to receive these updates.
150
157
  */
151
158
  removed_chat_boost: ChatBoostRemoved;
159
+
160
+ /**
161
+ * A new bot was created to be managed by the bot or token of a bot was changed
162
+ */
163
+ managed_bot: ManagedBotUpdated;
152
164
  };
153
165
 
154
166
  /**