nyx-bot-client 1.0.1 → 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.
- package/@types/BackgroundFillSolid.ts +1 -1
- package/@types/BackgroundTypePattern.ts +2 -2
- package/@types/BackgroundTypeWallpaper.ts +2 -2
- package/@types/BotAccessSettings.ts +18 -0
- package/@types/ChatMemberRestricted.ts +5 -0
- package/@types/ChatPermissions.ts +8 -1
- package/@types/ExternalReplyInfo.ts +6 -0
- package/@types/ForumTopic.ts +1 -1
- package/@types/ForumTopicCreated.ts +1 -1
- package/@types/Giveaway.ts +2 -2
- package/@types/GiveawayCompleted.ts +3 -3
- package/@types/InlineQueryResultArticle.ts +3 -3
- package/@types/InlineQueryResultGif.ts +1 -1
- package/@types/InlineQueryResultMpeg4Gif.ts +1 -1
- package/@types/InlineQueryResultVenue.ts +5 -0
- package/@types/InputInvoiceMessageContent.ts +1 -1
- package/@types/InputMedia.ts +4 -1
- package/@types/InputMediaLivePhoto.ts +54 -0
- package/@types/InputMediaLocation.ts +26 -0
- package/@types/InputMediaSticker.ts +26 -0
- package/@types/InputMediaVenue.ts +52 -0
- package/@types/InputPaidMedia.ts +6 -1
- package/@types/InputPaidMediaLivePhoto.ts +29 -0
- package/@types/InputPollMedia.ts +33 -0
- package/@types/InputPollOption.ts +6 -1
- package/@types/InputPollOptionMedia.ts +30 -0
- package/@types/KeyboardButtonRequestChat.ts +2 -2
- package/@types/LivePhoto.ts +51 -0
- package/@types/Message.ts +25 -0
- package/@types/MessageReactionUpdated.ts +2 -2
- package/@types/OrderInfo.ts +1 -1
- package/@types/OwnedGiftUnique.ts +2 -2
- package/@types/PaidMedia.ts +8 -2
- package/@types/PaidMediaLivePhoto.ts +18 -0
- package/@types/PaidMediaVideo.ts +1 -1
- package/@types/PaidMessagePriceChanged.ts +4 -8
- package/@types/Poll.ts +23 -1
- package/@types/PollAnswer.ts +2 -2
- package/@types/PollMedia.ts +63 -0
- package/@types/PollOption.ts +6 -1
- package/@types/ReplyKeyboardMarkup.ts +1 -1
- package/@types/ReplyParameters.ts +2 -2
- package/@types/SentGuestMessage.ts +11 -0
- package/@types/SentWebAppMessage.ts +1 -1
- package/@types/SwitchInlineQueryChosenChat.ts +1 -1
- package/@types/TextQuote.ts +2 -2
- package/@types/Update.ts +6 -0
- package/@types/User.ts +6 -2
- package/@types/WebhookInfo.ts +1 -1
- package/@types/index.ts +12 -0
- package/biome.json +1 -1
- package/bun.lock +20 -20
- package/package.json +7 -7
- package/utils/methods.ts +140 -0
|
@@ -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
|
-
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
*/
|
package/@types/ForumTopic.ts
CHANGED
|
@@ -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
|
|
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
|
package/@types/Giveaway.ts
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
|
-
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
-
|
|
47
|
+
thumbnail_url?: string;
|
|
48
48
|
|
|
49
49
|
/**
|
|
50
50
|
* Optional. Thumbnail width
|
|
51
51
|
*/
|
|
52
|
-
|
|
52
|
+
thumbnail_width?: number;
|
|
53
53
|
|
|
54
54
|
/**
|
|
55
55
|
* Optional. Thumbnail height
|
|
56
56
|
*/
|
|
57
|
-
|
|
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
|
|
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
|
|
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
|
*/
|
|
@@ -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
|
|
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.
|
package/@types/InputMedia.ts
CHANGED
|
@@ -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
|
+
};
|
package/@types/InputPaidMedia.ts
CHANGED
|
@@ -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 =
|
|
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;
|
|
@@ -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?:
|
|
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?:
|
|
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,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
|
+
};
|
package/@types/Message.ts
CHANGED
|
@@ -31,6 +31,7 @@ import type {
|
|
|
31
31
|
InlineKeyboardMarkup,
|
|
32
32
|
Invoice,
|
|
33
33
|
LinkPreviewOptions,
|
|
34
|
+
LivePhoto,
|
|
34
35
|
Location,
|
|
35
36
|
ManagedBotCreated,
|
|
36
37
|
MaybeInaccessibleMessage,
|
|
@@ -128,6 +129,13 @@ export type Message = {
|
|
|
128
129
|
*/
|
|
129
130
|
date: number;
|
|
130
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
|
+
|
|
131
139
|
/**
|
|
132
140
|
* Optional. Unique identifier of the business connection from which the message was received. If non-empty, the
|
|
133
141
|
* message belongs to a chat of the corresponding business account that is independent from any potential bot chat
|
|
@@ -191,6 +199,16 @@ export type Message = {
|
|
|
191
199
|
*/
|
|
192
200
|
via_bot?: User;
|
|
193
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
|
+
|
|
194
212
|
/**
|
|
195
213
|
* Optional. Date the message was last edited in Unix time
|
|
196
214
|
*/
|
|
@@ -272,6 +290,12 @@ export type Message = {
|
|
|
272
290
|
*/
|
|
273
291
|
document?: Document;
|
|
274
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
|
+
|
|
275
299
|
/**
|
|
276
300
|
* Optional. Message contains paid media; information about the paid media
|
|
277
301
|
*/
|
|
@@ -667,6 +691,7 @@ export const messageTypes = [
|
|
|
667
691
|
"animation",
|
|
668
692
|
"audio",
|
|
669
693
|
"document",
|
|
694
|
+
"live_photo",
|
|
670
695
|
"paid_media",
|
|
671
696
|
"photo",
|
|
672
697
|
"sticker",
|