@zero-bot.net/tg-bot-api 1.2.0 → 1.5.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/README.md +100 -81
- package/index.js +5 -11
- package/package.json +19 -37
- package/src/errors.js +33 -3
- package/src/fileTypes.js +188 -0
- package/src/network.js +47 -0
- package/src/telegram.d.ts +372 -9
- package/src/telegram.js +192 -24
- package/src/telegramPolling.js +9 -3
- package/src/telegramWebHook.js +53 -4
- package/.github/ISSUE_TEMPLATE.md +0 -68
- package/.github/PULL_REQUEST_TEMPLATE.md +0 -23
- package/CHANGELOG.md +0 -515
- package/CODE_OF_CONDUCT.md +0 -74
- package/CONTRIBUTING.md +0 -45
- package/doc/api.hbs +0 -19
- package/doc/api.md +0 -3473
- package/doc/experimental.md +0 -28
- package/doc/help.md +0 -151
- package/doc/usage.md +0 -269
- package/lib/errors.js +0 -62
- package/lib/telegram.d.ts +0 -4929
- package/lib/telegram.js +0 -4142
- package/lib/telegramPolling.js +0 -196
- package/lib/telegramWebHook.js +0 -156
- package/lib/utils.js +0 -3
package/src/telegram.d.ts
CHANGED
|
@@ -35,6 +35,11 @@ export interface User {
|
|
|
35
35
|
supports_inline_queries?: boolean;
|
|
36
36
|
can_connect_to_business?: boolean;
|
|
37
37
|
has_main_web_app?: boolean;
|
|
38
|
+
supports_guest_queries?: boolean;
|
|
39
|
+
supports_join_request_queries?: boolean;
|
|
40
|
+
can_manage_bots?: boolean;
|
|
41
|
+
allows_users_to_create_topics?: boolean;
|
|
42
|
+
has_topics_enabled?: boolean;
|
|
38
43
|
}
|
|
39
44
|
|
|
40
45
|
/** This object represents info about the user's bot. */
|
|
@@ -115,6 +120,9 @@ export interface Video {
|
|
|
115
120
|
file_name?: string;
|
|
116
121
|
mime_type?: string;
|
|
117
122
|
file_size?: Integer;
|
|
123
|
+
cover?: PhotoSize;
|
|
124
|
+
start_timestamp?: number;
|
|
125
|
+
qualities?: VideoQuality[];
|
|
118
126
|
}
|
|
119
127
|
|
|
120
128
|
/** This object represents a video message. */
|
|
@@ -496,6 +504,9 @@ export interface SuccessfulPayment {
|
|
|
496
504
|
order_info?: OrderInfo;
|
|
497
505
|
telegram_payment_charge_id: string;
|
|
498
506
|
provider_payment_charge_id: string;
|
|
507
|
+
subscription_expiration_date?: number;
|
|
508
|
+
is_recurring?: boolean;
|
|
509
|
+
is_first_recurring?: boolean;
|
|
499
510
|
}
|
|
500
511
|
|
|
501
512
|
/** This object contains information about an incoming pre-checkout query. */
|
|
@@ -563,6 +574,16 @@ export interface Poll {
|
|
|
563
574
|
explanation_entities?: MessageEntity[];
|
|
564
575
|
open_period?: Integer;
|
|
565
576
|
close_date?: Integer;
|
|
577
|
+
media?: PollMedia;
|
|
578
|
+
explanation_media?: PollMedia;
|
|
579
|
+
members_only?: boolean;
|
|
580
|
+
country_codes?: string[];
|
|
581
|
+
correct_option_ids?: number[];
|
|
582
|
+
allows_revoting?: boolean;
|
|
583
|
+
question_parse_mode?: string;
|
|
584
|
+
question_entities?: MessageEntity[];
|
|
585
|
+
description?: string;
|
|
586
|
+
description_entities?: MessageEntity[];
|
|
566
587
|
}
|
|
567
588
|
|
|
568
589
|
/** This object represents one answer of a user from a poll. */
|
|
@@ -571,12 +592,19 @@ export interface PollAnswer {
|
|
|
571
592
|
voter_chat?: Chat;
|
|
572
593
|
user?: User;
|
|
573
594
|
option_ids: Integer[];
|
|
595
|
+
option_persistent_ids?: string[];
|
|
574
596
|
}
|
|
575
597
|
|
|
576
598
|
/** This object represents an answer of a user in a non-anonymous poll. */
|
|
577
599
|
export interface PollOption {
|
|
578
600
|
text: string;
|
|
579
601
|
voter_count: Integer;
|
|
602
|
+
text_entities?: MessageEntity[];
|
|
603
|
+
media?: PollMedia;
|
|
604
|
+
persistent_id?: string;
|
|
605
|
+
added_by_user?: boolean;
|
|
606
|
+
added_by_chat?: boolean;
|
|
607
|
+
addition_date?: number;
|
|
580
608
|
}
|
|
581
609
|
|
|
582
610
|
/** This object contains information about a user that was added to a chat. */
|
|
@@ -602,6 +630,7 @@ export interface ChatJoinRequest {
|
|
|
602
630
|
date: Integer;
|
|
603
631
|
bio?: string;
|
|
604
632
|
invite_link?: ChatInviteLink;
|
|
633
|
+
query_id?: number;
|
|
605
634
|
}
|
|
606
635
|
|
|
607
636
|
/** This object contains information about one member of a chat. */
|
|
@@ -637,12 +666,16 @@ export interface ChatMemberAdministrator {
|
|
|
637
666
|
can_manage_topics?: boolean;
|
|
638
667
|
is_anonymous?: boolean;
|
|
639
668
|
custom_title?: string;
|
|
669
|
+
can_manage_tags?: boolean;
|
|
670
|
+
can_send_welcome_messages?: boolean;
|
|
671
|
+
can_manage_direct_messages?: boolean;
|
|
640
672
|
}
|
|
641
673
|
|
|
642
674
|
export interface ChatMemberMember {
|
|
643
675
|
status: 'member';
|
|
644
676
|
user: User;
|
|
645
677
|
until_date?: Integer;
|
|
678
|
+
tag?: string;
|
|
646
679
|
}
|
|
647
680
|
|
|
648
681
|
export interface ChatMemberRestricted {
|
|
@@ -664,6 +697,9 @@ export interface ChatMemberRestricted {
|
|
|
664
697
|
can_pin_messages: boolean;
|
|
665
698
|
can_manage_topics: boolean;
|
|
666
699
|
until_date: Integer;
|
|
700
|
+
can_edit_tag?: boolean;
|
|
701
|
+
can_react_to_messages?: boolean;
|
|
702
|
+
tag?: string;
|
|
667
703
|
}
|
|
668
704
|
|
|
669
705
|
export interface ChatMemberLeft {
|
|
@@ -753,6 +789,8 @@ export interface ChatAdministratorRights {
|
|
|
753
789
|
can_edit_stories?: boolean;
|
|
754
790
|
can_delete_stories?: boolean;
|
|
755
791
|
can_manage_direct_messages?: boolean;
|
|
792
|
+
can_manage_tags?: boolean;
|
|
793
|
+
can_send_welcome_messages?: boolean;
|
|
756
794
|
}
|
|
757
795
|
|
|
758
796
|
/** This object represents the permissions of a default chat administrator in a chat. */
|
|
@@ -772,6 +810,8 @@ export interface ChatPermissions {
|
|
|
772
810
|
can_pin_messages?: boolean;
|
|
773
811
|
can_manage_topics?: boolean;
|
|
774
812
|
can_change_gift_settings?: boolean;
|
|
813
|
+
can_edit_tag?: boolean;
|
|
814
|
+
can_react_to_messages?: boolean;
|
|
775
815
|
}
|
|
776
816
|
|
|
777
817
|
/** This object represents a forum topic. */
|
|
@@ -780,6 +820,7 @@ export interface ForumTopic {
|
|
|
780
820
|
name: string;
|
|
781
821
|
icon_color: Integer;
|
|
782
822
|
icon_custom_emoji_id?: string;
|
|
823
|
+
is_name_implicit?: boolean;
|
|
783
824
|
}
|
|
784
825
|
|
|
785
826
|
/** This object describes a bot's menu button in a private chat. */
|
|
@@ -999,6 +1040,14 @@ export interface Gift {
|
|
|
999
1040
|
id: string;
|
|
1000
1041
|
sticker: Sticker;
|
|
1001
1042
|
star_count: Integer;
|
|
1043
|
+
upgrade_star_count?: number;
|
|
1044
|
+
personal_total_count?: number;
|
|
1045
|
+
personal_remaining_count?: number;
|
|
1046
|
+
is_premium?: boolean;
|
|
1047
|
+
has_colors?: boolean;
|
|
1048
|
+
background?: GiftBackground;
|
|
1049
|
+
unique_gift_variant_count?: number;
|
|
1050
|
+
publisher_chat?: Chat;
|
|
1002
1051
|
}
|
|
1003
1052
|
|
|
1004
1053
|
/** This object represents a unique gift. */
|
|
@@ -1008,12 +1057,19 @@ export interface UniqueGift {
|
|
|
1008
1057
|
model: UniqueGiftModel;
|
|
1009
1058
|
pattern: UniqueGiftPattern;
|
|
1010
1059
|
backdrop: UniqueGiftBackdrop;
|
|
1060
|
+
is_from_blockchain?: boolean;
|
|
1061
|
+
is_burned?: boolean;
|
|
1062
|
+
gift_id?: string;
|
|
1063
|
+
is_premium?: boolean;
|
|
1064
|
+
colors?: UniqueGiftColors;
|
|
1065
|
+
publisher_chat?: Chat;
|
|
1011
1066
|
}
|
|
1012
1067
|
|
|
1013
1068
|
/** This object describes the model of a unique gift. */
|
|
1014
1069
|
export interface UniqueGiftModel {
|
|
1015
1070
|
name: string;
|
|
1016
1071
|
sticker: Sticker;
|
|
1072
|
+
rarity?: string;
|
|
1017
1073
|
}
|
|
1018
1074
|
|
|
1019
1075
|
/** This object describes the pattern of a unique gift. */
|
|
@@ -1186,7 +1242,7 @@ export interface BusinessConnection {
|
|
|
1186
1242
|
user: User;
|
|
1187
1243
|
date: Integer;
|
|
1188
1244
|
is_enabled: boolean;
|
|
1189
|
-
|
|
1245
|
+
rights?: BusinessBotRights;
|
|
1190
1246
|
is_deleted?: boolean;
|
|
1191
1247
|
}
|
|
1192
1248
|
|
|
@@ -1513,6 +1569,7 @@ export interface Chat {
|
|
|
1513
1569
|
subscription_period?: Integer;
|
|
1514
1570
|
subscription_price?: Integer;
|
|
1515
1571
|
location?: ChatLocation;
|
|
1572
|
+
is_direct_messages?: boolean;
|
|
1516
1573
|
}
|
|
1517
1574
|
|
|
1518
1575
|
/** Extended information about the chat. */
|
|
@@ -1572,6 +1629,15 @@ export interface ChatFullInfo {
|
|
|
1572
1629
|
can_have_sponsored_messages?: boolean;
|
|
1573
1630
|
user_chat_boost_count?: Integer;
|
|
1574
1631
|
location?: ChatLocation;
|
|
1632
|
+
community?: Community;
|
|
1633
|
+
guard_bot?: boolean;
|
|
1634
|
+
rating?: UserRating;
|
|
1635
|
+
paid_message_star_count?: number;
|
|
1636
|
+
unique_gift_colors?: UniqueGiftColors;
|
|
1637
|
+
can_send_paid_media?: boolean;
|
|
1638
|
+
first_profile_audio?: Audio;
|
|
1639
|
+
parent_chat?: Chat;
|
|
1640
|
+
accepted_gift_types?: AcceptedGiftTypes;
|
|
1575
1641
|
}
|
|
1576
1642
|
|
|
1577
1643
|
/** This object represents a location to which a chat is connected. */
|
|
@@ -1698,12 +1764,42 @@ export interface Message {
|
|
|
1698
1764
|
|
|
1699
1765
|
live_photo?: LivePhoto;
|
|
1700
1766
|
checklist?: Checklist;
|
|
1701
|
-
suggested_post_approved?:
|
|
1702
|
-
suggested_post_declined?:
|
|
1767
|
+
suggested_post_approved?: SuggestedPostApproved;
|
|
1768
|
+
suggested_post_declined?: SuggestedPostDeclined;
|
|
1703
1769
|
suggested_post_info?: SuggestedPostInfo;
|
|
1704
1770
|
|
|
1705
1771
|
from_shared_folder?: boolean;
|
|
1706
1772
|
to_shared_folder?: boolean;
|
|
1773
|
+
|
|
1774
|
+
effect_id?: string;
|
|
1775
|
+
reply_to_poll_option_id?: string;
|
|
1776
|
+
sender_tag?: string;
|
|
1777
|
+
is_paid_post?: boolean;
|
|
1778
|
+
direct_messages_topic?: DirectMessagesTopic;
|
|
1779
|
+
guest_bot_caller_user?: User;
|
|
1780
|
+
guest_bot_caller_chat?: Chat;
|
|
1781
|
+
guest_query_id?: string;
|
|
1782
|
+
receiver_user?: User;
|
|
1783
|
+
paid_star_count?: number;
|
|
1784
|
+
gift?: GiftInfo;
|
|
1785
|
+
unique_gift?: UniqueGiftInfo;
|
|
1786
|
+
gift_upgrade_sent?: boolean;
|
|
1787
|
+
checklist_tasks_done?: ChecklistTasksDone;
|
|
1788
|
+
checklist_tasks_added?: ChecklistTasksAdded;
|
|
1789
|
+
direct_message_price_changed?: DirectMessagePriceChanged;
|
|
1790
|
+
chat_owner_left?: ChatOwnerLeft;
|
|
1791
|
+
chat_owner_changed?: ChatOwnerChanged;
|
|
1792
|
+
poll_option_added?: PollOptionAdded;
|
|
1793
|
+
poll_option_deleted?: PollOptionDeleted;
|
|
1794
|
+
managed_bot_created?: ManagedBotCreated;
|
|
1795
|
+
suggested_post_approval_failed?: SuggestedPostApprovalFailed;
|
|
1796
|
+
suggested_post_paid?: SuggestedPostPaid;
|
|
1797
|
+
suggested_post_refunded?: SuggestedPostRefunded;
|
|
1798
|
+
community_chat_added?: CommunityChatAdded;
|
|
1799
|
+
community_chat_removed?: CommunityChatRemoved;
|
|
1800
|
+
community_chat_joined?: CommunityChatJoined;
|
|
1801
|
+
stopped_message_generation?: MessageGenerationStopped;
|
|
1802
|
+
bot_subscription_updated?: BotSubscriptionUpdated;
|
|
1707
1803
|
}
|
|
1708
1804
|
|
|
1709
1805
|
/** Describes the origin of a message. */
|
|
@@ -1928,6 +2024,7 @@ export interface BackgroundFillFreeformGradient {
|
|
|
1928
2024
|
|
|
1929
2025
|
export interface SuggestedPostInfo {
|
|
1930
2026
|
schedule_date?: Integer;
|
|
2027
|
+
price?: SuggestedPostPrice;
|
|
1931
2028
|
}
|
|
1932
2029
|
|
|
1933
2030
|
export interface StoryBoard {
|
|
@@ -1960,6 +2057,144 @@ export interface ServiceMessage {
|
|
|
1960
2057
|
type: string;
|
|
1961
2058
|
}
|
|
1962
2059
|
|
|
2060
|
+
// ---------------------------------------------------------------------------
|
|
2061
|
+
// New Bot API 7.4-10.3 Types
|
|
2062
|
+
// ---------------------------------------------------------------------------
|
|
2063
|
+
|
|
2064
|
+
export interface DirectMessagesTopic {
|
|
2065
|
+
message_thread_id: number;
|
|
2066
|
+
}
|
|
2067
|
+
|
|
2068
|
+
export interface SuggestedPostPrice {
|
|
2069
|
+
currency: string;
|
|
2070
|
+
amount: number;
|
|
2071
|
+
}
|
|
2072
|
+
|
|
2073
|
+
export interface SuggestedPostApproved {}
|
|
2074
|
+
export interface SuggestedPostApprovalFailed {}
|
|
2075
|
+
export interface SuggestedPostDeclined {}
|
|
2076
|
+
export interface SuggestedPostPaid {}
|
|
2077
|
+
export interface SuggestedPostRefunded {}
|
|
2078
|
+
|
|
2079
|
+
export interface CommunityChatAdded {}
|
|
2080
|
+
export interface CommunityChatRemoved {}
|
|
2081
|
+
export interface CommunityChatJoined {}
|
|
2082
|
+
export interface MessageGenerationStopped {}
|
|
2083
|
+
export interface ManagedBotCreated {}
|
|
2084
|
+
export interface PollOptionAdded {}
|
|
2085
|
+
export interface PollOptionDeleted {}
|
|
2086
|
+
export interface ChatOwnerLeft {}
|
|
2087
|
+
export interface ChatOwnerChanged {}
|
|
2088
|
+
export interface ChecklistTasksDone {}
|
|
2089
|
+
export interface ChecklistTasksAdded {}
|
|
2090
|
+
export interface DirectMessagePriceChanged {}
|
|
2091
|
+
|
|
2092
|
+
export interface GiftBackground {
|
|
2093
|
+
id: string;
|
|
2094
|
+
file: string;
|
|
2095
|
+
}
|
|
2096
|
+
|
|
2097
|
+
export interface UniqueGiftColors {
|
|
2098
|
+
background_color: string;
|
|
2099
|
+
foreground_color: string;
|
|
2100
|
+
pattern_color: string;
|
|
2101
|
+
}
|
|
2102
|
+
|
|
2103
|
+
export interface VideoQuality {
|
|
2104
|
+
quality: string;
|
|
2105
|
+
width: number;
|
|
2106
|
+
height: number;
|
|
2107
|
+
file_size?: number;
|
|
2108
|
+
}
|
|
2109
|
+
|
|
2110
|
+
export interface UserRating {
|
|
2111
|
+
rating: number;
|
|
2112
|
+
max_rating?: number;
|
|
2113
|
+
}
|
|
2114
|
+
|
|
2115
|
+
export interface GiftInfo {
|
|
2116
|
+
gift: Gift;
|
|
2117
|
+
owned_gift_id?: string;
|
|
2118
|
+
text?: string;
|
|
2119
|
+
entities?: MessageEntity[];
|
|
2120
|
+
is_upgrade_separate?: boolean;
|
|
2121
|
+
unique_gift_number?: string;
|
|
2122
|
+
}
|
|
2123
|
+
|
|
2124
|
+
export interface UniqueGiftInfo {
|
|
2125
|
+
origin: string;
|
|
2126
|
+
gift: UniqueGift;
|
|
2127
|
+
owned_gift_id?: string;
|
|
2128
|
+
next_transfer_date?: number;
|
|
2129
|
+
last_resale_currency?: string;
|
|
2130
|
+
last_resale_amount?: number;
|
|
2131
|
+
text?: string;
|
|
2132
|
+
entities?: MessageEntity[];
|
|
2133
|
+
is_private?: boolean;
|
|
2134
|
+
}
|
|
2135
|
+
|
|
2136
|
+
export interface BotSubscriptionUpdated {
|
|
2137
|
+
subscription_period: number;
|
|
2138
|
+
currency: string;
|
|
2139
|
+
amount: number;
|
|
2140
|
+
}
|
|
2141
|
+
|
|
2142
|
+
export interface DisabledButton {}
|
|
2143
|
+
|
|
2144
|
+
export interface KeyboardButtonRequestManagedBot {
|
|
2145
|
+
request_chat?: KeyboardButtonRequestChat;
|
|
2146
|
+
}
|
|
2147
|
+
|
|
2148
|
+
export interface PollMedia {
|
|
2149
|
+
type?: string;
|
|
2150
|
+
text?: string;
|
|
2151
|
+
text_entities?: MessageEntity[];
|
|
2152
|
+
animation?: Animation;
|
|
2153
|
+
photo?: PhotoSize[];
|
|
2154
|
+
sticker?: Sticker;
|
|
2155
|
+
video?: Video;
|
|
2156
|
+
audio?: Audio;
|
|
2157
|
+
voice?: Voice;
|
|
2158
|
+
document?: Document;
|
|
2159
|
+
link?: Link;
|
|
2160
|
+
}
|
|
2161
|
+
|
|
2162
|
+
export interface InputPollMedia {
|
|
2163
|
+
type?: string;
|
|
2164
|
+
text?: string;
|
|
2165
|
+
text_entities?: MessageEntity[];
|
|
2166
|
+
animation?: string;
|
|
2167
|
+
photo?: string;
|
|
2168
|
+
sticker?: string;
|
|
2169
|
+
video?: string;
|
|
2170
|
+
audio?: string;
|
|
2171
|
+
voice?: string;
|
|
2172
|
+
document?: string;
|
|
2173
|
+
}
|
|
2174
|
+
|
|
2175
|
+
export interface Link {
|
|
2176
|
+
type: string;
|
|
2177
|
+
url?: string;
|
|
2178
|
+
}
|
|
2179
|
+
|
|
2180
|
+
export interface InputMediaLink {
|
|
2181
|
+
type: string;
|
|
2182
|
+
url?: string;
|
|
2183
|
+
}
|
|
2184
|
+
|
|
2185
|
+
export interface SuggestedPostParameters {
|
|
2186
|
+
post_type?: string;
|
|
2187
|
+
price?: SuggestedPostPrice;
|
|
2188
|
+
schedule_date?: number;
|
|
2189
|
+
}
|
|
2190
|
+
|
|
2191
|
+
export interface AcceptedGiftTypes {
|
|
2192
|
+
unlimited_gifts?: boolean;
|
|
2193
|
+
limited_gifts?: boolean;
|
|
2194
|
+
unique_gifts?: boolean;
|
|
2195
|
+
premium_subscription?: boolean;
|
|
2196
|
+
}
|
|
2197
|
+
|
|
1963
2198
|
// ---------------------------------------------------------------------------
|
|
1964
2199
|
// Keyboard Types
|
|
1965
2200
|
// ---------------------------------------------------------------------------
|
|
@@ -1967,6 +2202,7 @@ export interface ServiceMessage {
|
|
|
1967
2202
|
/** This object represents an inline keyboard. */
|
|
1968
2203
|
export interface InlineKeyboardMarkup {
|
|
1969
2204
|
inline_keyboard: InlineKeyboardButton[][];
|
|
2205
|
+
force_reply?: boolean;
|
|
1970
2206
|
}
|
|
1971
2207
|
|
|
1972
2208
|
/** This object represents one button of an inline keyboard. */
|
|
@@ -1982,6 +2218,9 @@ export interface InlineKeyboardButton {
|
|
|
1982
2218
|
pay?: boolean;
|
|
1983
2219
|
copy_text?: CopyTextButton;
|
|
1984
2220
|
callback_game?: CallbackGame;
|
|
2221
|
+
disabled?: DisabledButton;
|
|
2222
|
+
icon_custom_emoji_id?: string;
|
|
2223
|
+
style?: string;
|
|
1985
2224
|
}
|
|
1986
2225
|
|
|
1987
2226
|
/** This object represents a custom keyboard. */
|
|
@@ -1993,6 +2232,7 @@ export interface ReplyKeyboardMarkup {
|
|
|
1993
2232
|
input_field_placeholder?: string;
|
|
1994
2233
|
selective?: boolean;
|
|
1995
2234
|
is_custom_keyboard?: boolean;
|
|
2235
|
+
force_reply?: boolean;
|
|
1996
2236
|
}
|
|
1997
2237
|
|
|
1998
2238
|
/** This object represents one button of the reply keyboard. */
|
|
@@ -2006,6 +2246,9 @@ export interface KeyboardButton {
|
|
|
2006
2246
|
web_app?: WebAppInfo;
|
|
2007
2247
|
request_user?: KeyboardButtonRequestUsers;
|
|
2008
2248
|
request_chat_is_channel?: boolean;
|
|
2249
|
+
icon_custom_emoji_id?: string;
|
|
2250
|
+
style?: string;
|
|
2251
|
+
request_managed_bot?: KeyboardButtonRequestManagedBot;
|
|
2009
2252
|
}
|
|
2010
2253
|
|
|
2011
2254
|
export interface KeyboardButtonRequestUsers {
|
|
@@ -2249,6 +2492,8 @@ export interface InputMediaVideo {
|
|
|
2249
2492
|
duration?: Integer;
|
|
2250
2493
|
supports_streaming?: boolean;
|
|
2251
2494
|
has_spoiler?: boolean;
|
|
2495
|
+
cover?: string;
|
|
2496
|
+
start_timestamp?: number;
|
|
2252
2497
|
}
|
|
2253
2498
|
|
|
2254
2499
|
/** Describes the paid media to be sent. */
|
|
@@ -2443,6 +2688,16 @@ export interface TelegramBotOptions {
|
|
|
2443
2688
|
filepath?: boolean;
|
|
2444
2689
|
/** Set to true for forward-compatibility on unhandled rejections. */
|
|
2445
2690
|
badRejection?: boolean;
|
|
2691
|
+
/**
|
|
2692
|
+
* Apply latency-oriented network tuning at construction (prefer IPv4 and
|
|
2693
|
+
* shorten Node's IPv6 fallback window). Mutates process-global DNS settings.
|
|
2694
|
+
*/
|
|
2695
|
+
ipv4First?: boolean;
|
|
2696
|
+
/**
|
|
2697
|
+
* Warm up the connection (DNS/TCP/TLS) with a `getMe()` call at startup so
|
|
2698
|
+
* the first real request is not a cold start.
|
|
2699
|
+
*/
|
|
2700
|
+
prewarm?: boolean;
|
|
2446
2701
|
}
|
|
2447
2702
|
|
|
2448
2703
|
/** Polling options. */
|
|
@@ -2509,6 +2764,9 @@ export interface SendMessageOptions extends FormQueryOptions {
|
|
|
2509
2764
|
allow_paid_broadcast?: boolean;
|
|
2510
2765
|
message_effect_id?: string;
|
|
2511
2766
|
business_connection_id?: string;
|
|
2767
|
+
direct_messages_topic_id?: number;
|
|
2768
|
+
suggested_post_parameters?: SuggestedPostParameters;
|
|
2769
|
+
ephemeral_message_parameters?: EphemeralMessageParameters;
|
|
2512
2770
|
reply_markup?: ReplyMarkup;
|
|
2513
2771
|
}
|
|
2514
2772
|
|
|
@@ -2525,6 +2783,9 @@ export interface SendPhotoOptions extends FormQueryOptions {
|
|
|
2525
2783
|
protect_content?: boolean;
|
|
2526
2784
|
allow_paid_broadcast?: boolean;
|
|
2527
2785
|
message_effect_id?: string;
|
|
2786
|
+
direct_messages_topic_id?: number;
|
|
2787
|
+
suggested_post_parameters?: SuggestedPostParameters;
|
|
2788
|
+
ephemeral_message_parameters?: EphemeralMessageParameters;
|
|
2528
2789
|
reply_parameters?: ReplyParameters;
|
|
2529
2790
|
reply_markup?: ReplyMarkup;
|
|
2530
2791
|
}
|
|
@@ -2544,6 +2805,9 @@ export interface SendAudioOptions extends FormQueryOptions {
|
|
|
2544
2805
|
protect_content?: boolean;
|
|
2545
2806
|
allow_paid_broadcast?: boolean;
|
|
2546
2807
|
message_effect_id?: string;
|
|
2808
|
+
direct_messages_topic_id?: number;
|
|
2809
|
+
suggested_post_parameters?: SuggestedPostParameters;
|
|
2810
|
+
ephemeral_message_parameters?: EphemeralMessageParameters;
|
|
2547
2811
|
reply_parameters?: ReplyParameters;
|
|
2548
2812
|
reply_markup?: ReplyMarkup;
|
|
2549
2813
|
}
|
|
@@ -2561,6 +2825,9 @@ export interface SendDocumentOptions extends FormQueryOptions {
|
|
|
2561
2825
|
protect_content?: boolean;
|
|
2562
2826
|
allow_paid_broadcast?: boolean;
|
|
2563
2827
|
message_effect_id?: string;
|
|
2828
|
+
direct_messages_topic_id?: number;
|
|
2829
|
+
suggested_post_parameters?: SuggestedPostParameters;
|
|
2830
|
+
ephemeral_message_parameters?: EphemeralMessageParameters;
|
|
2564
2831
|
reply_parameters?: ReplyParameters;
|
|
2565
2832
|
reply_markup?: ReplyMarkup;
|
|
2566
2833
|
}
|
|
@@ -2583,6 +2850,11 @@ export interface SendVideoOptions extends FormQueryOptions {
|
|
|
2583
2850
|
protect_content?: boolean;
|
|
2584
2851
|
allow_paid_broadcast?: boolean;
|
|
2585
2852
|
message_effect_id?: string;
|
|
2853
|
+
direct_messages_topic_id?: number;
|
|
2854
|
+
suggested_post_parameters?: SuggestedPostParameters;
|
|
2855
|
+
ephemeral_message_parameters?: EphemeralMessageParameters;
|
|
2856
|
+
cover?: string;
|
|
2857
|
+
start_timestamp?: number;
|
|
2586
2858
|
reply_parameters?: ReplyParameters;
|
|
2587
2859
|
reply_markup?: ReplyMarkup;
|
|
2588
2860
|
}
|
|
@@ -2604,6 +2876,9 @@ export interface SendAnimationOptions extends FormQueryOptions {
|
|
|
2604
2876
|
protect_content?: boolean;
|
|
2605
2877
|
allow_paid_broadcast?: boolean;
|
|
2606
2878
|
message_effect_id?: string;
|
|
2879
|
+
direct_messages_topic_id?: number;
|
|
2880
|
+
suggested_post_parameters?: SuggestedPostParameters;
|
|
2881
|
+
ephemeral_message_parameters?: EphemeralMessageParameters;
|
|
2607
2882
|
reply_parameters?: ReplyParameters;
|
|
2608
2883
|
reply_markup?: ReplyMarkup;
|
|
2609
2884
|
}
|
|
@@ -2620,6 +2895,9 @@ export interface SendVoiceOptions extends FormQueryOptions {
|
|
|
2620
2895
|
protect_content?: boolean;
|
|
2621
2896
|
allow_paid_broadcast?: boolean;
|
|
2622
2897
|
message_effect_id?: string;
|
|
2898
|
+
direct_messages_topic_id?: number;
|
|
2899
|
+
suggested_post_parameters?: SuggestedPostParameters;
|
|
2900
|
+
ephemeral_message_parameters?: EphemeralMessageParameters;
|
|
2623
2901
|
reply_parameters?: ReplyParameters;
|
|
2624
2902
|
reply_markup?: ReplyMarkup;
|
|
2625
2903
|
}
|
|
@@ -2635,6 +2913,9 @@ export interface SendVideoNoteOptions extends FormQueryOptions {
|
|
|
2635
2913
|
protect_content?: boolean;
|
|
2636
2914
|
allow_paid_broadcast?: boolean;
|
|
2637
2915
|
message_effect_id?: string;
|
|
2916
|
+
direct_messages_topic_id?: number;
|
|
2917
|
+
suggested_post_parameters?: SuggestedPostParameters;
|
|
2918
|
+
ephemeral_message_parameters?: EphemeralMessageParameters;
|
|
2638
2919
|
reply_parameters?: ReplyParameters;
|
|
2639
2920
|
reply_markup?: ReplyMarkup;
|
|
2640
2921
|
}
|
|
@@ -2648,6 +2929,9 @@ export interface SendStickerOptions extends FormQueryOptions {
|
|
|
2648
2929
|
protect_content?: boolean;
|
|
2649
2930
|
allow_paid_broadcast?: boolean;
|
|
2650
2931
|
message_effect_id?: string;
|
|
2932
|
+
direct_messages_topic_id?: number;
|
|
2933
|
+
suggested_post_parameters?: SuggestedPostParameters;
|
|
2934
|
+
ephemeral_message_parameters?: EphemeralMessageParameters;
|
|
2651
2935
|
reply_parameters?: ReplyParameters;
|
|
2652
2936
|
reply_markup?: ReplyMarkup;
|
|
2653
2937
|
}
|
|
@@ -2664,6 +2948,9 @@ export interface SendLocationOptions extends FormQueryOptions {
|
|
|
2664
2948
|
protect_content?: boolean;
|
|
2665
2949
|
allow_paid_broadcast?: boolean;
|
|
2666
2950
|
message_effect_id?: string;
|
|
2951
|
+
direct_messages_topic_id?: number;
|
|
2952
|
+
suggested_post_parameters?: SuggestedPostParameters;
|
|
2953
|
+
ephemeral_message_parameters?: EphemeralMessageParameters;
|
|
2667
2954
|
reply_parameters?: ReplyParameters;
|
|
2668
2955
|
reply_markup?: ReplyMarkup;
|
|
2669
2956
|
}
|
|
@@ -2680,6 +2967,9 @@ export interface SendVenueOptions extends FormQueryOptions {
|
|
|
2680
2967
|
protect_content?: boolean;
|
|
2681
2968
|
allow_paid_broadcast?: boolean;
|
|
2682
2969
|
message_effect_id?: string;
|
|
2970
|
+
direct_messages_topic_id?: number;
|
|
2971
|
+
suggested_post_parameters?: SuggestedPostParameters;
|
|
2972
|
+
ephemeral_message_parameters?: EphemeralMessageParameters;
|
|
2683
2973
|
reply_parameters?: ReplyParameters;
|
|
2684
2974
|
reply_markup?: ReplyMarkup;
|
|
2685
2975
|
}
|
|
@@ -2694,6 +2984,9 @@ export interface SendContactOptions extends FormQueryOptions {
|
|
|
2694
2984
|
protect_content?: boolean;
|
|
2695
2985
|
allow_paid_broadcast?: boolean;
|
|
2696
2986
|
message_effect_id?: string;
|
|
2987
|
+
direct_messages_topic_id?: number;
|
|
2988
|
+
suggested_post_parameters?: SuggestedPostParameters;
|
|
2989
|
+
ephemeral_message_parameters?: EphemeralMessageParameters;
|
|
2697
2990
|
reply_parameters?: ReplyParameters;
|
|
2698
2991
|
reply_markup?: ReplyMarkup;
|
|
2699
2992
|
}
|
|
@@ -2714,10 +3007,25 @@ export interface SendPollOptions extends FormQueryOptions {
|
|
|
2714
3007
|
open_period?: Integer;
|
|
2715
3008
|
close_date?: Integer;
|
|
2716
3009
|
is_closed?: boolean;
|
|
3010
|
+
media?: InputPollMedia;
|
|
3011
|
+
explanation_media?: InputMedia;
|
|
3012
|
+
members_only?: boolean;
|
|
3013
|
+
country_codes?: string[];
|
|
3014
|
+
correct_option_ids?: number[];
|
|
3015
|
+
allows_revoting?: boolean;
|
|
3016
|
+
shuffle_options?: boolean;
|
|
3017
|
+
allow_adding_options?: boolean;
|
|
3018
|
+
hide_results_until_closes?: boolean;
|
|
3019
|
+
description?: string;
|
|
3020
|
+
description_parse_mode?: string;
|
|
3021
|
+
description_entities?: MessageEntity[];
|
|
2717
3022
|
disable_notification?: boolean;
|
|
2718
3023
|
protect_content?: boolean;
|
|
2719
3024
|
allow_paid_broadcast?: boolean;
|
|
2720
3025
|
message_effect_id?: string;
|
|
3026
|
+
direct_messages_topic_id?: number;
|
|
3027
|
+
suggested_post_parameters?: SuggestedPostParameters;
|
|
3028
|
+
ephemeral_message_parameters?: EphemeralMessageParameters;
|
|
2721
3029
|
reply_parameters?: ReplyParameters;
|
|
2722
3030
|
reply_markup?: ReplyMarkup;
|
|
2723
3031
|
}
|
|
@@ -2731,6 +3039,9 @@ export interface SendDiceOptions extends FormQueryOptions {
|
|
|
2731
3039
|
protect_content?: boolean;
|
|
2732
3040
|
allow_paid_broadcast?: boolean;
|
|
2733
3041
|
message_effect_id?: string;
|
|
3042
|
+
direct_messages_topic_id?: number;
|
|
3043
|
+
suggested_post_parameters?: SuggestedPostParameters;
|
|
3044
|
+
ephemeral_message_parameters?: EphemeralMessageParameters;
|
|
2734
3045
|
reply_parameters?: ReplyParameters;
|
|
2735
3046
|
reply_markup?: ReplyMarkup;
|
|
2736
3047
|
}
|
|
@@ -2749,6 +3060,9 @@ export interface SendGameOptions extends FormQueryOptions {
|
|
|
2749
3060
|
protect_content?: boolean;
|
|
2750
3061
|
allow_paid_broadcast?: boolean;
|
|
2751
3062
|
message_effect_id?: string;
|
|
3063
|
+
direct_messages_topic_id?: number;
|
|
3064
|
+
suggested_post_parameters?: SuggestedPostParameters;
|
|
3065
|
+
ephemeral_message_parameters?: EphemeralMessageParameters;
|
|
2752
3066
|
reply_parameters?: ReplyParameters;
|
|
2753
3067
|
reply_markup?: InlineKeyboardMarkup;
|
|
2754
3068
|
}
|
|
@@ -2774,6 +3088,9 @@ export interface SendInvoiceOptions extends FormQueryOptions {
|
|
|
2774
3088
|
protect_content?: boolean;
|
|
2775
3089
|
allow_paid_broadcast?: boolean;
|
|
2776
3090
|
message_effect_id?: string;
|
|
3091
|
+
direct_messages_topic_id?: number;
|
|
3092
|
+
suggested_post_parameters?: SuggestedPostParameters;
|
|
3093
|
+
ephemeral_message_parameters?: EphemeralMessageParameters;
|
|
2777
3094
|
reply_parameters?: ReplyParameters;
|
|
2778
3095
|
reply_markup?: InlineKeyboardMarkup;
|
|
2779
3096
|
message_thread_id?: Integer;
|
|
@@ -2791,6 +3108,8 @@ export interface SendPaidMediaOptions extends FormQueryOptions {
|
|
|
2791
3108
|
disable_notification?: boolean;
|
|
2792
3109
|
protect_content?: boolean;
|
|
2793
3110
|
allow_paid_broadcast?: boolean;
|
|
3111
|
+
direct_messages_topic_id?: number;
|
|
3112
|
+
suggested_post_parameters?: SuggestedPostParameters;
|
|
2794
3113
|
reply_parameters?: ReplyParameters;
|
|
2795
3114
|
reply_markup?: ReplyMarkup;
|
|
2796
3115
|
}
|
|
@@ -2810,6 +3129,9 @@ export interface ReplyParameters {
|
|
|
2810
3129
|
quote_entities?: MessageEntity[];
|
|
2811
3130
|
quote_position?: Integer;
|
|
2812
3131
|
is_quote?: boolean;
|
|
3132
|
+
ephemeral_message_id?: string;
|
|
3133
|
+
poll_option_id?: string;
|
|
3134
|
+
checklist_task_id?: string;
|
|
2813
3135
|
}
|
|
2814
3136
|
|
|
2815
3137
|
/** Parameters for setMessageReaction. */
|
|
@@ -2858,6 +3180,14 @@ export default class TelegramBot extends EventEmitter {
|
|
|
2858
3180
|
|
|
2859
3181
|
/** The types of message updates the library handles. */
|
|
2860
3182
|
static messageTypes: string[];
|
|
3183
|
+
/**
|
|
3184
|
+
* Apply latency-oriented network tuning (prefer IPv4, shorten Node's IPv6
|
|
3185
|
+
* fallback window). Mutates process-global settings — call once at startup.
|
|
3186
|
+
*/
|
|
3187
|
+
static applyNetworkTuning(options?: {
|
|
3188
|
+
ipv4First?: boolean;
|
|
3189
|
+
autoSelectFamilyAttemptTimeout?: number;
|
|
3190
|
+
}): { ipv4First: boolean; autoSelectFamilyAttemptTimeout: number };
|
|
2861
3191
|
|
|
2862
3192
|
// --- Event Overloads --------------------------------------------------------
|
|
2863
3193
|
|
|
@@ -3050,6 +3380,11 @@ export default class TelegramBot extends EventEmitter {
|
|
|
3050
3380
|
|
|
3051
3381
|
/** A simple method for testing your bot's authentication token. */
|
|
3052
3382
|
getMe(form?: FormQueryOptions): Promise<User>;
|
|
3383
|
+
/**
|
|
3384
|
+
* Warm up the connection (DNS/TCP/TLS) with a lightweight `getMe()` call so
|
|
3385
|
+
* the first real request is not a cold start. Resolves with the bot instance.
|
|
3386
|
+
*/
|
|
3387
|
+
preheat(options?: { suppressErrors?: boolean }): Promise<this>;
|
|
3053
3388
|
|
|
3054
3389
|
/** Log out from the cloud Bot API server. */
|
|
3055
3390
|
logOut(form?: FormQueryOptions): Promise<boolean>;
|
|
@@ -3081,6 +3416,8 @@ export default class TelegramBot extends EventEmitter {
|
|
|
3081
3416
|
disable_notification?: boolean;
|
|
3082
3417
|
protect_content?: boolean;
|
|
3083
3418
|
message_effect_id?: string;
|
|
3419
|
+
video_start_timestamp?: number;
|
|
3420
|
+
direct_messages_topic_id?: number;
|
|
3084
3421
|
},
|
|
3085
3422
|
): Promise<Message>;
|
|
3086
3423
|
|
|
@@ -3095,6 +3432,7 @@ export default class TelegramBot extends EventEmitter {
|
|
|
3095
3432
|
form?: {
|
|
3096
3433
|
disable_notification?: boolean;
|
|
3097
3434
|
protect_content?: boolean;
|
|
3435
|
+
direct_messages_topic_id?: number;
|
|
3098
3436
|
},
|
|
3099
3437
|
): Promise<MessageId[]>;
|
|
3100
3438
|
|
|
@@ -3115,6 +3453,9 @@ export default class TelegramBot extends EventEmitter {
|
|
|
3115
3453
|
disable_notification?: boolean;
|
|
3116
3454
|
protect_content?: boolean;
|
|
3117
3455
|
allow_paid_broadcast?: boolean;
|
|
3456
|
+
video_start_timestamp?: number;
|
|
3457
|
+
message_effect_id?: string;
|
|
3458
|
+
direct_messages_topic_id?: number;
|
|
3118
3459
|
reply_parameters?: ReplyParameters;
|
|
3119
3460
|
reply_markup?: ReplyMarkup;
|
|
3120
3461
|
},
|
|
@@ -3133,6 +3474,7 @@ export default class TelegramBot extends EventEmitter {
|
|
|
3133
3474
|
disable_notification?: boolean;
|
|
3134
3475
|
protect_content?: boolean;
|
|
3135
3476
|
remove_caption?: boolean;
|
|
3477
|
+
direct_messages_topic_id?: number;
|
|
3136
3478
|
},
|
|
3137
3479
|
): Promise<{ message_id: Integer }[]>;
|
|
3138
3480
|
|
|
@@ -3220,7 +3562,7 @@ export default class TelegramBot extends EventEmitter {
|
|
|
3220
3562
|
sendMediaGroup(
|
|
3221
3563
|
chatId: number | string,
|
|
3222
3564
|
media: Array<InputMedia & { file_options?: FormQueryOptions }>,
|
|
3223
|
-
options?: FormQueryOptions,
|
|
3565
|
+
options?: FormQueryOptions & { direct_messages_topic_id?: number },
|
|
3224
3566
|
): Promise<Message[]>;
|
|
3225
3567
|
|
|
3226
3568
|
/**
|
|
@@ -3259,6 +3601,7 @@ export default class TelegramBot extends EventEmitter {
|
|
|
3259
3601
|
horizontal_accuracy?: Float;
|
|
3260
3602
|
heading?: Integer;
|
|
3261
3603
|
proximity_alert_radius?: Integer;
|
|
3604
|
+
business_connection_id?: string;
|
|
3262
3605
|
reply_markup?: InlineKeyboardMarkup;
|
|
3263
3606
|
},
|
|
3264
3607
|
): Promise<Message | boolean>;
|
|
@@ -3271,6 +3614,7 @@ export default class TelegramBot extends EventEmitter {
|
|
|
3271
3614
|
chat_id?: number | string;
|
|
3272
3615
|
message_id?: number;
|
|
3273
3616
|
inline_message_id?: string;
|
|
3617
|
+
business_connection_id?: string;
|
|
3274
3618
|
reply_markup?: InlineKeyboardMarkup;
|
|
3275
3619
|
}): Promise<Message | boolean>;
|
|
3276
3620
|
|
|
@@ -3416,6 +3760,8 @@ export default class TelegramBot extends EventEmitter {
|
|
|
3416
3760
|
can_edit_stories?: boolean;
|
|
3417
3761
|
can_delete_stories?: boolean;
|
|
3418
3762
|
can_manage_direct_messages?: boolean;
|
|
3763
|
+
can_manage_tags?: boolean;
|
|
3764
|
+
can_send_welcome_messages?: boolean;
|
|
3419
3765
|
},
|
|
3420
3766
|
): Promise<boolean>;
|
|
3421
3767
|
|
|
@@ -3583,7 +3929,7 @@ export default class TelegramBot extends EventEmitter {
|
|
|
3583
3929
|
* Get a list of administrators in a chat.
|
|
3584
3930
|
* @see https://core.telegram.org/bots/api#getchatadministrators
|
|
3585
3931
|
*/
|
|
3586
|
-
getChatAdministrators(chatId: number | string, form?:
|
|
3932
|
+
getChatAdministrators(chatId: number | string, form?: { return_bots?: boolean }): Promise<ChatMember[]>;
|
|
3587
3933
|
|
|
3588
3934
|
/**
|
|
3589
3935
|
* Get the number of members in a chat.
|
|
@@ -3832,6 +4178,8 @@ export default class TelegramBot extends EventEmitter {
|
|
|
3832
4178
|
parse_mode?: string;
|
|
3833
4179
|
entities?: MessageEntity[];
|
|
3834
4180
|
link_preview_options?: LinkPreviewOptions;
|
|
4181
|
+
rich_message?: InputRichMessage;
|
|
4182
|
+
business_connection_id?: string;
|
|
3835
4183
|
reply_markup?: InlineKeyboardMarkup;
|
|
3836
4184
|
},
|
|
3837
4185
|
): Promise<Message | boolean>;
|
|
@@ -3849,6 +4197,7 @@ export default class TelegramBot extends EventEmitter {
|
|
|
3849
4197
|
parse_mode?: string;
|
|
3850
4198
|
caption_entities?: MessageEntity[];
|
|
3851
4199
|
show_caption_above_media?: boolean;
|
|
4200
|
+
business_connection_id?: string;
|
|
3852
4201
|
reply_markup?: InlineKeyboardMarkup;
|
|
3853
4202
|
},
|
|
3854
4203
|
): Promise<Message | boolean>;
|
|
@@ -3863,6 +4212,7 @@ export default class TelegramBot extends EventEmitter {
|
|
|
3863
4212
|
chat_id?: number | string;
|
|
3864
4213
|
message_id?: number;
|
|
3865
4214
|
inline_message_id?: string;
|
|
4215
|
+
business_connection_id?: string;
|
|
3866
4216
|
reply_markup?: InlineKeyboardMarkup;
|
|
3867
4217
|
},
|
|
3868
4218
|
): Promise<Message | boolean>;
|
|
@@ -3877,6 +4227,7 @@ export default class TelegramBot extends EventEmitter {
|
|
|
3877
4227
|
chat_id?: number | string;
|
|
3878
4228
|
message_id?: number;
|
|
3879
4229
|
inline_message_id?: string;
|
|
4230
|
+
business_connection_id?: string;
|
|
3880
4231
|
},
|
|
3881
4232
|
): Promise<Message | boolean>;
|
|
3882
4233
|
|
|
@@ -3889,6 +4240,7 @@ export default class TelegramBot extends EventEmitter {
|
|
|
3889
4240
|
pollId: number,
|
|
3890
4241
|
form?: {
|
|
3891
4242
|
message_thread_id?: Integer;
|
|
4243
|
+
business_connection_id?: string;
|
|
3892
4244
|
reply_markup?: InlineKeyboardMarkup;
|
|
3893
4245
|
},
|
|
3894
4246
|
): Promise<Poll>;
|
|
@@ -4247,7 +4599,7 @@ export default class TelegramBot extends EventEmitter {
|
|
|
4247
4599
|
sendGift(
|
|
4248
4600
|
userId: number,
|
|
4249
4601
|
giftId: string,
|
|
4250
|
-
form?: { text?: string; text_parse_mode?: string; text_entities?: MessageEntity[]; pay_for_upgrade?: boolean },
|
|
4602
|
+
form?: { text?: string; text_parse_mode?: string; text_entities?: MessageEntity[]; pay_for_upgrade?: boolean; chat_id?: number | string },
|
|
4251
4603
|
): Promise<boolean>;
|
|
4252
4604
|
|
|
4253
4605
|
/**
|
|
@@ -4550,6 +4902,8 @@ export default class TelegramBot extends EventEmitter {
|
|
|
4550
4902
|
parse_mode?: string;
|
|
4551
4903
|
entities?: MessageEntity[];
|
|
4552
4904
|
link_preview_options?: LinkPreviewOptions;
|
|
4905
|
+
can_stop?: boolean;
|
|
4906
|
+
keep_on_stop?: boolean;
|
|
4553
4907
|
},
|
|
4554
4908
|
): Promise<Message>;
|
|
4555
4909
|
|
|
@@ -4668,10 +5022,17 @@ export default class TelegramBot extends EventEmitter {
|
|
|
4668
5022
|
answerGuestQuery(guestQueryId: string, text: string, form?: FormQueryOptions): Promise<boolean>;
|
|
4669
5023
|
|
|
4670
5024
|
/**
|
|
4671
|
-
* Remove
|
|
4672
|
-
*
|
|
5025
|
+
* Remove up to 10000 recent reactions in a group or supergroup added by a
|
|
5026
|
+
* given user or chat.
|
|
5027
|
+
*
|
|
5028
|
+
* Pass the user id positionally, or an options object with `user_id` and/or
|
|
5029
|
+
* `actor_chat_id`.
|
|
5030
|
+
* @see https://core.telegram.org/bots/api#deleteallmessagereactions
|
|
4673
5031
|
*/
|
|
4674
|
-
deleteAllMessageReactions(
|
|
5032
|
+
deleteAllMessageReactions(
|
|
5033
|
+
chatId: number | string,
|
|
5034
|
+
userIdOrOptions?: number | string | FormQueryOptions,
|
|
5035
|
+
): Promise<boolean>;
|
|
4675
5036
|
|
|
4676
5037
|
/**
|
|
4677
5038
|
* Remove a reaction from a message.
|
|
@@ -4762,6 +5123,8 @@ export default class TelegramBot extends EventEmitter {
|
|
|
4762
5123
|
form?: {
|
|
4763
5124
|
business_connection_id?: string;
|
|
4764
5125
|
message_thread_id?: Integer;
|
|
5126
|
+
can_stop?: boolean;
|
|
5127
|
+
keep_on_stop?: boolean;
|
|
4765
5128
|
},
|
|
4766
5129
|
): Promise<Message>;
|
|
4767
5130
|
|