nyx-bot-client 0.0.9 → 1.0.1
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/ChatMemberAdministrator.ts +10 -3
- package/@types/ChatMemberMember.ts +5 -0
- package/@types/ChatMemberRestricted.ts +11 -1
- package/@types/ChatPermissions.ts +6 -1
- package/@types/Gift.ts +2 -2
- package/@types/InlineQueryResultsButton.ts +1 -1
- package/@types/KeyboardButton.ts +9 -1
- package/@types/KeyboardButtonRequestManagedBot.ts +22 -0
- package/@types/ManagedBotCreated.ts +13 -0
- package/@types/ManagedBotUpdated.ts +18 -0
- package/@types/Message.ts +33 -1
- package/@types/MessageEntity.ts +23 -4
- package/@types/Poll.ts +18 -3
- package/@types/PollAnswer.ts +5 -0
- package/@types/PollOption.ts +23 -2
- package/@types/PollOptionAdded.ts +29 -0
- package/@types/PollOptionDeleted.ts +29 -0
- package/@types/PreparedInlineMessage.ts +16 -0
- package/@types/PreparedKeyboardButton.ts +11 -0
- package/@types/ReplyParameters.ts +5 -0
- package/@types/SuggestedPostApprovalFailed.ts +1 -1
- package/@types/SuggestedPostPaid.ts +1 -1
- package/@types/SuggestedPostRefunded.ts +1 -1
- package/@types/Update.ts +7 -1
- package/@types/User.ts +5 -0
- package/@types/UserChatBoosts.ts +13 -0
- package/@types/index.ts +13 -0
- package/biome.json +1 -1
- package/bun.lock +22 -24
- package/package.json +7 -7
- package/utils/methods.ts +37 -0
|
@@ -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
|
};
|
|
@@ -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
|
*/
|
|
@@ -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
|
|
package/@types/KeyboardButton.ts
CHANGED
|
@@ -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.
|
|
@@ -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,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
|
@@ -32,6 +32,7 @@ import type {
|
|
|
32
32
|
Invoice,
|
|
33
33
|
LinkPreviewOptions,
|
|
34
34
|
Location,
|
|
35
|
+
ManagedBotCreated,
|
|
35
36
|
MaybeInaccessibleMessage,
|
|
36
37
|
MessageAutoDeleteTimerChanged,
|
|
37
38
|
MessageEntity,
|
|
@@ -41,12 +42,15 @@ import type {
|
|
|
41
42
|
PassportData,
|
|
42
43
|
PhotoSize,
|
|
43
44
|
Poll,
|
|
45
|
+
PollOptionAdded,
|
|
46
|
+
PollOptionDeleted,
|
|
44
47
|
ProximityAlertTriggered,
|
|
45
48
|
RefundedPayment,
|
|
46
49
|
Sticker,
|
|
47
50
|
Story,
|
|
48
51
|
SuccessfulPayment,
|
|
49
52
|
SuggestedPostApprovalFailed,
|
|
53
|
+
SuggestedPostApproved,
|
|
50
54
|
SuggestedPostDeclined,
|
|
51
55
|
SuggestedPostInfo,
|
|
52
56
|
SuggestedPostPaid,
|
|
@@ -114,6 +118,11 @@ export type Message = {
|
|
|
114
118
|
*/
|
|
115
119
|
sender_business_bot?: User;
|
|
116
120
|
|
|
121
|
+
/**
|
|
122
|
+
* Optional. Tag or custom title of the sender of the message; for supergroups only
|
|
123
|
+
*/
|
|
124
|
+
sender_tag?: string;
|
|
125
|
+
|
|
117
126
|
/**
|
|
118
127
|
* Date the message was sent in Unix time. It is always a positive number, representing a valid date.
|
|
119
128
|
*/
|
|
@@ -172,6 +181,11 @@ export type Message = {
|
|
|
172
181
|
*/
|
|
173
182
|
reply_to_checklist_task_id?: number;
|
|
174
183
|
|
|
184
|
+
/**
|
|
185
|
+
* Optional. Persistent identifier of the specific poll option that is being replied to
|
|
186
|
+
*/
|
|
187
|
+
reply_to_poll_option_id?: string;
|
|
188
|
+
|
|
175
189
|
/**
|
|
176
190
|
* Optional. Bot through which the message was sent
|
|
177
191
|
*/
|
|
@@ -571,15 +585,30 @@ export type Message = {
|
|
|
571
585
|
*/
|
|
572
586
|
giveaway_completed?: GiveawayCompleted;
|
|
573
587
|
|
|
588
|
+
/**
|
|
589
|
+
* Optional. Service message: user created a bot that will be managed by the current bot
|
|
590
|
+
*/
|
|
591
|
+
managed_bot_created?: ManagedBotCreated;
|
|
592
|
+
|
|
574
593
|
/**
|
|
575
594
|
* Optional. Service message: the price for paid messages has changed in the chat
|
|
576
595
|
*/
|
|
577
596
|
paid_message_price_changed?: PaidMessagePriceChanged;
|
|
578
597
|
|
|
598
|
+
/**
|
|
599
|
+
* Optional. Service message: answer option was added to a poll
|
|
600
|
+
*/
|
|
601
|
+
poll_option_added?: PollOptionAdded;
|
|
602
|
+
|
|
603
|
+
/**
|
|
604
|
+
* Optional. Service message: answer option was deleted from a poll
|
|
605
|
+
*/
|
|
606
|
+
poll_option_deleted?: PollOptionDeleted;
|
|
607
|
+
|
|
579
608
|
/**
|
|
580
609
|
* Optional. Service message: a suggested post was approved
|
|
581
610
|
*/
|
|
582
|
-
suggested_post_approved?:
|
|
611
|
+
suggested_post_approved?: SuggestedPostApproved;
|
|
583
612
|
|
|
584
613
|
/**
|
|
585
614
|
* Optional. Service message: approval of a suggested post has failed
|
|
@@ -693,7 +722,10 @@ export const messageTypes = [
|
|
|
693
722
|
"giveaway",
|
|
694
723
|
"giveaway_winners",
|
|
695
724
|
"giveaway_completed",
|
|
725
|
+
"managed_bot_created",
|
|
696
726
|
"paid_message_price_changed",
|
|
727
|
+
"poll_option_added",
|
|
728
|
+
"poll_option_deleted",
|
|
697
729
|
"suggested_post_approved",
|
|
698
730
|
"suggested_post_approval_failed",
|
|
699
731
|
"suggested_post_declined",
|
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
|
);
|
package/@types/Poll.ts
CHANGED
|
@@ -53,10 +53,15 @@ export type Poll = {
|
|
|
53
53
|
allows_multiple_answers: boolean;
|
|
54
54
|
|
|
55
55
|
/**
|
|
56
|
-
*
|
|
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
|
-
|
|
58
|
+
allows_revoting: boolean;
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Optional. Array of 0-based identifiers of the correct answer options. Available only for polls in quiz mode which
|
|
62
|
+
* are closed or were sent (not forwarded) by the bot or to the private chat with the bot.
|
|
63
|
+
*/
|
|
64
|
+
correct_option_ids?: number[];
|
|
60
65
|
|
|
61
66
|
/**
|
|
62
67
|
* Optional. Text that is shown when a user chooses an incorrect answer or taps on the lamp icon in a quiz-style poll,
|
|
@@ -78,4 +83,14 @@ export type Poll = {
|
|
|
78
83
|
* Optional. Point in time (Unix timestamp) when the poll will be automatically closed
|
|
79
84
|
*/
|
|
80
85
|
close_date?: number;
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Optional. Description of the poll; for polls inside the Message object only
|
|
89
|
+
*/
|
|
90
|
+
description?: string;
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Optional. Special entities like usernames, URLs, bot commands, etc. that appear in the description
|
|
94
|
+
*/
|
|
95
|
+
description_entities?: MessageEntity[];
|
|
81
96
|
};
|
package/@types/PollAnswer.ts
CHANGED
|
@@ -25,4 +25,9 @@ export type PollAnswer = {
|
|
|
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
|
};
|
package/@types/PollOption.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { MessageEntity } from "./
|
|
1
|
+
import type { Chat, MessageEntity, 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,23 @@ export type PollOption = {
|
|
|
18
23
|
text_entities?: MessageEntity[];
|
|
19
24
|
|
|
20
25
|
/**
|
|
21
|
-
* Number of users
|
|
26
|
+
* Number of users who voted for this option; may be 0 if unknown
|
|
22
27
|
*/
|
|
23
28
|
voter_count: number;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Optional. User who added the option; omitted if the option wasn't added by a user after poll creation
|
|
32
|
+
*/
|
|
33
|
+
added_by_user?: User;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Optional. Chat that added the option; omitted if the option wasn't added by a chat after poll creation
|
|
37
|
+
*/
|
|
38
|
+
added_by_chat?: Chat;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Optional. Point in time (Unix timestamp) when the option was added; omitted if the option existed in the original
|
|
42
|
+
* poll
|
|
43
|
+
*/
|
|
44
|
+
addition_date?: number;
|
|
24
45
|
};
|
|
@@ -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,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
|
+
};
|
|
@@ -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
|
+
};
|
|
@@ -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
|
};
|
|
@@ -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/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
|
|
@@ -149,6 +150,11 @@ export type EventTypes = {
|
|
|
149
150
|
* A boost was removed from a chat. The bot must be an administrator in the chat to receive these updates.
|
|
150
151
|
*/
|
|
151
152
|
removed_chat_boost: ChatBoostRemoved;
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* A new bot was created to be managed by the bot or token of a bot was changed
|
|
156
|
+
*/
|
|
157
|
+
managed_bot: ManagedBotUpdated;
|
|
152
158
|
};
|
|
153
159
|
|
|
154
160
|
/**
|
package/@types/User.ts
CHANGED
|
@@ -81,4 +81,9 @@ export type User = {
|
|
|
81
81
|
* Optional. True, if the bot allows users to create and delete topics in private chats. Returned only in getMe.
|
|
82
82
|
*/
|
|
83
83
|
allows_users_to_create_topics?: boolean;
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Optional. True, if other bots can be created to be controlled by the bot. Returned only in getMe.
|
|
87
|
+
*/
|
|
88
|
+
can_manage_bots?: boolean;
|
|
84
89
|
};
|
|
@@ -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
|
+
};
|
package/@types/index.ts
CHANGED
|
@@ -151,12 +151,15 @@ export * from "./index";
|
|
|
151
151
|
export * from "./KeyboardButton";
|
|
152
152
|
export * from "./KeyboardButtonPollType";
|
|
153
153
|
export * from "./KeyboardButtonRequestChat";
|
|
154
|
+
export * from "./KeyboardButtonRequestManagedBot";
|
|
154
155
|
export * from "./KeyboardButtonRequestUsers";
|
|
155
156
|
export * from "./LabeledPrice";
|
|
156
157
|
export * from "./LinkPreviewOptions";
|
|
157
158
|
export * from "./Location";
|
|
158
159
|
export * from "./LocationAddress";
|
|
159
160
|
export * from "./LoginUrl";
|
|
161
|
+
export * from "./ManagedBotCreated";
|
|
162
|
+
export * from "./ManagedBotUpdated";
|
|
160
163
|
export * from "./MaskPosition";
|
|
161
164
|
export * from "./MaybeInaccessibleMessage";
|
|
162
165
|
export * from "./MenuButton";
|
|
@@ -207,7 +210,11 @@ export * from "./PhotoSize";
|
|
|
207
210
|
export * from "./Poll";
|
|
208
211
|
export * from "./PollAnswer";
|
|
209
212
|
export * from "./PollOption";
|
|
213
|
+
export * from "./PollOptionAdded";
|
|
214
|
+
export * from "./PollOptionDeleted";
|
|
210
215
|
export * from "./PreCheckoutQuery";
|
|
216
|
+
export * from "./PreparedInlineMessage";
|
|
217
|
+
export * from "./PreparedKeyboardButton";
|
|
211
218
|
export * from "./ProximityAlertTriggered";
|
|
212
219
|
export * from "./ReactionCount";
|
|
213
220
|
export * from "./ReactionType";
|
|
@@ -219,6 +226,10 @@ export * from "./ReplyKeyboardMarkup";
|
|
|
219
226
|
export * from "./ReplyKeyboardRemove";
|
|
220
227
|
export * from "./ReplyParameters";
|
|
221
228
|
export * from "./ResponseParameters";
|
|
229
|
+
export * from "./RevenueWithdrawalState";
|
|
230
|
+
export * from "./RevenueWithdrawalStateFailed";
|
|
231
|
+
export * from "./RevenueWithdrawalStatePending";
|
|
232
|
+
export * from "./RevenueWithdrawalStateSucceeded";
|
|
222
233
|
export * from "./SentWebAppMessage";
|
|
223
234
|
export * from "./SharedUser";
|
|
224
235
|
export * from "./ShippingAddress";
|
|
@@ -240,6 +251,7 @@ export * from "./StoryAreaTypeUniqueGift";
|
|
|
240
251
|
export * from "./StoryAreaTypeWeather";
|
|
241
252
|
export * from "./SuccessfulPayment";
|
|
242
253
|
export * from "./SuggestedPostApprovalFailed";
|
|
254
|
+
export * from "./SuggestedPostApproved";
|
|
243
255
|
export * from "./SuggestedPostDeclined";
|
|
244
256
|
export * from "./SuggestedPostInfo";
|
|
245
257
|
export * from "./SuggestedPostPaid";
|
|
@@ -265,6 +277,7 @@ export * from "./UniqueGiftModel";
|
|
|
265
277
|
export * from "./UniqueGiftSymbol";
|
|
266
278
|
export * from "./Update";
|
|
267
279
|
export * from "./User";
|
|
280
|
+
export * from "./UserChatBoosts";
|
|
268
281
|
export * from "./UserProfileAudios";
|
|
269
282
|
export * from "./UserProfilePhotos";
|
|
270
283
|
export * from "./UserRating";
|
package/biome.json
CHANGED
package/bun.lock
CHANGED
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
"": {
|
|
6
6
|
"name": "nyx-bot-client",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@biomejs/biome": "^2.
|
|
9
|
-
"@types/node": "^25.
|
|
10
|
-
"dotenv": "^17.2
|
|
11
|
-
"kysely": "^0.28.
|
|
12
|
-
"mysql2": "^3.
|
|
13
|
-
"ts-debounce": "^
|
|
8
|
+
"@biomejs/biome": "^2.4.12",
|
|
9
|
+
"@types/node": "^25.6.0",
|
|
10
|
+
"dotenv": "^17.4.2",
|
|
11
|
+
"kysely": "^0.28.16",
|
|
12
|
+
"mysql2": "^3.22.1",
|
|
13
|
+
"ts-debounce": "^5.0.0",
|
|
14
14
|
"zod": "^4.3.6",
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {
|
|
@@ -22,27 +22,27 @@
|
|
|
22
22
|
},
|
|
23
23
|
},
|
|
24
24
|
"packages": {
|
|
25
|
-
"@biomejs/biome": ["@biomejs/biome@2.
|
|
25
|
+
"@biomejs/biome": ["@biomejs/biome@2.4.12", "", { "optionalDependencies": { "@biomejs/cli-darwin-arm64": "2.4.12", "@biomejs/cli-darwin-x64": "2.4.12", "@biomejs/cli-linux-arm64": "2.4.12", "@biomejs/cli-linux-arm64-musl": "2.4.12", "@biomejs/cli-linux-x64": "2.4.12", "@biomejs/cli-linux-x64-musl": "2.4.12", "@biomejs/cli-win32-arm64": "2.4.12", "@biomejs/cli-win32-x64": "2.4.12" }, "bin": { "biome": "bin/biome" } }, "sha512-Rro7adQl3NLq/zJCIL98eElXKI8eEiBtoeu5TbXF/U3qbjuSc7Jb5rjUbeHHcquDWeSf3HnGP7XI5qGrlRk/pA=="],
|
|
26
26
|
|
|
27
|
-
"@biomejs/cli-darwin-arm64": ["@biomejs/cli-darwin-arm64@2.
|
|
27
|
+
"@biomejs/cli-darwin-arm64": ["@biomejs/cli-darwin-arm64@2.4.12", "", { "os": "darwin", "cpu": "arm64" }, "sha512-BnMU4Pc3ciEVteVpZ0BK33MLr7X57F5w1dwDLDn+/iy/yTrA4Q/N2yftidFtsA4vrDh0FMXDpacNV/Tl3fbmng=="],
|
|
28
28
|
|
|
29
|
-
"@biomejs/cli-darwin-x64": ["@biomejs/cli-darwin-x64@2.
|
|
29
|
+
"@biomejs/cli-darwin-x64": ["@biomejs/cli-darwin-x64@2.4.12", "", { "os": "darwin", "cpu": "x64" }, "sha512-x9uJ0bI1rJsWICp3VH8w/5PnAVD3A7SqzDpbrfoUQX1QyWrK5jSU4fRLo/wSgGeplCivbxBRKmt5Xq4/nWvq8A=="],
|
|
30
30
|
|
|
31
|
-
"@biomejs/cli-linux-arm64": ["@biomejs/cli-linux-arm64@2.
|
|
31
|
+
"@biomejs/cli-linux-arm64": ["@biomejs/cli-linux-arm64@2.4.12", "", { "os": "linux", "cpu": "arm64" }, "sha512-tOwuCuZZtKi1jVzbk/5nXmIsziOB6yqN8c9r9QM0EJYPU6DpQWf11uBOSCfFKKM4H3d9ZoarvlgMfbcuD051Pw=="],
|
|
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.12", "", { "os": "linux", "cpu": "arm64" }, "sha512-FhfpkAAlKL6kwvcVap0Hgp4AhZmtd3YImg0kK1jd7C/aSoh4SfsB2f++yG1rU0lr8Y5MCFJrcSkmssiL9Xnnig=="],
|
|
34
34
|
|
|
35
|
-
"@biomejs/cli-linux-x64": ["@biomejs/cli-linux-x64@2.
|
|
35
|
+
"@biomejs/cli-linux-x64": ["@biomejs/cli-linux-x64@2.4.12", "", { "os": "linux", "cpu": "x64" }, "sha512-8pFeAnLU9QdW9jCIslB/v82bI0lhBmz2ZAKc8pVMFPO0t0wAHsoEkrUQUbMkIorTRIjbqyNZHA3lEXavsPWYSw=="],
|
|
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.12", "", { "os": "linux", "cpu": "x64" }, "sha512-dwTIgZrGutzhkQCuvHynCkyW6hJxUuyZqKKO0YNfaS2GUoRO+tOvxXZqZB6SkWAOdfZTzwaw8IEdUnIkHKHoew=="],
|
|
38
38
|
|
|
39
|
-
"@biomejs/cli-win32-arm64": ["@biomejs/cli-win32-arm64@2.
|
|
39
|
+
"@biomejs/cli-win32-arm64": ["@biomejs/cli-win32-arm64@2.4.12", "", { "os": "win32", "cpu": "arm64" }, "sha512-B0DLnx0vA9ya/3v7XyCaP+/lCpnbWbMOfUFFve+xb5OxyYvdHaS55YsSddr228Y+JAFk58agCuZTsqNiw2a6ig=="],
|
|
40
40
|
|
|
41
|
-
"@biomejs/cli-win32-x64": ["@biomejs/cli-win32-x64@2.
|
|
41
|
+
"@biomejs/cli-win32-x64": ["@biomejs/cli-win32-x64@2.4.12", "", { "os": "win32", "cpu": "x64" }, "sha512-yMckRzTyZ83hkk8iDFWswqSdU8tvZxspJKnYNh7JZr/zhZNOlzH13k4ecboU6MurKExCe2HUkH75pGI/O2JwGA=="],
|
|
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.6.0", "", { "dependencies": { "undici-types": "~7.19.0" } }, "sha512-+qIYRKdNYJwY3vRCZMdJbPLJAtGjQBudzZzdzwQYkEPQd+PJGixUL5QfvCLDaULoLv+RhT3LDkwEfKaAkgSmNQ=="],
|
|
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.2
|
|
53
|
+
"dotenv": ["dotenv@17.4.2", "", {}, "sha512-nI4U3TottKAcAD9LLud4Cb7b2QztQMUEfHbvhTH09bqXTxnSie8WnjPALV/WMCrJZ6UV/qHJ6L03OqO3LcdYZw=="],
|
|
54
54
|
|
|
55
55
|
"generate-function": ["generate-function@2.3.1", "", { "dependencies": { "is-property": "^1.0.2" } }, "sha512-eeB5GfMNeevm/GRYq20ShmsaGcmI81kIX2K9XQx5miC8KdHaC6Jm0qQ8ZNeGOi7wYB8OsdxKs+Y2oVuTFuVwKQ=="],
|
|
56
56
|
|
|
@@ -58,27 +58,25 @@
|
|
|
58
58
|
|
|
59
59
|
"is-property": ["is-property@1.0.2", "", {}, "sha512-Ks/IoX00TtClbGQr4TWXemAnktAQvYB7HzcCxDGqEZU6oCmb2INHuOoKxbtR+HFkmYWBKv/dOZtGRiAjDhj92g=="],
|
|
60
60
|
|
|
61
|
-
"kysely": ["kysely@0.28.
|
|
61
|
+
"kysely": ["kysely@0.28.16", "", {}, "sha512-3i5pmOiZvMDj00qhrIVbH0AnioVTx22DMP7Vn5At4yJO46iy+FM8Y/g61ltenLVSo3fiO8h8Q3QOFgf/gQ72ww=="],
|
|
62
62
|
|
|
63
63
|
"long": ["long@5.3.2", "", {}, "sha512-mNAgZ1GmyNhD7AuqnTG3/VQ26o760+ZYBPKjPvugO8+nLbYfX6TVpJPseBvopbdY+qpZ/lKUnmEc1LeZYS3QAA=="],
|
|
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.22.1", "", { "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-48+9UXehKyxxiP2pqCxUq+MSFvX+v41jwsSpFDQO/jAoFuAELutBGJUhWJnDbe82/OBlIhSBMC82WeonmznT/Q=="],
|
|
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
|
-
"
|
|
73
|
+
"sql-escaper": ["sql-escaper@1.3.3", "", {}, "sha512-BsTCV265VpTp8tm1wyIm1xqQCS+Q9NHx2Sr+WcnUrgLrQ6yiDIvHYJV5gHxsj1lMBy2zm5twLaZao8Jd+S8JJw=="],
|
|
74
74
|
|
|
75
|
-
"
|
|
76
|
-
|
|
77
|
-
"ts-debounce": ["ts-debounce@4.0.0", "", {}, "sha512-+1iDGY6NmOGidq7i7xZGA4cm8DAa6fqdYcvO5Z6yBevH++Bdo9Qt/mN0TzHUgcCcKv1gmh9+W5dHqz8pMWbCbg=="],
|
|
75
|
+
"ts-debounce": ["ts-debounce@5.0.0", "", {}, "sha512-u0TCPC1koR5OcYC8hUC9ZisNlkxW87VejeoK+qX2in0grK1Dy0Fjlq9diNwHsFZwbFjM5lCTloRPPrs4TcPPug=="],
|
|
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.19.2", "", {}, "sha512-qYVnV5OEm2AW8cJMCpdV20CDyaN3g0AjDlOGf1OW4iaDEx8MwdtChUp4zu4H0VP3nDRF/8RKWH+IPp9uW0YGZg=="],
|
|
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": "
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"module": "index.ts",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"devDependencies": {
|
|
@@ -10,12 +10,12 @@
|
|
|
10
10
|
"typescript": "^5"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@biomejs/biome": "^2.
|
|
14
|
-
"@types/node": "^25.
|
|
15
|
-
"dotenv": "^17.2
|
|
16
|
-
"kysely": "^0.28.
|
|
17
|
-
"mysql2": "^3.
|
|
18
|
-
"ts-debounce": "^
|
|
13
|
+
"@biomejs/biome": "^2.4.12",
|
|
14
|
+
"@types/node": "^25.6.0",
|
|
15
|
+
"dotenv": "^17.4.2",
|
|
16
|
+
"kysely": "^0.28.16",
|
|
17
|
+
"mysql2": "^3.22.1",
|
|
18
|
+
"ts-debounce": "^5.0.0",
|
|
19
19
|
"zod": "^4.3.6"
|
|
20
20
|
}
|
|
21
21
|
}
|
package/utils/methods.ts
CHANGED
|
@@ -29,6 +29,7 @@ import type {
|
|
|
29
29
|
InputPollOption,
|
|
30
30
|
InputProfilePhoto,
|
|
31
31
|
InputSticker,
|
|
32
|
+
KeyboardButton,
|
|
32
33
|
LabeledPrice,
|
|
33
34
|
LinkPreviewOptions,
|
|
34
35
|
MaskPosition,
|
|
@@ -39,6 +40,7 @@ import type {
|
|
|
39
40
|
OwnedGifts,
|
|
40
41
|
PassportElementError,
|
|
41
42
|
Poll,
|
|
43
|
+
PreparedKeyboardButton,
|
|
42
44
|
ReactionType,
|
|
43
45
|
ReplyKeyboardMarkup,
|
|
44
46
|
ReplyKeyboardRemove,
|
|
@@ -2095,3 +2097,38 @@ export type removeMyProfilePhotoParams = {
|
|
|
2095
2097
|
export const removeMyProfilePhoto = (
|
|
2096
2098
|
params: removeMyProfilePhotoParams,
|
|
2097
2099
|
): APIResponse => requestTelegramAPI("removeMyProfilePhoto", params);
|
|
2100
|
+
|
|
2101
|
+
export type setChatMemberTagParams = {
|
|
2102
|
+
chat_id: string | number;
|
|
2103
|
+
user_id: number;
|
|
2104
|
+
tag?: string;
|
|
2105
|
+
} & methodParams;
|
|
2106
|
+
|
|
2107
|
+
export const setChatMemberTag = (params: setChatMemberTagParams): APIResponse =>
|
|
2108
|
+
requestTelegramAPI("setChatMemberTag", params);
|
|
2109
|
+
|
|
2110
|
+
export type getManagedBotTokenParams = {
|
|
2111
|
+
user_id: number;
|
|
2112
|
+
} & methodParams;
|
|
2113
|
+
|
|
2114
|
+
export const getManagedBotToken = (
|
|
2115
|
+
params: getManagedBotTokenParams,
|
|
2116
|
+
): APIResponse<string> => requestTelegramAPI("getManagedBotToken", params);
|
|
2117
|
+
|
|
2118
|
+
export type replaceManagedBotTokenParams = {
|
|
2119
|
+
user_id: number;
|
|
2120
|
+
} & methodParams;
|
|
2121
|
+
|
|
2122
|
+
export const replaceManagedBotToken = (
|
|
2123
|
+
params: replaceManagedBotTokenParams,
|
|
2124
|
+
): APIResponse<string> => requestTelegramAPI("replaceManagedBotToken", params);
|
|
2125
|
+
|
|
2126
|
+
export type savePreparedKeyboardButtonParams = {
|
|
2127
|
+
user_id: number;
|
|
2128
|
+
button: KeyboardButton;
|
|
2129
|
+
} & methodParams;
|
|
2130
|
+
|
|
2131
|
+
export const savePreparedKeyboardButton = (
|
|
2132
|
+
params: savePreparedKeyboardButtonParams,
|
|
2133
|
+
): APIResponse<PreparedKeyboardButton> =>
|
|
2134
|
+
requestTelegramAPI("savePreparedKeyboardButton", params);
|