@zero-bot.net/tg-bot-api 1.2.0 → 1.3.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/lib/telegram.d.ts +339 -6
- package/lib/telegram.js +39 -2
- package/package.json +1 -1
- package/src/telegram.d.ts +339 -6
- package/src/telegram.js +52 -1
package/lib/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. */
|
|
@@ -2509,6 +2754,9 @@ export interface SendMessageOptions extends FormQueryOptions {
|
|
|
2509
2754
|
allow_paid_broadcast?: boolean;
|
|
2510
2755
|
message_effect_id?: string;
|
|
2511
2756
|
business_connection_id?: string;
|
|
2757
|
+
direct_messages_topic_id?: number;
|
|
2758
|
+
suggested_post_parameters?: SuggestedPostParameters;
|
|
2759
|
+
ephemeral_message_parameters?: EphemeralMessageParameters;
|
|
2512
2760
|
reply_markup?: ReplyMarkup;
|
|
2513
2761
|
}
|
|
2514
2762
|
|
|
@@ -2525,6 +2773,9 @@ export interface SendPhotoOptions extends FormQueryOptions {
|
|
|
2525
2773
|
protect_content?: boolean;
|
|
2526
2774
|
allow_paid_broadcast?: boolean;
|
|
2527
2775
|
message_effect_id?: string;
|
|
2776
|
+
direct_messages_topic_id?: number;
|
|
2777
|
+
suggested_post_parameters?: SuggestedPostParameters;
|
|
2778
|
+
ephemeral_message_parameters?: EphemeralMessageParameters;
|
|
2528
2779
|
reply_parameters?: ReplyParameters;
|
|
2529
2780
|
reply_markup?: ReplyMarkup;
|
|
2530
2781
|
}
|
|
@@ -2544,6 +2795,9 @@ export interface SendAudioOptions extends FormQueryOptions {
|
|
|
2544
2795
|
protect_content?: boolean;
|
|
2545
2796
|
allow_paid_broadcast?: boolean;
|
|
2546
2797
|
message_effect_id?: string;
|
|
2798
|
+
direct_messages_topic_id?: number;
|
|
2799
|
+
suggested_post_parameters?: SuggestedPostParameters;
|
|
2800
|
+
ephemeral_message_parameters?: EphemeralMessageParameters;
|
|
2547
2801
|
reply_parameters?: ReplyParameters;
|
|
2548
2802
|
reply_markup?: ReplyMarkup;
|
|
2549
2803
|
}
|
|
@@ -2561,6 +2815,9 @@ export interface SendDocumentOptions extends FormQueryOptions {
|
|
|
2561
2815
|
protect_content?: boolean;
|
|
2562
2816
|
allow_paid_broadcast?: boolean;
|
|
2563
2817
|
message_effect_id?: string;
|
|
2818
|
+
direct_messages_topic_id?: number;
|
|
2819
|
+
suggested_post_parameters?: SuggestedPostParameters;
|
|
2820
|
+
ephemeral_message_parameters?: EphemeralMessageParameters;
|
|
2564
2821
|
reply_parameters?: ReplyParameters;
|
|
2565
2822
|
reply_markup?: ReplyMarkup;
|
|
2566
2823
|
}
|
|
@@ -2583,6 +2840,11 @@ export interface SendVideoOptions extends FormQueryOptions {
|
|
|
2583
2840
|
protect_content?: boolean;
|
|
2584
2841
|
allow_paid_broadcast?: boolean;
|
|
2585
2842
|
message_effect_id?: string;
|
|
2843
|
+
direct_messages_topic_id?: number;
|
|
2844
|
+
suggested_post_parameters?: SuggestedPostParameters;
|
|
2845
|
+
ephemeral_message_parameters?: EphemeralMessageParameters;
|
|
2846
|
+
cover?: string;
|
|
2847
|
+
start_timestamp?: number;
|
|
2586
2848
|
reply_parameters?: ReplyParameters;
|
|
2587
2849
|
reply_markup?: ReplyMarkup;
|
|
2588
2850
|
}
|
|
@@ -2604,6 +2866,9 @@ export interface SendAnimationOptions extends FormQueryOptions {
|
|
|
2604
2866
|
protect_content?: boolean;
|
|
2605
2867
|
allow_paid_broadcast?: boolean;
|
|
2606
2868
|
message_effect_id?: string;
|
|
2869
|
+
direct_messages_topic_id?: number;
|
|
2870
|
+
suggested_post_parameters?: SuggestedPostParameters;
|
|
2871
|
+
ephemeral_message_parameters?: EphemeralMessageParameters;
|
|
2607
2872
|
reply_parameters?: ReplyParameters;
|
|
2608
2873
|
reply_markup?: ReplyMarkup;
|
|
2609
2874
|
}
|
|
@@ -2620,6 +2885,9 @@ export interface SendVoiceOptions extends FormQueryOptions {
|
|
|
2620
2885
|
protect_content?: boolean;
|
|
2621
2886
|
allow_paid_broadcast?: boolean;
|
|
2622
2887
|
message_effect_id?: string;
|
|
2888
|
+
direct_messages_topic_id?: number;
|
|
2889
|
+
suggested_post_parameters?: SuggestedPostParameters;
|
|
2890
|
+
ephemeral_message_parameters?: EphemeralMessageParameters;
|
|
2623
2891
|
reply_parameters?: ReplyParameters;
|
|
2624
2892
|
reply_markup?: ReplyMarkup;
|
|
2625
2893
|
}
|
|
@@ -2635,6 +2903,9 @@ export interface SendVideoNoteOptions extends FormQueryOptions {
|
|
|
2635
2903
|
protect_content?: boolean;
|
|
2636
2904
|
allow_paid_broadcast?: boolean;
|
|
2637
2905
|
message_effect_id?: string;
|
|
2906
|
+
direct_messages_topic_id?: number;
|
|
2907
|
+
suggested_post_parameters?: SuggestedPostParameters;
|
|
2908
|
+
ephemeral_message_parameters?: EphemeralMessageParameters;
|
|
2638
2909
|
reply_parameters?: ReplyParameters;
|
|
2639
2910
|
reply_markup?: ReplyMarkup;
|
|
2640
2911
|
}
|
|
@@ -2648,6 +2919,9 @@ export interface SendStickerOptions extends FormQueryOptions {
|
|
|
2648
2919
|
protect_content?: boolean;
|
|
2649
2920
|
allow_paid_broadcast?: boolean;
|
|
2650
2921
|
message_effect_id?: string;
|
|
2922
|
+
direct_messages_topic_id?: number;
|
|
2923
|
+
suggested_post_parameters?: SuggestedPostParameters;
|
|
2924
|
+
ephemeral_message_parameters?: EphemeralMessageParameters;
|
|
2651
2925
|
reply_parameters?: ReplyParameters;
|
|
2652
2926
|
reply_markup?: ReplyMarkup;
|
|
2653
2927
|
}
|
|
@@ -2664,6 +2938,9 @@ export interface SendLocationOptions extends FormQueryOptions {
|
|
|
2664
2938
|
protect_content?: boolean;
|
|
2665
2939
|
allow_paid_broadcast?: boolean;
|
|
2666
2940
|
message_effect_id?: string;
|
|
2941
|
+
direct_messages_topic_id?: number;
|
|
2942
|
+
suggested_post_parameters?: SuggestedPostParameters;
|
|
2943
|
+
ephemeral_message_parameters?: EphemeralMessageParameters;
|
|
2667
2944
|
reply_parameters?: ReplyParameters;
|
|
2668
2945
|
reply_markup?: ReplyMarkup;
|
|
2669
2946
|
}
|
|
@@ -2680,6 +2957,9 @@ export interface SendVenueOptions extends FormQueryOptions {
|
|
|
2680
2957
|
protect_content?: boolean;
|
|
2681
2958
|
allow_paid_broadcast?: boolean;
|
|
2682
2959
|
message_effect_id?: string;
|
|
2960
|
+
direct_messages_topic_id?: number;
|
|
2961
|
+
suggested_post_parameters?: SuggestedPostParameters;
|
|
2962
|
+
ephemeral_message_parameters?: EphemeralMessageParameters;
|
|
2683
2963
|
reply_parameters?: ReplyParameters;
|
|
2684
2964
|
reply_markup?: ReplyMarkup;
|
|
2685
2965
|
}
|
|
@@ -2694,6 +2974,9 @@ export interface SendContactOptions extends FormQueryOptions {
|
|
|
2694
2974
|
protect_content?: boolean;
|
|
2695
2975
|
allow_paid_broadcast?: boolean;
|
|
2696
2976
|
message_effect_id?: string;
|
|
2977
|
+
direct_messages_topic_id?: number;
|
|
2978
|
+
suggested_post_parameters?: SuggestedPostParameters;
|
|
2979
|
+
ephemeral_message_parameters?: EphemeralMessageParameters;
|
|
2697
2980
|
reply_parameters?: ReplyParameters;
|
|
2698
2981
|
reply_markup?: ReplyMarkup;
|
|
2699
2982
|
}
|
|
@@ -2714,10 +2997,25 @@ export interface SendPollOptions extends FormQueryOptions {
|
|
|
2714
2997
|
open_period?: Integer;
|
|
2715
2998
|
close_date?: Integer;
|
|
2716
2999
|
is_closed?: boolean;
|
|
3000
|
+
media?: InputPollMedia;
|
|
3001
|
+
explanation_media?: InputMedia;
|
|
3002
|
+
members_only?: boolean;
|
|
3003
|
+
country_codes?: string[];
|
|
3004
|
+
correct_option_ids?: number[];
|
|
3005
|
+
allows_revoting?: boolean;
|
|
3006
|
+
shuffle_options?: boolean;
|
|
3007
|
+
allow_adding_options?: boolean;
|
|
3008
|
+
hide_results_until_closes?: boolean;
|
|
3009
|
+
description?: string;
|
|
3010
|
+
description_parse_mode?: string;
|
|
3011
|
+
description_entities?: MessageEntity[];
|
|
2717
3012
|
disable_notification?: boolean;
|
|
2718
3013
|
protect_content?: boolean;
|
|
2719
3014
|
allow_paid_broadcast?: boolean;
|
|
2720
3015
|
message_effect_id?: string;
|
|
3016
|
+
direct_messages_topic_id?: number;
|
|
3017
|
+
suggested_post_parameters?: SuggestedPostParameters;
|
|
3018
|
+
ephemeral_message_parameters?: EphemeralMessageParameters;
|
|
2721
3019
|
reply_parameters?: ReplyParameters;
|
|
2722
3020
|
reply_markup?: ReplyMarkup;
|
|
2723
3021
|
}
|
|
@@ -2731,6 +3029,9 @@ export interface SendDiceOptions extends FormQueryOptions {
|
|
|
2731
3029
|
protect_content?: boolean;
|
|
2732
3030
|
allow_paid_broadcast?: boolean;
|
|
2733
3031
|
message_effect_id?: string;
|
|
3032
|
+
direct_messages_topic_id?: number;
|
|
3033
|
+
suggested_post_parameters?: SuggestedPostParameters;
|
|
3034
|
+
ephemeral_message_parameters?: EphemeralMessageParameters;
|
|
2734
3035
|
reply_parameters?: ReplyParameters;
|
|
2735
3036
|
reply_markup?: ReplyMarkup;
|
|
2736
3037
|
}
|
|
@@ -2749,6 +3050,9 @@ export interface SendGameOptions extends FormQueryOptions {
|
|
|
2749
3050
|
protect_content?: boolean;
|
|
2750
3051
|
allow_paid_broadcast?: boolean;
|
|
2751
3052
|
message_effect_id?: string;
|
|
3053
|
+
direct_messages_topic_id?: number;
|
|
3054
|
+
suggested_post_parameters?: SuggestedPostParameters;
|
|
3055
|
+
ephemeral_message_parameters?: EphemeralMessageParameters;
|
|
2752
3056
|
reply_parameters?: ReplyParameters;
|
|
2753
3057
|
reply_markup?: InlineKeyboardMarkup;
|
|
2754
3058
|
}
|
|
@@ -2774,6 +3078,9 @@ export interface SendInvoiceOptions extends FormQueryOptions {
|
|
|
2774
3078
|
protect_content?: boolean;
|
|
2775
3079
|
allow_paid_broadcast?: boolean;
|
|
2776
3080
|
message_effect_id?: string;
|
|
3081
|
+
direct_messages_topic_id?: number;
|
|
3082
|
+
suggested_post_parameters?: SuggestedPostParameters;
|
|
3083
|
+
ephemeral_message_parameters?: EphemeralMessageParameters;
|
|
2777
3084
|
reply_parameters?: ReplyParameters;
|
|
2778
3085
|
reply_markup?: InlineKeyboardMarkup;
|
|
2779
3086
|
message_thread_id?: Integer;
|
|
@@ -2791,6 +3098,8 @@ export interface SendPaidMediaOptions extends FormQueryOptions {
|
|
|
2791
3098
|
disable_notification?: boolean;
|
|
2792
3099
|
protect_content?: boolean;
|
|
2793
3100
|
allow_paid_broadcast?: boolean;
|
|
3101
|
+
direct_messages_topic_id?: number;
|
|
3102
|
+
suggested_post_parameters?: SuggestedPostParameters;
|
|
2794
3103
|
reply_parameters?: ReplyParameters;
|
|
2795
3104
|
reply_markup?: ReplyMarkup;
|
|
2796
3105
|
}
|
|
@@ -2810,6 +3119,9 @@ export interface ReplyParameters {
|
|
|
2810
3119
|
quote_entities?: MessageEntity[];
|
|
2811
3120
|
quote_position?: Integer;
|
|
2812
3121
|
is_quote?: boolean;
|
|
3122
|
+
ephemeral_message_id?: string;
|
|
3123
|
+
poll_option_id?: string;
|
|
3124
|
+
checklist_task_id?: string;
|
|
2813
3125
|
}
|
|
2814
3126
|
|
|
2815
3127
|
/** Parameters for setMessageReaction. */
|
|
@@ -3081,6 +3393,8 @@ export default class TelegramBot extends EventEmitter {
|
|
|
3081
3393
|
disable_notification?: boolean;
|
|
3082
3394
|
protect_content?: boolean;
|
|
3083
3395
|
message_effect_id?: string;
|
|
3396
|
+
video_start_timestamp?: number;
|
|
3397
|
+
direct_messages_topic_id?: number;
|
|
3084
3398
|
},
|
|
3085
3399
|
): Promise<Message>;
|
|
3086
3400
|
|
|
@@ -3095,6 +3409,7 @@ export default class TelegramBot extends EventEmitter {
|
|
|
3095
3409
|
form?: {
|
|
3096
3410
|
disable_notification?: boolean;
|
|
3097
3411
|
protect_content?: boolean;
|
|
3412
|
+
direct_messages_topic_id?: number;
|
|
3098
3413
|
},
|
|
3099
3414
|
): Promise<MessageId[]>;
|
|
3100
3415
|
|
|
@@ -3115,6 +3430,9 @@ export default class TelegramBot extends EventEmitter {
|
|
|
3115
3430
|
disable_notification?: boolean;
|
|
3116
3431
|
protect_content?: boolean;
|
|
3117
3432
|
allow_paid_broadcast?: boolean;
|
|
3433
|
+
video_start_timestamp?: number;
|
|
3434
|
+
message_effect_id?: string;
|
|
3435
|
+
direct_messages_topic_id?: number;
|
|
3118
3436
|
reply_parameters?: ReplyParameters;
|
|
3119
3437
|
reply_markup?: ReplyMarkup;
|
|
3120
3438
|
},
|
|
@@ -3133,6 +3451,7 @@ export default class TelegramBot extends EventEmitter {
|
|
|
3133
3451
|
disable_notification?: boolean;
|
|
3134
3452
|
protect_content?: boolean;
|
|
3135
3453
|
remove_caption?: boolean;
|
|
3454
|
+
direct_messages_topic_id?: number;
|
|
3136
3455
|
},
|
|
3137
3456
|
): Promise<{ message_id: Integer }[]>;
|
|
3138
3457
|
|
|
@@ -3220,7 +3539,7 @@ export default class TelegramBot extends EventEmitter {
|
|
|
3220
3539
|
sendMediaGroup(
|
|
3221
3540
|
chatId: number | string,
|
|
3222
3541
|
media: Array<InputMedia & { file_options?: FormQueryOptions }>,
|
|
3223
|
-
options?: FormQueryOptions,
|
|
3542
|
+
options?: FormQueryOptions & { direct_messages_topic_id?: number },
|
|
3224
3543
|
): Promise<Message[]>;
|
|
3225
3544
|
|
|
3226
3545
|
/**
|
|
@@ -3259,6 +3578,7 @@ export default class TelegramBot extends EventEmitter {
|
|
|
3259
3578
|
horizontal_accuracy?: Float;
|
|
3260
3579
|
heading?: Integer;
|
|
3261
3580
|
proximity_alert_radius?: Integer;
|
|
3581
|
+
business_connection_id?: string;
|
|
3262
3582
|
reply_markup?: InlineKeyboardMarkup;
|
|
3263
3583
|
},
|
|
3264
3584
|
): Promise<Message | boolean>;
|
|
@@ -3271,6 +3591,7 @@ export default class TelegramBot extends EventEmitter {
|
|
|
3271
3591
|
chat_id?: number | string;
|
|
3272
3592
|
message_id?: number;
|
|
3273
3593
|
inline_message_id?: string;
|
|
3594
|
+
business_connection_id?: string;
|
|
3274
3595
|
reply_markup?: InlineKeyboardMarkup;
|
|
3275
3596
|
}): Promise<Message | boolean>;
|
|
3276
3597
|
|
|
@@ -3416,6 +3737,8 @@ export default class TelegramBot extends EventEmitter {
|
|
|
3416
3737
|
can_edit_stories?: boolean;
|
|
3417
3738
|
can_delete_stories?: boolean;
|
|
3418
3739
|
can_manage_direct_messages?: boolean;
|
|
3740
|
+
can_manage_tags?: boolean;
|
|
3741
|
+
can_send_welcome_messages?: boolean;
|
|
3419
3742
|
},
|
|
3420
3743
|
): Promise<boolean>;
|
|
3421
3744
|
|
|
@@ -3583,7 +3906,7 @@ export default class TelegramBot extends EventEmitter {
|
|
|
3583
3906
|
* Get a list of administrators in a chat.
|
|
3584
3907
|
* @see https://core.telegram.org/bots/api#getchatadministrators
|
|
3585
3908
|
*/
|
|
3586
|
-
getChatAdministrators(chatId: number | string, form?:
|
|
3909
|
+
getChatAdministrators(chatId: number | string, form?: { return_bots?: boolean }): Promise<ChatMember[]>;
|
|
3587
3910
|
|
|
3588
3911
|
/**
|
|
3589
3912
|
* Get the number of members in a chat.
|
|
@@ -3832,6 +4155,8 @@ export default class TelegramBot extends EventEmitter {
|
|
|
3832
4155
|
parse_mode?: string;
|
|
3833
4156
|
entities?: MessageEntity[];
|
|
3834
4157
|
link_preview_options?: LinkPreviewOptions;
|
|
4158
|
+
rich_message?: InputRichMessage;
|
|
4159
|
+
business_connection_id?: string;
|
|
3835
4160
|
reply_markup?: InlineKeyboardMarkup;
|
|
3836
4161
|
},
|
|
3837
4162
|
): Promise<Message | boolean>;
|
|
@@ -3849,6 +4174,7 @@ export default class TelegramBot extends EventEmitter {
|
|
|
3849
4174
|
parse_mode?: string;
|
|
3850
4175
|
caption_entities?: MessageEntity[];
|
|
3851
4176
|
show_caption_above_media?: boolean;
|
|
4177
|
+
business_connection_id?: string;
|
|
3852
4178
|
reply_markup?: InlineKeyboardMarkup;
|
|
3853
4179
|
},
|
|
3854
4180
|
): Promise<Message | boolean>;
|
|
@@ -3863,6 +4189,7 @@ export default class TelegramBot extends EventEmitter {
|
|
|
3863
4189
|
chat_id?: number | string;
|
|
3864
4190
|
message_id?: number;
|
|
3865
4191
|
inline_message_id?: string;
|
|
4192
|
+
business_connection_id?: string;
|
|
3866
4193
|
reply_markup?: InlineKeyboardMarkup;
|
|
3867
4194
|
},
|
|
3868
4195
|
): Promise<Message | boolean>;
|
|
@@ -3877,6 +4204,7 @@ export default class TelegramBot extends EventEmitter {
|
|
|
3877
4204
|
chat_id?: number | string;
|
|
3878
4205
|
message_id?: number;
|
|
3879
4206
|
inline_message_id?: string;
|
|
4207
|
+
business_connection_id?: string;
|
|
3880
4208
|
},
|
|
3881
4209
|
): Promise<Message | boolean>;
|
|
3882
4210
|
|
|
@@ -3889,6 +4217,7 @@ export default class TelegramBot extends EventEmitter {
|
|
|
3889
4217
|
pollId: number,
|
|
3890
4218
|
form?: {
|
|
3891
4219
|
message_thread_id?: Integer;
|
|
4220
|
+
business_connection_id?: string;
|
|
3892
4221
|
reply_markup?: InlineKeyboardMarkup;
|
|
3893
4222
|
},
|
|
3894
4223
|
): Promise<Poll>;
|
|
@@ -4247,7 +4576,7 @@ export default class TelegramBot extends EventEmitter {
|
|
|
4247
4576
|
sendGift(
|
|
4248
4577
|
userId: number,
|
|
4249
4578
|
giftId: string,
|
|
4250
|
-
form?: { text?: string; text_parse_mode?: string; text_entities?: MessageEntity[]; pay_for_upgrade?: boolean },
|
|
4579
|
+
form?: { text?: string; text_parse_mode?: string; text_entities?: MessageEntity[]; pay_for_upgrade?: boolean; chat_id?: number | string },
|
|
4251
4580
|
): Promise<boolean>;
|
|
4252
4581
|
|
|
4253
4582
|
/**
|
|
@@ -4550,6 +4879,8 @@ export default class TelegramBot extends EventEmitter {
|
|
|
4550
4879
|
parse_mode?: string;
|
|
4551
4880
|
entities?: MessageEntity[];
|
|
4552
4881
|
link_preview_options?: LinkPreviewOptions;
|
|
4882
|
+
can_stop?: boolean;
|
|
4883
|
+
keep_on_stop?: boolean;
|
|
4553
4884
|
},
|
|
4554
4885
|
): Promise<Message>;
|
|
4555
4886
|
|
|
@@ -4762,6 +5093,8 @@ export default class TelegramBot extends EventEmitter {
|
|
|
4762
5093
|
form?: {
|
|
4763
5094
|
business_connection_id?: string;
|
|
4764
5095
|
message_thread_id?: Integer;
|
|
5096
|
+
can_stop?: boolean;
|
|
5097
|
+
keep_on_stop?: boolean;
|
|
4765
5098
|
},
|
|
4766
5099
|
): Promise<Message>;
|
|
4767
5100
|
|