@grammyjs/types 2.2.6 → 2.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bot-command-scope.d.ts +4 -4
- package/inline.d.ts +6 -6
- package/manage.d.ts +28 -8
- package/message.d.ts +65 -45
- package/package.json +1 -1
- package/passport.d.ts +1 -1
- package/proxied.d.ts +75 -35
- package/update.d.ts +3 -1
package/bot-command-scope.d.ts
CHANGED
|
@@ -22,12 +22,12 @@ The following algorithm is used to determine the list of commands for a particul
|
|
|
22
22
|
### Commands in group and supergroup chats
|
|
23
23
|
- botCommandScopeChatMember + language_code
|
|
24
24
|
- botCommandScopeChatMember
|
|
25
|
-
- botCommandScopeChatAdministrators + language_code (
|
|
26
|
-
- botCommandScopeChatAdministrators (
|
|
25
|
+
- botCommandScopeChatAdministrators + language_code (administrators only)
|
|
26
|
+
- botCommandScopeChatAdministrators (administrators only)
|
|
27
27
|
- botCommandScopeChat + language_code
|
|
28
28
|
- botCommandScopeChat
|
|
29
|
-
- botCommandScopeAllChatAdministrators + language_code (
|
|
30
|
-
- botCommandScopeAllChatAdministrators (
|
|
29
|
+
- botCommandScopeAllChatAdministrators + language_code (administrators only)
|
|
30
|
+
- botCommandScopeAllChatAdministrators (administrators only)
|
|
31
31
|
- botCommandScopeAllGroupChats + language_code
|
|
32
32
|
- botCommandScopeAllGroupChats
|
|
33
33
|
- botCommandScopeDefault + language_code
|
package/inline.d.ts
CHANGED
|
@@ -30,7 +30,7 @@ export namespace InlineKeyboardButton {
|
|
|
30
30
|
text: string;
|
|
31
31
|
}
|
|
32
32
|
export interface UrlButton extends AbstractInlineKeyboardButton {
|
|
33
|
-
/** HTTP or tg:// url to be opened when button is pressed */
|
|
33
|
+
/** HTTP or tg:// url to be opened when the button is pressed. Links tg://user?id=<user_id> can be used to mention a user by their ID without using a username, if this is allowed by their privacy settings. */
|
|
34
34
|
url: string;
|
|
35
35
|
}
|
|
36
36
|
export interface LoginButton extends AbstractInlineKeyboardButton {
|
|
@@ -63,7 +63,7 @@ export namespace InlineKeyboardButton {
|
|
|
63
63
|
export interface PayButton extends AbstractInlineKeyboardButton {
|
|
64
64
|
/** Specify True, to send a Pay button.
|
|
65
65
|
|
|
66
|
-
NOTE: This type of button must always be the first button in the first row. */
|
|
66
|
+
NOTE: This type of button must always be the first button in the first row and can only be used in invoice messages. */
|
|
67
67
|
pay: boolean;
|
|
68
68
|
}
|
|
69
69
|
}
|
|
@@ -209,7 +209,7 @@ export interface InlineQueryResultGif {
|
|
|
209
209
|
gif_width?: number;
|
|
210
210
|
/** Height of the GIF */
|
|
211
211
|
gif_height?: number;
|
|
212
|
-
/** Duration of the GIF */
|
|
212
|
+
/** Duration of the GIF in seconds */
|
|
213
213
|
gif_duration?: number;
|
|
214
214
|
/** URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result */
|
|
215
215
|
thumb_url: string;
|
|
@@ -239,7 +239,7 @@ export interface InlineQueryResultMpeg4Gif {
|
|
|
239
239
|
mpeg4_width?: number;
|
|
240
240
|
/** Video height */
|
|
241
241
|
mpeg4_height?: number;
|
|
242
|
-
/** Video duration */
|
|
242
|
+
/** Video duration in seconds */
|
|
243
243
|
mpeg4_duration?: number;
|
|
244
244
|
/** URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result */
|
|
245
245
|
thumb_url: string;
|
|
@@ -269,7 +269,7 @@ export interface InlineQueryResultVideo {
|
|
|
269
269
|
video_url: string;
|
|
270
270
|
/** Mime type of the content of video url, “text/html” or “video/mp4” */
|
|
271
271
|
mime_type: "text/html" | "video/mp4";
|
|
272
|
-
/** URL of the thumbnail (
|
|
272
|
+
/** URL of the thumbnail (JPEG only) for the video */
|
|
273
273
|
thumb_url: string;
|
|
274
274
|
/** Title for the result */
|
|
275
275
|
title: string;
|
|
@@ -371,7 +371,7 @@ export interface InlineQueryResultDocument {
|
|
|
371
371
|
reply_markup?: InlineKeyboardMarkup;
|
|
372
372
|
/** Content of the message to be sent instead of the file */
|
|
373
373
|
input_message_content?: InputMessageContent;
|
|
374
|
-
/** URL of the thumbnail (
|
|
374
|
+
/** URL of the thumbnail (JPEG only) for the file */
|
|
375
375
|
thumb_url?: string;
|
|
376
376
|
/** Thumbnail width */
|
|
377
377
|
thumb_width?: number;
|
package/manage.d.ts
CHANGED
|
@@ -86,9 +86,7 @@ export namespace Chat {
|
|
|
86
86
|
}
|
|
87
87
|
/** Internal type representing super group chats. */
|
|
88
88
|
export interface SupergroupChat
|
|
89
|
-
extends AbstractChat,
|
|
90
|
-
UserNameChat,
|
|
91
|
-
TitleChat {
|
|
89
|
+
extends AbstractChat, UserNameChat, TitleChat {
|
|
92
90
|
type: "supergroup";
|
|
93
91
|
}
|
|
94
92
|
/** Internal type representing channel chats. */
|
|
@@ -105,6 +103,8 @@ export namespace Chat {
|
|
|
105
103
|
pinned_message?: Message;
|
|
106
104
|
/** The time after which all messages sent to the chat will be automatically deleted; in seconds. Returned only in getChat. */
|
|
107
105
|
message_auto_delete_time?: number;
|
|
106
|
+
/** True, if messages from the chat can't be forwarded to other chats. Returned only in getChat. */
|
|
107
|
+
has_protected_content?: true;
|
|
108
108
|
}
|
|
109
109
|
/** Internal type holding properties that those group, supergroup, and channel chats returned from `getChat` share. */
|
|
110
110
|
interface NonPrivateGetChat extends GetChat {
|
|
@@ -131,15 +131,15 @@ export namespace Chat {
|
|
|
131
131
|
export interface PrivateGetChat extends PrivateChat, GetChat {
|
|
132
132
|
/** Bio of the other party in a private chat. Returned only in getChat. */
|
|
133
133
|
bio?: string;
|
|
134
|
+
/** 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. Returned only in getChat. */
|
|
135
|
+
has_private_forwards?: true;
|
|
134
136
|
}
|
|
135
137
|
/** Internal type representing group chats returned from `getChat`. */
|
|
136
138
|
export interface GroupGetChat extends GroupChat, MultiUserGetChat {}
|
|
137
139
|
/** Internal type representing supergroup chats returned from `getChat`. */
|
|
138
140
|
export interface SupergroupGetChat
|
|
139
|
-
extends SupergroupChat,
|
|
140
|
-
|
|
141
|
-
LargeGetChat {
|
|
142
|
-
/** For supergroups, the minimum allowed delay between consecutive messages sent by each unprivileged user. Returned only in getChat. */
|
|
141
|
+
extends SupergroupChat, MultiUserGetChat, LargeGetChat {
|
|
142
|
+
/** For supergroups, the minimum allowed delay between consecutive messages sent by each unpriviledged user; in seconds. Returned only in getChat. */
|
|
143
143
|
slow_mode_delay?: number;
|
|
144
144
|
/** For supergroups, name of group sticker set. Returned only in getChat. */
|
|
145
145
|
sticker_set_name?: string;
|
|
@@ -190,14 +190,20 @@ export interface ChatInviteLink {
|
|
|
190
190
|
invite_link: string;
|
|
191
191
|
/** Creator of the link */
|
|
192
192
|
creator: User;
|
|
193
|
+
/** True, if users joining the chat via the link need to be approved by chat administrators */
|
|
194
|
+
creates_join_request: boolean;
|
|
193
195
|
/** True, if the link is primary */
|
|
194
196
|
is_primary: boolean;
|
|
195
197
|
/** True, if the link is revoked */
|
|
196
198
|
is_revoked: boolean;
|
|
199
|
+
/** Invite link name */
|
|
200
|
+
name?: string;
|
|
197
201
|
/** Point in time (Unix timestamp) when the link will expire or has been expired */
|
|
198
202
|
expire_date?: number;
|
|
199
203
|
/** Maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999 */
|
|
200
204
|
member_limit?: number;
|
|
205
|
+
/** Number of pending join requests created using this link */
|
|
206
|
+
pending_join_request_count?: number;
|
|
201
207
|
}
|
|
202
208
|
|
|
203
209
|
/** This object contains information about one member of a chat. Currently, the following 6 types of chat members are supported:
|
|
@@ -331,6 +337,20 @@ export interface ChatMemberUpdated {
|
|
|
331
337
|
invite_link?: ChatInviteLink;
|
|
332
338
|
}
|
|
333
339
|
|
|
340
|
+
/** Represents a join request sent to a chat. */
|
|
341
|
+
export interface ChatJoinRequest {
|
|
342
|
+
/** Chat to which the request was sent */
|
|
343
|
+
chat: Chat;
|
|
344
|
+
/** User that sent the join request */
|
|
345
|
+
from: User;
|
|
346
|
+
/** Date the request was sent in Unix time */
|
|
347
|
+
date: number;
|
|
348
|
+
/** Bio of the user. */
|
|
349
|
+
bio?: string;
|
|
350
|
+
/** Chat invite link that was used by the user to send the join request */
|
|
351
|
+
invite_link?: ChatInviteLink;
|
|
352
|
+
}
|
|
353
|
+
|
|
334
354
|
/** Describes actions that a non-administrator user is allowed to take in a chat. */
|
|
335
355
|
export interface ChatPermissions {
|
|
336
356
|
/** True, if the user is allowed to send text messages, contacts, locations and venues */
|
|
@@ -373,7 +393,7 @@ export interface File {
|
|
|
373
393
|
file_id: string;
|
|
374
394
|
/** Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file. */
|
|
375
395
|
file_unique_id: string;
|
|
376
|
-
/** File size, if known */
|
|
396
|
+
/** File size in bytes, if known */
|
|
377
397
|
file_size?: number;
|
|
378
398
|
/** File path. Use https://api.telegram.org/file/bot<token>/<file_path> to get the file. */
|
|
379
399
|
file_path?: string;
|
package/message.d.ts
CHANGED
|
@@ -31,12 +31,16 @@ export namespace Message {
|
|
|
31
31
|
forward_sender_name?: string;
|
|
32
32
|
/** For forwarded messages, date the original message was sent in Unix time */
|
|
33
33
|
forward_date?: number;
|
|
34
|
+
/** True, if the message is a channel post that was automatically forwarded to the connected discussion group */
|
|
35
|
+
is_automatic_forward?: true;
|
|
34
36
|
/** For replies, the original message. Note that the Message object in this field will not contain further reply_to_message fields even if it itself is a reply. */
|
|
35
37
|
reply_to_message?: ReplyMessage;
|
|
36
38
|
/** Bot through which the message was sent */
|
|
37
39
|
via_bot?: User;
|
|
38
40
|
/** Date the message was last edited in Unix time */
|
|
39
41
|
edit_date?: number;
|
|
42
|
+
/** True, if the message can't be forwarded */
|
|
43
|
+
has_protected_content?: true;
|
|
40
44
|
/** Signature of the post author for messages in channels, or the custom title of an anonymous group administrator */
|
|
41
45
|
author_signature?: string;
|
|
42
46
|
/** Inline keyboard attached to the message. login_url buttons are represented as ordinary url buttons. */
|
|
@@ -68,43 +72,59 @@ export namespace Message {
|
|
|
68
72
|
export type PollMessage = CommonMessage & MsgWith<"poll">;
|
|
69
73
|
export type LocationMessage = CommonMessage & MsgWith<"location">;
|
|
70
74
|
export type VenueMessage = LocationMessage & MsgWith<"venue">;
|
|
71
|
-
export type NewChatMembersMessage =
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
+
export type NewChatMembersMessage =
|
|
76
|
+
& ServiceMessage
|
|
77
|
+
& MsgWith<"new_chat_members">;
|
|
78
|
+
export type LeftChatMemberMessage =
|
|
79
|
+
& ServiceMessage
|
|
80
|
+
& MsgWith<"left_chat_member">;
|
|
75
81
|
export type NewChatTitleMessage = ServiceMessage & MsgWith<"new_chat_title">;
|
|
76
82
|
export type NewChatPhotoMessage = ServiceMessage & MsgWith<"new_chat_photo">;
|
|
77
|
-
export type DeleteChatPhotoMessage =
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
MsgWith<"
|
|
83
|
-
export type
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
MsgWith<"
|
|
89
|
-
export type
|
|
90
|
-
|
|
83
|
+
export type DeleteChatPhotoMessage =
|
|
84
|
+
& ServiceMessage
|
|
85
|
+
& MsgWith<"delete_chat_photo">;
|
|
86
|
+
export type GroupChatCreatedMessage =
|
|
87
|
+
& ServiceMessage
|
|
88
|
+
& MsgWith<"group_chat_created">;
|
|
89
|
+
export type SupergroupChatCreated =
|
|
90
|
+
& ServiceMessage
|
|
91
|
+
& MsgWith<"supergroup_chat_created">;
|
|
92
|
+
export type ChannelChatCreatedMessage =
|
|
93
|
+
& ServiceMessage
|
|
94
|
+
& MsgWith<"channel_chat_created">;
|
|
95
|
+
export type MessageAutoDeleteTimerChangedMessage =
|
|
96
|
+
& ServiceMessage
|
|
97
|
+
& MsgWith<"message_auto_delete_timer_changed">;
|
|
98
|
+
export type MigrateToChatIdMessage =
|
|
99
|
+
& ServiceMessage
|
|
100
|
+
& MsgWith<"migrate_to_chat_id">;
|
|
101
|
+
export type MigrateFromChatIdMessage =
|
|
102
|
+
& ServiceMessage
|
|
103
|
+
& MsgWith<"migrate_from_chat_id">;
|
|
91
104
|
export type PinnedMessageMessage = ServiceMessage & MsgWith<"pinned_message">;
|
|
92
105
|
export type InvoiceMessage = ServiceMessage & MsgWith<"invoice">;
|
|
93
|
-
export type SuccessfulPaymentMessage =
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
106
|
+
export type SuccessfulPaymentMessage =
|
|
107
|
+
& ServiceMessage
|
|
108
|
+
& MsgWith<"successful_payment">;
|
|
109
|
+
export type ConnectedWebsiteMessage =
|
|
110
|
+
& ServiceMessage
|
|
111
|
+
& MsgWith<"connected_website">;
|
|
97
112
|
export type PassportDataMessage = ServiceMessage & MsgWith<"passport_data">;
|
|
98
|
-
export type ProximityAlertTriggeredMessage =
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
MsgWith<"
|
|
104
|
-
export type
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
113
|
+
export type ProximityAlertTriggeredMessage =
|
|
114
|
+
& ServiceMessage
|
|
115
|
+
& MsgWith<"proximity_alert_triggered">;
|
|
116
|
+
export type VoiceChatScheduledMessage =
|
|
117
|
+
& ServiceMessage
|
|
118
|
+
& MsgWith<"voice_chat_scheduled">;
|
|
119
|
+
export type VoiceChatStartedMessage =
|
|
120
|
+
& ServiceMessage
|
|
121
|
+
& MsgWith<"voice_chat_started">;
|
|
122
|
+
export type VoiceChatEndedMessage =
|
|
123
|
+
& ServiceMessage
|
|
124
|
+
& MsgWith<"voice_chat_ended">;
|
|
125
|
+
export type VoiceChatParticipantsInvitedMessage =
|
|
126
|
+
& ServiceMessage
|
|
127
|
+
& MsgWith<"voice_chat_participants_invited">;
|
|
108
128
|
}
|
|
109
129
|
|
|
110
130
|
type ReplyMessage = Message & { reply_to_message: undefined };
|
|
@@ -203,8 +223,8 @@ Message entities can be nested, providing following restrictions are met:
|
|
|
203
223
|
|
|
204
224
|
Links `tg://user?id=<user_id>` can be used to mention a user by their ID without using a username. Please note:
|
|
205
225
|
|
|
206
|
-
- These links will work only if they are used inside an inline link. For example, they will not work, when used in
|
|
207
|
-
- These mentions are only guaranteed to work if the user has contacted the bot in the past, has sent a callback query to the bot via inline button or is a member in the group where he was mentioned.
|
|
226
|
+
- These links will work only if they are used inside an inline link or in an inline keyboard button. For example, they will not work, when used in a message text.
|
|
227
|
+
- These mentions are only guaranteed to work if the user has contacted the bot in the past, has sent a callback query to the bot via an inline button or is a member in the group where he was mentioned.
|
|
208
228
|
|
|
209
229
|
#### MarkdownV2 style
|
|
210
230
|
To use this mode, pass *MarkdownV2* in the *parse_mode* field. Use the following syntax in your message:
|
|
@@ -339,7 +359,7 @@ export interface PhotoSize {
|
|
|
339
359
|
width: number;
|
|
340
360
|
/** Photo height */
|
|
341
361
|
height: number;
|
|
342
|
-
/** File size */
|
|
362
|
+
/** File size in bytes */
|
|
343
363
|
file_size?: number;
|
|
344
364
|
}
|
|
345
365
|
|
|
@@ -361,7 +381,7 @@ export interface Animation {
|
|
|
361
381
|
file_name?: string;
|
|
362
382
|
/** MIME type of the file as defined by sender */
|
|
363
383
|
mime_type?: string;
|
|
364
|
-
/** File size */
|
|
384
|
+
/** File size in bytes */
|
|
365
385
|
file_size?: number;
|
|
366
386
|
}
|
|
367
387
|
|
|
@@ -381,7 +401,7 @@ export interface Audio {
|
|
|
381
401
|
file_name?: string;
|
|
382
402
|
/** MIME type of the file as defined by sender */
|
|
383
403
|
mime_type?: string;
|
|
384
|
-
/** File size */
|
|
404
|
+
/** File size in bytes */
|
|
385
405
|
file_size?: number;
|
|
386
406
|
/** Thumbnail of the album cover to which the music file belongs */
|
|
387
407
|
thumb?: PhotoSize;
|
|
@@ -399,7 +419,7 @@ export interface Document {
|
|
|
399
419
|
file_name?: string;
|
|
400
420
|
/** MIME type of the file as defined by sender */
|
|
401
421
|
mime_type?: string;
|
|
402
|
-
/** File size */
|
|
422
|
+
/** File size in bytes */
|
|
403
423
|
file_size?: number;
|
|
404
424
|
}
|
|
405
425
|
|
|
@@ -421,7 +441,7 @@ export interface Video {
|
|
|
421
441
|
file_name?: string;
|
|
422
442
|
/** Mime type of a file as defined by sender */
|
|
423
443
|
mime_type?: string;
|
|
424
|
-
/** File size */
|
|
444
|
+
/** File size in bytes */
|
|
425
445
|
file_size?: number;
|
|
426
446
|
}
|
|
427
447
|
|
|
@@ -437,7 +457,7 @@ export interface VideoNote {
|
|
|
437
457
|
duration: number;
|
|
438
458
|
/** Video thumbnail */
|
|
439
459
|
thumb?: PhotoSize;
|
|
440
|
-
/** File size */
|
|
460
|
+
/** File size in bytes */
|
|
441
461
|
file_size?: number;
|
|
442
462
|
}
|
|
443
463
|
|
|
@@ -451,7 +471,7 @@ export interface Voice {
|
|
|
451
471
|
duration: number;
|
|
452
472
|
/** MIME type of the file as defined by sender */
|
|
453
473
|
mime_type?: string;
|
|
454
|
-
/** File size */
|
|
474
|
+
/** File size in bytes */
|
|
455
475
|
file_size?: number;
|
|
456
476
|
}
|
|
457
477
|
|
|
@@ -533,7 +553,7 @@ export interface Location {
|
|
|
533
553
|
latitude: number;
|
|
534
554
|
/** The radius of uncertainty for the location, measured in meters; 0-1500 */
|
|
535
555
|
horizontal_accuracy?: number;
|
|
536
|
-
/** Time relative to the message sending date, during which the location can be updated
|
|
556
|
+
/** Time relative to the message sending date, during which the location can be updated; in seconds. For active live locations only. */
|
|
537
557
|
live_period?: number;
|
|
538
558
|
/** The direction in which user is moving, in degrees; 1-360. For active live locations only. */
|
|
539
559
|
heading?: number;
|
|
@@ -571,7 +591,7 @@ export interface ProximityAlertTriggered {
|
|
|
571
591
|
|
|
572
592
|
/** This object represents a service message about a change in auto-delete timer settings. */
|
|
573
593
|
export interface MessageAutoDeleteTimerChanged {
|
|
574
|
-
/** New auto-delete time for messages in the chat */
|
|
594
|
+
/** New auto-delete time for messages in the chat; in seconds */
|
|
575
595
|
message_auto_delete_time: number;
|
|
576
596
|
}
|
|
577
597
|
|
|
@@ -586,7 +606,7 @@ export interface VoiceChatStarted {}
|
|
|
586
606
|
|
|
587
607
|
/** This object represents a service message about a voice chat ended in the chat. */
|
|
588
608
|
export interface VoiceChatEnded {
|
|
589
|
-
/** Voice chat duration
|
|
609
|
+
/** Voice chat duration in seconds */
|
|
590
610
|
duration: number;
|
|
591
611
|
}
|
|
592
612
|
|
|
@@ -616,7 +636,7 @@ export interface Sticker {
|
|
|
616
636
|
set_name?: string;
|
|
617
637
|
/** For mask stickers, the position where the mask should be placed */
|
|
618
638
|
mask_position?: MaskPosition;
|
|
619
|
-
/** File size */
|
|
639
|
+
/** File size in bytes */
|
|
620
640
|
file_size?: number;
|
|
621
641
|
}
|
|
622
642
|
|
package/package.json
CHANGED
package/passport.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ export interface PassportFile {
|
|
|
12
12
|
file_id: string;
|
|
13
13
|
/** Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file. */
|
|
14
14
|
file_unique_id: string;
|
|
15
|
-
/** File size */
|
|
15
|
+
/** File size in bytes */
|
|
16
16
|
file_size: number;
|
|
17
17
|
/** Unix time when the file was uploaded */
|
|
18
18
|
file_date: number;
|
package/proxied.d.ts
CHANGED
|
@@ -42,8 +42,7 @@ export interface InputFileProxy<F> {
|
|
|
42
42
|
[M in keyof InputFileProxy<F>["Telegram"]]: Params<
|
|
43
43
|
M,
|
|
44
44
|
F
|
|
45
|
-
>[0] extends undefined
|
|
46
|
-
? {}
|
|
45
|
+
>[0] extends undefined ? {}
|
|
47
46
|
: NonNullable<Params<M, F>[0]>;
|
|
48
47
|
};
|
|
49
48
|
|
|
@@ -102,7 +101,7 @@ export interface InputFileProxy<F> {
|
|
|
102
101
|
/** Use this method to get current webhook status. Requires no parameters. On success, returns a WebhookInfo object. If the bot is using getUpdates, will return an object with the url field empty. */
|
|
103
102
|
getWebhookInfo(): WebhookInfo;
|
|
104
103
|
|
|
105
|
-
/** A simple method for testing your bot's
|
|
104
|
+
/** A simple method for testing your bot's authentication token. Requires no parameters. Returns basic information about the bot in form of a User object. */
|
|
106
105
|
getMe(): UserFromGetMe;
|
|
107
106
|
|
|
108
107
|
/** Use this method to log out from the cloud Bot API server before launching the bot locally. You must log out the bot before running it locally, otherwise there is no guarantee that the bot will receive updates. After a successful call, you can immediately log in on a local server, but will not be able to log in back to the cloud Bot API server for 10 minutes. Returns True on success. Requires no parameters. */
|
|
@@ -119,7 +118,7 @@ export interface InputFileProxy<F> {
|
|
|
119
118
|
text: string;
|
|
120
119
|
/** Mode for parsing entities in the message text. See formatting options for more details. */
|
|
121
120
|
parse_mode?: ParseMode;
|
|
122
|
-
/**
|
|
121
|
+
/** A list of special entities that appear in message text, which can be specified instead of parse_mode */
|
|
123
122
|
entities?: MessageEntity[];
|
|
124
123
|
/** Boolean Disables link previews for links in this message */
|
|
125
124
|
disable_web_page_preview?: boolean;
|
|
@@ -161,7 +160,7 @@ export interface InputFileProxy<F> {
|
|
|
161
160
|
caption?: string;
|
|
162
161
|
/** Mode for parsing entities in the new caption. See formatting options for more details. */
|
|
163
162
|
parse_mode?: string;
|
|
164
|
-
/**
|
|
163
|
+
/** A list of special entities that appear in the new caption, which can be specified instead of parse_mode */
|
|
165
164
|
caption_entities?: MessageEntity[];
|
|
166
165
|
/** Sends the message silently. Users will receive a notification with no sound. */
|
|
167
166
|
disable_notification?: boolean;
|
|
@@ -187,7 +186,7 @@ export interface InputFileProxy<F> {
|
|
|
187
186
|
caption?: string;
|
|
188
187
|
/** Mode for parsing entities in the photo caption. See formatting options for more details. */
|
|
189
188
|
parse_mode?: ParseMode;
|
|
190
|
-
/**
|
|
189
|
+
/** A list of special entities that appear in the caption, which can be specified instead of parse_mode */
|
|
191
190
|
caption_entities?: MessageEntity[];
|
|
192
191
|
/** Sends the message silently. Users will receive a notification with no sound. */
|
|
193
192
|
disable_notification?: boolean;
|
|
@@ -215,7 +214,7 @@ export interface InputFileProxy<F> {
|
|
|
215
214
|
caption?: string;
|
|
216
215
|
/** Mode for parsing entities in the audio caption. See formatting options for more details. */
|
|
217
216
|
parse_mode?: ParseMode;
|
|
218
|
-
/**
|
|
217
|
+
/** A list of special entities that appear in the caption, which can be specified instead of parse_mode */
|
|
219
218
|
caption_entities?: MessageEntity[];
|
|
220
219
|
/** Duration of the audio in seconds */
|
|
221
220
|
duration?: number;
|
|
@@ -251,7 +250,7 @@ export interface InputFileProxy<F> {
|
|
|
251
250
|
caption?: string;
|
|
252
251
|
/** Mode for parsing entities in the document caption. See formatting options for more details. */
|
|
253
252
|
parse_mode?: ParseMode;
|
|
254
|
-
/**
|
|
253
|
+
/** A list of special entities that appear in the caption, which can be specified instead of parse_mode */
|
|
255
254
|
caption_entities?: MessageEntity[];
|
|
256
255
|
/** Disables automatic server-side content type detection for files uploaded using multipart/form-data. Always true, if the document is sent as part of an album. */
|
|
257
256
|
disable_content_type_detection?: boolean;
|
|
@@ -287,7 +286,7 @@ export interface InputFileProxy<F> {
|
|
|
287
286
|
caption?: string;
|
|
288
287
|
/** Mode for parsing entities in the video caption. See formatting options for more details. */
|
|
289
288
|
parse_mode?: ParseMode;
|
|
290
|
-
/**
|
|
289
|
+
/** A list of special entities that appear in the caption, which can be specified instead of parse_mode */
|
|
291
290
|
caption_entities?: MessageEntity[];
|
|
292
291
|
/** Pass True, if the uploaded video is suitable for streaming */
|
|
293
292
|
supports_streaming?: boolean;
|
|
@@ -323,7 +322,7 @@ export interface InputFileProxy<F> {
|
|
|
323
322
|
caption?: string;
|
|
324
323
|
/** Mode for parsing entities in the animation caption. See formatting options for more details. */
|
|
325
324
|
parse_mode?: ParseMode;
|
|
326
|
-
/**
|
|
325
|
+
/** A list of special entities that appear in the caption, which can be specified instead of parse_mode */
|
|
327
326
|
caption_entities?: MessageEntity[];
|
|
328
327
|
/** Sends the message silently. Users will receive a notification with no sound. */
|
|
329
328
|
disable_notification?: boolean;
|
|
@@ -349,7 +348,7 @@ export interface InputFileProxy<F> {
|
|
|
349
348
|
caption?: string;
|
|
350
349
|
/** Mode for parsing entities in the voice message caption. See formatting options for more details. */
|
|
351
350
|
parse_mode?: ParseMode;
|
|
352
|
-
/**
|
|
351
|
+
/** A list of special entities that appear in the caption, which can be specified instead of parse_mode */
|
|
353
352
|
caption_entities?: MessageEntity[];
|
|
354
353
|
/** Duration of the voice message in seconds */
|
|
355
354
|
duration?: number;
|
|
@@ -562,7 +561,7 @@ export interface InputFileProxy<F> {
|
|
|
562
561
|
explanation?: string;
|
|
563
562
|
/** Mode for parsing entities in the explanation. See formatting options for more details. */
|
|
564
563
|
explanation_parse_mode?: ParseMode;
|
|
565
|
-
/**
|
|
564
|
+
/** A list of special entities that appear in the poll explanation, which can be specified instead of parse_mode */
|
|
566
565
|
explanation_entities?: MessageEntity[];
|
|
567
566
|
/** Amount of time in seconds the poll will be active after creation, 5-600. Can't be used together with close_date. */
|
|
568
567
|
open_period?: number;
|
|
@@ -612,7 +611,7 @@ export interface InputFileProxy<F> {
|
|
|
612
611
|
sendChatAction(args: {
|
|
613
612
|
/** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
|
|
614
613
|
chat_id: number | string;
|
|
615
|
-
/** Type of action to broadcast. Choose one, depending on what the user is about to receive: typing for text messages, upload_photo for photos, record_video or upload_video for videos, record_voice or upload_voice for voice notes, upload_document for general files, find_location for location data, record_video_note or upload_video_note for video notes. */
|
|
614
|
+
/** Type of action to broadcast. Choose one, depending on what the user is about to receive: typing for text messages, upload_photo for photos, record_video or upload_video for videos, record_voice or upload_voice for voice notes, upload_document for general files, choose_sticker for stickers, find_location for location data, record_video_note or upload_video_note for video notes. */
|
|
616
615
|
action:
|
|
617
616
|
| "typing"
|
|
618
617
|
| "upload_photo"
|
|
@@ -621,6 +620,7 @@ export interface InputFileProxy<F> {
|
|
|
621
620
|
| "record_voice"
|
|
622
621
|
| "upload_voice"
|
|
623
622
|
| "upload_document"
|
|
623
|
+
| "choose_sticker"
|
|
624
624
|
| "find_location"
|
|
625
625
|
| "record_video_note"
|
|
626
626
|
| "upload_video_note";
|
|
@@ -644,11 +644,11 @@ export interface InputFileProxy<F> {
|
|
|
644
644
|
file_id: string;
|
|
645
645
|
}): File;
|
|
646
646
|
|
|
647
|
-
/** Use this method to ban a user in a group, a supergroup or a channel. In the case of supergroups and channels, the user will not be able to return to the chat on their own using invite links, etc., unless unbanned first. The bot must be an administrator in the chat for this to work and must have the appropriate
|
|
647
|
+
/** Use this method to ban a user in a group, a supergroup or a channel. In the case of supergroups and channels, the user will not be able to return to the chat on their own using invite links, etc., unless unbanned first. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns True on success.
|
|
648
648
|
* @deprecated Use `banChatMember` instead. */
|
|
649
649
|
kickChatMember: InputFileProxy<F>["Telegram"]["banChatMember"];
|
|
650
650
|
|
|
651
|
-
/** Use this method to ban a user in a group, a supergroup or a channel. In the case of supergroups and channels, the user will not be able to return to the chat on their own using invite links, etc., unless unbanned first. The bot must be an administrator in the chat for this to work and must have the appropriate
|
|
651
|
+
/** Use this method to ban a user in a group, a supergroup or a channel. In the case of supergroups and channels, the user will not be able to return to the chat on their own using invite links, etc., unless unbanned first. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns True on success. */
|
|
652
652
|
banChatMember(args: {
|
|
653
653
|
/** Unique identifier for the target group or username of the target supergroup or channel (in the format @channelusername) */
|
|
654
654
|
chat_id: number | string;
|
|
@@ -670,7 +670,7 @@ export interface InputFileProxy<F> {
|
|
|
670
670
|
only_if_banned?: boolean;
|
|
671
671
|
}): true;
|
|
672
672
|
|
|
673
|
-
/** Use this method to restrict a user in a supergroup. The bot must be an administrator in the supergroup for this to work and must have the appropriate
|
|
673
|
+
/** Use this method to restrict a user in a supergroup. The bot must be an administrator in the supergroup for this to work and must have the appropriate administrator rights. Pass True for all permissions to lift restrictions from a user. Returns True on success. */
|
|
674
674
|
restrictChatMember(args: {
|
|
675
675
|
/** Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername) */
|
|
676
676
|
chat_id: number | string;
|
|
@@ -682,7 +682,7 @@ export interface InputFileProxy<F> {
|
|
|
682
682
|
until_date?: number;
|
|
683
683
|
}): true;
|
|
684
684
|
|
|
685
|
-
/** Use this method to promote or demote a user in a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate
|
|
685
|
+
/** Use this method to promote or demote a user in a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Pass False for all boolean parameters to demote a user. Returns True on success. */
|
|
686
686
|
promoteChatMember(args: {
|
|
687
687
|
/** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
|
|
688
688
|
chat_id: number | string;
|
|
@@ -722,15 +722,31 @@ export interface InputFileProxy<F> {
|
|
|
722
722
|
custom_title: string;
|
|
723
723
|
}): true;
|
|
724
724
|
|
|
725
|
-
/** Use this method to
|
|
725
|
+
/** Use this method to ban a channel chat in a supergroup or a channel. The owner of the chat will not be able to send messages and join live streams on behalf of the chat, unless it is unbanned first. The bot must be an administrator in the supergroup or channel for this to work and must have the appropriate administrator rights. Returns True on success. */
|
|
726
|
+
banChatSenderChat(args: {
|
|
727
|
+
/** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
|
|
728
|
+
chat_id: number | string;
|
|
729
|
+
/** Unique identifier of the target sender chat */
|
|
730
|
+
sender_chat_id: number;
|
|
731
|
+
}): true;
|
|
732
|
+
|
|
733
|
+
/** Use this method to unban a previously banned channel chat in a supergroup or channel. The bot must be an administrator for this to work and must have the appropriate administrator rights. Returns True on success. */
|
|
734
|
+
unbanChatSenderChat(args: {
|
|
735
|
+
/** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
|
|
736
|
+
chat_id: number | string;
|
|
737
|
+
/** Unique identifier of the target sender chat */
|
|
738
|
+
sender_chat_id: number;
|
|
739
|
+
}): true;
|
|
740
|
+
|
|
741
|
+
/** Use this method to set default chat permissions for all members. The bot must be an administrator in the group or a supergroup for this to work and must have the can_restrict_members administrator rights. Returns True on success. */
|
|
726
742
|
setChatPermissions(args: {
|
|
727
743
|
/** Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername) */
|
|
728
744
|
chat_id: number | string;
|
|
729
|
-
/**
|
|
745
|
+
/** An object for new default chat permissions */
|
|
730
746
|
permissions: ChatPermissions;
|
|
731
747
|
}): true;
|
|
732
748
|
|
|
733
|
-
/** Use this method to generate a new primary invite link for a chat; any previously generated primary link is revoked. The bot must be an administrator in the chat for this to work and must have the appropriate
|
|
749
|
+
/** Use this method to generate a new primary invite link for a chat; any previously generated primary link is revoked. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the new invite link as String on success.
|
|
734
750
|
|
|
735
751
|
Note: Each administrator in a chat generates their own invite links. Bots can't use invite links generated by other administrators. If you want your bot to work with invite links, it will need to generate its own link using exportChatInviteLink or by calling the getChat method. If your bot needs to generate a new primary invite link replacing its previous one, use exportChatInviteLink again. */
|
|
736
752
|
exportChatInviteLink(args: {
|
|
@@ -738,29 +754,37 @@ export interface InputFileProxy<F> {
|
|
|
738
754
|
chat_id: number | string;
|
|
739
755
|
}): string;
|
|
740
756
|
|
|
741
|
-
/** Use this method to create an additional invite link for a chat. The bot must be an administrator in the chat for this to work and must have the appropriate
|
|
757
|
+
/** Use this method to create an additional invite link for a chat. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. The link can be revoked using the method revokeChatInviteLink. Returns the new invite link as ChatInviteLink object. */
|
|
742
758
|
createChatInviteLink(args: {
|
|
743
759
|
/** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
|
|
744
760
|
chat_id: number | string;
|
|
761
|
+
/** Invite link name; 0-32 characters */
|
|
762
|
+
name?: string;
|
|
745
763
|
/** Point in time (Unix timestamp) when the link will expire */
|
|
746
764
|
expire_date?: number;
|
|
747
765
|
/** Maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999 */
|
|
748
766
|
member_limit?: number;
|
|
767
|
+
/** True, if users joining the chat via the link need to be approved by chat administrators. If True, member_limit can't be specified */
|
|
768
|
+
creates_join_request?: boolean;
|
|
749
769
|
}): ChatInviteLink;
|
|
750
770
|
|
|
751
|
-
/** Use this method to edit a non-primary invite link created by the bot. The bot must be an administrator in the chat for this to work and must have the appropriate
|
|
771
|
+
/** Use this method to edit a non-primary invite link created by the bot. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the edited invite link as a ChatInviteLink object. */
|
|
752
772
|
editChatInviteLink(args: {
|
|
753
773
|
/** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
|
|
754
774
|
chat_id: number | string;
|
|
755
775
|
/** The invite link to edit */
|
|
756
776
|
invite_link: string;
|
|
777
|
+
/** Invite link name; 0-32 characters */
|
|
778
|
+
name?: string;
|
|
757
779
|
/** Point in time (Unix timestamp) when the link will expire */
|
|
758
780
|
expire_date?: number;
|
|
759
781
|
/** Maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999 */
|
|
760
782
|
member_limit?: number;
|
|
783
|
+
/** True, if users joining the chat via the link need to be approved by chat administrators. If True, member_limit can't be specified */
|
|
784
|
+
creates_join_request?: boolean;
|
|
761
785
|
}): ChatInviteLink;
|
|
762
786
|
|
|
763
|
-
/** Use this method to revoke an invite link created by the bot. If the primary link is revoked, a new link is automatically generated. The bot must be an administrator in the chat for this to work and must have the appropriate
|
|
787
|
+
/** Use this method to revoke an invite link created by the bot. If the primary link is revoked, a new link is automatically generated. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the revoked invite link as ChatInviteLink object. */
|
|
764
788
|
revokeChatInviteLink(args: {
|
|
765
789
|
/** Unique identifier of the target chat or username of the target channel (in the format @channelusername) */
|
|
766
790
|
chat_id: number | string;
|
|
@@ -768,7 +792,23 @@ export interface InputFileProxy<F> {
|
|
|
768
792
|
invite_link: string;
|
|
769
793
|
}): ChatInviteLink;
|
|
770
794
|
|
|
771
|
-
/** Use this method to
|
|
795
|
+
/** Use this method to approve a chat join request. The bot must be an administrator in the chat for this to work and must have the can_invite_users administrator right. Returns True on success. */
|
|
796
|
+
approveChatJoinRequest(args: {
|
|
797
|
+
/** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
|
|
798
|
+
chat_id: number | string;
|
|
799
|
+
/** Unique identifier of the target user */
|
|
800
|
+
user_id: number;
|
|
801
|
+
}): true;
|
|
802
|
+
|
|
803
|
+
/** Use this method to decline a chat join request. The bot must be an administrator in the chat for this to work and must have the can_invite_users administrator right. Returns True on success. */
|
|
804
|
+
declineChatJoinRequest(args: {
|
|
805
|
+
/** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
|
|
806
|
+
chat_id: number | string;
|
|
807
|
+
/** Unique identifier of the target user */
|
|
808
|
+
user_id: number;
|
|
809
|
+
}): true;
|
|
810
|
+
|
|
811
|
+
/** Use this method to set a new profile photo for the chat. Photos can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns True on success. */
|
|
772
812
|
setChatPhoto(args: {
|
|
773
813
|
/** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
|
|
774
814
|
chat_id: number | string;
|
|
@@ -776,13 +816,13 @@ export interface InputFileProxy<F> {
|
|
|
776
816
|
photo: F;
|
|
777
817
|
}): true;
|
|
778
818
|
|
|
779
|
-
/** Use this method to delete a chat photo. Photos can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate
|
|
819
|
+
/** Use this method to delete a chat photo. Photos can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns True on success. */
|
|
780
820
|
deleteChatPhoto(args: {
|
|
781
821
|
/** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
|
|
782
822
|
chat_id: number | string;
|
|
783
823
|
}): true;
|
|
784
824
|
|
|
785
|
-
/** Use this method to change the title of a chat. Titles can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate
|
|
825
|
+
/** Use this method to change the title of a chat. Titles can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns True on success. */
|
|
786
826
|
setChatTitle(args: {
|
|
787
827
|
/** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
|
|
788
828
|
chat_id: number | string;
|
|
@@ -790,7 +830,7 @@ export interface InputFileProxy<F> {
|
|
|
790
830
|
title: string;
|
|
791
831
|
}): true;
|
|
792
832
|
|
|
793
|
-
/** Use this method to change the description of a group, a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate
|
|
833
|
+
/** Use this method to change the description of a group, a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns True on success. */
|
|
794
834
|
setChatDescription(args: {
|
|
795
835
|
/** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
|
|
796
836
|
chat_id: number | string;
|
|
@@ -858,7 +898,7 @@ export interface InputFileProxy<F> {
|
|
|
858
898
|
user_id: number;
|
|
859
899
|
}): ChatMember;
|
|
860
900
|
|
|
861
|
-
/** Use this method to set a new group sticker set for a supergroup. The bot must be an administrator in the chat for this to work and must have the appropriate
|
|
901
|
+
/** Use this method to set a new group sticker set for a supergroup. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Use the field can_set_sticker_set ly returned in getChat requests to check if the bot can use this method. Returns True on success. */
|
|
862
902
|
setChatStickerSet(args: {
|
|
863
903
|
/** Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername) */
|
|
864
904
|
chat_id: number | string;
|
|
@@ -866,7 +906,7 @@ export interface InputFileProxy<F> {
|
|
|
866
906
|
sticker_set_name: string;
|
|
867
907
|
}): true;
|
|
868
908
|
|
|
869
|
-
/** Use this method to delete a group sticker set from a supergroup. The bot must be an administrator in the chat for this to work and must have the appropriate
|
|
909
|
+
/** Use this method to delete a group sticker set from a supergroup. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Use the field can_set_sticker_set ly returned in getChat requests to check if the bot can use this method. Returns True on success. */
|
|
870
910
|
deleteChatStickerSet(args: {
|
|
871
911
|
/** Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername) */
|
|
872
912
|
chat_id: number | string;
|
|
@@ -880,7 +920,7 @@ export interface InputFileProxy<F> {
|
|
|
880
920
|
callback_query_id: string;
|
|
881
921
|
/** Text of the notification. If not specified, nothing will be shown to the user, 0-200 characters */
|
|
882
922
|
text?: string;
|
|
883
|
-
/** If
|
|
923
|
+
/** If True, an alert will be shown by the client instead of a notification at the top of the chat screen. Defaults to false. */
|
|
884
924
|
show_alert?: boolean;
|
|
885
925
|
/** URL that will be opened by the user's client. If you have created a Game and accepted the conditions via @Botfather, specify the URL that opens your game — note that this will only work if the query comes from a callback_game button.
|
|
886
926
|
|
|
@@ -928,7 +968,7 @@ export interface InputFileProxy<F> {
|
|
|
928
968
|
text: string;
|
|
929
969
|
/** Mode for parsing entities in the message text. See formatting options for more details. */
|
|
930
970
|
parse_mode?: ParseMode;
|
|
931
|
-
/**
|
|
971
|
+
/** A list of special entities that appear in message text, which can be specified instead of parse_mode */
|
|
932
972
|
entities?: MessageEntity[];
|
|
933
973
|
/** Disables link previews for links in this message */
|
|
934
974
|
disable_web_page_preview?: boolean;
|
|
@@ -948,7 +988,7 @@ export interface InputFileProxy<F> {
|
|
|
948
988
|
caption?: string;
|
|
949
989
|
/** Mode for parsing entities in the message caption. See formatting options for more details. */
|
|
950
990
|
parse_mode?: ParseMode;
|
|
951
|
-
/**
|
|
991
|
+
/** A list of special entities that appear in the caption, which can be specified instead of parse_mode */
|
|
952
992
|
caption_entities?: MessageEntity[];
|
|
953
993
|
/** An object for an inline keyboard. */
|
|
954
994
|
reply_markup?: InlineKeyboardMarkup;
|
|
@@ -1109,7 +1149,7 @@ export interface InputFileProxy<F> {
|
|
|
1109
1149
|
/** Use this method to send answers to an inline query. On success, True is returned.
|
|
1110
1150
|
No more than 50 results per query are allowed.
|
|
1111
1151
|
|
|
1112
|
-
Example: An inline bot that sends YouTube videos can ask the user to connect the bot to their YouTube account to adapt search results accordingly. To do this, it displays a 'Connect your YouTube account' button above the results, or even before showing any. The user presses the button, switches to a private chat with the bot and, in doing so, passes a start parameter that instructs the bot to return an
|
|
1152
|
+
Example: An inline bot that sends YouTube videos can ask the user to connect the bot to their YouTube account to adapt search results accordingly. To do this, it displays a 'Connect your YouTube account' button above the results, or even before showing any. The user presses the button, switches to a private chat with the bot and, in doing so, passes a start parameter that instructs the bot to return an OAuth link. Once done, the bot can offer a switch_inline button so that the user can easily return to the chat where they wanted to use the bot's inline capabilities. */
|
|
1113
1153
|
answerInlineQuery(args: {
|
|
1114
1154
|
/** Unique identifier for the answered query */
|
|
1115
1155
|
inline_query_id: string;
|
|
@@ -1309,7 +1349,7 @@ export interface InputFileProxy<F> {
|
|
|
1309
1349
|
width?: number;
|
|
1310
1350
|
/** Video height */
|
|
1311
1351
|
height?: number;
|
|
1312
|
-
/** Video duration */
|
|
1352
|
+
/** Video duration in seconds */
|
|
1313
1353
|
duration?: number;
|
|
1314
1354
|
/** Pass True, if the uploaded video is suitable for streaming */
|
|
1315
1355
|
supports_streaming?: boolean;
|
|
@@ -1333,7 +1373,7 @@ export interface InputFileProxy<F> {
|
|
|
1333
1373
|
width?: number;
|
|
1334
1374
|
/** Animation height */
|
|
1335
1375
|
height?: number;
|
|
1336
|
-
/** Animation duration */
|
|
1376
|
+
/** Animation duration in seconds */
|
|
1337
1377
|
duration?: number;
|
|
1338
1378
|
};
|
|
1339
1379
|
|
package/update.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CallbackQuery } from "./callback";
|
|
2
2
|
import { ChosenInlineResult, InlineQuery } from "./inline";
|
|
3
|
-
import { Chat, ChatMemberUpdated, User } from "./manage";
|
|
3
|
+
import { Chat, ChatJoinRequest, ChatMemberUpdated, User } from "./manage";
|
|
4
4
|
import { Message, Poll, PollAnswer } from "./message";
|
|
5
5
|
import { PreCheckoutQuery, ShippingQuery } from "./payment";
|
|
6
6
|
|
|
@@ -66,4 +66,6 @@ export interface Update {
|
|
|
66
66
|
my_chat_member?: ChatMemberUpdated;
|
|
67
67
|
/** A chat member's status was updated in a chat. The bot must be an administrator in the chat and must explicitly specify “chat_member” in the list of allowed_updates to receive these updates. */
|
|
68
68
|
chat_member?: ChatMemberUpdated;
|
|
69
|
+
/** A request to join the chat has been sent. The bot must have the can_invite_users administrator right in the chat to receive these updates. */
|
|
70
|
+
chat_join_request?: ChatJoinRequest;
|
|
69
71
|
}
|