nyx-bot-client 0.0.8 → 1.0.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/@types/ChatAdministratorRights.ts +10 -2
- package/@types/ChatFullInfo.ts +6 -0
- package/@types/ChatMemberAdministrator.ts +10 -3
- package/@types/ChatMemberMember.ts +5 -0
- package/@types/ChatMemberRestricted.ts +11 -1
- package/@types/ChatOwnerChanged.ts +13 -0
- package/@types/ChatOwnerLeft.ts +13 -0
- package/@types/ChatPermissions.ts +6 -1
- package/@types/Gift.ts +2 -2
- package/@types/InlineKeyboardButton.ts +20 -6
- package/@types/KeyboardButton.ts +18 -4
- package/@types/Message.ts +21 -1
- package/@types/MessageEntity.ts +23 -4
- package/@types/PreparedInlineMessage.ts +16 -0
- package/@types/SuggestedPostApprovalFailed.ts +1 -1
- package/@types/SuggestedPostPaid.ts +1 -1
- package/@types/SuggestedPostRefunded.ts +1 -1
- package/@types/UniqueGift.ts +5 -0
- package/@types/UniqueGiftModel.ts +7 -1
- package/@types/User.ts +5 -0
- package/@types/UserChatBoosts.ts +13 -0
- package/@types/UserProfileAudios.ts +18 -0
- package/@types/Video.ts +6 -1
- package/@types/VideoQuality.ts +39 -0
- package/@types/index.ts +11 -0
- package/biome.json +1 -1
- package/bun.lock +18 -20
- package/package.json +5 -5
- package/utils/methods.ts +38 -10
|
@@ -10,7 +10,8 @@ export type ChatAdministratorRights = {
|
|
|
10
10
|
is_anonymous: boolean;
|
|
11
11
|
/**
|
|
12
12
|
* True, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel
|
|
13
|
-
* members, report spam messages
|
|
13
|
+
* members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars.
|
|
14
|
+
* Implied by any other administrator privilege.
|
|
14
15
|
*/
|
|
15
16
|
can_manage_chat: boolean;
|
|
16
17
|
|
|
@@ -63,7 +64,8 @@ export type ChatAdministratorRights = {
|
|
|
63
64
|
can_delete_stories: boolean;
|
|
64
65
|
|
|
65
66
|
/**
|
|
66
|
-
* True, if the administrator can post messages in the channel, or access channel
|
|
67
|
+
* Optional. True, if the administrator can post messages in the channel, approve suggested posts, or access channel
|
|
68
|
+
* statistics; for channels only
|
|
67
69
|
*/
|
|
68
70
|
can_post_messages?: boolean;
|
|
69
71
|
|
|
@@ -87,4 +89,10 @@ export type ChatAdministratorRights = {
|
|
|
87
89
|
* channels only
|
|
88
90
|
*/
|
|
89
91
|
can_manage_direct_messages?: boolean;
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Optional. True, if the administrator can edit the tags of regular members; for groups and supergroups only. If
|
|
95
|
+
* omitted defaults to the value of can_pin_messages.
|
|
96
|
+
*/
|
|
97
|
+
can_manage_tags?: boolean;
|
|
90
98
|
};
|
package/@types/ChatFullInfo.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type {
|
|
2
2
|
AcceptedGiftTypes,
|
|
3
|
+
Audio,
|
|
3
4
|
Birthdate,
|
|
4
5
|
BusinessIntro,
|
|
5
6
|
BusinessLocation,
|
|
@@ -275,6 +276,11 @@ export type ChatFullInfo = {
|
|
|
275
276
|
*/
|
|
276
277
|
rating?: UserRating;
|
|
277
278
|
|
|
279
|
+
/**
|
|
280
|
+
* Optional. For private chats, the first audio added to the profile of the user
|
|
281
|
+
*/
|
|
282
|
+
first_profile_audio?: Audio;
|
|
283
|
+
|
|
278
284
|
/**
|
|
279
285
|
* Optional. The color scheme based on a unique gift that must be used for the chat's name, message replies and
|
|
280
286
|
* link previews
|
|
@@ -27,7 +27,8 @@ export type ChatMemberAdministrator = {
|
|
|
27
27
|
is_anonymous: boolean;
|
|
28
28
|
/**
|
|
29
29
|
* True, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel
|
|
30
|
-
* members, report spam messages
|
|
30
|
+
* members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars.
|
|
31
|
+
* Implied by any other administrator privilege.
|
|
31
32
|
*/
|
|
32
33
|
can_manage_chat: boolean;
|
|
33
34
|
|
|
@@ -80,8 +81,8 @@ export type ChatMemberAdministrator = {
|
|
|
80
81
|
can_delete_stories: boolean;
|
|
81
82
|
|
|
82
83
|
/**
|
|
83
|
-
* Optional. True, if the administrator can post messages in the channel, or access channel
|
|
84
|
-
* only
|
|
84
|
+
* Optional. True, if the administrator can post messages in the channel, approve suggested posts, or access channel
|
|
85
|
+
* statistics; for channels only
|
|
85
86
|
*/
|
|
86
87
|
can_post_messages?: boolean;
|
|
87
88
|
|
|
@@ -106,6 +107,12 @@ export type ChatMemberAdministrator = {
|
|
|
106
107
|
*/
|
|
107
108
|
can_manage_direct_messages?: boolean;
|
|
108
109
|
|
|
110
|
+
/**
|
|
111
|
+
* Optional. True, if the administrator can edit the tags of regular members; for groups and supergroups only. If
|
|
112
|
+
* omitted defaults to the value of can_pin_messages.
|
|
113
|
+
*/
|
|
114
|
+
can_manage_tags?: boolean;
|
|
115
|
+
|
|
109
116
|
/**
|
|
110
117
|
* Optional. Custom title for this user
|
|
111
118
|
*/
|
|
@@ -11,6 +11,11 @@ export type ChatMemberRestricted = {
|
|
|
11
11
|
*/
|
|
12
12
|
status: "restricted";
|
|
13
13
|
|
|
14
|
+
/**
|
|
15
|
+
* Optional. Tag of the member
|
|
16
|
+
*/
|
|
17
|
+
tag?: string;
|
|
18
|
+
|
|
14
19
|
/**
|
|
15
20
|
* Information about the user
|
|
16
21
|
*/
|
|
@@ -58,7 +63,7 @@ export type ChatMemberRestricted = {
|
|
|
58
63
|
can_send_voice_notes: boolean;
|
|
59
64
|
|
|
60
65
|
/**
|
|
61
|
-
* True, if the user is allowed to send polls
|
|
66
|
+
* True, if the user is allowed to send polls and checklists
|
|
62
67
|
*/
|
|
63
68
|
can_send_polls: boolean;
|
|
64
69
|
|
|
@@ -72,6 +77,11 @@ export type ChatMemberRestricted = {
|
|
|
72
77
|
*/
|
|
73
78
|
can_add_web_page_previews: boolean;
|
|
74
79
|
|
|
80
|
+
/**
|
|
81
|
+
* True, if the user is allowed to edit their own tag
|
|
82
|
+
*/
|
|
83
|
+
can_edit_tag: boolean;
|
|
84
|
+
|
|
75
85
|
/**
|
|
76
86
|
* True, if the user is allowed to change the chat title, photo and other settings
|
|
77
87
|
*/
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { User } from "./";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* ## ChatOwnerChanged
|
|
5
|
+
* Describes a service message about an ownership change in the chat.
|
|
6
|
+
* @see https://core.telegram.org/bots/api#chatownerchanged
|
|
7
|
+
*/
|
|
8
|
+
export type ChatOwnerChanged = {
|
|
9
|
+
/**
|
|
10
|
+
* The new owner of the chat
|
|
11
|
+
*/
|
|
12
|
+
new_owner: User;
|
|
13
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { User } from "./";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* ## ChatOwnerLeft
|
|
5
|
+
* Describes a service message about the chat owner leaving the chat.
|
|
6
|
+
* @see https://core.telegram.org/bots/api#chatownerleft
|
|
7
|
+
*/
|
|
8
|
+
export type ChatOwnerLeft = {
|
|
9
|
+
/**
|
|
10
|
+
* Optional. The user which will be the new owner of the chat if the previous owner does not return to the chat
|
|
11
|
+
*/
|
|
12
|
+
new_owner?: User;
|
|
13
|
+
};
|
|
@@ -41,7 +41,7 @@ export type ChatPermissions = {
|
|
|
41
41
|
can_send_voice_notes?: boolean;
|
|
42
42
|
|
|
43
43
|
/**
|
|
44
|
-
* Optional. True, if the user is allowed to send polls
|
|
44
|
+
* Optional. True, if the user is allowed to send polls and checklists
|
|
45
45
|
*/
|
|
46
46
|
can_send_polls?: boolean;
|
|
47
47
|
|
|
@@ -55,6 +55,11 @@ export type ChatPermissions = {
|
|
|
55
55
|
*/
|
|
56
56
|
can_add_web_page_previews?: boolean;
|
|
57
57
|
|
|
58
|
+
/**
|
|
59
|
+
* Optional. True, if the user is allowed to edit their own tag
|
|
60
|
+
*/
|
|
61
|
+
can_edit_tag?: boolean;
|
|
62
|
+
|
|
58
63
|
/**
|
|
59
64
|
* Optional. True, if the user is allowed to change the chat title, photo and other settings. Ignored in public
|
|
60
65
|
* supergroups
|
package/@types/Gift.ts
CHANGED
|
@@ -37,12 +37,12 @@ export type Gift = {
|
|
|
37
37
|
has_colors?: true;
|
|
38
38
|
|
|
39
39
|
/**
|
|
40
|
-
* Optional. The total number of
|
|
40
|
+
* Optional. The total number of gifts of this type that can be sent by all users; for limited gifts only
|
|
41
41
|
*/
|
|
42
42
|
total_count?: number;
|
|
43
43
|
|
|
44
44
|
/**
|
|
45
|
-
* Optional. The number of remaining gifts of this type that can be sent; for limited gifts only
|
|
45
|
+
* Optional. The number of remaining gifts of this type that can be sent by all users; for limited gifts only
|
|
46
46
|
*/
|
|
47
47
|
remaining_count?: number;
|
|
48
48
|
|
|
@@ -8,8 +8,8 @@ import type {
|
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* ## InlineKeyboardButton
|
|
11
|
-
* This object represents one button of an inline keyboard. Exactly one of the
|
|
12
|
-
* type of the button.
|
|
11
|
+
* This object represents one button of an inline keyboard. Exactly one of the fields other than text,
|
|
12
|
+
* icon_custom_emoji_id, and style must be used to specify the type of the button.
|
|
13
13
|
* @see https://core.telegram.org/bots/api#inlinekeyboardbutton
|
|
14
14
|
*/
|
|
15
15
|
export type InlineKeyboardButton = {
|
|
@@ -18,6 +18,19 @@ export type InlineKeyboardButton = {
|
|
|
18
18
|
*/
|
|
19
19
|
text: string;
|
|
20
20
|
|
|
21
|
+
/**
|
|
22
|
+
* Optional. Unique identifier of the custom emoji shown before the text of the button. Can only be used by bots
|
|
23
|
+
* that purchased additional usernames on Fragment or in the messages directly sent by the bot to private, group and
|
|
24
|
+
* supergroup chats if the owner of the bot has a Telegram Premium subscription.
|
|
25
|
+
*/
|
|
26
|
+
icon_custom_emoji_id?: string;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Optional. Style of the button. Must be one of "danger" (red), "success" (green) or "primary" (blue). If omitted,
|
|
30
|
+
* then an app-specific style is used.
|
|
31
|
+
*/
|
|
32
|
+
style?: string;
|
|
33
|
+
|
|
21
34
|
/**
|
|
22
35
|
* Optional. HTTP or tg:// URL to be opened when the button is pressed. Links tg://user?id=<user_id> can be used to
|
|
23
36
|
* mention a user by their identifier without using a username, if this is allowed by their privacy settings.
|
|
@@ -45,7 +58,8 @@ export type InlineKeyboardButton = {
|
|
|
45
58
|
/**
|
|
46
59
|
* Optional. If set, pressing the button will prompt the user to select one of their chats, open that chat and insert
|
|
47
60
|
* the bot's username and the specified inline query in the input field. May be empty, in which case just the bot's
|
|
48
|
-
* username will be inserted. Not supported for messages sent on behalf of a
|
|
61
|
+
* username will be inserted. Not supported for messages sent in channel direct messages chats and on behalf of a
|
|
62
|
+
* Telegram Business account.
|
|
49
63
|
*/
|
|
50
64
|
switch_inline_query?: string;
|
|
51
65
|
|
|
@@ -54,15 +68,15 @@ export type InlineKeyboardButton = {
|
|
|
54
68
|
* chat's input field. May be empty, in which case only the bot's username will be inserted.
|
|
55
69
|
*
|
|
56
70
|
* This offers a quick way for the user to open your bot in inline mode in the same chat - good for selecting
|
|
57
|
-
* something from multiple options. Not supported in channels and for messages sent
|
|
58
|
-
* account.
|
|
71
|
+
* something from multiple options. Not supported in channels and for messages sent in channel direct messages chats
|
|
72
|
+
* and on behalf of a Telegram Business account.
|
|
59
73
|
*/
|
|
60
74
|
switch_inline_query_current_chat?: string;
|
|
61
75
|
|
|
62
76
|
/**
|
|
63
77
|
* Optional. If set, pressing the button will prompt the user to select one of their chats of the specified type, open
|
|
64
78
|
* that chat and insert the bot's username and the specified inline query in the input field. Not supported for
|
|
65
|
-
* messages sent on behalf of a Telegram Business account.
|
|
79
|
+
* messages sent in channel direct messages chats and on behalf of a Telegram Business account.
|
|
66
80
|
*/
|
|
67
81
|
switch_inline_query_chosen_chat?: SwitchInlineQueryChosenChat;
|
|
68
82
|
|
package/@types/KeyboardButton.ts
CHANGED
|
@@ -8,18 +8,32 @@ import type {
|
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* ## KeyboardButton
|
|
11
|
-
* This object represents one button of the reply keyboard. At most one of the
|
|
12
|
-
* type of the button. For simple text buttons, String can
|
|
11
|
+
* This object represents one button of the reply keyboard. At most one of the fields other than text,
|
|
12
|
+
* icon_custom_emoji_id, and style must be used to specify the type of the button. For simple text buttons, String can
|
|
13
|
+
* be used instead of this object to specify the button text.
|
|
13
14
|
* @see https://core.telegram.org/bots/api#keyboardbutton
|
|
14
15
|
*/
|
|
15
16
|
export type KeyboardButton =
|
|
16
17
|
| string
|
|
17
18
|
| ({
|
|
18
19
|
/**
|
|
19
|
-
* Text of the button. If none of the
|
|
20
|
-
* pressed
|
|
20
|
+
* Text of the button. If none of the fields other than text, icon_custom_emoji_id, and style are used, it will
|
|
21
|
+
* be sent as a message when the button is pressed
|
|
21
22
|
*/
|
|
22
23
|
text: string;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Optional. Unique identifier of the custom emoji shown before the text of the button. Can only be used by bots
|
|
27
|
+
* that purchased additional usernames on Fragment or in the messages directly sent by the bot to private, group
|
|
28
|
+
* and supergroup chats if the owner of the bot has a Telegram Premium subscription.
|
|
29
|
+
*/
|
|
30
|
+
icon_custom_emoji_id?: string;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Optional. Style of the button. Must be one of "danger" (red), "success" (green) or "primary" (blue). If
|
|
34
|
+
* omitted, then an app-specific style is used.
|
|
35
|
+
*/
|
|
36
|
+
style?: string;
|
|
23
37
|
} & Partial<
|
|
24
38
|
AtMostOne<{
|
|
25
39
|
/**
|
package/@types/Message.ts
CHANGED
|
@@ -4,6 +4,8 @@ import type {
|
|
|
4
4
|
Chat,
|
|
5
5
|
ChatBackground,
|
|
6
6
|
ChatBoostAdded,
|
|
7
|
+
ChatOwnerChanged,
|
|
8
|
+
ChatOwnerLeft,
|
|
7
9
|
ChatShared,
|
|
8
10
|
Checklist,
|
|
9
11
|
ChecklistTasksAdded,
|
|
@@ -45,6 +47,7 @@ import type {
|
|
|
45
47
|
Story,
|
|
46
48
|
SuccessfulPayment,
|
|
47
49
|
SuggestedPostApprovalFailed,
|
|
50
|
+
SuggestedPostApproved,
|
|
48
51
|
SuggestedPostDeclined,
|
|
49
52
|
SuggestedPostInfo,
|
|
50
53
|
SuggestedPostPaid,
|
|
@@ -112,6 +115,11 @@ export type Message = {
|
|
|
112
115
|
*/
|
|
113
116
|
sender_business_bot?: User;
|
|
114
117
|
|
|
118
|
+
/**
|
|
119
|
+
* Optional. Tag or custom title of the sender of the message; for supergroups only
|
|
120
|
+
*/
|
|
121
|
+
sender_tag?: string;
|
|
122
|
+
|
|
115
123
|
/**
|
|
116
124
|
* Date the message was sent in Unix time. It is always a positive number, representing a valid date.
|
|
117
125
|
*/
|
|
@@ -359,6 +367,16 @@ export type Message = {
|
|
|
359
367
|
*/
|
|
360
368
|
left_chat_member?: User;
|
|
361
369
|
|
|
370
|
+
/**
|
|
371
|
+
* Optional. Service message: chat owner has left
|
|
372
|
+
*/
|
|
373
|
+
chat_owner_left?: ChatOwnerLeft;
|
|
374
|
+
|
|
375
|
+
/**
|
|
376
|
+
* Optional. Service message: chat owner has changed
|
|
377
|
+
*/
|
|
378
|
+
chat_owner_changed?: ChatOwnerChanged;
|
|
379
|
+
|
|
362
380
|
/**
|
|
363
381
|
* Optional. A chat title was changed to this value
|
|
364
382
|
*/
|
|
@@ -567,7 +585,7 @@ export type Message = {
|
|
|
567
585
|
/**
|
|
568
586
|
* Optional. Service message: a suggested post was approved
|
|
569
587
|
*/
|
|
570
|
-
suggested_post_approved?:
|
|
588
|
+
suggested_post_approved?: SuggestedPostApproved;
|
|
571
589
|
|
|
572
590
|
/**
|
|
573
591
|
* Optional. Service message: approval of a suggested post has failed
|
|
@@ -642,6 +660,8 @@ export const messageTypes = [
|
|
|
642
660
|
"location",
|
|
643
661
|
"new_chat_members",
|
|
644
662
|
"left_chat_member",
|
|
663
|
+
"chat_owner_left",
|
|
664
|
+
"chat_owner_changed",
|
|
645
665
|
"new_chat_title",
|
|
646
666
|
"new_chat_photo",
|
|
647
667
|
"delete_chat_photo",
|
package/@types/MessageEntity.ts
CHANGED
|
@@ -37,7 +37,8 @@ export type MessageEntity = {
|
|
|
37
37
|
* “pre” (monowidth block),
|
|
38
38
|
* “text_link” (for clickable text URLs),
|
|
39
39
|
* “text_mention” (for users without usernames),
|
|
40
|
-
* “custom_emoji” (for inline custom emoji stickers)
|
|
40
|
+
* “custom_emoji” (for inline custom emoji stickers),
|
|
41
|
+
* “date_time” (for formatted date and time)
|
|
41
42
|
*/
|
|
42
43
|
type:
|
|
43
44
|
| "mention"
|
|
@@ -54,14 +55,14 @@ export type MessageEntity = {
|
|
|
54
55
|
| "blockquote"
|
|
55
56
|
| "expandable_blockquote"
|
|
56
57
|
| "code"
|
|
57
|
-
| "
|
|
58
|
+
| "url";
|
|
58
59
|
}
|
|
59
60
|
| {
|
|
60
61
|
/**
|
|
61
62
|
* Type of the entity.
|
|
62
|
-
* “
|
|
63
|
+
* “text_link” (for clickable text URLs),
|
|
63
64
|
*/
|
|
64
|
-
type: "
|
|
65
|
+
type: "text_link";
|
|
65
66
|
|
|
66
67
|
/**
|
|
67
68
|
* Optional. For “text_link” only, URL that will be opened after user taps on the text
|
|
@@ -106,4 +107,22 @@ export type MessageEntity = {
|
|
|
106
107
|
*/
|
|
107
108
|
custom_emoji_id: string;
|
|
108
109
|
}
|
|
110
|
+
| {
|
|
111
|
+
/**
|
|
112
|
+
* Type of the entity.
|
|
113
|
+
* "date_time" (for formatted date and time)
|
|
114
|
+
*/
|
|
115
|
+
type: "date_time";
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Optional. For "date_time" only, the Unix time associated with the entity
|
|
119
|
+
*/
|
|
120
|
+
unix_time?: number;
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Optional. For "date_time" only, the string that defines the formatting of the date and time.
|
|
124
|
+
* See date-time entity formatting for more details.
|
|
125
|
+
*/
|
|
126
|
+
date_time_format?: string;
|
|
127
|
+
}
|
|
109
128
|
);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ## PreparedInlineMessage
|
|
3
|
+
* Describes an inline message to be sent by a user of a Mini App.
|
|
4
|
+
* @see https://core.telegram.org/bots/api#preparedinlinemessage
|
|
5
|
+
*/
|
|
6
|
+
export type PreparedInlineMessage = {
|
|
7
|
+
/**
|
|
8
|
+
* Unique identifier of the prepared message
|
|
9
|
+
*/
|
|
10
|
+
id: string;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Expiration date of the prepared message, in Unix time. Expired prepared messages can no longer be used
|
|
14
|
+
*/
|
|
15
|
+
expiration_date: number;
|
|
16
|
+
};
|
|
@@ -10,7 +10,7 @@ export type SuggestedPostPaid = {
|
|
|
10
10
|
* Optional. Message containing the suggested post. Note that the Message object in this field will not contain the
|
|
11
11
|
* reply_to_message field even if it itself is a reply.
|
|
12
12
|
*/
|
|
13
|
-
suggested_post_message
|
|
13
|
+
suggested_post_message?: Message;
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* Currency in which the payment was made. Currently, one of “XTR” for Telegram Stars or “TON” for toncoins
|
|
@@ -10,7 +10,7 @@ export type SuggestedPostRefunded = {
|
|
|
10
10
|
* Optional. Message containing the suggested post. Note that the Message object in this field will not contain the
|
|
11
11
|
* reply_to_message field even if it itself is a reply.
|
|
12
12
|
*/
|
|
13
|
-
suggested_post_message
|
|
13
|
+
suggested_post_message?: Message;
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* Reason for the refund. Currently, one of “post_deleted” if the post was deleted within 24 hours of being posted or
|
package/@types/UniqueGift.ts
CHANGED
|
@@ -52,6 +52,11 @@ export type UniqueGift = {
|
|
|
52
52
|
*/
|
|
53
53
|
is_premium?: true;
|
|
54
54
|
|
|
55
|
+
/**
|
|
56
|
+
* Optional. True, if the gift was used to craft another gift and isn't available anymore
|
|
57
|
+
*/
|
|
58
|
+
is_burned?: true;
|
|
59
|
+
|
|
55
60
|
/**
|
|
56
61
|
* Optional. True, if the gift is assigned from the TON blockchain and can't be resold or transferred in Telegram
|
|
57
62
|
*/
|
|
@@ -17,7 +17,13 @@ export type UniqueGiftModel = {
|
|
|
17
17
|
sticker: Sticker;
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
|
-
* The number of unique gifts that receive this model for every 1000 gifts
|
|
20
|
+
* The number of unique gifts that receive this model for every 1000 gift upgrades. Always 0 for crafted gifts.
|
|
21
21
|
*/
|
|
22
22
|
rarity_per_mille: number;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Optional. Rarity of the model if it is a crafted model. Currently, can be "uncommon", "rare", "epic", or
|
|
26
|
+
* "legendary".
|
|
27
|
+
*/
|
|
28
|
+
rarity?: string;
|
|
23
29
|
};
|
package/@types/User.ts
CHANGED
|
@@ -76,4 +76,9 @@ export type User = {
|
|
|
76
76
|
* Optional. True, if the bot has forum topic mode enabled in private chats. Returned only in getMe.
|
|
77
77
|
*/
|
|
78
78
|
has_topics_enabled?: boolean;
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Optional. True, if the bot allows users to create and delete topics in private chats. Returned only in getMe.
|
|
82
|
+
*/
|
|
83
|
+
allows_users_to_create_topics?: boolean;
|
|
79
84
|
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ChatBoost } from "./";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* ## UserChatBoosts
|
|
5
|
+
* This object represents a list of boosts added to a chat by a user.
|
|
6
|
+
* @see https://core.telegram.org/bots/api#userchatboosts
|
|
7
|
+
*/
|
|
8
|
+
export type UserChatBoosts = {
|
|
9
|
+
/**
|
|
10
|
+
* The list of boosts added to the chat by the user
|
|
11
|
+
*/
|
|
12
|
+
boosts: ChatBoost[];
|
|
13
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { Audio } from "./";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* ## UserProfileAudios
|
|
5
|
+
* This object represents the audios displayed on a user's profile.
|
|
6
|
+
* @see https://core.telegram.org/bots/api#userprofileaudios
|
|
7
|
+
*/
|
|
8
|
+
export type UserProfileAudios = {
|
|
9
|
+
/**
|
|
10
|
+
* Total number of profile audios for the target user
|
|
11
|
+
*/
|
|
12
|
+
total_count: number;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Requested profile audios
|
|
16
|
+
*/
|
|
17
|
+
audios: Audio[];
|
|
18
|
+
};
|
package/@types/Video.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { PhotoSize } from "./";
|
|
1
|
+
import type { PhotoSize, VideoQuality } from "./";
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* ## Video
|
|
@@ -47,6 +47,11 @@ export type Video = {
|
|
|
47
47
|
*/
|
|
48
48
|
start_timestamp?: number;
|
|
49
49
|
|
|
50
|
+
/**
|
|
51
|
+
* Optional. List of available qualities of the video
|
|
52
|
+
*/
|
|
53
|
+
qualities?: VideoQuality[];
|
|
54
|
+
|
|
50
55
|
/**
|
|
51
56
|
* Optional. Original filename as defined by the sender
|
|
52
57
|
*/
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ## VideoQuality
|
|
3
|
+
* This object represents a video file of a specific quality.
|
|
4
|
+
* @see https://core.telegram.org/bots/api#videoquality
|
|
5
|
+
*/
|
|
6
|
+
export type VideoQuality = {
|
|
7
|
+
/**
|
|
8
|
+
* Identifier for this file, which can be used to download or reuse the file
|
|
9
|
+
*/
|
|
10
|
+
file_id: string;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used
|
|
14
|
+
* to download or reuse the file.
|
|
15
|
+
*/
|
|
16
|
+
file_unique_id: string;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Video width
|
|
20
|
+
*/
|
|
21
|
+
width: number;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Video height
|
|
25
|
+
*/
|
|
26
|
+
height: number;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Codec that was used to encode the video, for example, "h264", "h265", or "av01"
|
|
30
|
+
*/
|
|
31
|
+
codec: string;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent
|
|
35
|
+
* defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or
|
|
36
|
+
* double-precision float type are safe for storing this value.
|
|
37
|
+
*/
|
|
38
|
+
file_size?: number;
|
|
39
|
+
};
|
package/@types/index.ts
CHANGED
|
@@ -56,6 +56,8 @@ export * from "./ChatMemberMember";
|
|
|
56
56
|
export * from "./ChatMemberOwner";
|
|
57
57
|
export * from "./ChatMemberRestricted";
|
|
58
58
|
export * from "./ChatMemberUpdated";
|
|
59
|
+
export * from "./ChatOwnerChanged";
|
|
60
|
+
export * from "./ChatOwnerLeft";
|
|
59
61
|
export * from "./ChatPermissions";
|
|
60
62
|
export * from "./ChatPhoto";
|
|
61
63
|
export * from "./ChatShared";
|
|
@@ -206,6 +208,7 @@ export * from "./Poll";
|
|
|
206
208
|
export * from "./PollAnswer";
|
|
207
209
|
export * from "./PollOption";
|
|
208
210
|
export * from "./PreCheckoutQuery";
|
|
211
|
+
export * from "./PreparedInlineMessage";
|
|
209
212
|
export * from "./ProximityAlertTriggered";
|
|
210
213
|
export * from "./ReactionCount";
|
|
211
214
|
export * from "./ReactionType";
|
|
@@ -217,6 +220,10 @@ export * from "./ReplyKeyboardMarkup";
|
|
|
217
220
|
export * from "./ReplyKeyboardRemove";
|
|
218
221
|
export * from "./ReplyParameters";
|
|
219
222
|
export * from "./ResponseParameters";
|
|
223
|
+
export * from "./RevenueWithdrawalState";
|
|
224
|
+
export * from "./RevenueWithdrawalStateFailed";
|
|
225
|
+
export * from "./RevenueWithdrawalStatePending";
|
|
226
|
+
export * from "./RevenueWithdrawalStateSucceeded";
|
|
220
227
|
export * from "./SentWebAppMessage";
|
|
221
228
|
export * from "./SharedUser";
|
|
222
229
|
export * from "./ShippingAddress";
|
|
@@ -238,6 +245,7 @@ export * from "./StoryAreaTypeUniqueGift";
|
|
|
238
245
|
export * from "./StoryAreaTypeWeather";
|
|
239
246
|
export * from "./SuccessfulPayment";
|
|
240
247
|
export * from "./SuggestedPostApprovalFailed";
|
|
248
|
+
export * from "./SuggestedPostApproved";
|
|
241
249
|
export * from "./SuggestedPostDeclined";
|
|
242
250
|
export * from "./SuggestedPostInfo";
|
|
243
251
|
export * from "./SuggestedPostPaid";
|
|
@@ -263,6 +271,8 @@ export * from "./UniqueGiftModel";
|
|
|
263
271
|
export * from "./UniqueGiftSymbol";
|
|
264
272
|
export * from "./Update";
|
|
265
273
|
export * from "./User";
|
|
274
|
+
export * from "./UserChatBoosts";
|
|
275
|
+
export * from "./UserProfileAudios";
|
|
266
276
|
export * from "./UserProfilePhotos";
|
|
267
277
|
export * from "./UserRating";
|
|
268
278
|
export * from "./UsersShared";
|
|
@@ -273,6 +283,7 @@ export * from "./VideoChatParticipantsInvited";
|
|
|
273
283
|
export * from "./VideoChatScheduled";
|
|
274
284
|
export * from "./VideoChatStarted";
|
|
275
285
|
export * from "./VideoNote";
|
|
286
|
+
export * from "./VideoQuality";
|
|
276
287
|
export * from "./Voice";
|
|
277
288
|
export * from "./WebAppData";
|
|
278
289
|
export * from "./WebAppInfo";
|
package/biome.json
CHANGED
package/bun.lock
CHANGED
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
"": {
|
|
6
6
|
"name": "nyx-bot-client",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@biomejs/biome": "^2.
|
|
9
|
-
"@types/node": "^25.
|
|
10
|
-
"dotenv": "^17.
|
|
8
|
+
"@biomejs/biome": "^2.4.6",
|
|
9
|
+
"@types/node": "^25.3.5",
|
|
10
|
+
"dotenv": "^17.3.1",
|
|
11
11
|
"kysely": "^0.28.11",
|
|
12
|
-
"mysql2": "^3.
|
|
12
|
+
"mysql2": "^3.19.0",
|
|
13
13
|
"ts-debounce": "^4.0.0",
|
|
14
14
|
"zod": "^4.3.6",
|
|
15
15
|
},
|
|
@@ -22,27 +22,27 @@
|
|
|
22
22
|
},
|
|
23
23
|
},
|
|
24
24
|
"packages": {
|
|
25
|
-
"@biomejs/biome": ["@biomejs/biome@2.
|
|
25
|
+
"@biomejs/biome": ["@biomejs/biome@2.4.6", "", { "optionalDependencies": { "@biomejs/cli-darwin-arm64": "2.4.6", "@biomejs/cli-darwin-x64": "2.4.6", "@biomejs/cli-linux-arm64": "2.4.6", "@biomejs/cli-linux-arm64-musl": "2.4.6", "@biomejs/cli-linux-x64": "2.4.6", "@biomejs/cli-linux-x64-musl": "2.4.6", "@biomejs/cli-win32-arm64": "2.4.6", "@biomejs/cli-win32-x64": "2.4.6" }, "bin": { "biome": "bin/biome" } }, "sha512-QnHe81PMslpy3mnpL8DnO2M4S4ZnYPkjlGCLWBZT/3R9M6b5daArWMMtEfP52/n174RKnwRIf3oT8+wc9ihSfQ=="],
|
|
26
26
|
|
|
27
|
-
"@biomejs/cli-darwin-arm64": ["@biomejs/cli-darwin-arm64@2.
|
|
27
|
+
"@biomejs/cli-darwin-arm64": ["@biomejs/cli-darwin-arm64@2.4.6", "", { "os": "darwin", "cpu": "arm64" }, "sha512-NW18GSyxr+8sJIqgoGwVp5Zqm4SALH4b4gftIA0n62PTuBs6G2tHlwNAOj0Vq0KKSs7Sf88VjjmHh0O36EnzrQ=="],
|
|
28
28
|
|
|
29
|
-
"@biomejs/cli-darwin-x64": ["@biomejs/cli-darwin-x64@2.
|
|
29
|
+
"@biomejs/cli-darwin-x64": ["@biomejs/cli-darwin-x64@2.4.6", "", { "os": "darwin", "cpu": "x64" }, "sha512-4uiE/9tuI7cnjtY9b07RgS7gGyYOAfIAGeVJWEfeCnAarOAS7qVmuRyX6d7JTKw28/mt+rUzMasYeZ+0R/U1Mw=="],
|
|
30
30
|
|
|
31
|
-
"@biomejs/cli-linux-arm64": ["@biomejs/cli-linux-arm64@2.
|
|
31
|
+
"@biomejs/cli-linux-arm64": ["@biomejs/cli-linux-arm64@2.4.6", "", { "os": "linux", "cpu": "arm64" }, "sha512-kMLaI7OF5GN1Q8Doymjro1P8rVEoy7BKQALNz6fiR8IC1WKduoNyteBtJlHT7ASIL0Cx2jR6VUOBIbcB1B8pew=="],
|
|
32
32
|
|
|
33
|
-
"@biomejs/cli-linux-arm64-musl": ["@biomejs/cli-linux-arm64-musl@2.
|
|
33
|
+
"@biomejs/cli-linux-arm64-musl": ["@biomejs/cli-linux-arm64-musl@2.4.6", "", { "os": "linux", "cpu": "arm64" }, "sha512-F/JdB7eN22txiTqHM5KhIVt0jVkzZwVYrdTR1O3Y4auBOQcXxHK4dxULf4z43QyZI5tsnQJrRBHZy7wwtL+B3A=="],
|
|
34
34
|
|
|
35
|
-
"@biomejs/cli-linux-x64": ["@biomejs/cli-linux-x64@2.
|
|
35
|
+
"@biomejs/cli-linux-x64": ["@biomejs/cli-linux-x64@2.4.6", "", { "os": "linux", "cpu": "x64" }, "sha512-oHXmUFEoH8Lql1xfc3QkFLiC1hGR7qedv5eKNlC185or+o4/4HiaU7vYODAH3peRCfsuLr1g6v2fK9dFFOYdyw=="],
|
|
36
36
|
|
|
37
|
-
"@biomejs/cli-linux-x64-musl": ["@biomejs/cli-linux-x64-musl@2.
|
|
37
|
+
"@biomejs/cli-linux-x64-musl": ["@biomejs/cli-linux-x64-musl@2.4.6", "", { "os": "linux", "cpu": "x64" }, "sha512-C9s98IPDu7DYarjlZNuzJKTjVHN03RUnmHV5htvqsx6vEUXCDSJ59DNwjKVD5XYoSS4N+BYhq3RTBAL8X6svEg=="],
|
|
38
38
|
|
|
39
|
-
"@biomejs/cli-win32-arm64": ["@biomejs/cli-win32-arm64@2.
|
|
39
|
+
"@biomejs/cli-win32-arm64": ["@biomejs/cli-win32-arm64@2.4.6", "", { "os": "win32", "cpu": "arm64" }, "sha512-xzThn87Pf3YrOGTEODFGONmqXpTwUNxovQb72iaUOdcw8sBSY3+3WD8Hm9IhMYLnPi0n32s3L3NWU6+eSjfqFg=="],
|
|
40
40
|
|
|
41
|
-
"@biomejs/cli-win32-x64": ["@biomejs/cli-win32-x64@2.
|
|
41
|
+
"@biomejs/cli-win32-x64": ["@biomejs/cli-win32-x64@2.4.6", "", { "os": "win32", "cpu": "x64" }, "sha512-7++XhnsPlr1HDbor5amovPjOH6vsrFOCdp93iKXhFn6bcMUI6soodj3WWKfgEO6JosKU1W5n3uky3WW9RlRjTg=="],
|
|
42
42
|
|
|
43
43
|
"@types/bun": ["@types/bun@1.2.17", "", { "dependencies": { "bun-types": "1.2.17" } }, "sha512-l/BYs/JYt+cXA/0+wUhulYJB6a6p//GTPiJ7nV+QHa8iiId4HZmnu/3J/SowP5g0rTiERY2kfGKXEK5Ehltx4Q=="],
|
|
44
44
|
|
|
45
|
-
"@types/node": ["@types/node@25.
|
|
45
|
+
"@types/node": ["@types/node@25.3.5", "", { "dependencies": { "undici-types": "~7.18.0" } }, "sha512-oX8xrhvpiyRCQkG1MFchB09f+cXftgIXb3a7UUa4Y3wpmZPw5tyZGTLWhlESOLq1Rq6oDlc8npVU2/9xiCuXMA=="],
|
|
46
46
|
|
|
47
47
|
"aws-ssl-profiles": ["aws-ssl-profiles@1.1.2", "", {}, "sha512-NZKeq9AfyQvEeNlN0zSYAaWrmBffJh3IELMZfRpJVWgrpEbtEpnjvzqBPf+mxoI287JohRDoa+/nsfqqiZmF6g=="],
|
|
48
48
|
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
|
|
51
51
|
"denque": ["denque@2.1.0", "", {}, "sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw=="],
|
|
52
52
|
|
|
53
|
-
"dotenv": ["dotenv@17.
|
|
53
|
+
"dotenv": ["dotenv@17.3.1", "", {}, "sha512-IO8C/dzEb6O3F9/twg6ZLXz164a2fhTnEWb95H23Dm4OuN+92NmEAlTrupP9VW6Jm3sO26tQlqyvyi4CsnY9GA=="],
|
|
54
54
|
|
|
55
55
|
"generate-function": ["generate-function@2.3.1", "", { "dependencies": { "is-property": "^1.0.2" } }, "sha512-eeB5GfMNeevm/GRYq20ShmsaGcmI81kIX2K9XQx5miC8KdHaC6Jm0qQ8ZNeGOi7wYB8OsdxKs+Y2oVuTFuVwKQ=="],
|
|
56
56
|
|
|
@@ -64,21 +64,19 @@
|
|
|
64
64
|
|
|
65
65
|
"lru.min": ["lru.min@1.1.4", "", {}, "sha512-DqC6n3QQ77zdFpCMASA1a3Jlb64Hv2N2DciFGkO/4L9+q/IpIAuRlKOvCXabtRW6cQf8usbmM6BE/TOPysCdIA=="],
|
|
66
66
|
|
|
67
|
-
"mysql2": ["mysql2@3.
|
|
67
|
+
"mysql2": ["mysql2@3.19.0", "", { "dependencies": { "aws-ssl-profiles": "^1.1.2", "denque": "^2.1.0", "generate-function": "^2.3.1", "iconv-lite": "^0.7.2", "long": "^5.3.2", "lru.min": "^1.1.4", "named-placeholders": "^1.1.6", "sql-escaper": "^1.3.3" }, "peerDependencies": { "@types/node": ">= 8" } }, "sha512-760Ay9HViAUT7V8QkYxrIx/LHJPGWtE+D/31VuiDm1eu2IFaUIqMcK7+hVHnmgnC7JnnwreFKsZoa8K6BnGl8Q=="],
|
|
68
68
|
|
|
69
69
|
"named-placeholders": ["named-placeholders@1.1.6", "", { "dependencies": { "lru.min": "^1.1.0" } }, "sha512-Tz09sEL2EEuv5fFowm419c1+a/jSMiBjI9gHxVLrVdbUkkNUUfjsVYs9pVZu5oCon/kmRh9TfLEObFtkVxmY0w=="],
|
|
70
70
|
|
|
71
71
|
"safer-buffer": ["safer-buffer@2.1.2", "", {}, "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="],
|
|
72
72
|
|
|
73
|
-
"
|
|
74
|
-
|
|
75
|
-
"sql-escaper": ["sql-escaper@1.3.1", "", {}, "sha512-GLMJGWKzrr7BS5E5+8Prix6RGfBd4UokKMxkPSg313X0TvUyjdJU3Xg7FAhhcba4dHnLy81t4YeHETKLGVsDow=="],
|
|
73
|
+
"sql-escaper": ["sql-escaper@1.3.3", "", {}, "sha512-BsTCV265VpTp8tm1wyIm1xqQCS+Q9NHx2Sr+WcnUrgLrQ6yiDIvHYJV5gHxsj1lMBy2zm5twLaZao8Jd+S8JJw=="],
|
|
76
74
|
|
|
77
75
|
"ts-debounce": ["ts-debounce@4.0.0", "", {}, "sha512-+1iDGY6NmOGidq7i7xZGA4cm8DAa6fqdYcvO5Z6yBevH++Bdo9Qt/mN0TzHUgcCcKv1gmh9+W5dHqz8pMWbCbg=="],
|
|
78
76
|
|
|
79
77
|
"typescript": ["typescript@5.8.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ=="],
|
|
80
78
|
|
|
81
|
-
"undici-types": ["undici-types@7.
|
|
79
|
+
"undici-types": ["undici-types@7.18.2", "", {}, "sha512-AsuCzffGHJybSaRrmr5eHr81mwJU3kjw6M+uprWvCXiNeN9SOGwQ3Jn8jb8m3Z6izVgknn1R0FTCEAP2QrLY/w=="],
|
|
82
80
|
|
|
83
81
|
"zod": ["zod@4.3.6", "", {}, "sha512-rftlrkhHZOcjDwkGlnUtZZkvaPHCsDATp4pGpuOOMDaTdDDXF91wuVDJoWoPsKX/3YPQ5fHuF3STjcYyKr+Qhg=="],
|
|
84
82
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nyx-bot-client",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"module": "index.ts",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"devDependencies": {
|
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
"typescript": "^5"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@biomejs/biome": "^2.
|
|
14
|
-
"@types/node": "^25.
|
|
15
|
-
"dotenv": "^17.
|
|
13
|
+
"@biomejs/biome": "^2.4.6",
|
|
14
|
+
"@types/node": "^25.3.5",
|
|
15
|
+
"dotenv": "^17.3.1",
|
|
16
16
|
"kysely": "^0.28.11",
|
|
17
|
-
"mysql2": "^3.
|
|
17
|
+
"mysql2": "^3.19.0",
|
|
18
18
|
"ts-debounce": "^4.0.0",
|
|
19
19
|
"zod": "^4.3.6"
|
|
20
20
|
}
|
package/utils/methods.ts
CHANGED
|
@@ -27,6 +27,7 @@ import type {
|
|
|
27
27
|
InputMediaVideo,
|
|
28
28
|
InputPaidMedia,
|
|
29
29
|
InputPollOption,
|
|
30
|
+
InputProfilePhoto,
|
|
30
31
|
InputSticker,
|
|
31
32
|
LabeledPrice,
|
|
32
33
|
LinkPreviewOptions,
|
|
@@ -46,6 +47,7 @@ import type {
|
|
|
46
47
|
ShippingOption,
|
|
47
48
|
StarAmount,
|
|
48
49
|
StarTransaction,
|
|
50
|
+
StarTransactions,
|
|
49
51
|
Sticker,
|
|
50
52
|
StickerSet,
|
|
51
53
|
Story,
|
|
@@ -81,7 +83,7 @@ export type getUpdatesParams = {
|
|
|
81
83
|
allowed_updates?: string[];
|
|
82
84
|
} & methodParams;
|
|
83
85
|
|
|
84
|
-
export const getUpdates = (params: getUpdatesParams): APIResponse<Update> =>
|
|
86
|
+
export const getUpdates = (params: getUpdatesParams): APIResponse<Update[]> =>
|
|
85
87
|
requestTelegramAPI("getUpdates", params);
|
|
86
88
|
|
|
87
89
|
export type sendMessageParams = {
|
|
@@ -663,7 +665,7 @@ export const getUserProfilePhotos = (
|
|
|
663
665
|
export type setUserEmojiStatusParams = {
|
|
664
666
|
user_id: number;
|
|
665
667
|
emoji_status_custom_emoji_id?: string;
|
|
666
|
-
emoji_status_expiration_date?:
|
|
668
|
+
emoji_status_expiration_date?: number;
|
|
667
669
|
} & methodParams;
|
|
668
670
|
|
|
669
671
|
export const setUserEmojiStatus = (
|
|
@@ -797,7 +799,7 @@ export type editChatInviteLinkParams = {
|
|
|
797
799
|
name?: string;
|
|
798
800
|
expire_date?: number;
|
|
799
801
|
member_limit?: number;
|
|
800
|
-
creates_join_request?:
|
|
802
|
+
creates_join_request?: boolean;
|
|
801
803
|
} & methodParams;
|
|
802
804
|
|
|
803
805
|
export const editChatInviteLink = (
|
|
@@ -1140,7 +1142,7 @@ export const getMyCommands = (
|
|
|
1140
1142
|
): APIResponse<BotCommand[]> => requestTelegramAPI("getMyCommands", params);
|
|
1141
1143
|
|
|
1142
1144
|
export type setMyNameParams = {
|
|
1143
|
-
name?:
|
|
1145
|
+
name?: string;
|
|
1144
1146
|
language_code?: string;
|
|
1145
1147
|
} & methodParams;
|
|
1146
1148
|
|
|
@@ -1155,7 +1157,7 @@ export const getMyName = (params: getMyNameParams): APIResponse<BotName> =>
|
|
|
1155
1157
|
requestTelegramAPI("getMyName", params);
|
|
1156
1158
|
|
|
1157
1159
|
export type setMyDescriptionParams = {
|
|
1158
|
-
description?:
|
|
1160
|
+
description?: string;
|
|
1159
1161
|
language_code?: string;
|
|
1160
1162
|
} & methodParams;
|
|
1161
1163
|
|
|
@@ -1172,7 +1174,7 @@ export const getMyDescription = (
|
|
|
1172
1174
|
requestTelegramAPI("getMyDescription", params);
|
|
1173
1175
|
|
|
1174
1176
|
export type setMyShortDescriptionParams = {
|
|
1175
|
-
short_description?:
|
|
1177
|
+
short_description?: string;
|
|
1176
1178
|
language_code?: string;
|
|
1177
1179
|
} & methodParams;
|
|
1178
1180
|
|
|
@@ -1423,7 +1425,8 @@ export const removeChatVerification = (
|
|
|
1423
1425
|
): APIResponse => requestTelegramAPI("removeChatVerification", params);
|
|
1424
1426
|
|
|
1425
1427
|
export type readBusinessMessageParams = {
|
|
1426
|
-
chat_id:
|
|
1428
|
+
chat_id: number;
|
|
1429
|
+
message_id: number;
|
|
1427
1430
|
} & methodParams;
|
|
1428
1431
|
|
|
1429
1432
|
export const readBusinessMessage = (
|
|
@@ -1607,7 +1610,7 @@ export type sendStickerParams = {
|
|
|
1607
1610
|
sticker: InputFile | string;
|
|
1608
1611
|
business_connection_id?: string;
|
|
1609
1612
|
message_thread_id?: number;
|
|
1610
|
-
emoji?:
|
|
1613
|
+
emoji?: "🎲" | "🎯" | "🏀" | "⚽" | "🎳" | "🎰";
|
|
1611
1614
|
disable_notification?: boolean;
|
|
1612
1615
|
protect_content?: boolean;
|
|
1613
1616
|
allow_paid_broadcast?: boolean;
|
|
@@ -1893,7 +1896,7 @@ export type getStarTransactionsParams = {
|
|
|
1893
1896
|
|
|
1894
1897
|
export const getStarTransactions = (
|
|
1895
1898
|
params: getStarTransactionsParams,
|
|
1896
|
-
): APIResponse<
|
|
1899
|
+
): APIResponse<StarTransactions> =>
|
|
1897
1900
|
requestTelegramAPI("getStarTransactions", params);
|
|
1898
1901
|
|
|
1899
1902
|
export type refundStarPaymentParams = {
|
|
@@ -1947,7 +1950,7 @@ export type setGameScoreParams = {
|
|
|
1947
1950
|
disable_edit_message?: boolean;
|
|
1948
1951
|
chat_id?: number;
|
|
1949
1952
|
message_id?: number;
|
|
1950
|
-
inline_message_id?:
|
|
1953
|
+
inline_message_id?: string;
|
|
1951
1954
|
} & methodParams;
|
|
1952
1955
|
|
|
1953
1956
|
export const setGameScore = (
|
|
@@ -2076,3 +2079,28 @@ export type sendMessageDraftParams = {
|
|
|
2076
2079
|
|
|
2077
2080
|
export const sendMessageDraft = (params: sendMessageDraftParams): APIResponse =>
|
|
2078
2081
|
requestTelegramAPI("sendMessageDraft", params);
|
|
2082
|
+
|
|
2083
|
+
export type setMyProfilePhotoParams = {
|
|
2084
|
+
photo: InputProfilePhoto;
|
|
2085
|
+
} & methodParams;
|
|
2086
|
+
|
|
2087
|
+
export const setMyProfilePhoto = (
|
|
2088
|
+
params: setMyProfilePhotoParams,
|
|
2089
|
+
): APIResponse => requestTelegramAPI("setMyProfilePhoto", params);
|
|
2090
|
+
|
|
2091
|
+
export type removeMyProfilePhotoParams = {
|
|
2092
|
+
photo: InputProfilePhoto;
|
|
2093
|
+
} & methodParams;
|
|
2094
|
+
|
|
2095
|
+
export const removeMyProfilePhoto = (
|
|
2096
|
+
params: removeMyProfilePhotoParams,
|
|
2097
|
+
): APIResponse => requestTelegramAPI("removeMyProfilePhoto", params);
|
|
2098
|
+
|
|
2099
|
+
export type setChatMemberTagParams = {
|
|
2100
|
+
chat_id: string | number;
|
|
2101
|
+
user_id: number;
|
|
2102
|
+
tag?: string;
|
|
2103
|
+
} & methodParams;
|
|
2104
|
+
|
|
2105
|
+
export const setChatMemberTag = (params: setChatMemberTagParams): APIResponse =>
|
|
2106
|
+
requestTelegramAPI("setChatMemberTag", params);
|