@grammyjs/types 2.12.1 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -2
- package/api.d.ts +10 -13
- package/inline.d.ts +532 -586
- package/manage.d.ts +375 -423
- package/markup.d.ts +159 -189
- package/message.d.ts +535 -633
- package/methods.d.ts +1531 -0
- package/mod.d.ts +10 -0
- package/package.json +15 -5
- package/passport.d.ts +113 -182
- package/payment.d.ts +77 -85
- package/{menu-button.d.ts → settings.d.ts} +45 -57
- package/update.d.ts +50 -52
- package/.editorconfig +0 -8
- package/deno.jsonc +0 -1
- package/index.d.ts +0 -10
- package/proxied.d.ts +0 -1702
- /package/{index.js → mod.js} +0 -0
package/message.d.ts
CHANGED
|
@@ -1,273 +1,222 @@
|
|
|
1
|
-
import { InlineKeyboardMarkup } from "./markup";
|
|
2
|
-
import { Chat, File, User } from "./manage";
|
|
3
|
-
import { PassportData } from "./passport";
|
|
4
|
-
import { Invoice, SuccessfulPayment } from "./payment";
|
|
5
|
-
|
|
1
|
+
import type { InlineKeyboardMarkup } from "./markup.js";
|
|
2
|
+
import type { Chat, File, User } from "./manage.js";
|
|
3
|
+
import type { PassportData } from "./passport.js";
|
|
4
|
+
import type { Invoice, SuccessfulPayment } from "./payment.js";
|
|
6
5
|
type MsgWith<P extends keyof Message> = Record<P, NonNullable<Message[P]>>;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
&
|
|
83
|
-
& MsgWith<"
|
|
84
|
-
|
|
85
|
-
&
|
|
86
|
-
& MsgWith<"
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
&
|
|
91
|
-
& MsgWith<"
|
|
92
|
-
|
|
93
|
-
&
|
|
94
|
-
& MsgWith<"
|
|
95
|
-
|
|
96
|
-
&
|
|
97
|
-
& MsgWith<"
|
|
98
|
-
|
|
99
|
-
&
|
|
100
|
-
& MsgWith<"
|
|
101
|
-
|
|
102
|
-
&
|
|
103
|
-
& MsgWith<"
|
|
104
|
-
|
|
105
|
-
&
|
|
106
|
-
& MsgWith<"
|
|
107
|
-
|
|
108
|
-
&
|
|
109
|
-
& MsgWith<"
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
export type UserSharedMessage = ServiceMessage & MsgWith<"user_shared">;
|
|
116
|
-
export type ChatSharedMessage = ServiceMessage & MsgWith<"chat_shared">;
|
|
117
|
-
export type ConnectedWebsiteMessage =
|
|
118
|
-
& ServiceMessage
|
|
119
|
-
& MsgWith<"connected_website">;
|
|
120
|
-
export type WriteAccessAllowedMessage =
|
|
121
|
-
& ServiceMessage
|
|
122
|
-
& MsgWith<"write_access_allowed">;
|
|
123
|
-
export type PassportDataMessage = ServiceMessage & MsgWith<"passport_data">;
|
|
124
|
-
export type ProximityAlertTriggeredMessage =
|
|
125
|
-
& ServiceMessage
|
|
126
|
-
& MsgWith<"proximity_alert_triggered">;
|
|
127
|
-
export type ForumTopicCreatedMessage =
|
|
128
|
-
& ServiceMessage
|
|
129
|
-
& MsgWith<"forum_topic_created">;
|
|
130
|
-
export type ForumTopicEditedMessage =
|
|
131
|
-
& ServiceMessage
|
|
132
|
-
& MsgWith<"forum_topic_edited">;
|
|
133
|
-
export type ForumTopicClosedMessage =
|
|
134
|
-
& ServiceMessage
|
|
135
|
-
& MsgWith<"forum_topic_closed">;
|
|
136
|
-
export type ForumTopicReopenedMessage =
|
|
137
|
-
& ServiceMessage
|
|
138
|
-
& MsgWith<"forum_topic_reopened">;
|
|
139
|
-
export type GeneralForumTopicHiddenMessage =
|
|
140
|
-
& ServiceMessage
|
|
141
|
-
& MsgWith<"general_forum_topic_hidden">;
|
|
142
|
-
export type GeneralForumTopicUnhiddenMessage =
|
|
143
|
-
& ServiceMessage
|
|
144
|
-
& MsgWith<"general_forum_topic_unhidden">;
|
|
145
|
-
export type VideoChatScheduledMessage =
|
|
146
|
-
& ServiceMessage
|
|
147
|
-
& MsgWith<"video_chat_scheduled">;
|
|
148
|
-
export type VideoChatStartedMessage =
|
|
149
|
-
& ServiceMessage
|
|
150
|
-
& MsgWith<"video_chat_started">;
|
|
151
|
-
export type VideoChatEndedMessage =
|
|
152
|
-
& ServiceMessage
|
|
153
|
-
& MsgWith<"video_chat_ended">;
|
|
154
|
-
export type VideoChatParticipantsInvitedMessage =
|
|
155
|
-
& ServiceMessage
|
|
156
|
-
& MsgWith<"video_chat_participants_invited">;
|
|
157
|
-
export type WebAppDataMessage = ServiceMessage & MsgWith<"web_app_data">;
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
type ReplyMessage = Message & { reply_to_message: undefined };
|
|
161
|
-
|
|
6
|
+
export declare namespace Message {
|
|
7
|
+
interface ServiceMessage {
|
|
8
|
+
/** Unique message identifier inside this chat */
|
|
9
|
+
message_id: number;
|
|
10
|
+
/** Unique identifier of a message thread or a forum topic to which the message belongs; for supergroups only */
|
|
11
|
+
message_thread_id?: number;
|
|
12
|
+
/** Sender of the message; empty for messages sent to channels. For backward compatibility, the field contains a fake sender user in non-channel chats, if the message was sent on behalf of a chat. */
|
|
13
|
+
from?: User;
|
|
14
|
+
/** Sender of the message, sent on behalf of a chat. For example, the channel itself for channel posts, the supergroup itself for messages from anonymous group administrators, the linked channel for messages automatically forwarded to the discussion group. For backward compatibility, the field from contains a fake sender user in non-channel chats, if the message was sent on behalf of a chat. */
|
|
15
|
+
sender_chat?: Chat;
|
|
16
|
+
/** Date the message was sent in Unix time */
|
|
17
|
+
date: number;
|
|
18
|
+
/** Conversation the message belongs to */
|
|
19
|
+
chat: Chat;
|
|
20
|
+
/** True, if the message is sent to a forum topic */
|
|
21
|
+
is_topic_message?: boolean;
|
|
22
|
+
}
|
|
23
|
+
interface CommonMessage extends ServiceMessage {
|
|
24
|
+
/** For forwarded messages, sender of the original message */
|
|
25
|
+
forward_from?: User;
|
|
26
|
+
/** For messages forwarded from channels or from anonymous administrators, information about the original sender chat */
|
|
27
|
+
forward_from_chat?: Chat;
|
|
28
|
+
/** For messages forwarded from channels, identifier of the original message in the channel */
|
|
29
|
+
forward_from_message_id?: number;
|
|
30
|
+
/** For forwarded messages that were originally sent in channels or by an anonymous chat administrator, signature of the message sender if present */
|
|
31
|
+
forward_signature?: string;
|
|
32
|
+
/** Sender's name for messages forwarded from users who disallow adding a link to their account in forwarded messages */
|
|
33
|
+
forward_sender_name?: string;
|
|
34
|
+
/** For forwarded messages, date the original message was sent in Unix time */
|
|
35
|
+
forward_date?: number;
|
|
36
|
+
/** True, if the message is a channel post that was automatically forwarded to the connected discussion group */
|
|
37
|
+
is_automatic_forward?: true;
|
|
38
|
+
/** 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. */
|
|
39
|
+
reply_to_message?: ReplyMessage;
|
|
40
|
+
/** Bot through which the message was sent */
|
|
41
|
+
via_bot?: User;
|
|
42
|
+
/** Date the message was last edited in Unix time */
|
|
43
|
+
edit_date?: number;
|
|
44
|
+
/** True, if the message can't be forwarded */
|
|
45
|
+
has_protected_content?: true;
|
|
46
|
+
/** Signature of the post author for messages in channels, or the custom title of an anonymous group administrator */
|
|
47
|
+
author_signature?: string;
|
|
48
|
+
/** Inline keyboard attached to the message. login_url buttons are represented as ordinary url buttons. */
|
|
49
|
+
reply_markup?: InlineKeyboardMarkup;
|
|
50
|
+
}
|
|
51
|
+
export interface CaptionableMessage extends CommonMessage {
|
|
52
|
+
/** Caption for the animation, audio, document, photo, video or voice */
|
|
53
|
+
caption?: string;
|
|
54
|
+
/** For messages with a caption, special entities like usernames, URLs, bot commands, etc. that appear in the caption */
|
|
55
|
+
caption_entities?: MessageEntity[];
|
|
56
|
+
}
|
|
57
|
+
export interface MediaMessage extends CaptionableMessage {
|
|
58
|
+
/** The unique identifier of a media message group this message belongs to */
|
|
59
|
+
media_group_id?: string;
|
|
60
|
+
/** True, if the message media is covered by a spoiler animation */
|
|
61
|
+
has_media_spoiler?: true;
|
|
62
|
+
}
|
|
63
|
+
export type TextMessage = CommonMessage & MsgWith<"text">;
|
|
64
|
+
export type AudioMessage = CaptionableMessage & MsgWith<"audio">;
|
|
65
|
+
export type DocumentMessage = CaptionableMessage & MsgWith<"document">;
|
|
66
|
+
export type AnimationMessage = DocumentMessage & MsgWith<"animation">;
|
|
67
|
+
export type PhotoMessage = MediaMessage & MsgWith<"photo">;
|
|
68
|
+
export type StickerMessage = CommonMessage & MsgWith<"sticker">;
|
|
69
|
+
export type VideoMessage = MediaMessage & MsgWith<"video">;
|
|
70
|
+
export type VideoNoteMessage = CommonMessage & MsgWith<"video_note">;
|
|
71
|
+
export type VoiceMessage = CaptionableMessage & MsgWith<"voice">;
|
|
72
|
+
export type ContactMessage = CommonMessage & MsgWith<"contact">;
|
|
73
|
+
export type DiceMessage = CommonMessage & MsgWith<"dice">;
|
|
74
|
+
export type GameMessage = CommonMessage & MsgWith<"game">;
|
|
75
|
+
export type PollMessage = CommonMessage & MsgWith<"poll">;
|
|
76
|
+
export type LocationMessage = CommonMessage & MsgWith<"location">;
|
|
77
|
+
export type VenueMessage = LocationMessage & MsgWith<"venue">;
|
|
78
|
+
export type NewChatMembersMessage = ServiceMessage & MsgWith<"new_chat_members">;
|
|
79
|
+
export type LeftChatMemberMessage = ServiceMessage & MsgWith<"left_chat_member">;
|
|
80
|
+
export type NewChatTitleMessage = ServiceMessage & MsgWith<"new_chat_title">;
|
|
81
|
+
export type NewChatPhotoMessage = ServiceMessage & MsgWith<"new_chat_photo">;
|
|
82
|
+
export type DeleteChatPhotoMessage = ServiceMessage & MsgWith<"delete_chat_photo">;
|
|
83
|
+
export type GroupChatCreatedMessage = ServiceMessage & MsgWith<"group_chat_created">;
|
|
84
|
+
export type SupergroupChatCreated = ServiceMessage & MsgWith<"supergroup_chat_created">;
|
|
85
|
+
export type ChannelChatCreatedMessage = ServiceMessage & MsgWith<"channel_chat_created">;
|
|
86
|
+
export type MessageAutoDeleteTimerChangedMessage = ServiceMessage & MsgWith<"message_auto_delete_timer_changed">;
|
|
87
|
+
export type MigrateToChatIdMessage = ServiceMessage & MsgWith<"migrate_to_chat_id">;
|
|
88
|
+
export type MigrateFromChatIdMessage = ServiceMessage & MsgWith<"migrate_from_chat_id">;
|
|
89
|
+
export type PinnedMessageMessage = ServiceMessage & MsgWith<"pinned_message">;
|
|
90
|
+
export type InvoiceMessage = ServiceMessage & MsgWith<"invoice">;
|
|
91
|
+
export type SuccessfulPaymentMessage = ServiceMessage & MsgWith<"successful_payment">;
|
|
92
|
+
export type UserSharedMessage = ServiceMessage & MsgWith<"user_shared">;
|
|
93
|
+
export type ChatSharedMessage = ServiceMessage & MsgWith<"chat_shared">;
|
|
94
|
+
export type ConnectedWebsiteMessage = ServiceMessage & MsgWith<"connected_website">;
|
|
95
|
+
export type WriteAccessAllowedMessage = ServiceMessage & MsgWith<"write_access_allowed">;
|
|
96
|
+
export type PassportDataMessage = ServiceMessage & MsgWith<"passport_data">;
|
|
97
|
+
export type ProximityAlertTriggeredMessage = ServiceMessage & MsgWith<"proximity_alert_triggered">;
|
|
98
|
+
export type ForumTopicCreatedMessage = ServiceMessage & MsgWith<"forum_topic_created">;
|
|
99
|
+
export type ForumTopicEditedMessage = ServiceMessage & MsgWith<"forum_topic_edited">;
|
|
100
|
+
export type ForumTopicClosedMessage = ServiceMessage & MsgWith<"forum_topic_closed">;
|
|
101
|
+
export type ForumTopicReopenedMessage = ServiceMessage & MsgWith<"forum_topic_reopened">;
|
|
102
|
+
export type GeneralForumTopicHiddenMessage = ServiceMessage & MsgWith<"general_forum_topic_hidden">;
|
|
103
|
+
export type GeneralForumTopicUnhiddenMessage = ServiceMessage & MsgWith<"general_forum_topic_unhidden">;
|
|
104
|
+
export type VideoChatScheduledMessage = ServiceMessage & MsgWith<"video_chat_scheduled">;
|
|
105
|
+
export type VideoChatStartedMessage = ServiceMessage & MsgWith<"video_chat_started">;
|
|
106
|
+
export type VideoChatEndedMessage = ServiceMessage & MsgWith<"video_chat_ended">;
|
|
107
|
+
export type VideoChatParticipantsInvitedMessage = ServiceMessage & MsgWith<"video_chat_participants_invited">;
|
|
108
|
+
export type WebAppDataMessage = ServiceMessage & MsgWith<"web_app_data">;
|
|
109
|
+
export {};
|
|
110
|
+
}
|
|
111
|
+
type ReplyMessage = Message & {
|
|
112
|
+
reply_to_message: undefined;
|
|
113
|
+
};
|
|
162
114
|
export interface Message extends Message.MediaMessage {
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
115
|
+
/** For text messages, the actual UTF-8 text of the message */
|
|
116
|
+
text?: string;
|
|
117
|
+
/** For text messages, special entities like usernames, URLs, bot commands, etc. that appear in the text */
|
|
118
|
+
entities?: MessageEntity[];
|
|
119
|
+
/** Message is an animation, information about the animation. For backward compatibility, when this field is set, the document field will also be set */
|
|
120
|
+
animation?: Animation;
|
|
121
|
+
/** Message is an audio file, information about the file */
|
|
122
|
+
audio?: Audio;
|
|
123
|
+
/** Message is a general file, information about the file */
|
|
124
|
+
document?: Document;
|
|
125
|
+
/** Message is a photo, available sizes of the photo */
|
|
126
|
+
photo?: PhotoSize[];
|
|
127
|
+
/** Message is a sticker, information about the sticker */
|
|
128
|
+
sticker?: Sticker;
|
|
129
|
+
/** Message is a video, information about the video */
|
|
130
|
+
video?: Video;
|
|
131
|
+
/** Message is a video note, information about the video message */
|
|
132
|
+
video_note?: VideoNote;
|
|
133
|
+
/** Message is a voice message, information about the file */
|
|
134
|
+
voice?: Voice;
|
|
135
|
+
/** Message is a shared contact, information about the contact */
|
|
136
|
+
contact?: Contact;
|
|
137
|
+
/** Message is a dice with random value */
|
|
138
|
+
dice?: Dice;
|
|
139
|
+
/** Message is a game, information about the game. More about games » */
|
|
140
|
+
game?: Game;
|
|
141
|
+
/** Message is a native poll, information about the poll */
|
|
142
|
+
poll?: Poll;
|
|
143
|
+
/** Message is a venue, information about the venue. For backward compatibility, when this field is set, the location field will also be set */
|
|
144
|
+
venue?: Venue;
|
|
145
|
+
/** Message is a shared location, information about the location */
|
|
146
|
+
location?: Location;
|
|
147
|
+
/** New members that were added to the group or supergroup and information about them (the bot itself may be one of these members) */
|
|
148
|
+
new_chat_members?: User[];
|
|
149
|
+
/** A member was removed from the group, information about them (this member may be the bot itself) */
|
|
150
|
+
left_chat_member?: User;
|
|
151
|
+
/** A chat title was changed to this value */
|
|
152
|
+
new_chat_title?: string;
|
|
153
|
+
/** A chat photo was change to this value */
|
|
154
|
+
new_chat_photo?: PhotoSize[];
|
|
155
|
+
/** Service message: the chat photo was deleted */
|
|
156
|
+
delete_chat_photo?: true;
|
|
157
|
+
/** Service message: the group has been created */
|
|
158
|
+
group_chat_created?: true;
|
|
159
|
+
/** Service message: the supergroup has been created. This field can't be received in a message coming through updates, because bot can't be a member of a supergroup when it is created. It can only be found in reply_to_message if someone replies to a very first message in a directly created supergroup. */
|
|
160
|
+
supergroup_chat_created?: true;
|
|
161
|
+
/** Service message: the channel has been created. This field can't be received in a message coming through updates, because bot can't be a member of a channel when it is created. It can only be found in reply_to_message if someone replies to a very first message in a channel. */
|
|
162
|
+
channel_chat_created?: true;
|
|
163
|
+
/** Service message: auto-delete timer settings changed in the chat */
|
|
164
|
+
message_auto_delete_timer_changed?: MessageAutoDeleteTimerChanged;
|
|
165
|
+
/** The group has been migrated to a supergroup with the specified identifier. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier. */
|
|
166
|
+
migrate_to_chat_id?: number;
|
|
167
|
+
/** The supergroup has been migrated from a group with the specified identifier. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier. */
|
|
168
|
+
migrate_from_chat_id?: number;
|
|
169
|
+
/** Specified message was pinned. Note that the Message object in this field will not contain further reply_to_message fields even if it is itself a reply. */
|
|
170
|
+
pinned_message?: ReplyMessage;
|
|
171
|
+
/** Message is an invoice for a payment, information about the invoice. More about payments » */
|
|
172
|
+
invoice?: Invoice;
|
|
173
|
+
/** Message is a service message about a successful payment, information about the payment. More about payments » */
|
|
174
|
+
successful_payment?: SuccessfulPayment;
|
|
175
|
+
/** Service message: a user was shared with the bot */
|
|
176
|
+
user_shared?: UserShared;
|
|
177
|
+
/** Service message: a chat was shared with the bot */
|
|
178
|
+
chat_shared?: ChatShared;
|
|
179
|
+
/** The domain name of the website on which the user has logged in. More about Telegram Login » */
|
|
180
|
+
connected_website?: string;
|
|
181
|
+
/** Service message: the user allowed the bot added to the attachment menu to write messages */
|
|
182
|
+
write_access_allowed?: WriteAccessAllowed;
|
|
183
|
+
/** Telegram Passport data */
|
|
184
|
+
passport_data?: PassportData;
|
|
185
|
+
/** Service message. A user in the chat triggered another user's proximity alert while sharing Live Location. */
|
|
186
|
+
proximity_alert_triggered?: ProximityAlertTriggered;
|
|
187
|
+
/** Service message: forum topic created */
|
|
188
|
+
forum_topic_created?: ForumTopicCreated;
|
|
189
|
+
/** Service message: forum topic edited */
|
|
190
|
+
forum_topic_edited?: ForumTopicEdited;
|
|
191
|
+
/** Service message: forum topic closed */
|
|
192
|
+
forum_topic_closed?: ForumTopicClosed;
|
|
193
|
+
/** Service message: forum topic reopened */
|
|
194
|
+
forum_topic_reopened?: ForumTopicReopened;
|
|
195
|
+
/** Service message: the 'General' forum topic hidden */
|
|
196
|
+
general_forum_topic_hidden?: GeneralForumTopicHidden;
|
|
197
|
+
/** Service message: the 'General' forum topic unhidden */
|
|
198
|
+
general_forum_topic_unhidden?: GeneralForumTopicUnhidden;
|
|
199
|
+
/** Service message: video chat scheduled */
|
|
200
|
+
video_chat_scheduled?: VideoChatScheduled;
|
|
201
|
+
/** Service message: video chat started */
|
|
202
|
+
video_chat_started?: VideoChatStarted;
|
|
203
|
+
/** Service message: video chat ended */
|
|
204
|
+
video_chat_ended?: VideoChatEnded;
|
|
205
|
+
/** Service message: new participants invited to a video chat */
|
|
206
|
+
video_chat_participants_invited?: VideoChatParticipantsInvited;
|
|
207
|
+
/** Service message: data sent by a Web App */
|
|
208
|
+
web_app_data?: WebAppData;
|
|
257
209
|
}
|
|
258
|
-
|
|
259
210
|
/** This object represents a unique message identifier. */
|
|
260
211
|
export interface MessageId {
|
|
261
|
-
|
|
262
|
-
|
|
212
|
+
/** Unique message identifier */
|
|
213
|
+
message_id: number;
|
|
263
214
|
}
|
|
264
|
-
|
|
265
215
|
/** Describes an inline message sent by a Web App on behalf of a user. */
|
|
266
216
|
export interface SentWebAppMessage {
|
|
267
|
-
|
|
268
|
-
|
|
217
|
+
/** Identifier of the sent inline message. Available only if there is an inline keyboard attached to the message. */
|
|
218
|
+
inline_message_id: string;
|
|
269
219
|
}
|
|
270
|
-
|
|
271
220
|
/** The Bot API supports basic formatting for messages. You can use bold, italic, underlined, strikethrough, and spoiler text, as well as inline links and pre-formatted code in your bots' messages. Telegram clients will render them accordingly. You can use either markdown-style or HTML-style formatting.
|
|
272
221
|
|
|
273
222
|
Note that Telegram clients will display an **alert** to the user before opening an inline link ('Open this link?' together with the full URL).
|
|
@@ -358,470 +307,423 @@ Please note:
|
|
|
358
307
|
- To escape characters '_', '*', '`', '[' outside of an entity, prepend the characters '\' before them.
|
|
359
308
|
- Escaping inside entities is not allowed, so entity must be closed first and reopened again: use `_snake_\__case_` for italic `snake_case` and `*2*\**2=4*` for bold `2*2=4`. */
|
|
360
309
|
export type ParseMode = "Markdown" | "MarkdownV2" | "HTML";
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
/** For “text_link” only, URL that will be opened after user taps on the text */
|
|
395
|
-
url: string;
|
|
396
|
-
}
|
|
397
|
-
export interface TextMentionMessageEntity extends AbstractMessageEntity {
|
|
398
|
-
type: "text_mention";
|
|
399
|
-
/** For “text_mention” only, the mentioned user */
|
|
400
|
-
user: User;
|
|
401
|
-
}
|
|
402
|
-
export interface CustomEmojiMessageEntity extends AbstractMessageEntity {
|
|
403
|
-
type: "custom_emoji";
|
|
404
|
-
/** For “custom_emoji” only, unique identifier of the custom emoji. Use getCustomEmojiStickers to get full information about the sticker */
|
|
405
|
-
custom_emoji_id: string;
|
|
406
|
-
}
|
|
310
|
+
export declare namespace MessageEntity {
|
|
311
|
+
interface AbstractMessageEntity {
|
|
312
|
+
/** Type of the entity. Currently, can be “mention” (@username), “hashtag” (#hashtag), “cashtag” ($USD), “bot_command” (/start@jobs_bot), “url” (https://telegram.org), “email” (do-not-reply@telegram.org), “phone_number” (+1-212-555-0123), “bold” (bold text), “italic” (italic text), “underline” (underlined text), “strikethrough” (strikethrough text), “spoiler” (spoiler message), “code” (monowidth string), “pre” (monowidth block), “text_link” (for clickable text URLs), “text_mention” (for users without usernames), “custom_emoji” (for inline custom emoji stickers) */
|
|
313
|
+
type: string;
|
|
314
|
+
/** Offset in UTF-16 code units to the start of the entity */
|
|
315
|
+
offset: number;
|
|
316
|
+
/** Length of the entity in UTF-16 code units */
|
|
317
|
+
length: number;
|
|
318
|
+
}
|
|
319
|
+
export interface CommonMessageEntity extends AbstractMessageEntity {
|
|
320
|
+
type: "mention" | "hashtag" | "cashtag" | "bot_command" | "url" | "email" | "phone_number" | "bold" | "italic" | "underline" | "strikethrough" | "spoiler" | "code";
|
|
321
|
+
}
|
|
322
|
+
export interface PreMessageEntity extends AbstractMessageEntity {
|
|
323
|
+
type: "pre";
|
|
324
|
+
/** For “pre” only, the programming language of the entity text */
|
|
325
|
+
language?: string;
|
|
326
|
+
}
|
|
327
|
+
export interface TextLinkMessageEntity extends AbstractMessageEntity {
|
|
328
|
+
type: "text_link";
|
|
329
|
+
/** For “text_link” only, URL that will be opened after user taps on the text */
|
|
330
|
+
url: string;
|
|
331
|
+
}
|
|
332
|
+
export interface TextMentionMessageEntity extends AbstractMessageEntity {
|
|
333
|
+
type: "text_mention";
|
|
334
|
+
/** For “text_mention” only, the mentioned user */
|
|
335
|
+
user: User;
|
|
336
|
+
}
|
|
337
|
+
export interface CustomEmojiMessageEntity extends AbstractMessageEntity {
|
|
338
|
+
type: "custom_emoji";
|
|
339
|
+
/** For “custom_emoji” only, unique identifier of the custom emoji. Use getCustomEmojiStickers to get full information about the sticker */
|
|
340
|
+
custom_emoji_id: string;
|
|
341
|
+
}
|
|
342
|
+
export {};
|
|
407
343
|
}
|
|
408
|
-
|
|
409
344
|
/** This object represents one special entity in a text message. For example, hashtags, usernames, URLs, etc. */
|
|
410
|
-
export type MessageEntity =
|
|
411
|
-
| MessageEntity.CommonMessageEntity
|
|
412
|
-
| MessageEntity.CustomEmojiMessageEntity
|
|
413
|
-
| MessageEntity.PreMessageEntity
|
|
414
|
-
| MessageEntity.TextLinkMessageEntity
|
|
415
|
-
| MessageEntity.TextMentionMessageEntity;
|
|
416
|
-
|
|
345
|
+
export type MessageEntity = MessageEntity.CommonMessageEntity | MessageEntity.CustomEmojiMessageEntity | MessageEntity.PreMessageEntity | MessageEntity.TextLinkMessageEntity | MessageEntity.TextMentionMessageEntity;
|
|
417
346
|
/** This object represents one size of a photo or a file / sticker thumbnail. */
|
|
418
347
|
export interface PhotoSize {
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
348
|
+
/** Identifier for this file, which can be used to download or reuse the file */
|
|
349
|
+
file_id: string;
|
|
350
|
+
/** 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. */
|
|
351
|
+
file_unique_id: string;
|
|
352
|
+
/** Photo width */
|
|
353
|
+
width: number;
|
|
354
|
+
/** Photo height */
|
|
355
|
+
height: number;
|
|
356
|
+
/** File size in bytes */
|
|
357
|
+
file_size?: number;
|
|
429
358
|
}
|
|
430
|
-
|
|
431
359
|
/** This object represents an animation file (GIF or H.264/MPEG-4 AVC video without sound). */
|
|
432
360
|
export interface Animation {
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
361
|
+
/** Identifier for this file, which can be used to download or reuse the file */
|
|
362
|
+
file_id: string;
|
|
363
|
+
/** 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. */
|
|
364
|
+
file_unique_id: string;
|
|
365
|
+
/** Video width as defined by sender */
|
|
366
|
+
width: number;
|
|
367
|
+
/** Video height as defined by sender */
|
|
368
|
+
height: number;
|
|
369
|
+
/** Duration of the video in seconds as defined by sender */
|
|
370
|
+
duration: number;
|
|
371
|
+
/** Animation thumbnail as defined by sender */
|
|
372
|
+
thumbnail?: PhotoSize;
|
|
373
|
+
/** Original animation filename as defined by sender */
|
|
374
|
+
file_name?: string;
|
|
375
|
+
/** MIME type of the file as defined by sender */
|
|
376
|
+
mime_type?: string;
|
|
377
|
+
/** File size in bytes */
|
|
378
|
+
file_size?: number;
|
|
451
379
|
}
|
|
452
|
-
|
|
453
380
|
/** This object represents an audio file to be treated as music by the Telegram clients. */
|
|
454
381
|
export interface Audio {
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
382
|
+
/** Identifier for this file, which can be used to download or reuse the file */
|
|
383
|
+
file_id: string;
|
|
384
|
+
/** 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. */
|
|
385
|
+
file_unique_id: string;
|
|
386
|
+
/** Duration of the audio in seconds as defined by sender */
|
|
387
|
+
duration: number;
|
|
388
|
+
/** Performer of the audio as defined by sender or by audio tags */
|
|
389
|
+
performer?: string;
|
|
390
|
+
/** Title of the audio as defined by sender or by audio tags */
|
|
391
|
+
title?: string;
|
|
392
|
+
/** Original filename as defined by sender */
|
|
393
|
+
file_name?: string;
|
|
394
|
+
/** MIME type of the file as defined by sender */
|
|
395
|
+
mime_type?: string;
|
|
396
|
+
/** File size in bytes */
|
|
397
|
+
file_size?: number;
|
|
398
|
+
/** Thumbnail of the album cover to which the music file belongs */
|
|
399
|
+
thumbnail?: PhotoSize;
|
|
473
400
|
}
|
|
474
|
-
|
|
475
401
|
/** This object represents a general file (as opposed to photos, voice messages and audio files). */
|
|
476
402
|
export interface Document {
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
403
|
+
/** Identifier for this file, which can be used to download or reuse the file */
|
|
404
|
+
file_id: string;
|
|
405
|
+
/** 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. */
|
|
406
|
+
file_unique_id: string;
|
|
407
|
+
/** Document thumbnail as defined by sender */
|
|
408
|
+
thumbnail?: PhotoSize;
|
|
409
|
+
/** Original filename as defined by sender */
|
|
410
|
+
file_name?: string;
|
|
411
|
+
/** MIME type of the file as defined by sender */
|
|
412
|
+
mime_type?: string;
|
|
413
|
+
/** File size in bytes */
|
|
414
|
+
file_size?: number;
|
|
489
415
|
}
|
|
490
|
-
|
|
491
416
|
/** This object represents a video file. */
|
|
492
417
|
export interface Video {
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
418
|
+
/** Identifier for this file, which can be used to download or reuse the file */
|
|
419
|
+
file_id: string;
|
|
420
|
+
/** 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. */
|
|
421
|
+
file_unique_id: string;
|
|
422
|
+
/** Video width as defined by sender */
|
|
423
|
+
width: number;
|
|
424
|
+
/** Video height as defined by sender */
|
|
425
|
+
height: number;
|
|
426
|
+
/** Duration of the video in seconds as defined by sender */
|
|
427
|
+
duration: number;
|
|
428
|
+
/** Video thumbnail */
|
|
429
|
+
thumbnail?: PhotoSize;
|
|
430
|
+
/** Original filename as defined by sender */
|
|
431
|
+
file_name?: string;
|
|
432
|
+
/** MIME type of the file as defined by sender */
|
|
433
|
+
mime_type?: string;
|
|
434
|
+
/** File size in bytes */
|
|
435
|
+
file_size?: number;
|
|
511
436
|
}
|
|
512
|
-
|
|
513
437
|
/** This object represents a video message (available in Telegram apps as of v.4.0). */
|
|
514
438
|
export interface VideoNote {
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
439
|
+
/** Identifier for this file, which can be used to download or reuse the file */
|
|
440
|
+
file_id: string;
|
|
441
|
+
/** 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. */
|
|
442
|
+
file_unique_id: string;
|
|
443
|
+
/** Video width and height (diameter of the video message) as defined by sender */
|
|
444
|
+
length: number;
|
|
445
|
+
/** Duration of the video in seconds as defined by sender */
|
|
446
|
+
duration: number;
|
|
447
|
+
/** Video thumbnail */
|
|
448
|
+
thumbnail?: PhotoSize;
|
|
449
|
+
/** File size in bytes */
|
|
450
|
+
file_size?: number;
|
|
527
451
|
}
|
|
528
|
-
|
|
529
452
|
/** This object represents a voice note. */
|
|
530
453
|
export interface Voice {
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
454
|
+
/** Identifier for this file, which can be used to download or reuse the file */
|
|
455
|
+
file_id: string;
|
|
456
|
+
/** 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. */
|
|
457
|
+
file_unique_id: string;
|
|
458
|
+
/** Duration of the audio in seconds as defined by sender */
|
|
459
|
+
duration: number;
|
|
460
|
+
/** MIME type of the file as defined by sender */
|
|
461
|
+
mime_type?: string;
|
|
462
|
+
/** File size in bytes */
|
|
463
|
+
file_size?: number;
|
|
541
464
|
}
|
|
542
|
-
|
|
543
465
|
/** This object represents a phone contact. */
|
|
544
466
|
export interface Contact {
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
467
|
+
/** Contact's phone number */
|
|
468
|
+
phone_number: string;
|
|
469
|
+
/** Contact's first name */
|
|
470
|
+
first_name: string;
|
|
471
|
+
/** Contact's last name */
|
|
472
|
+
last_name?: string;
|
|
473
|
+
/** Contact's user identifier in Telegram. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier. */
|
|
474
|
+
user_id?: number;
|
|
475
|
+
/** Additional data about the contact in the form of a vCard */
|
|
476
|
+
vcard?: string;
|
|
555
477
|
}
|
|
556
|
-
|
|
557
478
|
/** This object represents an animated emoji that displays a random value. */
|
|
558
479
|
export interface Dice {
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
480
|
+
/** Emoji on which the dice throw animation is based */
|
|
481
|
+
emoji: string;
|
|
482
|
+
/** Value of the dice, 1-6 for "🎲", "🎯" and "🎳" base emoji, 1-5 for "🏀" and "⚽" base emoji, 1-64 for "🎰" base emoji */
|
|
483
|
+
value: number;
|
|
563
484
|
}
|
|
564
|
-
|
|
565
485
|
/** This object contains information about one answer option in a poll. */
|
|
566
486
|
export interface PollOption {
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
487
|
+
/** Option text, 1-100 characters */
|
|
488
|
+
text: string;
|
|
489
|
+
/** Number of users that voted for this option */
|
|
490
|
+
voter_count: number;
|
|
571
491
|
}
|
|
572
|
-
|
|
573
492
|
/** This object represents an answer of a user in a non-anonymous poll. */
|
|
574
493
|
export interface PollAnswer {
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
494
|
+
/** Unique poll identifier */
|
|
495
|
+
poll_id: string;
|
|
496
|
+
/** The user, who changed the answer to the poll */
|
|
497
|
+
user: User;
|
|
498
|
+
/** 0-based identifiers of answer options, chosen by the user. May be empty if the user retracted their vote. */
|
|
499
|
+
option_ids: number[];
|
|
581
500
|
}
|
|
582
|
-
|
|
583
501
|
/** This object contains information about a poll. */
|
|
584
502
|
export interface Poll {
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
503
|
+
/** Unique poll identifier */
|
|
504
|
+
id: string;
|
|
505
|
+
/** Poll question, 1-300 characters */
|
|
506
|
+
question: string;
|
|
507
|
+
/** List of poll options */
|
|
508
|
+
options: PollOption[];
|
|
509
|
+
/** Total number of users that voted in the poll */
|
|
510
|
+
total_voter_count: number;
|
|
511
|
+
/** True, if the poll is closed */
|
|
512
|
+
is_closed: boolean;
|
|
513
|
+
/** True, if the poll is anonymous */
|
|
514
|
+
is_anonymous: boolean;
|
|
515
|
+
/** Poll type, currently can be “regular” or “quiz” */
|
|
516
|
+
type: "regular" | "quiz";
|
|
517
|
+
/** True, if the poll allows multiple answers */
|
|
518
|
+
allows_multiple_answers: boolean;
|
|
519
|
+
/** 0-based identifier of the correct answer option. Available only for polls in the quiz mode, which are closed, or was sent (not forwarded) by the bot or to the private chat with the bot. */
|
|
520
|
+
correct_option_id?: number;
|
|
521
|
+
/** Text that is shown when a user chooses an incorrect answer or taps on the lamp icon in a quiz-style poll, 0-200 characters */
|
|
522
|
+
explanation?: string;
|
|
523
|
+
/** Special entities like usernames, URLs, bot commands, etc. that appear in the explanation */
|
|
524
|
+
explanation_entities?: MessageEntity[];
|
|
525
|
+
/** Amount of time in seconds the poll will be active after creation */
|
|
526
|
+
open_period?: number;
|
|
527
|
+
/** Point in time (Unix timestamp) when the poll will be automatically closed */
|
|
528
|
+
close_date?: number;
|
|
611
529
|
}
|
|
612
|
-
|
|
613
530
|
/** This object represents a point on the map. */
|
|
614
531
|
export interface Location {
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
532
|
+
/** Longitude as defined by sender */
|
|
533
|
+
longitude: number;
|
|
534
|
+
/** Latitude as defined by sender */
|
|
535
|
+
latitude: number;
|
|
536
|
+
/** The radius of uncertainty for the location, measured in meters; 0-1500 */
|
|
537
|
+
horizontal_accuracy?: number;
|
|
538
|
+
/** Time relative to the message sending date, during which the location can be updated; in seconds. For active live locations only. */
|
|
539
|
+
live_period?: number;
|
|
540
|
+
/** The direction in which user is moving, in degrees; 1-360. For active live locations only. */
|
|
541
|
+
heading?: number;
|
|
542
|
+
/** The maximum distance for proximity alerts about approaching another chat member, in meters. For sent live locations only. */
|
|
543
|
+
proximity_alert_radius?: number;
|
|
627
544
|
}
|
|
628
|
-
|
|
629
545
|
/** This object represents a venue. */
|
|
630
546
|
export interface Venue {
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
547
|
+
/** Venue location. Can't be a live location */
|
|
548
|
+
location: Location;
|
|
549
|
+
/** Name of the venue */
|
|
550
|
+
title: string;
|
|
551
|
+
/** Address of the venue */
|
|
552
|
+
address: string;
|
|
553
|
+
/** Foursquare identifier of the venue */
|
|
554
|
+
foursquare_id?: string;
|
|
555
|
+
/** Foursquare type of the venue. (For example, “arts_entertainment/default”, “arts_entertainment/aquarium” or “food/icecream”.) */
|
|
556
|
+
foursquare_type?: string;
|
|
557
|
+
/** Google Places identifier of the venue */
|
|
558
|
+
google_place_id?: string;
|
|
559
|
+
/** Google Places type of the venue. (See supported types.) */
|
|
560
|
+
google_place_type?: string;
|
|
645
561
|
}
|
|
646
|
-
|
|
647
562
|
/** This object represents the content of a service message, sent whenever a user in the chat triggers a proximity alert set by another user. */
|
|
648
563
|
export interface ProximityAlertTriggered {
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
564
|
+
/** User that triggered the alert */
|
|
565
|
+
traveler: User;
|
|
566
|
+
/** User that set the alert */
|
|
567
|
+
watcher: User;
|
|
568
|
+
/** The distance between the users */
|
|
569
|
+
distance: number;
|
|
655
570
|
}
|
|
656
|
-
|
|
657
571
|
/** This object represents a service message about a change in auto-delete timer settings. */
|
|
658
572
|
export interface MessageAutoDeleteTimerChanged {
|
|
659
|
-
|
|
660
|
-
|
|
573
|
+
/** New auto-delete time for messages in the chat; in seconds */
|
|
574
|
+
message_auto_delete_time: number;
|
|
661
575
|
}
|
|
662
|
-
|
|
663
576
|
/** This object represents a service message about a new forum topic created in the chat. */
|
|
664
577
|
export interface ForumTopicCreated {
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
578
|
+
/** Name of the topic */
|
|
579
|
+
name: string;
|
|
580
|
+
/** Color of the topic icon in RGB format */
|
|
581
|
+
icon_color: number;
|
|
582
|
+
/** Unique identifier of the custom emoji shown as the topic icon */
|
|
583
|
+
icon_custom_emoji_id?: string;
|
|
671
584
|
}
|
|
672
|
-
|
|
673
585
|
/** This object represents a service message about an edited forum topic. */
|
|
674
586
|
export interface ForumTopicEdited {
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
587
|
+
/** New name of the topic, if it was edited */
|
|
588
|
+
name?: string;
|
|
589
|
+
/** New identifier of the custom emoji shown as the topic icon, if it was edited; an empty string if the icon was removed */
|
|
590
|
+
icon_custom_emoji_id?: string;
|
|
679
591
|
}
|
|
680
|
-
|
|
681
592
|
/** This object represents a service message about a forum topic closed in the chat. Currently holds no information. */
|
|
682
|
-
export interface ForumTopicClosed {
|
|
683
|
-
|
|
593
|
+
export interface ForumTopicClosed {
|
|
594
|
+
}
|
|
684
595
|
/** This object represents a service message about a forum topic reopened in the chat. Currently holds no information. */
|
|
685
|
-
export interface ForumTopicReopened {
|
|
686
|
-
|
|
596
|
+
export interface ForumTopicReopened {
|
|
597
|
+
}
|
|
687
598
|
/** This object represents a service message about General forum topic hidden in the chat. Currently holds no information. */
|
|
688
|
-
export interface GeneralForumTopicHidden {
|
|
689
|
-
|
|
599
|
+
export interface GeneralForumTopicHidden {
|
|
600
|
+
}
|
|
690
601
|
/** This object represents a service message about General forum topic unhidden in the chat. Currently holds no information. */
|
|
691
|
-
export interface GeneralForumTopicUnhidden {
|
|
692
|
-
|
|
602
|
+
export interface GeneralForumTopicUnhidden {
|
|
603
|
+
}
|
|
693
604
|
/** This object contains information about the user whose identifier was shared with the bot using a KeyboardButtonRequestUser button. */
|
|
694
605
|
export interface UserShared {
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
606
|
+
/** Identifier of the request */
|
|
607
|
+
request_id: number;
|
|
608
|
+
/** Identifier of the shared user. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier. 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. */
|
|
609
|
+
user_id: number;
|
|
699
610
|
}
|
|
700
|
-
|
|
701
611
|
/** This object contains information about the chat whose identifier was shared with the bot using a KeyboardButtonRequestChat button. */
|
|
702
612
|
export interface ChatShared {
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
613
|
+
/** Identifier of the request */
|
|
614
|
+
request_id: number;
|
|
615
|
+
/** Identifier of the shared chat. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier. The bot may not have access to the chat and could be unable to use this identifier, unless the chat is already known to the bot by some other means. */
|
|
616
|
+
chat_id: number;
|
|
707
617
|
}
|
|
708
|
-
|
|
709
618
|
/** This object represents a service message about a user allowing a bot added to the attachment menu to write messages. Currently holds no information. */
|
|
710
|
-
export interface WriteAccessAllowed {
|
|
711
|
-
|
|
619
|
+
export interface WriteAccessAllowed {
|
|
620
|
+
}
|
|
712
621
|
/** This object represents a service message about a video chat scheduled in the chat. */
|
|
713
622
|
export interface VideoChatScheduled {
|
|
714
|
-
|
|
715
|
-
|
|
623
|
+
/** Point in time (Unix timestamp) when the video chat is supposed to be started by a chat administrator */
|
|
624
|
+
start_date: number;
|
|
716
625
|
}
|
|
717
|
-
|
|
718
626
|
/** This object represents a service message about a video chat started in the chat. Currently holds no information. */
|
|
719
|
-
export interface VideoChatStarted {
|
|
720
|
-
|
|
627
|
+
export interface VideoChatStarted {
|
|
628
|
+
}
|
|
721
629
|
/** This object represents a service message about a video chat ended in the chat. */
|
|
722
630
|
export interface VideoChatEnded {
|
|
723
|
-
|
|
724
|
-
|
|
631
|
+
/** Video chat duration in seconds */
|
|
632
|
+
duration: number;
|
|
725
633
|
}
|
|
726
|
-
|
|
727
634
|
/** This object represents a service message about new members invited to a video chat. */
|
|
728
635
|
export interface VideoChatParticipantsInvited {
|
|
729
|
-
|
|
730
|
-
|
|
636
|
+
/** New members that were invited to the video chat */
|
|
637
|
+
users: User[];
|
|
731
638
|
}
|
|
732
|
-
|
|
733
639
|
/** Describes data sent from a Web App to the bot. */
|
|
734
640
|
export interface WebAppData {
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
641
|
+
/** The data. Be aware that a bad client can send arbitrary data in this field. */
|
|
642
|
+
data: string;
|
|
643
|
+
/** 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. */
|
|
644
|
+
button_text: string;
|
|
739
645
|
}
|
|
740
|
-
|
|
741
646
|
/** This object represents a sticker. */
|
|
742
647
|
export interface Sticker {
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
648
|
+
/** Identifier for this file, which can be used to download or reuse the file */
|
|
649
|
+
file_id: string;
|
|
650
|
+
/** 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. */
|
|
651
|
+
file_unique_id: string;
|
|
652
|
+
/** Type of the sticker, currently one of “regular”, “mask”, “custom_emoji”. The type of the sticker is independent from its format, which is determined by the fields is_animated and is_video. */
|
|
653
|
+
type: "regular" | "mask" | "custom_emoji";
|
|
654
|
+
/** Sticker width */
|
|
655
|
+
width: number;
|
|
656
|
+
/** Sticker height */
|
|
657
|
+
height: number;
|
|
658
|
+
/** True, if the sticker is animated */
|
|
659
|
+
is_animated: boolean;
|
|
660
|
+
/** True, if the sticker is a video sticker */
|
|
661
|
+
is_video: boolean;
|
|
662
|
+
/** Sticker thumbnail in the .WEBP or .JPG format */
|
|
663
|
+
thumbnail?: PhotoSize;
|
|
664
|
+
/** Emoji associated with the sticker */
|
|
665
|
+
emoji?: string;
|
|
666
|
+
/** Name of the sticker set to which the sticker belongs */
|
|
667
|
+
set_name?: string;
|
|
668
|
+
/** For premium regular stickers, premium animation for the sticker */
|
|
669
|
+
premium_animation?: File;
|
|
670
|
+
/** For mask stickers, the position where the mask should be placed */
|
|
671
|
+
mask_position?: MaskPosition;
|
|
672
|
+
/** For custom emoji stickers, unique identifier of the custom emoji */
|
|
673
|
+
custom_emoji_id?: string;
|
|
674
|
+
/** File size in bytes */
|
|
675
|
+
file_size?: number;
|
|
771
676
|
}
|
|
772
|
-
|
|
773
677
|
/** This object represents a sticker set. */
|
|
774
678
|
export interface StickerSet {
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
679
|
+
/** Sticker set name */
|
|
680
|
+
name: string;
|
|
681
|
+
/** Sticker set title */
|
|
682
|
+
title: string;
|
|
683
|
+
/** Type of stickers in the set, currently one of “regular”, “mask”, “custom_emoji” */
|
|
684
|
+
sticker_type: "regular" | "mask" | "custom_emoji";
|
|
685
|
+
/** True, if the sticker set contains animated stickers */
|
|
686
|
+
is_animated: boolean;
|
|
687
|
+
/** True, if the sticker set contains video stickers */
|
|
688
|
+
is_video: boolean;
|
|
689
|
+
/** List of all set stickers */
|
|
690
|
+
stickers: Sticker[];
|
|
691
|
+
/** Sticker set thumbnail in the .WEBP, .TGS, or .WEBM format */
|
|
692
|
+
thumbnail?: PhotoSize;
|
|
789
693
|
}
|
|
790
|
-
|
|
791
694
|
/** This object describes the position on faces where a mask should be placed by default. */
|
|
792
695
|
export interface MaskPosition {
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
696
|
+
/** The part of the face relative to which the mask should be placed. One of “forehead”, “eyes”, “mouth”, or “chin”. */
|
|
697
|
+
point: "forehead" | "eyes" | "mouth" | "chin";
|
|
698
|
+
/** Shift by X-axis measured in widths of the mask scaled to the face size, from left to right. For example, choosing -1.0 will place mask just to the left of the default mask position. */
|
|
699
|
+
x_shift: number;
|
|
700
|
+
/** Shift by Y-axis measured in heights of the mask scaled to the face size, from top to bottom. For example, 1.0 will place the mask just below the default mask position. */
|
|
701
|
+
y_shift: number;
|
|
702
|
+
/** Mask scaling coefficient. For example, 2.0 means double size. */
|
|
703
|
+
scale: number;
|
|
801
704
|
}
|
|
802
|
-
|
|
803
705
|
/** This object represents a game. Use BotFather to create and edit games, their short names will act as unique identifiers. */
|
|
804
706
|
export interface Game {
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
707
|
+
/** Title of the game */
|
|
708
|
+
title: string;
|
|
709
|
+
/** Description of the game */
|
|
710
|
+
description: string;
|
|
711
|
+
/** Photo that will be displayed in the game message in chats. */
|
|
712
|
+
photo: PhotoSize[];
|
|
713
|
+
/** Brief description of the game or high scores included in the game message. Can be automatically edited to include current high scores for the game when the bot calls setGameScore, or manually edited using editMessageText. 0-4096 characters. */
|
|
714
|
+
text: string;
|
|
715
|
+
/** Special entities that appear in text, such as usernames, URLs, bot commands, etc. */
|
|
716
|
+
text_entities: MessageEntity[];
|
|
717
|
+
/** Animation that will be displayed in the game message in chats. Upload via BotFather */
|
|
718
|
+
animation: Animation;
|
|
817
719
|
}
|
|
818
|
-
|
|
819
720
|
/** This object represents one row of the high scores table for a game. */
|
|
820
721
|
export interface GameHighScore {
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
722
|
+
/** Position in high score table for the game */
|
|
723
|
+
position: number;
|
|
724
|
+
/** User */
|
|
725
|
+
user: User;
|
|
726
|
+
/** Score */
|
|
727
|
+
score: number;
|
|
827
728
|
}
|
|
729
|
+
export {};
|