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
@@ -12,5 +12,5 @@ export type BackgroundFillSolid = {
12
12
  /**
13
13
  * The color of the background fill in the RGB24 format
14
14
  */
15
- color: string;
15
+ color: number;
16
16
  };
@@ -31,10 +31,10 @@ export type BackgroundTypePattern = {
31
31
  * Optional. True, if the background fill must be applied only to the pattern itself. All other pixels are black in
32
32
  * this case. For dark themes only
33
33
  */
34
- is_blurred: boolean;
34
+ is_inverted?: true;
35
35
 
36
36
  /**
37
37
  * Optional. True, if the background moves slightly when the device is tilted
38
38
  */
39
- is_moving: boolean;
39
+ is_moving?: true;
40
40
  };
@@ -24,10 +24,10 @@ export type BackgroundTypeWallpaper = {
24
24
  /**
25
25
  * Optional. True, if the wallpaper is downscaled to fit in a 450x450 square and then box-blurred with radius 12
26
26
  */
27
- is_blurred: boolean;
27
+ is_blurred?: true;
28
28
 
29
29
  /**
30
30
  * Optional. True, if the background moves slightly when the device is tilted
31
31
  */
32
- is_moving: boolean;
32
+ is_moving?: true;
33
33
  };
@@ -0,0 +1,18 @@
1
+ import type { User } from "./";
2
+
3
+ /**
4
+ * ## BotAccessSettings
5
+ * This object describes the access settings of a bot.
6
+ * @see https://core.telegram.org/bots/api#botaccesssettings
7
+ */
8
+ export type BotAccessSettings = {
9
+ /**
10
+ * True, if only selected users can access the bot. The bot's owner can always access it.
11
+ */
12
+ is_access_restricted: boolean;
13
+
14
+ /**
15
+ * Optional. The list of other users who have access to the bot if the access is restricted
16
+ */
17
+ added_users?: User[];
18
+ };
@@ -77,6 +77,11 @@ export type ChatMemberRestricted = {
77
77
  */
78
78
  can_add_web_page_previews: boolean;
79
79
 
80
+ /**
81
+ * True, if the user is allowed to react to messages
82
+ */
83
+ can_react_to_messages: boolean;
84
+
80
85
  /**
81
86
  * True, if the user is allowed to edit their own tag
82
87
  */
@@ -56,7 +56,14 @@ export type ChatPermissions = {
56
56
  can_add_web_page_previews?: boolean;
57
57
 
58
58
  /**
59
- * Optional. True, if the user is allowed to edit their own tag
59
+ * Optional. True, if the user is allowed to react to messages. If omitted, defaults to the value of
60
+ * can_send_messages.
61
+ */
62
+ can_react_to_messages?: boolean;
63
+
64
+ /**
65
+ * Optional. True, if the user is allowed to edit their own tag. If omitted, defaults to the value of
66
+ * can_pin_messages.
60
67
  */
61
68
  can_edit_tag?: boolean;
62
69
 
@@ -11,6 +11,7 @@ import type {
11
11
  GiveawayWinners,
12
12
  Invoice,
13
13
  LinkPreviewOptions,
14
+ LivePhoto,
14
15
  Location,
15
16
  MessageOrigin,
16
17
  PaidMediaInfo,
@@ -67,6 +68,11 @@ export type ExternalReplyInfo = {
67
68
  */
68
69
  document?: Document;
69
70
 
71
+ /**
72
+ * Optional. Message is a live photo, information about the live photo
73
+ */
74
+ live_photo?: LivePhoto;
75
+
70
76
  /**
71
77
  * Optional. Message contains paid media; information about the paid media
72
78
  */
@@ -17,7 +17,7 @@ export type ForumTopic = {
17
17
  /**
18
18
  * Color of the topic icon in RGB format
19
19
  */
20
- icon_color: string;
20
+ icon_color: number;
21
21
 
22
22
  /**
23
23
  * Optional. Unique identifier of the custom emoji shown as the topic icon
@@ -17,7 +17,7 @@ export type ForumTopicCreated = {
17
17
  /**
18
18
  * Optional. Unique identifier of the custom emoji shown as the topic icon
19
19
  */
20
- icon_custom_emoji_id: string;
20
+ icon_custom_emoji_id?: string;
21
21
 
22
22
  /**
23
23
  * Optional. True, if the name of the topic wasn't specified explicitly by its creator and likely needs to be changed
@@ -9,7 +9,7 @@ export type Giveaway = {
9
9
  /**
10
10
  * The list of chats which the user must join to participate in the giveaway
11
11
  */
12
- chat: Chat;
12
+ chats: Chat[];
13
13
 
14
14
  /**
15
15
  * Point in time (Unix timestamp) when winners of the giveaway will be selected
@@ -19,7 +19,7 @@ export type Giveaway = {
19
19
  /**
20
20
  * The number of users which are supposed to be selected as winners of the giveaway
21
21
  */
22
- winner_count?: number;
22
+ winner_count: number;
23
23
 
24
24
  /**
25
25
  * Optional. True, if only users who join the chats after the giveaway started should be eligible to win
@@ -14,16 +14,16 @@ export type GiveawayCompleted = {
14
14
  /**
15
15
  * Optional. Number of undistributed prizes
16
16
  */
17
- unclaimed_prize_count: number;
17
+ unclaimed_prize_count?: number;
18
18
 
19
19
  /**
20
20
  * Optional. Message with the giveaway that was completed, if it wasn't deleted
21
21
  */
22
- giveaway_message: Message;
22
+ giveaway_message?: Message;
23
23
 
24
24
  /**
25
25
  * Optional. True, if the giveaway is a Telegram Star giveaway. Otherwise, currently, the giveaway is a Telegram
26
26
  * Premium giveaway.
27
27
  */
28
- is_star_giveaway: boolean;
28
+ is_star_giveaway?: true;
29
29
  };
@@ -44,15 +44,15 @@ export type InlineQueryResultArticle = {
44
44
  /**
45
45
  * Optional. Url of the thumbnail for the result
46
46
  */
47
- thumb_url?: string;
47
+ thumbnail_url?: string;
48
48
 
49
49
  /**
50
50
  * Optional. Thumbnail width
51
51
  */
52
- thumb_width?: number;
52
+ thumbnail_width?: number;
53
53
 
54
54
  /**
55
55
  * Optional. Thumbnail height
56
56
  */
57
- thumb_height?: number;
57
+ thumbnail_height?: number;
58
58
  };
@@ -52,7 +52,7 @@ export type InlineQueryResultGif = {
52
52
  * Optional. MIME type of the thumbnail, must be one of “image/jpeg”, “image/gif”, or “video/mp4”. Defaults to
53
53
  * “image/jpeg”
54
54
  */
55
- thumbnail_mime_type: "image/jpeg" | "image/gif" | "video/mp4";
55
+ thumbnail_mime_type?: "image/jpeg" | "image/gif" | "video/mp4";
56
56
 
57
57
  /**
58
58
  * Optional. Title for the result
@@ -52,7 +52,7 @@ export type InlineQueryResultMpeg4Gif = {
52
52
  * Optional. MIME type of the thumbnail, must be one of “image/jpeg”, “image/gif”, or “video/mp4”. Defaults to
53
53
  * “image/jpeg”
54
54
  */
55
- thumbnail_mime_type: "image/jpeg" | "image/gif" | "video/mp4";
55
+ thumbnail_mime_type?: "image/jpeg" | "image/gif" | "video/mp4";
56
56
 
57
57
  /**
58
58
  * Optional. Title for the result
@@ -48,6 +48,11 @@ export type InlineQueryResultVenue = {
48
48
  */
49
49
  foursquare_type?: string;
50
50
 
51
+ /**
52
+ * Optional. Google Places identifier of the venue
53
+ */
54
+ google_place_id?: string;
55
+
51
56
  /**
52
57
  * Optional. Google Places type of the venue. (See supported types.)
53
58
  */
@@ -1,5 +1,5 @@
1
- import type { AtMostOne } from "../utils";
2
1
  import type { WebAppInfo } from "./";
2
+ import type { AtMostOne } from "./utils";
3
3
 
4
4
  /**
5
5
  * ## InlineQueryResultsButton
@@ -25,7 +25,7 @@ export type InputInvoiceMessageContent = {
25
25
  /**
26
26
  * Optional. Payment provider token, obtained via @BotFather. Pass an empty string for payments in Telegram Stars.
27
27
  */
28
- provider_token: string;
28
+ provider_token?: string;
29
29
 
30
30
  /**
31
31
  * Three-letter ISO 4217 currency code, see more on currencies. Pass “XTR” for payments in Telegram Stars.
@@ -2,6 +2,7 @@ import type {
2
2
  InputMediaAnimation,
3
3
  InputMediaAudio,
4
4
  InputMediaDocument,
5
+ InputMediaLivePhoto,
5
6
  InputMediaPhoto,
6
7
  InputMediaVideo,
7
8
  } from "./";
@@ -10,8 +11,9 @@ import type {
10
11
  * ## InputMedia
11
12
  * This object represents the content of a media message to be sent. It should be one of
12
13
  * - InputMediaAnimation
13
- * - InputMediaDocument
14
14
  * - InputMediaAudio
15
+ * - InputMediaDocument
16
+ * - InputMediaLivePhoto
15
17
  * - InputMediaPhoto
16
18
  * - InputMediaVideo
17
19
  * @see https://core.telegram.org/bots/api#inputmedia
@@ -20,5 +22,6 @@ export type InputMedia =
20
22
  | InputMediaAnimation
21
23
  | InputMediaDocument
22
24
  | InputMediaAudio
25
+ | InputMediaLivePhoto
23
26
  | InputMediaPhoto
24
27
  | InputMediaVideo;
@@ -0,0 +1,54 @@
1
+ import type { Attachment, MessageEntity, ParseMode } from "./";
2
+
3
+ /**
4
+ * ## InputMediaLivePhoto
5
+ * Represents a live photo to be sent.
6
+ * @see https://core.telegram.org/bots/api#inputmedialivephoto
7
+ */
8
+ export type InputMediaLivePhoto = {
9
+ /**
10
+ * Type of the result, must be live_photo
11
+ */
12
+ type: "live_photo";
13
+
14
+ /**
15
+ * Video of the live photo to send. Pass a file_id to send a file that exists on the Telegram servers (recommended)
16
+ * or pass “attach://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name.
17
+ * Sending live photos by a URL is currently unsupported.
18
+ * [More information on Sending Files](https://core.telegram.org/bots/api#sending-files)
19
+ */
20
+ media: string | Attachment;
21
+
22
+ /**
23
+ * The static photo to send. Pass a file_id to send a file that exists on the Telegram servers (recommended) or pass
24
+ * “attach://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name. Sending
25
+ * live photos by a URL is currently unsupported.
26
+ * [More information on Sending Files](https://core.telegram.org/bots/api#sending-files)
27
+ */
28
+ photo: string | Attachment;
29
+
30
+ /**
31
+ * Optional. Caption of the live photo to be sent, 0-1024 characters after entities parsing
32
+ */
33
+ caption?: string;
34
+
35
+ /**
36
+ * Optional. Mode for parsing entities in the live photo caption. See formatting options for more details.
37
+ */
38
+ parse_mode?: ParseMode;
39
+
40
+ /**
41
+ * Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
42
+ */
43
+ caption_entities?: MessageEntity[];
44
+
45
+ /**
46
+ * Optional. Pass True, if the caption must be shown above the message media
47
+ */
48
+ show_caption_above_media?: boolean;
49
+
50
+ /**
51
+ * Optional. Pass True if the live photo needs to be covered with a spoiler animation
52
+ */
53
+ has_spoiler?: boolean;
54
+ };
@@ -0,0 +1,26 @@
1
+ /**
2
+ * ## InputMediaLocation
3
+ * Represents a location to be sent.
4
+ * @see https://core.telegram.org/bots/api#inputmedialocation
5
+ */
6
+ export type InputMediaLocation = {
7
+ /**
8
+ * Type of the result, must be location
9
+ */
10
+ type: "location";
11
+
12
+ /**
13
+ * Latitude of the location
14
+ */
15
+ latitude: number;
16
+
17
+ /**
18
+ * Longitude of the location
19
+ */
20
+ longitude: number;
21
+
22
+ /**
23
+ * Optional. The radius of uncertainty for the location, measured in meters; 0-1500
24
+ */
25
+ horizontal_accuracy?: number;
26
+ };
@@ -0,0 +1,26 @@
1
+ import type { Attachment } from "./";
2
+
3
+ /**
4
+ * ## InputMediaSticker
5
+ * Represents a sticker file to be sent.
6
+ * @see https://core.telegram.org/bots/api#inputmediasticker
7
+ */
8
+ export type InputMediaSticker = {
9
+ /**
10
+ * Type of the result, must be sticker
11
+ */
12
+ type: "sticker";
13
+
14
+ /**
15
+ * File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL
16
+ * for Telegram to get a .WEBP sticker from the Internet, or pass “attach://<file_attach_name>” to upload a new
17
+ * .WEBP, .TGS, or .WEBM sticker using multipart/form-data under <file_attach_name> name.
18
+ * [More information on Sending Files](https://core.telegram.org/bots/api#sending-files)
19
+ */
20
+ media: string | Attachment;
21
+
22
+ /**
23
+ * Optional. Emoji associated with the sticker; only for just uploaded stickers
24
+ */
25
+ emoji?: string;
26
+ };
@@ -0,0 +1,52 @@
1
+ /**
2
+ * ## InputMediaVenue
3
+ * Represents a venue to be sent.
4
+ * @see https://core.telegram.org/bots/api#inputmediavenue
5
+ */
6
+ export type InputMediaVenue = {
7
+ /**
8
+ * Type of the result, must be venue
9
+ */
10
+ type: "venue";
11
+
12
+ /**
13
+ * Latitude of the location
14
+ */
15
+ latitude: number;
16
+
17
+ /**
18
+ * Longitude of the location
19
+ */
20
+ longitude: number;
21
+
22
+ /**
23
+ * Name of the venue
24
+ */
25
+ title: string;
26
+
27
+ /**
28
+ * Address of the venue
29
+ */
30
+ address: string;
31
+
32
+ /**
33
+ * Optional. Foursquare identifier of the venue
34
+ */
35
+ foursquare_id?: string;
36
+
37
+ /**
38
+ * Optional. Foursquare type of the venue, if known. (For example, “arts_entertainment/default”,
39
+ * “arts_entertainment/aquarium” or “food/icecream”.)
40
+ */
41
+ foursquare_type?: string;
42
+
43
+ /**
44
+ * Optional. Google Places identifier of the venue
45
+ */
46
+ google_place_id?: string;
47
+
48
+ /**
49
+ * Optional. Google Places type of the venue. (See [supported types](https://developers.google.com/places/web-service/supported_types).)
50
+ */
51
+ google_place_type?: string;
52
+ };
@@ -1,11 +1,16 @@
1
+ import type { InputPaidMediaLivePhoto } from "./InputPaidMediaLivePhoto";
1
2
  import type { InputPaidMediaPhoto } from "./InputPaidMediaPhoto";
2
3
  import type { InputPaidMediaVideo } from "./InputPaidMediaVideo";
3
4
 
4
5
  /**
5
6
  * ## InputPaidMedia
6
7
  * This object describes the paid media to be sent. Currently, it can be one of
8
+ * - InputPaidMediaLivePhoto
7
9
  * - InputPaidMediaPhoto
8
10
  * - InputPaidMediaVideo
9
11
  * @see https://core.telegram.org/bots/api#inputpaidmedia
10
12
  */
11
- export type InputPaidMedia = InputPaidMediaPhoto | InputPaidMediaVideo;
13
+ export type InputPaidMedia =
14
+ | InputPaidMediaLivePhoto
15
+ | InputPaidMediaPhoto
16
+ | InputPaidMediaVideo;
@@ -0,0 +1,29 @@
1
+ import type { Attachment } from "./index";
2
+
3
+ /**
4
+ * InputPaidMediaLivePhoto
5
+ * The paid media to send is a live photo.
6
+ * @see https://core.telegram.org/bots/api#inputpaidmedialivephoto
7
+ */
8
+ export type InputPaidMediaLivePhoto = {
9
+ /**
10
+ * Type of the media, must be live_photo
11
+ */
12
+ type: "live_photo";
13
+
14
+ /**
15
+ * Video of the live photo to send. Pass a file_id to send a file that exists on the Telegram servers (recommended)
16
+ * or pass “attach://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name.
17
+ * Sending live photos by a URL is currently unsupported.
18
+ * @see https://core.telegram.org/bots/api#sending-files
19
+ */
20
+ media: string | Attachment;
21
+
22
+ /**
23
+ * The static photo to send. Pass a file_id to send a file that exists on the Telegram servers (recommended) or pass
24
+ * “attach://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name. Sending
25
+ * live photos by a URL is currently unsupported.
26
+ * @see https://core.telegram.org/bots/api#sending-files
27
+ */
28
+ photo: string | Attachment;
29
+ };
@@ -0,0 +1,33 @@
1
+ import type {
2
+ InputMediaAnimation,
3
+ InputMediaAudio,
4
+ InputMediaDocument,
5
+ InputMediaLivePhoto,
6
+ InputMediaLocation,
7
+ InputMediaPhoto,
8
+ InputMediaVenue,
9
+ InputMediaVideo,
10
+ } from "./";
11
+
12
+ /**
13
+ * ## InputPollMedia
14
+ * This object represents the content of a poll description or a quiz explanation to be sent. It should be one of
15
+ * - InputMediaAnimation
16
+ * - InputMediaAudio
17
+ * - InputMediaDocument
18
+ * - InputMediaLivePhoto
19
+ * - InputMediaLocation
20
+ * - InputMediaPhoto
21
+ * - InputMediaVenue
22
+ * - InputMediaVideo
23
+ * @see https://core.telegram.org/bots/api#inputpollmedia
24
+ */
25
+ export type InputPollMedia =
26
+ | InputMediaAnimation
27
+ | InputMediaAudio
28
+ | InputMediaDocument
29
+ | InputMediaLivePhoto
30
+ | InputMediaLocation
31
+ | InputMediaPhoto
32
+ | InputMediaVenue
33
+ | InputMediaVideo;
@@ -1,4 +1,4 @@
1
- import type { MessageEntity, ParseMode } from "./";
1
+ import type { InputPollOptionMedia, MessageEntity, ParseMode } from "./";
2
2
 
3
3
  /**
4
4
  * ## InputPollOption
@@ -22,4 +22,9 @@ export type InputPollOption = {
22
22
  * instead of text_parse_mode
23
23
  */
24
24
  text_entities?: MessageEntity[];
25
+
26
+ /**
27
+ * Optional. Media added to the poll option
28
+ */
29
+ media?: InputPollOptionMedia;
25
30
  };
@@ -0,0 +1,30 @@
1
+ import type {
2
+ InputMediaAnimation,
3
+ InputMediaLivePhoto,
4
+ InputMediaLocation,
5
+ InputMediaPhoto,
6
+ InputMediaSticker,
7
+ InputMediaVenue,
8
+ InputMediaVideo,
9
+ } from "./";
10
+
11
+ /**
12
+ * ## InputPollOptionMedia
13
+ * This object represents the content of a poll option to be sent. It should be one of
14
+ * - InputMediaAnimation
15
+ * - InputMediaLivePhoto
16
+ * - InputMediaLocation
17
+ * - InputMediaPhoto
18
+ * - InputMediaSticker
19
+ * - InputMediaVenue
20
+ * - InputMediaVideo
21
+ * @see https://core.telegram.org/bots/api#inputpolloptionmedia
22
+ */
23
+ export type InputPollOptionMedia =
24
+ | InputMediaAnimation
25
+ | InputMediaLivePhoto
26
+ | InputMediaLocation
27
+ | InputMediaPhoto
28
+ | InputMediaSticker
29
+ | InputMediaVenue
30
+ | InputMediaVideo;
@@ -1,10 +1,11 @@
1
- import type { AtMostOne } from "../utils";
2
1
  import type {
3
2
  KeyboardButtonPollType,
4
3
  KeyboardButtonRequestChat,
4
+ KeyboardButtonRequestManagedBot,
5
5
  KeyboardButtonRequestUsers,
6
6
  WebAppInfo,
7
7
  } from "./";
8
+ import type { AtMostOne } from "./utils";
8
9
 
9
10
  /**
10
11
  * ## KeyboardButton
@@ -48,6 +49,13 @@ export type KeyboardButton =
48
49
  */
49
50
  request_chat?: KeyboardButtonRequestChat;
50
51
 
52
+ /**
53
+ * Optional. If specified, pressing the button will ask the user to create and share a bot that will be managed
54
+ * by the current bot. Available for bots that enabled management of other bots in the @BotFather Mini App.
55
+ * Available in private chats only.
56
+ */
57
+ request_managed_bot?: KeyboardButtonRequestManagedBot;
58
+
51
59
  /**
52
60
  * Optional. If True, the user's phone number will be sent as a contact when the button is pressed. Available in
53
61
  * private chats only.
@@ -40,12 +40,12 @@ export type KeyboardButtonRequestChat = {
40
40
  * Optional. A JSON-serialized object listing the required administrator rights of the user in the chat. The rights
41
41
  * must be a superset of bot_administrator_rights. If not specified, no additional restrictions are applied.
42
42
  */
43
- user_administrator_rights?: Partial<ChatAdministratorRights>;
43
+ user_administrator_rights?: ChatAdministratorRights;
44
44
  /**
45
45
  * Optional. A JSON-serialized object listing the required administrator rights of the bot in the chat. The rights
46
46
  * must be a subset of user_administrator_rights. If not specified, no additional restrictions are applied.
47
47
  */
48
- bot_administrator_rights?: Partial<ChatAdministratorRights>;
48
+ bot_administrator_rights?: ChatAdministratorRights;
49
49
  /**
50
50
  * Optional. Pass True to request a chat with the bot as a member. Otherwise, no additional restrictions are applied.
51
51
  */
@@ -0,0 +1,22 @@
1
+ /**
2
+ * ## KeyboardButtonRequestManagedBot
3
+ * This object defines the parameters for the creation of a managed bot. Information about the created bot will be
4
+ * shared with the bot using the update managed_bot and a Message with the field managed_bot_created.
5
+ * @see https://core.telegram.org/bots/api#keyboardbuttonrequestmanagedbot
6
+ */
7
+ export type KeyboardButtonRequestManagedBot = {
8
+ /**
9
+ * Signed 32-bit identifier of the request. Must be unique within the message
10
+ */
11
+ request_id: number;
12
+
13
+ /**
14
+ * Optional. Suggested name for the bot
15
+ */
16
+ suggested_name?: string;
17
+
18
+ /**
19
+ * Optional. Suggested username for the bot
20
+ */
21
+ suggested_username?: string;
22
+ };
@@ -0,0 +1,51 @@
1
+ import type { PhotoSize } from "./";
2
+
3
+ /**
4
+ * ## LivePhoto
5
+ * This object represents a live photo.
6
+ * @see https://core.telegram.org/bots/api#livephoto
7
+ */
8
+ export type LivePhoto = {
9
+ /**
10
+ * Optional. Available sizes of the corresponding static photo
11
+ */
12
+ photo?: PhotoSize[];
13
+
14
+ /**
15
+ * Identifier for the video file which can be used to download or reuse the file
16
+ */
17
+ file_id: string;
18
+
19
+ /**
20
+ * Unique identifier for the video file which is supposed to be the same over time and for different bots. Can't be
21
+ * used to download or reuse the file.
22
+ */
23
+ file_unique_id: string;
24
+
25
+ /**
26
+ * Video width as defined by the sender
27
+ */
28
+ width: number;
29
+
30
+ /**
31
+ * Video height as defined by the sender
32
+ */
33
+ height: number;
34
+
35
+ /**
36
+ * Duration of the video in seconds as defined by the sender
37
+ */
38
+ duration: number;
39
+
40
+ /**
41
+ * Optional. MIME type of the file as defined by the sender
42
+ */
43
+ mime_type?: string;
44
+
45
+ /**
46
+ * Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent
47
+ * defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision
48
+ * float type are safe for storing this value.
49
+ */
50
+ file_size?: number;
51
+ };