@grammyjs/types 3.6.2 → 3.7.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/inline.d.ts +2 -2
- package/manage.d.ts +400 -102
- package/markup.d.ts +11 -11
- package/message.d.ts +129 -21
- package/methods.d.ts +32 -25
- package/package.json +1 -1
- package/update.d.ts +1 -1
package/inline.d.ts
CHANGED
|
@@ -285,7 +285,7 @@ export interface InlineQueryResultLocation {
|
|
|
285
285
|
title: string;
|
|
286
286
|
/** The radius of uncertainty for the location, measured in meters; 0-1500 */
|
|
287
287
|
horizontal_accuracy?: number;
|
|
288
|
-
/** Period in seconds
|
|
288
|
+
/** Period in seconds during which the location can be updated, should be between 60 and 86400, or 0x7FFFFFFF for live locations that can be edited indefinitely. */
|
|
289
289
|
live_period?: number;
|
|
290
290
|
/** For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified. */
|
|
291
291
|
heading?: number;
|
|
@@ -562,7 +562,7 @@ export interface InputLocationMessageContent {
|
|
|
562
562
|
longitude: number;
|
|
563
563
|
/** The radius of uncertainty for the location, measured in meters; 0-1500 */
|
|
564
564
|
horizontal_accuracy?: number;
|
|
565
|
-
/** Period in seconds
|
|
565
|
+
/** Period in seconds during which the location can be updated, should be between 60 and 86400, or 0x7FFFFFFF for live locations that can be edited indefinitely. */
|
|
566
566
|
live_period?: number;
|
|
567
567
|
/** For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified. */
|
|
568
568
|
heading?: number;
|
package/manage.d.ts
CHANGED
|
@@ -54,148 +54,439 @@ export interface UserFromGetMe extends User {
|
|
|
54
54
|
can_connect_to_business?: boolean;
|
|
55
55
|
}
|
|
56
56
|
export declare namespace Chat {
|
|
57
|
-
/** Internal type
|
|
58
|
-
interface
|
|
57
|
+
/** Internal type for private chats */
|
|
58
|
+
interface PrivateChat {
|
|
59
59
|
/** Unique identifier for this chat. */
|
|
60
60
|
id: number;
|
|
61
|
-
/** Type of chat, can be either “private”, “group”, “supergroup” or “channel” */
|
|
62
|
-
type:
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
interface UserNameChat {
|
|
61
|
+
/** Type of the chat, can be either “private”, “group”, “supergroup” or “channel” */
|
|
62
|
+
type: "private";
|
|
63
|
+
/** Title, for supergroups, channels and group chats */
|
|
64
|
+
title?: undefined;
|
|
66
65
|
/** Username, for private chats, supergroups and channels if available */
|
|
67
66
|
username?: string;
|
|
68
|
-
}
|
|
69
|
-
/** Internal type holding properties that those chats with titles share. */
|
|
70
|
-
interface TitleChat {
|
|
71
|
-
/** Title, for supergroups, channels and group chats */
|
|
72
|
-
title: string;
|
|
73
|
-
}
|
|
74
|
-
/** Internal type representing private chats. */
|
|
75
|
-
interface PrivateChat extends AbstractChat, UserNameChat {
|
|
76
|
-
type: "private";
|
|
77
67
|
/** First name of the other party in a private chat */
|
|
78
68
|
first_name: string;
|
|
79
69
|
/** Last name of the other party in a private chat */
|
|
80
70
|
last_name?: string;
|
|
71
|
+
/** True, if the supergroup chat is a forum (has topics enabled) */
|
|
72
|
+
is_forum?: undefined;
|
|
81
73
|
}
|
|
82
|
-
/** Internal type
|
|
83
|
-
interface GroupChat
|
|
74
|
+
/** Internal type for group chats */
|
|
75
|
+
interface GroupChat {
|
|
76
|
+
/** Unique identifier for this chat. */
|
|
77
|
+
id: number;
|
|
78
|
+
/** Type of the chat, can be either “private”, “group”, “supergroup” or “channel” */
|
|
84
79
|
type: "group";
|
|
80
|
+
/** Title, for supergroups, channels and group chats */
|
|
81
|
+
title: string;
|
|
82
|
+
/** Username, for private chats, supergroups and channels if available */
|
|
83
|
+
username?: undefined;
|
|
84
|
+
/** First name of the other party in a private chat */
|
|
85
|
+
first_name?: undefined;
|
|
86
|
+
/** Last name of the other party in a private chat */
|
|
87
|
+
last_name?: undefined;
|
|
88
|
+
/** True, if the supergroup chat is a forum (has topics enabled) */
|
|
89
|
+
is_forum?: undefined;
|
|
85
90
|
}
|
|
86
|
-
/** Internal type
|
|
87
|
-
interface SupergroupChat
|
|
91
|
+
/** Internal type for supergroup chats */
|
|
92
|
+
interface SupergroupChat {
|
|
93
|
+
/** Unique identifier for this chat. */
|
|
94
|
+
id: number;
|
|
95
|
+
/** Type of the chat, can be either “private”, “group”, “supergroup” or “channel” */
|
|
88
96
|
type: "supergroup";
|
|
97
|
+
/** Title, for supergroups, channels and group chats */
|
|
98
|
+
title: string;
|
|
99
|
+
/** Username, for private chats, supergroups and channels if available */
|
|
100
|
+
username?: string;
|
|
101
|
+
/** First name of the other party in a private chat */
|
|
102
|
+
first_name?: undefined;
|
|
103
|
+
/** Last name of the other party in a private chat */
|
|
104
|
+
last_name?: undefined;
|
|
89
105
|
/** True, if the supergroup chat is a forum (has topics enabled) */
|
|
90
106
|
is_forum?: true;
|
|
91
107
|
}
|
|
92
|
-
/** Internal type
|
|
93
|
-
interface ChannelChat
|
|
108
|
+
/** Internal type for channel chats */
|
|
109
|
+
interface ChannelChat {
|
|
110
|
+
/** Unique identifier for this chat. */
|
|
111
|
+
id: number;
|
|
112
|
+
/** Type of the chat, can be either “private”, “group”, “supergroup” or “channel” */
|
|
94
113
|
type: "channel";
|
|
114
|
+
/** Title, for supergroups, channels and group chats */
|
|
115
|
+
title: string;
|
|
116
|
+
/** Username, for private chats, supergroups and channels if available */
|
|
117
|
+
username?: string;
|
|
118
|
+
/** First name of the other party in a private chat */
|
|
119
|
+
first_name?: undefined;
|
|
120
|
+
/** Last name of the other party in a private chat */
|
|
121
|
+
last_name?: undefined;
|
|
122
|
+
/** True, if the supergroup chat is a forum (has topics enabled) */
|
|
123
|
+
is_forum?: undefined;
|
|
95
124
|
}
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
125
|
+
}
|
|
126
|
+
/** This object represents a chat. */
|
|
127
|
+
export type Chat = Chat.PrivateChat | Chat.GroupChat | Chat.SupergroupChat | Chat.ChannelChat;
|
|
128
|
+
export declare namespace ChatFullInfo {
|
|
129
|
+
/** Internal type for private chats */
|
|
130
|
+
interface PrivateChat {
|
|
131
|
+
/** Unique identifier for this chat. */
|
|
132
|
+
id: number;
|
|
133
|
+
/** Type of the chat, can be either “private”, “group”, “supergroup” or “channel” */
|
|
134
|
+
type: "private";
|
|
135
|
+
/** Title, for supergroups, channels and group chats */
|
|
136
|
+
title?: undefined;
|
|
137
|
+
/** Username, for private chats, supergroups and channels if available */
|
|
138
|
+
username?: string;
|
|
139
|
+
/** First name of the other party in a private chat */
|
|
140
|
+
first_name: string;
|
|
141
|
+
/** Last name of the other party in a private chat */
|
|
142
|
+
last_name?: string;
|
|
143
|
+
/** True, if the supergroup chat is a forum (has topics enabled) */
|
|
144
|
+
is_forum?: undefined;
|
|
145
|
+
/** Identifier of the accent color for the chat name and backgrounds of the chat photo, reply header, and link preview. See accent colors for more details. */
|
|
146
|
+
accent_color_id: number;
|
|
147
|
+
/** The maximum number of reactions that can be set on a message in the chat */
|
|
148
|
+
max_reaction_count: number;
|
|
149
|
+
/** Chat photo */
|
|
99
150
|
photo?: ChatPhoto;
|
|
100
|
-
/**
|
|
151
|
+
/** If non-empty, the list of all active chat usernames; for private chats, supergroups and channels */
|
|
152
|
+
active_usernames?: string[];
|
|
153
|
+
/** For private chats, the date of birth of the user */
|
|
154
|
+
birthdate?: Birthdate;
|
|
155
|
+
/** For private chats with business accounts, the intro of the business */
|
|
156
|
+
business_intro?: BusinessIntro;
|
|
157
|
+
/** For private chats with business accounts, the location of the business */
|
|
158
|
+
business_location?: BusinessLocation;
|
|
159
|
+
/** For private chats with business accounts, the opening hours of the business */
|
|
160
|
+
business_opening_hours?: BusinessOpeningHours;
|
|
161
|
+
/** For private chats, the personal channel of the user */
|
|
162
|
+
personal_chat?: Chat;
|
|
163
|
+
/** List of available reactions allowed in the chat. If omitted, then all emoji reactions are allowed. */
|
|
164
|
+
available_reactions?: ReactionType[];
|
|
165
|
+
/** Custom emoji identifier of the emoji chosen by the chat for the reply header and link preview background */
|
|
166
|
+
background_custom_emoji_id?: string;
|
|
167
|
+
/** Identifier of the accent color for the chat's profile background. See profile accent colors for more details. */
|
|
168
|
+
profile_accent_color_id?: number;
|
|
169
|
+
/** Custom emoji identifier of the emoji chosen by the chat for its profile background */
|
|
170
|
+
profile_background_custom_emoji_id?: string;
|
|
171
|
+
/** Custom emoji identifier of the emoji status of the chat or the other party in a private chat */
|
|
172
|
+
emoji_status_custom_emoji_id?: string;
|
|
173
|
+
/** Expiration date of the emoji status of the chat or the other party in a private chat, in Unix time, if any */
|
|
174
|
+
emoji_status_expiration_date?: number;
|
|
175
|
+
/** Bio of the other party in a private chat */
|
|
176
|
+
bio?: string;
|
|
177
|
+
/** True, if privacy settings of the other party in the private chat allows to use tg://user?id=<user_id> links only in chats with the user */
|
|
178
|
+
has_private_forwards?: true;
|
|
179
|
+
/** True, if the privacy settings of the other party restrict sending voice and video note messages in the private chat */
|
|
180
|
+
has_restricted_voice_and_video_messages?: true;
|
|
181
|
+
/** True, if users need to join the supergroup before they can send messages */
|
|
182
|
+
join_to_send_messages?: undefined;
|
|
183
|
+
/** True, if all users directly joining the supergroup without using an invite link need to be approved by supergroup administrators */
|
|
184
|
+
join_by_request?: undefined;
|
|
185
|
+
/** Description, for groups, supergroups and channel chats */
|
|
186
|
+
description?: undefined;
|
|
187
|
+
/** Primary invite link, for groups, supergroups and channel chats */
|
|
188
|
+
invite_link?: undefined;
|
|
189
|
+
/** The most recent pinned message (by sending date) */
|
|
101
190
|
pinned_message?: Message;
|
|
102
|
-
/**
|
|
191
|
+
/** Default chat member permissions, for groups and supergroups */
|
|
192
|
+
permissions?: undefined;
|
|
193
|
+
/** For supergroups, the minimum allowed delay between consecutive messages sent by each unprivileged user; in seconds */
|
|
194
|
+
slow_mode_delay?: undefined;
|
|
195
|
+
/** For supergroups, the minimum number of boosts that a non-administrator user needs to add in order to ignore slow mode and chat permissions */
|
|
196
|
+
unrestrict_boost_count?: undefined;
|
|
197
|
+
/** The time after which all messages sent to the chat will be automatically deleted; in seconds */
|
|
103
198
|
message_auto_delete_time?: number;
|
|
104
|
-
/** True, if
|
|
199
|
+
/** True, if aggressive anti-spam checks are enabled in the supergroup. The field is only available to chat administrators. */
|
|
200
|
+
has_aggressive_anti_spam_enabled?: undefined;
|
|
201
|
+
/** True, if non-administrators can only get the list of bots and administrators in the chat */
|
|
202
|
+
has_hidden_members?: undefined;
|
|
203
|
+
/** True, if messages from the chat can't be forwarded to other chats */
|
|
105
204
|
has_protected_content?: true;
|
|
205
|
+
/** True, if new chat members will have access to old messages; available only to chat administrators */
|
|
206
|
+
has_visible_history?: undefined;
|
|
207
|
+
/** For supergroups, name of the group sticker set */
|
|
208
|
+
sticker_set_name?: undefined;
|
|
209
|
+
/** True, if the bot can change the group sticker set */
|
|
210
|
+
can_set_sticker_set?: undefined;
|
|
211
|
+
/** For supergroups, the name of the group's custom emoji sticker set. Custom emoji from this set can be used by all users and bots in the group. */
|
|
212
|
+
custom_emoji_sticker_set_name?: undefined;
|
|
213
|
+
/** Unique identifier for the linked chat, i.e. the discussion group identifier for a channel and vice versa; for supergroups and channel chats. */
|
|
214
|
+
linked_chat_id?: undefined;
|
|
215
|
+
/** For supergroups, the location to which the supergroup is connected */
|
|
216
|
+
location?: undefined;
|
|
106
217
|
}
|
|
107
|
-
/** Internal type
|
|
108
|
-
interface
|
|
109
|
-
/**
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
218
|
+
/** Internal type for group chats */
|
|
219
|
+
interface GroupChat {
|
|
220
|
+
/** Unique identifier for this chat. */
|
|
221
|
+
id: number;
|
|
222
|
+
/** Type of the chat, can be either “private”, “group”, “supergroup” or “channel” */
|
|
223
|
+
type: "group";
|
|
224
|
+
/** Title, for supergroups, channels and group chats */
|
|
225
|
+
title?: string;
|
|
226
|
+
/** Username, for private chats, supergroups and channels if available */
|
|
227
|
+
username?: undefined;
|
|
228
|
+
/** First name of the other party in a private chat */
|
|
229
|
+
first_name?: undefined;
|
|
230
|
+
/** Last name of the other party in a private chat */
|
|
231
|
+
last_name?: undefined;
|
|
232
|
+
/** True, if the supergroup chat is a forum (has topics enabled) */
|
|
233
|
+
is_forum?: undefined;
|
|
234
|
+
/** Identifier of the accent color for the chat name and backgrounds of the chat photo, reply header, and link preview. See accent colors for more details. */
|
|
235
|
+
accent_color_id: number;
|
|
236
|
+
/** The maximum number of reactions that can be set on a message in the chat */
|
|
237
|
+
max_reaction_count: number;
|
|
238
|
+
/** Chat photo */
|
|
239
|
+
photo?: ChatPhoto;
|
|
240
|
+
/** If non-empty, the list of all active chat usernames; for private chats, supergroups and channels */
|
|
241
|
+
active_usernames?: undefined;
|
|
242
|
+
/** For private chats, the date of birth of the user */
|
|
243
|
+
birthdate?: undefined;
|
|
244
|
+
/** For private chats with business accounts, the intro of the business */
|
|
245
|
+
business_intro?: undefined;
|
|
246
|
+
/** For private chats with business accounts, the location of the business */
|
|
247
|
+
business_location?: undefined;
|
|
248
|
+
/** For private chats with business accounts, the opening hours of the business */
|
|
249
|
+
business_opening_hours?: undefined;
|
|
250
|
+
/** For private chats, the personal channel of the user */
|
|
251
|
+
personal_chat?: undefined;
|
|
252
|
+
/** List of available reactions allowed in the chat. If omitted, then all emoji reactions are allowed. */
|
|
253
|
+
available_reactions?: ReactionType[];
|
|
254
|
+
/** Custom emoji identifier of the emoji chosen by the chat for the reply header and link preview background */
|
|
255
|
+
background_custom_emoji_id?: string;
|
|
256
|
+
/** Identifier of the accent color for the chat's profile background. See profile accent colors for more details. */
|
|
257
|
+
profile_accent_color_id?: number;
|
|
258
|
+
/** Custom emoji identifier of the emoji chosen by the chat for its profile background */
|
|
259
|
+
profile_background_custom_emoji_id?: string;
|
|
260
|
+
/** Custom emoji identifier of the emoji status of the chat or the other party in a private chat */
|
|
261
|
+
emoji_status_custom_emoji_id?: string;
|
|
262
|
+
/** Expiration date of the emoji status of the chat or the other party in a private chat, in Unix time, if any */
|
|
263
|
+
emoji_status_expiration_date?: number;
|
|
264
|
+
/** Bio of the other party in a private chat */
|
|
265
|
+
bio?: undefined;
|
|
266
|
+
/** True, if privacy settings of the other party in the private chat allows to use tg://user?id=<user_id> links only in chats with the user */
|
|
267
|
+
has_private_forwards?: undefined;
|
|
268
|
+
/** True, if the privacy settings of the other party restrict sending voice and video note messages in the private chat */
|
|
269
|
+
has_restricted_voice_and_video_messages?: undefined;
|
|
270
|
+
/** True, if users need to join the supergroup before they can send messages */
|
|
271
|
+
join_to_send_messages?: undefined;
|
|
272
|
+
/** True, if all users directly joining the supergroup without using an invite link need to be approved by supergroup administrators */
|
|
273
|
+
join_by_request?: undefined;
|
|
274
|
+
/** Description, for groups, supergroups and channel chats */
|
|
115
275
|
description?: string;
|
|
116
|
-
/**
|
|
276
|
+
/** Primary invite link, for groups, supergroups and channel chats */
|
|
117
277
|
invite_link?: string;
|
|
118
|
-
/**
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
/** Internal type holding properties that those group and supergroup chats returned from `getChat` share. */
|
|
122
|
-
interface MultiUserGetChat {
|
|
123
|
-
/** Default chat member permissions, for groups and supergroups. Returned only in getChat. */
|
|
278
|
+
/** The most recent pinned message (by sending date) */
|
|
279
|
+
pinned_message?: Message;
|
|
280
|
+
/** Default chat member permissions, for groups and supergroups */
|
|
124
281
|
permissions?: ChatPermissions;
|
|
282
|
+
/** For supergroups, the minimum allowed delay between consecutive messages sent by each unprivileged user; in seconds */
|
|
283
|
+
slow_mode_delay?: undefined;
|
|
284
|
+
/** For supergroups, the minimum number of boosts that a non-administrator user needs to add in order to ignore slow mode and chat permissions */
|
|
285
|
+
unrestrict_boost_count?: undefined;
|
|
286
|
+
/** The time after which all messages sent to the chat will be automatically deleted; in seconds */
|
|
287
|
+
message_auto_delete_time?: number;
|
|
288
|
+
/** True, if aggressive anti-spam checks are enabled in the supergroup. The field is only available to chat administrators. */
|
|
289
|
+
has_aggressive_anti_spam_enabled?: undefined;
|
|
290
|
+
/** True, if non-administrators can only get the list of bots and administrators in the chat */
|
|
291
|
+
has_hidden_members?: true;
|
|
292
|
+
/** True, if messages from the chat can't be forwarded to other chats */
|
|
293
|
+
has_protected_content?: true;
|
|
294
|
+
/** True, if new chat members will have access to old messages; available only to chat administrators */
|
|
295
|
+
has_visible_history?: true;
|
|
296
|
+
/** For supergroups, name of the group sticker set */
|
|
297
|
+
sticker_set_name?: undefined;
|
|
298
|
+
/** True, if the bot can change the group sticker set */
|
|
299
|
+
can_set_sticker_set?: true;
|
|
300
|
+
/** For supergroups, the name of the group's custom emoji sticker set. Custom emoji from this set can be used by all users and bots in the group. */
|
|
301
|
+
custom_emoji_sticker_set_name?: undefined;
|
|
302
|
+
/** Unique identifier for the linked chat, i.e. the discussion group identifier for a channel and vice versa; for supergroups and channel chats. */
|
|
303
|
+
linked_chat_id?: undefined;
|
|
304
|
+
/** For supergroups, the location to which the supergroup is connected */
|
|
305
|
+
location?: undefined;
|
|
125
306
|
}
|
|
126
|
-
/** Internal type
|
|
127
|
-
interface
|
|
128
|
-
/**
|
|
307
|
+
/** Internal type for supergroup chats */
|
|
308
|
+
interface SupergroupChat {
|
|
309
|
+
/** Unique identifier for this chat. */
|
|
310
|
+
id: number;
|
|
311
|
+
/** Type of the chat, can be either “private”, “group”, “supergroup” or “channel” */
|
|
312
|
+
type: "supergroup";
|
|
313
|
+
/** Title, for supergroups, channels and group chats */
|
|
314
|
+
title?: string;
|
|
315
|
+
/** Username, for private chats, supergroups and channels if available */
|
|
316
|
+
username?: string;
|
|
317
|
+
/** First name of the other party in a private chat */
|
|
318
|
+
first_name?: undefined;
|
|
319
|
+
/** Last name of the other party in a private chat */
|
|
320
|
+
last_name?: undefined;
|
|
321
|
+
/** True, if the supergroup chat is a forum (has topics enabled) */
|
|
322
|
+
is_forum?: true;
|
|
323
|
+
/** Identifier of the accent color for the chat name and backgrounds of the chat photo, reply header, and link preview. See accent colors for more details. */
|
|
129
324
|
accent_color_id: number;
|
|
130
|
-
/**
|
|
325
|
+
/** The maximum number of reactions that can be set on a message in the chat */
|
|
326
|
+
max_reaction_count: number;
|
|
327
|
+
/** Chat photo */
|
|
328
|
+
photo?: ChatPhoto;
|
|
329
|
+
/** If non-empty, the list of all active chat usernames; for private chats, supergroups and channels */
|
|
330
|
+
active_usernames?: string[];
|
|
331
|
+
/** For private chats, the date of birth of the user */
|
|
332
|
+
birthdate?: undefined;
|
|
333
|
+
/** For private chats with business accounts, the intro of the business */
|
|
334
|
+
business_intro?: undefined;
|
|
335
|
+
/** For private chats with business accounts, the location of the business */
|
|
336
|
+
business_location?: undefined;
|
|
337
|
+
/** For private chats with business accounts, the opening hours of the business */
|
|
338
|
+
business_opening_hours?: undefined;
|
|
339
|
+
/** For private chats, the personal channel of the user */
|
|
340
|
+
personal_chat?: undefined;
|
|
341
|
+
/** List of available reactions allowed in the chat. If omitted, then all emoji reactions are allowed. */
|
|
342
|
+
available_reactions?: ReactionType[];
|
|
343
|
+
/** Custom emoji identifier of the emoji chosen by the chat for the reply header and link preview background */
|
|
131
344
|
background_custom_emoji_id?: string;
|
|
132
|
-
/**
|
|
345
|
+
/** Identifier of the accent color for the chat's profile background. See profile accent colors for more details. */
|
|
346
|
+
profile_accent_color_id?: number;
|
|
347
|
+
/** Custom emoji identifier of the emoji chosen by the chat for its profile background */
|
|
348
|
+
profile_background_custom_emoji_id?: string;
|
|
349
|
+
/** Custom emoji identifier of the emoji status of the chat or the other party in a private chat */
|
|
133
350
|
emoji_status_custom_emoji_id?: string;
|
|
134
|
-
/** Expiration date of the emoji status of the chat or the other party in a private chat, in Unix time, if any
|
|
351
|
+
/** Expiration date of the emoji status of the chat or the other party in a private chat, in Unix time, if any */
|
|
135
352
|
emoji_status_expiration_date?: number;
|
|
136
|
-
|
|
137
|
-
/** Internal type holding properties that those supergroup and channel chats returned from `getChat` share. */
|
|
138
|
-
interface LargeGetChat {
|
|
139
|
-
/** Unique identifier for the linked chat, i.e. the discussion group identifier for a channel and vice versa; for supergroups and channel chats. Returned only in getChat. */
|
|
140
|
-
linked_chat_id?: number;
|
|
141
|
-
}
|
|
142
|
-
/** Internal type representing private chats returned from `getChat`. */
|
|
143
|
-
interface PrivateGetChat extends PrivateChat, GetChat, NonGroupGetChat, NonMultiUserGetChat {
|
|
144
|
-
/** For private chats, the date of birth of the user. Returned only in getChat. */
|
|
145
|
-
birthdate?: Birthdate;
|
|
146
|
-
/** For private chats with business accounts, the intro of the business. Returned only in getChat. */
|
|
147
|
-
business_intro?: BusinessIntro;
|
|
148
|
-
/** For private chats with business accounts, the location of the business. Returned only in getChat. */
|
|
149
|
-
business_location?: BusinessLocation;
|
|
150
|
-
/** For private chats with business accounts, the opening hours of the business. Returned only in getChat. */
|
|
151
|
-
business_opening_hours?: BusinessOpeningHours;
|
|
152
|
-
/** For private chats, the personal channel of the user. Returned only in getChat. */
|
|
153
|
-
personal_chat?: Chat.ChannelChat;
|
|
154
|
-
/** Bio of the other party in a private chat. Returned only in getChat. */
|
|
353
|
+
/** Bio of the other party in a private chat */
|
|
155
354
|
bio?: string;
|
|
156
|
-
/** True, if privacy settings of the other party in the private chat allows to use tg://user?id=<user_id> links only in chats with the user
|
|
157
|
-
has_private_forwards?:
|
|
158
|
-
/** True, if the privacy settings of the other party restrict sending voice and video note messages in the private chat
|
|
159
|
-
has_restricted_voice_and_video_messages?:
|
|
160
|
-
|
|
161
|
-
/** Internal type representing group chats returned from `getChat`. */
|
|
162
|
-
interface GroupGetChat extends GroupChat, GetChat, NonPrivateGetChat, MultiUserGetChat {
|
|
163
|
-
}
|
|
164
|
-
/** Internal type representing supergroup chats returned from `getChat`. */
|
|
165
|
-
interface SupergroupGetChat extends SupergroupChat, GetChat, NonGroupGetChat, NonPrivateGetChat, MultiUserGetChat, LargeGetChat {
|
|
166
|
-
/** True, if users need to join the supergroup before they can send messages. Returned only in getChat. */
|
|
355
|
+
/** True, if privacy settings of the other party in the private chat allows to use tg://user?id=<user_id> links only in chats with the user */
|
|
356
|
+
has_private_forwards?: undefined;
|
|
357
|
+
/** True, if the privacy settings of the other party restrict sending voice and video note messages in the private chat */
|
|
358
|
+
has_restricted_voice_and_video_messages?: undefined;
|
|
359
|
+
/** True, if users need to join the supergroup before they can send messages */
|
|
167
360
|
join_to_send_messages?: true;
|
|
168
|
-
/** True, if all users directly joining the supergroup need to be approved by supergroup administrators
|
|
361
|
+
/** True, if all users directly joining the supergroup without using an invite link need to be approved by supergroup administrators */
|
|
169
362
|
join_by_request?: true;
|
|
170
|
-
/**
|
|
363
|
+
/** Description, for groups, supergroups and channel chats */
|
|
364
|
+
description?: string;
|
|
365
|
+
/** Primary invite link, for groups, supergroups and channel chats */
|
|
366
|
+
invite_link?: string;
|
|
367
|
+
/** The most recent pinned message (by sending date) */
|
|
368
|
+
pinned_message?: Message;
|
|
369
|
+
/** Default chat member permissions, for groups and supergroups */
|
|
370
|
+
permissions?: ChatPermissions;
|
|
371
|
+
/** For supergroups, the minimum allowed delay between consecutive messages sent by each unprivileged user; in seconds */
|
|
171
372
|
slow_mode_delay?: number;
|
|
172
|
-
/**
|
|
373
|
+
/** For supergroups, the minimum number of boosts that a non-administrator user needs to add in order to ignore slow mode and chat permissions */
|
|
173
374
|
unrestrict_boost_count?: number;
|
|
174
|
-
/**
|
|
175
|
-
|
|
176
|
-
/** True, if aggressive anti-spam checks are enabled in the supergroup. The field is only available to chat administrators.
|
|
375
|
+
/** The time after which all messages sent to the chat will be automatically deleted; in seconds */
|
|
376
|
+
message_auto_delete_time?: number;
|
|
377
|
+
/** True, if aggressive anti-spam checks are enabled in the supergroup. The field is only available to chat administrators. */
|
|
177
378
|
has_aggressive_anti_spam_enabled?: true;
|
|
178
|
-
/**
|
|
379
|
+
/** True, if non-administrators can only get the list of bots and administrators in the chat */
|
|
380
|
+
has_hidden_members?: true;
|
|
381
|
+
/** True, if messages from the chat can't be forwarded to other chats */
|
|
382
|
+
has_protected_content?: true;
|
|
383
|
+
/** True, if new chat members will have access to old messages; available only to chat administrators */
|
|
384
|
+
has_visible_history?: true;
|
|
385
|
+
/** For supergroups, name of the group sticker set */
|
|
179
386
|
sticker_set_name?: string;
|
|
180
|
-
/** True, if the bot can change the group sticker set
|
|
387
|
+
/** True, if the bot can change the group sticker set */
|
|
181
388
|
can_set_sticker_set?: true;
|
|
182
|
-
/** For supergroups, the name of the group's custom emoji sticker set. Custom emoji from this set can be used by all users and bots in the group.
|
|
389
|
+
/** For supergroups, the name of the group's custom emoji sticker set. Custom emoji from this set can be used by all users and bots in the group. */
|
|
183
390
|
custom_emoji_sticker_set_name?: string;
|
|
184
|
-
/**
|
|
391
|
+
/** Unique identifier for the linked chat, i.e. the discussion group identifier for a channel and vice versa; for supergroups and channel chats. */
|
|
392
|
+
linked_chat_id?: number;
|
|
393
|
+
/** For supergroups, the location to which the supergroup is connected */
|
|
185
394
|
location?: ChatLocation;
|
|
186
395
|
}
|
|
187
|
-
/** Internal type
|
|
188
|
-
interface
|
|
189
|
-
/**
|
|
396
|
+
/** Internal type for channel chats */
|
|
397
|
+
interface ChannelChat {
|
|
398
|
+
/** Unique identifier for this chat. */
|
|
399
|
+
id: number;
|
|
400
|
+
/** Type of the chat, can be either “private”, “group”, “supergroup” or “channel” */
|
|
401
|
+
type: "channel";
|
|
402
|
+
/** Title, for supergroups, channels and group chats */
|
|
403
|
+
title?: string;
|
|
404
|
+
/** Username, for private chats, supergroups and channels if available */
|
|
405
|
+
username?: string;
|
|
406
|
+
/** First name of the other party in a private chat */
|
|
407
|
+
first_name?: undefined;
|
|
408
|
+
/** Last name of the other party in a private chat */
|
|
409
|
+
last_name?: undefined;
|
|
410
|
+
/** True, if the supergroup chat is a forum (has topics enabled) */
|
|
411
|
+
is_forum?: undefined;
|
|
412
|
+
/** Identifier of the accent color for the chat name and backgrounds of the chat photo, reply header, and link preview. See accent colors for more details. */
|
|
413
|
+
accent_color_id: number;
|
|
414
|
+
/** The maximum number of reactions that can be set on a message in the chat */
|
|
415
|
+
max_reaction_count: number;
|
|
416
|
+
/** Chat photo */
|
|
417
|
+
photo?: ChatPhoto;
|
|
418
|
+
/** If non-empty, the list of all active chat usernames; for private chats, supergroups and channels */
|
|
419
|
+
active_usernames?: string[];
|
|
420
|
+
/** For private chats, the date of birth of the user */
|
|
421
|
+
birthdate?: undefined;
|
|
422
|
+
/** For private chats with business accounts, the intro of the business */
|
|
423
|
+
business_intro?: undefined;
|
|
424
|
+
/** For private chats with business accounts, the location of the business */
|
|
425
|
+
business_location?: undefined;
|
|
426
|
+
/** For private chats with business accounts, the opening hours of the business */
|
|
427
|
+
business_opening_hours?: undefined;
|
|
428
|
+
/** For private chats, the personal channel of the user */
|
|
429
|
+
personal_chat?: undefined;
|
|
430
|
+
/** List of available reactions allowed in the chat. If omitted, then all emoji reactions are allowed. */
|
|
431
|
+
available_reactions?: ReactionType[];
|
|
432
|
+
/** Custom emoji identifier of the emoji chosen by the chat for the reply header and link preview background */
|
|
433
|
+
background_custom_emoji_id?: string;
|
|
434
|
+
/** Identifier of the accent color for the chat's profile background. See profile accent colors for more details. */
|
|
190
435
|
profile_accent_color_id?: number;
|
|
191
|
-
/** Custom emoji identifier of the emoji chosen by the chat for its profile background
|
|
436
|
+
/** Custom emoji identifier of the emoji chosen by the chat for its profile background */
|
|
192
437
|
profile_background_custom_emoji_id?: string;
|
|
438
|
+
/** Custom emoji identifier of the emoji status of the chat or the other party in a private chat */
|
|
439
|
+
emoji_status_custom_emoji_id?: string;
|
|
440
|
+
/** Expiration date of the emoji status of the chat or the other party in a private chat, in Unix time, if any */
|
|
441
|
+
emoji_status_expiration_date?: number;
|
|
442
|
+
/** Bio of the other party in a private chat */
|
|
443
|
+
bio?: undefined;
|
|
444
|
+
/** True, if privacy settings of the other party in the private chat allows to use tg://user?id=<user_id> links only in chats with the user */
|
|
445
|
+
has_private_forwards?: undefined;
|
|
446
|
+
/** True, if the privacy settings of the other party restrict sending voice and video note messages in the private chat */
|
|
447
|
+
has_restricted_voice_and_video_messages?: undefined;
|
|
448
|
+
/** True, if users need to join the supergroup before they can send messages */
|
|
449
|
+
join_to_send_messages?: true;
|
|
450
|
+
/** True, if all users directly joining the supergroup without using an invite link need to be approved by supergroup administrators */
|
|
451
|
+
join_by_request?: undefined;
|
|
452
|
+
/** Description, for groups, supergroups and channel chats */
|
|
453
|
+
description?: string;
|
|
454
|
+
/** Primary invite link, for groups, supergroups and channel chats */
|
|
455
|
+
invite_link?: string;
|
|
456
|
+
/** The most recent pinned message (by sending date) */
|
|
457
|
+
pinned_message?: Message;
|
|
458
|
+
/** Default chat member permissions, for groups and supergroups */
|
|
459
|
+
permissions?: undefined;
|
|
460
|
+
/** For supergroups, the minimum allowed delay between consecutive messages sent by each unprivileged user; in seconds */
|
|
461
|
+
slow_mode_delay?: undefined;
|
|
462
|
+
/** For supergroups, the minimum number of boosts that a non-administrator user needs to add in order to ignore slow mode and chat permissions */
|
|
463
|
+
unrestrict_boost_count?: undefined;
|
|
464
|
+
/** The time after which all messages sent to the chat will be automatically deleted; in seconds */
|
|
465
|
+
message_auto_delete_time?: number;
|
|
466
|
+
/** True, if aggressive anti-spam checks are enabled in the supergroup. The field is only available to chat administrators. */
|
|
467
|
+
has_aggressive_anti_spam_enabled?: undefined;
|
|
468
|
+
/** True, if non-administrators can only get the list of bots and administrators in the chat */
|
|
469
|
+
has_hidden_members?: undefined;
|
|
470
|
+
/** True, if messages from the chat can't be forwarded to other chats */
|
|
471
|
+
has_protected_content?: true;
|
|
472
|
+
/** True, if new chat members will have access to old messages; available only to chat administrators */
|
|
473
|
+
has_visible_history?: undefined;
|
|
474
|
+
/** For supergroups, name of the group sticker set */
|
|
475
|
+
sticker_set_name?: undefined;
|
|
476
|
+
/** True, if the bot can change the group sticker set */
|
|
477
|
+
can_set_sticker_set?: undefined;
|
|
478
|
+
/** For supergroups, the name of the group's custom emoji sticker set. Custom emoji from this set can be used by all users and bots in the group. */
|
|
479
|
+
custom_emoji_sticker_set_name?: undefined;
|
|
480
|
+
/** Unique identifier for the linked chat, i.e. the discussion group identifier for a channel and vice versa; for supergroups and channel chats. */
|
|
481
|
+
linked_chat_id?: number;
|
|
482
|
+
/** For supergroups, the location to which the supergroup is connected */
|
|
483
|
+
location?: undefined;
|
|
193
484
|
}
|
|
194
485
|
}
|
|
195
|
-
/** This object
|
|
196
|
-
export type
|
|
197
|
-
/**
|
|
198
|
-
export type ChatFromGetChat =
|
|
486
|
+
/** This object contains full information about a chat. */
|
|
487
|
+
export type ChatFullInfo = ChatFullInfo.PrivateChat | ChatFullInfo.GroupChat | ChatFullInfo.SupergroupChat | ChatFullInfo.ChannelChat;
|
|
488
|
+
/** @deprecated use ChatFullInfo instead */
|
|
489
|
+
export type ChatFromGetChat = ChatFullInfo;
|
|
199
490
|
/** This object represent a user's profile pictures. */
|
|
200
491
|
export interface UserProfilePhotos {
|
|
201
492
|
/** Total number of profile pictures the target user has */
|
|
@@ -255,7 +546,7 @@ export interface ChatAdministratorRights {
|
|
|
255
546
|
can_invite_users: boolean;
|
|
256
547
|
/** True, if the administrator can post stories to the chat */
|
|
257
548
|
can_post_stories: boolean;
|
|
258
|
-
/** True, if the administrator can edit stories posted by other users */
|
|
549
|
+
/** True, if the administrator can edit stories posted by other users, post stories to the chat page, pin chat stories, and access the chat's story archive */
|
|
259
550
|
can_edit_stories: boolean;
|
|
260
551
|
/** True, if the administrator can delete stories posted by other users */
|
|
261
552
|
can_delete_stories: boolean;
|
|
@@ -282,6 +573,8 @@ export interface ChatMemberUpdated {
|
|
|
282
573
|
new_chat_member: ChatMember;
|
|
283
574
|
/** Chat invite link, which was used by the user to join the chat; for joining by invite link events only. */
|
|
284
575
|
invite_link?: ChatInviteLink;
|
|
576
|
+
/** True, if the user joined the chat after sending a direct join request without using an invite link without using an invite link and being approved by an administrator */
|
|
577
|
+
via_join_request?: boolean;
|
|
285
578
|
/** True, if the user joined the chat via a chat folder invite link */
|
|
286
579
|
via_chat_folder_invite_link?: boolean;
|
|
287
580
|
}
|
|
@@ -330,7 +623,7 @@ export interface ChatMemberAdministrator {
|
|
|
330
623
|
can_invite_users: boolean;
|
|
331
624
|
/** True, if the administrator can post stories to the chat */
|
|
332
625
|
can_post_stories: boolean;
|
|
333
|
-
/** True, if the administrator can edit stories posted by other users */
|
|
626
|
+
/** True, if the administrator can edit stories posted by other users, post stories to the chat page, pin chat stories, and access the chat's story archive */
|
|
334
627
|
can_edit_stories: boolean;
|
|
335
628
|
/** True, if the administrator can delete stories posted by other users */
|
|
336
629
|
can_delete_stories: boolean;
|
|
@@ -453,6 +746,7 @@ export interface ChatPermissions {
|
|
|
453
746
|
/** True, if the user is allowed to create forum topics. If omitted defaults to the value of can_pin_messages */
|
|
454
747
|
can_manage_topics?: boolean;
|
|
455
748
|
}
|
|
749
|
+
/** Describes the birthdate of a user. */
|
|
456
750
|
export interface Birthdate {
|
|
457
751
|
/** Day of the user's birth; 1-31 */
|
|
458
752
|
day: number;
|
|
@@ -461,6 +755,7 @@ export interface Birthdate {
|
|
|
461
755
|
/** Year of the user's birth */
|
|
462
756
|
year?: number;
|
|
463
757
|
}
|
|
758
|
+
/** Contains information about the start page settings of a Telegram Business account. */
|
|
464
759
|
export interface BusinessIntro {
|
|
465
760
|
/** Title text of the business intro */
|
|
466
761
|
title?: string;
|
|
@@ -469,18 +764,21 @@ export interface BusinessIntro {
|
|
|
469
764
|
/** Sticker of the business intro */
|
|
470
765
|
sticker?: Sticker;
|
|
471
766
|
}
|
|
767
|
+
/** Contains information about the location of a Telegram Business account. */
|
|
472
768
|
export interface BusinessLocation {
|
|
473
769
|
/** Address of the business */
|
|
474
770
|
address: string;
|
|
475
771
|
/** Location of the business */
|
|
476
772
|
location?: Location;
|
|
477
773
|
}
|
|
774
|
+
/** Describes an interval of time during which a business is open. */
|
|
478
775
|
export interface BusinessOpeningHoursInterval {
|
|
479
|
-
/** The minute's sequence number in a week, starting on Monday, marking the start of the time interval during which the business is open; 0 - 7 24 60 */
|
|
776
|
+
/** The minute's sequence number in a week, starting on Monday, marking the start of the time interval during which the business is open; 0 - 7 * 24 * 60 */
|
|
480
777
|
opening_minute: number;
|
|
481
|
-
/** The minute's sequence number in a week, starting on Monday, marking the end of the time interval during which the business is open; 0 - 8 24 60 */
|
|
778
|
+
/** The minute's sequence number in a week, starting on Monday, marking the end of the time interval during which the business is open; 0 - 8 * 24 * 60 */
|
|
482
779
|
closing_minute: number;
|
|
483
780
|
}
|
|
781
|
+
/** Describes the opening hours of a business. */
|
|
484
782
|
export interface BusinessOpeningHours {
|
|
485
783
|
/** Unique name of the time zone for which the opening hours are defined */
|
|
486
784
|
time_zone_name: string;
|
|
@@ -598,6 +896,6 @@ export interface BusinessMessagesDeleted {
|
|
|
598
896
|
business_connection_id: string;
|
|
599
897
|
/** Information about a chat in the business account. The bot may not have access to the chat or the corresponding user. */
|
|
600
898
|
chat: Chat.PrivateChat;
|
|
601
|
-
/**
|
|
899
|
+
/** The list of identifiers of deleted messages in the chat of the business account */
|
|
602
900
|
message_ids: number[];
|
|
603
901
|
}
|
package/markup.d.ts
CHANGED
|
@@ -15,11 +15,11 @@ export declare namespace InlineKeyboardButton {
|
|
|
15
15
|
url: string;
|
|
16
16
|
}
|
|
17
17
|
interface CallbackButton extends AbstractInlineKeyboardButton {
|
|
18
|
-
/** Data to be sent in a callback query to the bot when button is pressed, 1-64 bytes */
|
|
18
|
+
/** Data to be sent in a callback query to the bot when button is pressed, 1-64 bytes. Not supported for messages sent on behalf of a Telegram Business account. */
|
|
19
19
|
callback_data: string;
|
|
20
20
|
}
|
|
21
21
|
interface WebAppButton extends AbstractInlineKeyboardButton {
|
|
22
|
-
/** Description of the Web App that will be launched when the user presses the button. The Web App will be able to send an arbitrary message on behalf of the user using the method answerWebAppQuery. Available only in private chats between a user and the bot. */
|
|
22
|
+
/** Description of the Web App that will be launched when the user presses the button. The Web App will be able to send an arbitrary message on behalf of the user using the method answerWebAppQuery. Available only in private chats between a user and the bot. Not supported for messages sent on behalf of a Telegram Business account. */
|
|
23
23
|
web_app: WebAppInfo;
|
|
24
24
|
}
|
|
25
25
|
interface LoginButton extends AbstractInlineKeyboardButton {
|
|
@@ -27,17 +27,17 @@ export declare namespace InlineKeyboardButton {
|
|
|
27
27
|
login_url: LoginUrl;
|
|
28
28
|
}
|
|
29
29
|
interface SwitchInlineButton extends AbstractInlineKeyboardButton {
|
|
30
|
-
/** If set, pressing the button will prompt the user to select one of their chats, open that chat and insert the bot's username and the specified inline query in the input field.
|
|
30
|
+
/** If set, pressing the button will prompt the user to select one of their chats, open that chat and insert the bot's username and the specified inline query in the input field. May be empty, in which case just the bot's username will be inserted. Not supported for messages sent on behalf of a Telegram Business account. */
|
|
31
31
|
switch_inline_query: string;
|
|
32
32
|
}
|
|
33
33
|
interface SwitchInlineCurrentChatButton extends AbstractInlineKeyboardButton {
|
|
34
34
|
/** If set, pressing the button will insert the bot's username and the specified inline query in the current chat's input field. Can be empty, in which case only the bot's username will be inserted.
|
|
35
35
|
|
|
36
|
-
This offers a quick way for the user to open your bot in inline mode in the same chat – good for selecting something from multiple options. */
|
|
36
|
+
This offers a quick way for the user to open your bot in inline mode in the same chat – good for selecting something from multiple options. Not supported in channels and for messages sent on behalf of a Telegram Business account. */
|
|
37
37
|
switch_inline_query_current_chat: string;
|
|
38
38
|
}
|
|
39
39
|
interface SwitchInlineChosenChatButton extends AbstractInlineKeyboardButton {
|
|
40
|
-
/** If set, pressing the button will prompt the user to select one of their chats of the specified type, open that chat and insert the bot's username and the specified inline query in the input field */
|
|
40
|
+
/** If set, pressing the button will prompt the user to select one of their chats of the specified type, open that chat and insert the bot's username and the specified inline query in the input field. Not supported for messages sent on behalf of a Telegram Business account. */
|
|
41
41
|
switch_inline_query_chosen_chat: SwitchInlineQueryChosenChat;
|
|
42
42
|
}
|
|
43
43
|
interface GameButton extends AbstractInlineKeyboardButton {
|
|
@@ -104,7 +104,7 @@ export interface CallbackQuery {
|
|
|
104
104
|
/** Short name of a Game to be returned, serves as the unique identifier for the game */
|
|
105
105
|
game_short_name?: string;
|
|
106
106
|
}
|
|
107
|
-
/** This object represents a custom keyboard with reply options (see Introduction to bots for details and examples). */
|
|
107
|
+
/** This object represents a custom keyboard with reply options (see Introduction to bots for details and examples). Not supported in channels and for messages sent on behalf of a Telegram Business account. */
|
|
108
108
|
export interface ReplyKeyboardMarkup {
|
|
109
109
|
/** Array of button rows, each represented by an Array of KeyboardButton objects */
|
|
110
110
|
keyboard: KeyboardButton[][];
|
|
@@ -158,7 +158,7 @@ export interface KeyboardButtonPollType {
|
|
|
158
158
|
/** If quiz is passed, the user will be allowed to create only polls in the quiz mode. If regular is passed, only regular polls will be allowed. Otherwise, the user will be allowed to create a poll of any type. */
|
|
159
159
|
type?: "quiz" | "regular";
|
|
160
160
|
}
|
|
161
|
-
/** Upon receiving a message with this object, Telegram clients will remove the current custom keyboard and display the default letter-keyboard. By default, custom keyboards are displayed until a new keyboard is sent by a bot. An exception is made for one-time keyboards that are hidden immediately after the user presses a button (see ReplyKeyboardMarkup). */
|
|
161
|
+
/** Upon receiving a message with this object, Telegram clients will remove the current custom keyboard and display the default letter-keyboard. By default, custom keyboards are displayed until a new keyboard is sent by a bot. An exception is made for one-time keyboards that are hidden immediately after the user presses a button (see ReplyKeyboardMarkup). Not supported in channels and for messages sent on behalf of a Telegram Business account. */
|
|
162
162
|
export interface ReplyKeyboardRemove {
|
|
163
163
|
/** Requests clients to remove the custom keyboard (user will not be able to summon this keyboard; if you want to hide the keyboard from sight but keep it accessible, use one_time_keyboard in ReplyKeyboardMarkup) */
|
|
164
164
|
remove_keyboard: true;
|
|
@@ -167,7 +167,7 @@ export interface ReplyKeyboardRemove {
|
|
|
167
167
|
Example: A user votes in a poll, bot returns confirmation message in reply to the vote and removes the keyboard for that user, while still showing the keyboard with poll options to users who haven't voted yet. */
|
|
168
168
|
selective?: boolean;
|
|
169
169
|
}
|
|
170
|
-
/** Upon receiving a message with this object, Telegram clients will display a reply interface to the user (act as if the user has selected the bot's message and tapped 'Reply'). This can be extremely useful if you want to create user-friendly step-by-step interfaces without having to sacrifice privacy mode.
|
|
170
|
+
/** Upon receiving a message with this object, Telegram clients will display a reply interface to the user (act as if the user has selected the bot's message and tapped 'Reply'). This can be extremely useful if you want to create user-friendly step-by-step interfaces without having to sacrifice privacy mode. Not supported in channels and for messages sent on behalf of a Telegram Business account.
|
|
171
171
|
|
|
172
172
|
Example: A poll bot for groups runs in privacy mode (only receives commands, replies to its messages and mentions). There could be two ways to create a new poll:
|
|
173
173
|
|
|
@@ -199,11 +199,11 @@ export interface KeyboardButtonRequestUsers {
|
|
|
199
199
|
user_is_premium?: boolean;
|
|
200
200
|
/** The maximum number of users to be selected; 1-10. Defaults to 1. */
|
|
201
201
|
max_quantity?: number;
|
|
202
|
-
/** Pass True to request the users' first and last
|
|
202
|
+
/** Pass True to request the users' first and last names */
|
|
203
203
|
request_name?: boolean;
|
|
204
|
-
/** Pass True to request the users'
|
|
204
|
+
/** Pass True to request the users' usernames */
|
|
205
205
|
request_username?: boolean;
|
|
206
|
-
/** Pass True to request the users'
|
|
206
|
+
/** Pass True to request the users' photos */
|
|
207
207
|
request_photo?: boolean;
|
|
208
208
|
}
|
|
209
209
|
/** This object defines the criteria used to request a suitable chat. Information about the selected chat will be shared with the bot when the corresponding button is pressed. The bot will be granted requested rights in the chat if appropriate. */
|
package/message.d.ts
CHANGED
|
@@ -103,6 +103,7 @@ export declare namespace Message {
|
|
|
103
103
|
type PassportDataMessage = ServiceMessage & MsgWith<"passport_data">;
|
|
104
104
|
type ProximityAlertTriggeredMessage = ServiceMessage & MsgWith<"proximity_alert_triggered">;
|
|
105
105
|
type BoostAddedMessage = ServiceMessage & MsgWith<"boost_added">;
|
|
106
|
+
type ChatBackgroundSetMessage = ServiceMessage & MsgWith<"chat_background_set">;
|
|
106
107
|
type ForumTopicCreatedMessage = ServiceMessage & MsgWith<"forum_topic_created">;
|
|
107
108
|
type ForumTopicEditedMessage = ServiceMessage & MsgWith<"forum_topic_edited">;
|
|
108
109
|
type ForumTopicClosedMessage = ServiceMessage & MsgWith<"forum_topic_closed">;
|
|
@@ -199,6 +200,7 @@ export interface Message extends Message.MediaMessage {
|
|
|
199
200
|
proximity_alert_triggered?: ProximityAlertTriggered;
|
|
200
201
|
/** Service message: user boosted the chat */
|
|
201
202
|
boost_added?: ChatBoostAdded;
|
|
203
|
+
chat_background_set?: ChatBackground;
|
|
202
204
|
/** Service message: forum topic created */
|
|
203
205
|
forum_topic_created?: ForumTopicCreated;
|
|
204
206
|
/** Service message: forum topic edited */
|
|
@@ -250,6 +252,7 @@ export interface InaccessibleMessage extends Omit<Message, "chat" | "message_id"
|
|
|
250
252
|
date: 0;
|
|
251
253
|
}
|
|
252
254
|
/** This object describes a message that can be inaccessible to the bot. It can be one of
|
|
255
|
+
|
|
253
256
|
- Message
|
|
254
257
|
- InaccessibleMessage */
|
|
255
258
|
export type MaybeInaccessibleMessage = Message | InaccessibleMessage;
|
|
@@ -471,6 +474,7 @@ export interface ReplyParameters {
|
|
|
471
474
|
quote_position?: number;
|
|
472
475
|
}
|
|
473
476
|
/** This object describes the origin of a message. It can be one of
|
|
477
|
+
|
|
474
478
|
- MessageOriginUser
|
|
475
479
|
- MessageOriginHiddenUser
|
|
476
480
|
- MessageOriginChat
|
|
@@ -588,6 +592,13 @@ export interface Document {
|
|
|
588
592
|
/** File size in bytes */
|
|
589
593
|
file_size?: number;
|
|
590
594
|
}
|
|
595
|
+
/** This object represents a story. */
|
|
596
|
+
export interface Story {
|
|
597
|
+
/** Chat that posted the story */
|
|
598
|
+
chat: Chat;
|
|
599
|
+
/** Unique identifier for the story in the chat */
|
|
600
|
+
id: number;
|
|
601
|
+
}
|
|
591
602
|
/** This object represents a video file. */
|
|
592
603
|
export interface Video {
|
|
593
604
|
/** Identifier for this file, which can be used to download or reuse the file */
|
|
@@ -661,9 +672,20 @@ export interface Dice {
|
|
|
661
672
|
export interface PollOption {
|
|
662
673
|
/** Option text, 1-100 characters */
|
|
663
674
|
text: string;
|
|
675
|
+
/** Special entities that appear in the option text. Currently, only custom emoji entities are allowed in poll option texts */
|
|
676
|
+
text_entities?: MessageEntity[];
|
|
664
677
|
/** Number of users that voted for this option */
|
|
665
678
|
voter_count: number;
|
|
666
679
|
}
|
|
680
|
+
/** This object contains information about one answer option in a poll to send. */
|
|
681
|
+
export interface InputPollOption {
|
|
682
|
+
/** Option text, 1-100 characters */
|
|
683
|
+
text: string;
|
|
684
|
+
/** Mode for parsing entities in the text. See formatting options for more details. Currently, only custom emoji entities are allowed */
|
|
685
|
+
text_parse_mode?: string;
|
|
686
|
+
/** A list of special entities that appear in the poll option text. It can be specified instead of text_parse_mode */
|
|
687
|
+
text_entities?: MessageEntity[];
|
|
688
|
+
}
|
|
667
689
|
/** This object represents an answer of a user in a non-anonymous poll. */
|
|
668
690
|
export interface PollAnswer {
|
|
669
691
|
/** Unique poll identifier */
|
|
@@ -681,6 +703,8 @@ export interface Poll {
|
|
|
681
703
|
id: string;
|
|
682
704
|
/** Poll question, 1-300 characters */
|
|
683
705
|
question: string;
|
|
706
|
+
/** Special entities that appear in the question. Currently, only custom emoji entities are allowed in poll questions */
|
|
707
|
+
question_entities?: MessageEntity[];
|
|
684
708
|
/** List of poll options */
|
|
685
709
|
options: PollOption[];
|
|
686
710
|
/** Total number of users that voted in the poll */
|
|
@@ -736,12 +760,12 @@ export interface Venue {
|
|
|
736
760
|
/** Google Places type of the venue. (See supported types.) */
|
|
737
761
|
google_place_type?: string;
|
|
738
762
|
}
|
|
739
|
-
/**
|
|
740
|
-
export interface
|
|
741
|
-
/**
|
|
742
|
-
|
|
743
|
-
/**
|
|
744
|
-
|
|
763
|
+
/** Describes data sent from a Web App to the bot. */
|
|
764
|
+
export interface WebAppData {
|
|
765
|
+
/** The data. Be aware that a bad client can send arbitrary data in this field. */
|
|
766
|
+
data: string;
|
|
767
|
+
/** Text of the web_app keyboard button from which the Web App was opened. Be aware that a bad client can send arbitrary data in this field. */
|
|
768
|
+
button_text: string;
|
|
745
769
|
}
|
|
746
770
|
/** This object represents the content of a service message, sent whenever a user in the chat triggers a proximity alert set by another user. */
|
|
747
771
|
export interface ProximityAlertTriggered {
|
|
@@ -757,6 +781,99 @@ export interface MessageAutoDeleteTimerChanged {
|
|
|
757
781
|
/** New auto-delete time for messages in the chat; in seconds */
|
|
758
782
|
message_auto_delete_time: number;
|
|
759
783
|
}
|
|
784
|
+
/** This object represents a service message about a user boosting a chat. */
|
|
785
|
+
export interface ChatBoostAdded {
|
|
786
|
+
/** Number of boosts added by the user */
|
|
787
|
+
boost_count: number;
|
|
788
|
+
}
|
|
789
|
+
/** This object describes the way a background is filled based on the selected colors. Currently, it can be one of
|
|
790
|
+
|
|
791
|
+
- BackgroundFillSolid
|
|
792
|
+
- BackgroundFillGradient
|
|
793
|
+
- BackgroundFillFreeformGradient */
|
|
794
|
+
export type BackgroundFill = BackgroundFillSolid | BackgroundFillGradient | BackgroundFillFreeformGradient;
|
|
795
|
+
/** The background is filled using the selected color. */
|
|
796
|
+
export interface BackgroundFillSolid {
|
|
797
|
+
/** Type of the background fill, always “solid” */
|
|
798
|
+
type: "solid";
|
|
799
|
+
/** The color of the background fill in the RGB24 format */
|
|
800
|
+
color: number;
|
|
801
|
+
}
|
|
802
|
+
/** The background is a gradient fill. */
|
|
803
|
+
export interface BackgroundFillGradient {
|
|
804
|
+
/** Type of the background fill, always “gradient” */
|
|
805
|
+
type: "gradient";
|
|
806
|
+
/** Top color of the gradient in the RGB24 format */
|
|
807
|
+
top_color: number;
|
|
808
|
+
/** Bottom color of the gradient in the RGB24 format */
|
|
809
|
+
bottom_color: number;
|
|
810
|
+
/** Clockwise rotation angle of the background fill in degrees; 0-359 */
|
|
811
|
+
rotation_angle: number;
|
|
812
|
+
}
|
|
813
|
+
/** The background is a freeform gradient that rotates after every message in the chat. */
|
|
814
|
+
export interface BackgroundFillFreeformGradient {
|
|
815
|
+
/** Type of the background fill, always “freeform_gradient” */
|
|
816
|
+
type: "freeform_gradient";
|
|
817
|
+
/** A list of the 3 or 4 base colors that are used to generate the freeform gradient in the RGB24 format */
|
|
818
|
+
colors: number[];
|
|
819
|
+
}
|
|
820
|
+
/** This object describes the type of a background. Currently, it can be one of
|
|
821
|
+
|
|
822
|
+
- BackgroundTypeFill
|
|
823
|
+
- BackgroundTypeWallpaper
|
|
824
|
+
- BackgroundTypePattern
|
|
825
|
+
- BackgroundTypeChatTheme
|
|
826
|
+
- BackgroundTypeFill */
|
|
827
|
+
export type BackgroundType = BackgroundTypeFill | BackgroundTypeWallpaper | BackgroundTypePattern | BackgroundTypeChatTheme;
|
|
828
|
+
/** The background is automatically filled based on the selected colors. */
|
|
829
|
+
export interface BackgroundTypeFill {
|
|
830
|
+
/** Type of the background, always “fill” */
|
|
831
|
+
type: "fill";
|
|
832
|
+
/** The background fill */
|
|
833
|
+
fill: BackgroundFill;
|
|
834
|
+
/** Dimming of the background in dark themes, as a percentage; 0-100 */
|
|
835
|
+
dark_theme_dimming: number;
|
|
836
|
+
}
|
|
837
|
+
/** The background is a wallpaper in the JPEG format. */
|
|
838
|
+
export interface BackgroundTypeWallpaper {
|
|
839
|
+
/** Type of the background, always “wallpaper” */
|
|
840
|
+
type: "wallpaper";
|
|
841
|
+
/** Document with the wallpaper */
|
|
842
|
+
document: Document;
|
|
843
|
+
/** Dimming of the background in dark themes, as a percentage; 0-100 */
|
|
844
|
+
dark_theme_dimming: number;
|
|
845
|
+
/** True, if the wallpaper is downscaled to fit in a 450x450 square and then box-blurred with radius 12 */
|
|
846
|
+
is_blurred?: true;
|
|
847
|
+
/** True, if the background moves slightly when the device is tilted */
|
|
848
|
+
is_moving?: true;
|
|
849
|
+
}
|
|
850
|
+
/** The background is a PNG or TGV (gzipped subset of SVG with MIME type “application/x-tgwallpattern”) pattern to be combined with the background fill chosen by the user. */
|
|
851
|
+
export interface BackgroundTypePattern {
|
|
852
|
+
/** Type of the background, always “pattern” */
|
|
853
|
+
type: "pattern";
|
|
854
|
+
/** Document with the pattern */
|
|
855
|
+
document: Document;
|
|
856
|
+
/** The background fill that is combined with the pattern */
|
|
857
|
+
fill: BackgroundFill;
|
|
858
|
+
/** Intensity of the pattern when it is shown above the filled background; 0-100 */
|
|
859
|
+
intensity: number;
|
|
860
|
+
/** True, if the background fill must be applied only to the pattern itself. All other pixels are black in this case. For dark themes only */
|
|
861
|
+
is_inverted?: true;
|
|
862
|
+
/** True, if the background moves slightly when the device is tilted */
|
|
863
|
+
is_moving?: true;
|
|
864
|
+
}
|
|
865
|
+
/** The background is taken directly from a built-in chat theme. */
|
|
866
|
+
export interface BackgroundTypeChatTheme {
|
|
867
|
+
/** Type of the background, always “chat_theme” */
|
|
868
|
+
type: "chat_theme";
|
|
869
|
+
/** Name of the chat theme, which is usually an emoji */
|
|
870
|
+
theme_name: string;
|
|
871
|
+
}
|
|
872
|
+
/** This object represents a chat background. */
|
|
873
|
+
export interface ChatBackground {
|
|
874
|
+
/** Type of the background*/
|
|
875
|
+
type: BackgroundType;
|
|
876
|
+
}
|
|
760
877
|
/** This object represents a service message about a new forum topic created in the chat. */
|
|
761
878
|
export interface ForumTopicCreated {
|
|
762
879
|
/** Name of the topic */
|
|
@@ -785,14 +902,9 @@ export interface GeneralForumTopicHidden {
|
|
|
785
902
|
/** This object represents a service message about General forum topic unhidden in the chat. Currently holds no information. */
|
|
786
903
|
export interface GeneralForumTopicUnhidden {
|
|
787
904
|
}
|
|
788
|
-
/** This object
|
|
789
|
-
export interface ChatBoostAdded {
|
|
790
|
-
/** Number of boosts added by the user */
|
|
791
|
-
boost_count: number;
|
|
792
|
-
}
|
|
793
|
-
/** This object contains information about a user that was shared with the bot using a KeyboardButtonRequestUser button. */
|
|
905
|
+
/** This object contains information about a user that was shared with the bot using a KeyboardButtonRequestUsers button. */
|
|
794
906
|
export interface SharedUser {
|
|
795
|
-
/** Identifier of the shared user.
|
|
907
|
+
/** Identifier of the shared user. The bot may not have access to the user and could be unable to use this identifier, unless the user is already known to the bot by some other means. */
|
|
796
908
|
user_id: number;
|
|
797
909
|
/** First name of the user, if the name was requested by the bot */
|
|
798
910
|
first_name?: string;
|
|
@@ -919,13 +1031,6 @@ export interface LinkPreviewOptions {
|
|
|
919
1031
|
/** True, if the link preview must be shown above the message text; otherwise, the link preview will be shown below the message text */
|
|
920
1032
|
show_above_text?: boolean;
|
|
921
1033
|
}
|
|
922
|
-
/** Describes data sent from a Web App to the bot. */
|
|
923
|
-
export interface WebAppData {
|
|
924
|
-
/** The data. Be aware that a bad client can send arbitrary data in this field. */
|
|
925
|
-
data: string;
|
|
926
|
-
/** Text of the web_app keyboard button from which the Web App was opened. Be aware that a bad client can send arbitrary data in this field. */
|
|
927
|
-
button_text: string;
|
|
928
|
-
}
|
|
929
1034
|
/** This object represents a sticker. */
|
|
930
1035
|
export interface Sticker {
|
|
931
1036
|
/** Identifier for this file, which can be used to download or reuse the file */
|
|
@@ -1016,7 +1121,10 @@ export interface File {
|
|
|
1016
1121
|
/** File path. Use https://api.telegram.org/file/bot<token>/<file_path> to get the file. */
|
|
1017
1122
|
file_path?: string;
|
|
1018
1123
|
}
|
|
1019
|
-
/** This object describes the type of a reaction. Currently, it can be one of
|
|
1124
|
+
/** This object describes the type of a reaction. Currently, it can be one of
|
|
1125
|
+
|
|
1126
|
+
- ReactionTypeEmoji
|
|
1127
|
+
- ReactionTypeCustomEmoji */
|
|
1020
1128
|
export type ReactionType = ReactionTypeEmoji | ReactionTypeCustomEmoji;
|
|
1021
1129
|
/** The reaction is based on an emoji. */
|
|
1022
1130
|
export interface ReactionTypeEmoji {
|
package/methods.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { InlineQueryResult, InlineQueryResultsButton } from "./inline.js";
|
|
2
|
-
import type { BotCommand, BusinessConnection, ChatAdministratorRights,
|
|
2
|
+
import type { BotCommand, BusinessConnection, ChatAdministratorRights, ChatInviteLink, ChatMember, ChatMemberAdministrator, ChatMemberOwner, ChatPermissions, ForumTopic, UserChatBoosts, UserFromGetMe, UserProfilePhotos, WebhookInfo } from "./manage.js";
|
|
3
|
+
import type { ChatFullInfo } from "./manage.js";
|
|
3
4
|
import type { ForceReply, InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove } from "./markup.js";
|
|
4
|
-
import type { File, GameHighScore, LinkPreviewOptions, MaskPosition, Message, MessageEntity, MessageId, ParseMode, Poll, ReactionType, ReplyParameters, SentWebAppMessage, Sticker, StickerSet } from "./message.js";
|
|
5
|
+
import type { File, GameHighScore, InputPollOption, LinkPreviewOptions, MaskPosition, Message, MessageEntity, MessageId, ParseMode, Poll, ReactionType, ReplyParameters, SentWebAppMessage, Sticker, StickerSet } from "./message.js";
|
|
5
6
|
import type { PassportElementError } from "./passport.js";
|
|
6
7
|
import type { LabeledPrice, ShippingOption } from "./payment.js";
|
|
7
8
|
import type { BotCommandScope, BotDescription, BotName, BotShortDescription, MenuButton } from "./settings.js";
|
|
@@ -94,7 +95,7 @@ export type ApiMethods<F> = {
|
|
|
94
95
|
protect_content?: boolean;
|
|
95
96
|
/** Description of the message to reply to */
|
|
96
97
|
reply_parameters?: ReplyParameters;
|
|
97
|
-
/** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user.
|
|
98
|
+
/** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. */
|
|
98
99
|
reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
|
|
99
100
|
/** @deprecated Use `reply_parameters` instead. */
|
|
100
101
|
reply_to_message_id?: number;
|
|
@@ -197,7 +198,7 @@ export type ApiMethods<F> = {
|
|
|
197
198
|
protect_content?: boolean;
|
|
198
199
|
/** Description of the message to reply to */
|
|
199
200
|
reply_parameters?: ReplyParameters;
|
|
200
|
-
/** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user.
|
|
201
|
+
/** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. */
|
|
201
202
|
reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
|
|
202
203
|
/** @deprecated Use `reply_parameters` instead. */
|
|
203
204
|
reply_to_message_id?: number;
|
|
@@ -234,7 +235,7 @@ export type ApiMethods<F> = {
|
|
|
234
235
|
protect_content?: boolean;
|
|
235
236
|
/** Description of the message to reply to */
|
|
236
237
|
reply_parameters?: ReplyParameters;
|
|
237
|
-
/** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user.
|
|
238
|
+
/** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. */
|
|
238
239
|
reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
|
|
239
240
|
/** @deprecated Use `reply_parameters` instead. */
|
|
240
241
|
reply_to_message_id?: number;
|
|
@@ -265,7 +266,7 @@ export type ApiMethods<F> = {
|
|
|
265
266
|
protect_content?: boolean;
|
|
266
267
|
/** Description of the message to reply to */
|
|
267
268
|
reply_parameters?: ReplyParameters;
|
|
268
|
-
/** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user.
|
|
269
|
+
/** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. */
|
|
269
270
|
reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
|
|
270
271
|
/** @deprecated Use `reply_parameters` instead. */
|
|
271
272
|
reply_to_message_id?: number;
|
|
@@ -304,7 +305,7 @@ export type ApiMethods<F> = {
|
|
|
304
305
|
protect_content?: boolean;
|
|
305
306
|
/** Description of the message to reply to */
|
|
306
307
|
reply_parameters?: ReplyParameters;
|
|
307
|
-
/** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user.
|
|
308
|
+
/** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. */
|
|
308
309
|
reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
|
|
309
310
|
/** @deprecated Use `reply_parameters` instead. */
|
|
310
311
|
reply_to_message_id?: number;
|
|
@@ -341,12 +342,12 @@ export type ApiMethods<F> = {
|
|
|
341
342
|
protect_content?: boolean;
|
|
342
343
|
/** Description of the message to reply to */
|
|
343
344
|
reply_parameters?: ReplyParameters;
|
|
344
|
-
/** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user.
|
|
345
|
+
/** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. */
|
|
345
346
|
reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
|
|
346
347
|
/** @deprecated Use `reply_parameters` instead. */
|
|
347
348
|
reply_to_message_id?: number;
|
|
348
349
|
}): Message.AnimationMessage;
|
|
349
|
-
/** Use this method to send audio files, if you want Telegram clients to display the file as a playable voice message. For this to work, your audio must be in an .OGG file encoded with OPUS (other formats may be sent as Audio or Document). On success, the sent Message is returned. Bots can currently send voice messages of up to 50 MB in size, this limit may be changed in the future. */
|
|
350
|
+
/** Use this method to send audio files, if you want Telegram clients to display the file as a playable voice message. For this to work, your audio must be in an .OGG file encoded with OPUS, or in .MP3 format, or in .M4A format (other formats may be sent as Audio or Document). On success, the sent Message is returned. Bots can currently send voice messages of up to 50 MB in size, this limit may be changed in the future. */
|
|
350
351
|
sendVoice(args: {
|
|
351
352
|
/** Unique identifier of the business connection on behalf of which the message will be sent */
|
|
352
353
|
business_connection_id?: string;
|
|
@@ -370,7 +371,7 @@ export type ApiMethods<F> = {
|
|
|
370
371
|
protect_content?: boolean;
|
|
371
372
|
/** Description of the message to reply to */
|
|
372
373
|
reply_parameters?: ReplyParameters;
|
|
373
|
-
/** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user.
|
|
374
|
+
/** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. */
|
|
374
375
|
reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
|
|
375
376
|
/** @deprecated Use `reply_parameters` instead. */
|
|
376
377
|
reply_to_message_id?: number;
|
|
@@ -398,7 +399,7 @@ export type ApiMethods<F> = {
|
|
|
398
399
|
protect_content?: boolean;
|
|
399
400
|
/** Description of the message to reply to */
|
|
400
401
|
reply_parameters?: ReplyParameters;
|
|
401
|
-
/** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user.
|
|
402
|
+
/** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. */
|
|
402
403
|
reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
|
|
403
404
|
/** @deprecated Use `reply_parameters` instead. */
|
|
404
405
|
reply_to_message_id?: number;
|
|
@@ -436,7 +437,7 @@ export type ApiMethods<F> = {
|
|
|
436
437
|
longitude: number;
|
|
437
438
|
/** The radius of uncertainty for the location, measured in meters; 0-1500 */
|
|
438
439
|
horizontal_accuracy?: number;
|
|
439
|
-
/** Period in seconds
|
|
440
|
+
/** Period in seconds during which the location will be updated (see Live Locations, should be between 60 and 86400, or 0x7FFFFFFF for live locations that can be edited indefinitely. */
|
|
440
441
|
live_period?: number;
|
|
441
442
|
/** The direction in which user is moving, in degrees; 1-360. For active live locations only. */
|
|
442
443
|
heading?: number;
|
|
@@ -448,7 +449,7 @@ export type ApiMethods<F> = {
|
|
|
448
449
|
protect_content?: boolean;
|
|
449
450
|
/** Description of the message to reply to */
|
|
450
451
|
reply_parameters?: ReplyParameters;
|
|
451
|
-
/** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user.
|
|
452
|
+
/** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. */
|
|
452
453
|
reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
|
|
453
454
|
/** @deprecated Use `reply_parameters` instead. */
|
|
454
455
|
reply_to_message_id?: number;
|
|
@@ -465,6 +466,8 @@ export type ApiMethods<F> = {
|
|
|
465
466
|
latitude: number;
|
|
466
467
|
/** Longitude of new location */
|
|
467
468
|
longitude: number;
|
|
469
|
+
/** New period in seconds during which the location can be updated, starting from the message send date. If 0x7FFFFFFF is specified, then the location can be updated forever. Otherwise, the new value must not exceed the current live_period by more than a day, and the live location expiration date must remain within the next 90 days. If not specified, then live_period remains unchanged */
|
|
470
|
+
live_period?: number;
|
|
468
471
|
/** The radius of uncertainty for the location, measured in meters; 0-1500 */
|
|
469
472
|
horizontal_accuracy?: number;
|
|
470
473
|
/** The direction in which user is moving, in degrees; 1-360. For active live locations only. */
|
|
@@ -515,7 +518,7 @@ export type ApiMethods<F> = {
|
|
|
515
518
|
protect_content?: boolean;
|
|
516
519
|
/** Description of the message to reply to */
|
|
517
520
|
reply_parameters?: ReplyParameters;
|
|
518
|
-
/** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user.
|
|
521
|
+
/** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. */
|
|
519
522
|
reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
|
|
520
523
|
/** @deprecated Use `reply_parameters` instead. */
|
|
521
524
|
reply_to_message_id?: number;
|
|
@@ -542,7 +545,7 @@ export type ApiMethods<F> = {
|
|
|
542
545
|
protect_content?: boolean;
|
|
543
546
|
/** Description of the message to reply to */
|
|
544
547
|
reply_parameters?: ReplyParameters;
|
|
545
|
-
/** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove a keyboard or to force a reply from the user.
|
|
548
|
+
/** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. */
|
|
546
549
|
reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
|
|
547
550
|
/** @deprecated Use `reply_parameters` instead. */
|
|
548
551
|
reply_to_message_id?: number;
|
|
@@ -557,8 +560,12 @@ export type ApiMethods<F> = {
|
|
|
557
560
|
message_thread_id?: number;
|
|
558
561
|
/** Poll question, 1-300 characters */
|
|
559
562
|
question: string;
|
|
560
|
-
/**
|
|
561
|
-
|
|
563
|
+
/** Mode for parsing entities in the question. See formatting options for more details. Currently, only custom emoji entities are allowed */
|
|
564
|
+
question_parse_mode?: string;
|
|
565
|
+
/** A list of special entities that appear in the poll question. It can be specified instead of question_parse_mode */
|
|
566
|
+
question_entities?: MessageEntity[];
|
|
567
|
+
/** A list of 2-10 answer options */
|
|
568
|
+
options: InputPollOption[];
|
|
562
569
|
/** True, if the poll needs to be anonymous, defaults to True */
|
|
563
570
|
is_anonymous?: boolean;
|
|
564
571
|
/** Poll type, “quiz” or “regular”, defaults to “regular” */
|
|
@@ -571,7 +578,7 @@ export type ApiMethods<F> = {
|
|
|
571
578
|
explanation?: string;
|
|
572
579
|
/** Mode for parsing entities in the explanation. See formatting options for more details. */
|
|
573
580
|
explanation_parse_mode?: ParseMode;
|
|
574
|
-
/** A list of special entities that appear in the poll explanation
|
|
581
|
+
/** A list of special entities that appear in the poll explanation. It can be specified instead of explanation_parse_mode */
|
|
575
582
|
explanation_entities?: MessageEntity[];
|
|
576
583
|
/** Amount of time in seconds the poll will be active after creation, 5-600. Can't be used together with close_date. */
|
|
577
584
|
open_period?: number;
|
|
@@ -585,7 +592,7 @@ export type ApiMethods<F> = {
|
|
|
585
592
|
protect_content?: boolean;
|
|
586
593
|
/** Description of the message to reply to */
|
|
587
594
|
reply_parameters?: ReplyParameters;
|
|
588
|
-
/** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user.
|
|
595
|
+
/** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. */
|
|
589
596
|
reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
|
|
590
597
|
/** @deprecated Use `reply_parameters` instead. */
|
|
591
598
|
reply_to_message_id?: number;
|
|
@@ -606,7 +613,7 @@ export type ApiMethods<F> = {
|
|
|
606
613
|
protect_content?: boolean;
|
|
607
614
|
/** Description of the message to reply to */
|
|
608
615
|
reply_parameters?: ReplyParameters;
|
|
609
|
-
/** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user.
|
|
616
|
+
/** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. */
|
|
610
617
|
reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
|
|
611
618
|
/** @deprecated Use `reply_parameters` instead. */
|
|
612
619
|
reply_to_message_id?: number;
|
|
@@ -713,7 +720,7 @@ export type ApiMethods<F> = {
|
|
|
713
720
|
can_invite_users?: boolean;
|
|
714
721
|
/** True if the administrator can post stories to the chat */
|
|
715
722
|
can_post_stories?: boolean;
|
|
716
|
-
/** True if the administrator can edit stories posted by other users */
|
|
723
|
+
/** Pass True if the administrator can edit stories posted by other users, post stories to the chat page, pin chat stories, and access the chat's story archive */
|
|
717
724
|
can_edit_stories?: boolean;
|
|
718
725
|
/** True if the administrator can delete stories posted by other users */
|
|
719
726
|
can_delete_stories?: boolean;
|
|
@@ -866,11 +873,11 @@ export type ApiMethods<F> = {
|
|
|
866
873
|
/** Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername) */
|
|
867
874
|
chat_id: number | string;
|
|
868
875
|
}): true;
|
|
869
|
-
/** Use this method to get up
|
|
876
|
+
/** Use this method to get up-to-date information about the chat. Returns a ChatFullInfo object on success. */
|
|
870
877
|
getChat(args: {
|
|
871
878
|
/** Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername) */
|
|
872
879
|
chat_id: number | string;
|
|
873
|
-
}):
|
|
880
|
+
}): ChatFullInfo;
|
|
874
881
|
/** Use this method to get a list of administrators in a chat, which aren't bots. Returns an Array of ChatMember objects. */
|
|
875
882
|
getChatAdministrators(args: {
|
|
876
883
|
/** Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername) */
|
|
@@ -1209,7 +1216,7 @@ export type ApiMethods<F> = {
|
|
|
1209
1216
|
protect_content?: boolean;
|
|
1210
1217
|
/** Description of the message to reply to */
|
|
1211
1218
|
reply_parameters?: ReplyParameters;
|
|
1212
|
-
/** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user.
|
|
1219
|
+
/** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user. */
|
|
1213
1220
|
reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
|
|
1214
1221
|
/** @deprecated Use `reply_parameters` instead. */
|
|
1215
1222
|
reply_to_message_id?: number;
|
|
@@ -1503,7 +1510,7 @@ export type ApiMethods<F> = {
|
|
|
1503
1510
|
protect_content?: boolean;
|
|
1504
1511
|
/** Description of the message to reply to */
|
|
1505
1512
|
reply_parameters?: ReplyParameters;
|
|
1506
|
-
/** An object for an inline keyboard. If empty, one 'Play game_title' button will be shown. If not empty, the first button must launch the game.
|
|
1513
|
+
/** An object for an inline keyboard. If empty, one 'Play game_title' button will be shown. If not empty, the first button must launch the game. */
|
|
1507
1514
|
reply_markup?: InlineKeyboardMarkup;
|
|
1508
1515
|
/** @deprecated Use `reply_parameters` instead. */
|
|
1509
1516
|
reply_to_message_id?: number;
|
package/package.json
CHANGED
package/update.d.ts
CHANGED
|
@@ -39,7 +39,7 @@ export interface Update {
|
|
|
39
39
|
edited_channel_post?: Message & Update.Edited & Update.Channel;
|
|
40
40
|
/** The bot was connected to or disconnected from a business account, or a user edited an existing connection with the bot */
|
|
41
41
|
business_connection?: BusinessConnection;
|
|
42
|
-
/** New
|
|
42
|
+
/** New message from a connected business account */
|
|
43
43
|
business_message?: Message & Update.Private;
|
|
44
44
|
/** New version of a message from a connected business account */
|
|
45
45
|
edited_business_message?: Message & Update.Edited & Update.Private;
|