@grom.js/effect-tg 0.8.0 → 0.9.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.
Files changed (99) hide show
  1. package/README.md +162 -5
  2. package/dist/BotApi.d.ts +10 -12
  3. package/dist/BotApi.d.ts.map +1 -1
  4. package/dist/BotApi.js +2 -2
  5. package/dist/BotApi.js.map +1 -1
  6. package/dist/BotApiError.d.ts +46 -71
  7. package/dist/BotApiError.d.ts.map +1 -1
  8. package/dist/BotApiError.js +59 -41
  9. package/dist/BotApiError.js.map +1 -1
  10. package/dist/BotApiTransport.d.ts +10 -17
  11. package/dist/BotApiTransport.d.ts.map +1 -1
  12. package/dist/BotApiTransport.js +2 -7
  13. package/dist/BotApiTransport.js.map +1 -1
  14. package/dist/BotApiUrl.d.ts +6 -8
  15. package/dist/BotApiUrl.d.ts.map +1 -1
  16. package/dist/BotApiUrl.js.map +1 -1
  17. package/dist/Content.d.ts.map +1 -1
  18. package/dist/Dialog.d.ts +96 -41
  19. package/dist/Dialog.d.ts.map +1 -1
  20. package/dist/Dialog.js +60 -25
  21. package/dist/Dialog.js.map +1 -1
  22. package/dist/File.d.ts +1 -2
  23. package/dist/File.d.ts.map +1 -1
  24. package/dist/File.js +1 -1
  25. package/dist/File.js.map +1 -1
  26. package/dist/Markup.d.ts.map +1 -1
  27. package/dist/Runner.d.ts +1 -1
  28. package/dist/Runner.d.ts.map +1 -1
  29. package/dist/Send.d.ts +57 -130
  30. package/dist/Send.d.ts.map +1 -1
  31. package/dist/Send.js +65 -128
  32. package/dist/Send.js.map +1 -1
  33. package/dist/Text.d.ts.map +1 -1
  34. package/dist/internal/botApi.d.ts +3 -1
  35. package/dist/internal/botApi.d.ts.map +1 -1
  36. package/dist/internal/botApi.gen.d.ts +6501 -0
  37. package/dist/internal/botApi.gen.d.ts.map +1 -0
  38. package/dist/internal/botApi.gen.js +2 -0
  39. package/dist/internal/botApi.gen.js.map +1 -0
  40. package/dist/internal/botApi.js +2 -6
  41. package/dist/internal/botApi.js.map +1 -1
  42. package/dist/internal/botApiError.d.ts +5 -2
  43. package/dist/internal/botApiError.d.ts.map +1 -1
  44. package/dist/internal/botApiError.js +8 -18
  45. package/dist/internal/botApiError.js.map +1 -1
  46. package/dist/internal/botApiTransport.d.ts +5 -2
  47. package/dist/internal/botApiTransport.d.ts.map +1 -1
  48. package/dist/internal/botApiTransport.js +14 -10
  49. package/dist/internal/botApiTransport.js.map +1 -1
  50. package/dist/internal/dialog.d.ts +27 -10
  51. package/dist/internal/dialog.d.ts.map +1 -1
  52. package/dist/internal/dialog.js +88 -14
  53. package/dist/internal/dialog.js.map +1 -1
  54. package/dist/internal/file.d.ts +1 -1
  55. package/dist/internal/file.d.ts.map +1 -1
  56. package/dist/internal/file.js +1 -1
  57. package/dist/internal/file.js.map +1 -1
  58. package/dist/internal/runner.d.ts +4 -5
  59. package/dist/internal/runner.d.ts.map +1 -1
  60. package/dist/internal/runner.js +14 -19
  61. package/dist/internal/runner.js.map +1 -1
  62. package/dist/internal/send.d.ts +4 -4
  63. package/dist/internal/send.d.ts.map +1 -1
  64. package/dist/internal/send.js +62 -51
  65. package/dist/internal/send.js.map +1 -1
  66. package/package.json +11 -9
  67. package/src/BotApi.ts +38 -31
  68. package/src/BotApiError.ts +109 -63
  69. package/src/BotApiTransport.ts +18 -20
  70. package/src/BotApiUrl.ts +6 -8
  71. package/src/Content.ts +14 -14
  72. package/src/Dialog.ts +164 -42
  73. package/src/File.ts +3 -4
  74. package/src/Markup.ts +5 -5
  75. package/src/Send.ts +114 -202
  76. package/src/Text.ts +5 -5
  77. package/src/internal/botApi.gen.ts +6783 -0
  78. package/src/internal/botApi.ts +7 -11
  79. package/src/internal/botApiError.ts +15 -20
  80. package/src/internal/botApiTransport.ts +25 -17
  81. package/src/internal/dialog.ts +109 -26
  82. package/src/internal/file.ts +1 -1
  83. package/src/internal/runner.ts +34 -38
  84. package/src/internal/send.ts +161 -132
  85. package/dist/internal/botApiMethods.gen.d.ts +0 -2110
  86. package/dist/internal/botApiMethods.gen.d.ts.map +0 -1
  87. package/dist/internal/botApiMethods.gen.js +0 -2
  88. package/dist/internal/botApiMethods.gen.js.map +0 -1
  89. package/dist/internal/botApiShape.gen.d.ts +0 -406
  90. package/dist/internal/botApiShape.gen.d.ts.map +0 -1
  91. package/dist/internal/botApiShape.gen.js +0 -2
  92. package/dist/internal/botApiShape.gen.js.map +0 -1
  93. package/dist/internal/botApiTypes.gen.d.ts +0 -3986
  94. package/dist/internal/botApiTypes.gen.d.ts.map +0 -1
  95. package/dist/internal/botApiTypes.gen.js +0 -2
  96. package/dist/internal/botApiTypes.gen.js.map +0 -1
  97. package/src/internal/botApiMethods.gen.ts +0 -2111
  98. package/src/internal/botApiShape.gen.ts +0 -406
  99. package/src/internal/botApiTypes.gen.ts +0 -4264
@@ -1,4264 +0,0 @@
1
- /**
2
- * This [object](https://core.telegram.org/bots/api#available-types) represents an incoming update.
3
- *
4
- * At most **one** of the optional parameters can be present in any given update.
5
- */
6
- export interface Update {
7
- /** The update's unique identifier. Update identifiers start from a certain positive number and increase sequentially. This identifier becomes especially handy if you're using [webhooks](https://core.telegram.org/bots/api#setwebhook), since it allows you to ignore repeated updates or to restore the correct update sequence, should they get out of order. If there are no new updates for at least a week, then identifier of the next update will be chosen randomly instead of sequentially. */
8
- update_id: number
9
- /** New incoming message of any kind - text, photo, sticker, etc. */
10
- message?: Message
11
- /** New version of a message that is known to the bot and was edited. This update may at times be triggered by changes to message fields that are either unavailable or not actively used by your bot. */
12
- edited_message?: Message
13
- /** New incoming channel post of any kind - text, photo, sticker, etc. */
14
- channel_post?: Message
15
- /** New version of a channel post that is known to the bot and was edited. This update may at times be triggered by changes to message fields that are either unavailable or not actively used by your bot. */
16
- edited_channel_post?: Message
17
- /** The bot was connected to or disconnected from a business account, or a user edited an existing connection with the bot */
18
- business_connection?: BusinessConnection
19
- /** New message from a connected business account */
20
- business_message?: Message
21
- /** New version of a message from a connected business account */
22
- edited_business_message?: Message
23
- /** Messages were deleted from a connected business account */
24
- deleted_business_messages?: BusinessMessagesDeleted
25
- /** A reaction to a message was changed by a user. The bot must be an administrator in the chat and must explicitly specify `"message_reaction"` in the list of _allowed\_updates_ to receive these updates. The update isn't received for reactions set by bots. */
26
- message_reaction?: MessageReactionUpdated
27
- /** Reactions to a message with anonymous reactions were changed. The bot must be an administrator in the chat and must explicitly specify `"message_reaction_count"` in the list of _allowed\_updates_ to receive these updates. The updates are grouped and can be sent with delay up to a few minutes. */
28
- message_reaction_count?: MessageReactionCountUpdated
29
- /** New incoming [inline](https://core.telegram.org/bots/api#inline-mode) query */
30
- inline_query?: InlineQuery
31
- /** The result of an [inline](https://core.telegram.org/bots/api#inline-mode) query that was chosen by a user and sent to their chat partner. Please see our documentation on the [feedback collecting](https://core.telegram.org/bots/inline#collecting-feedback) for details on how to enable these updates for your bot. */
32
- chosen_inline_result?: ChosenInlineResult
33
- /** New incoming callback query */
34
- callback_query?: CallbackQuery
35
- /** New incoming shipping query. Only for invoices with flexible price */
36
- shipping_query?: ShippingQuery
37
- /** New incoming pre-checkout query. Contains full information about checkout */
38
- pre_checkout_query?: PreCheckoutQuery
39
- /** A user purchased paid media with a non-empty payload sent by the bot in a non-channel chat */
40
- purchased_paid_media?: PaidMediaPurchased
41
- /** New poll state. Bots receive only updates about manually stopped polls and polls, which are sent by the bot */
42
- poll?: Poll
43
- /** A user changed their answer in a non-anonymous poll. Bots receive new votes only in polls that were sent by the bot itself. */
44
- poll_answer?: PollAnswer
45
- /** The bot's chat member status was updated in a chat. For private chats, this update is received only when the bot is blocked or unblocked by the user. */
46
- my_chat_member?: ChatMemberUpdated
47
- /** 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. */
48
- chat_member?: ChatMemberUpdated
49
- /** 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. */
50
- chat_join_request?: ChatJoinRequest
51
- /** A chat boost was added or changed. The bot must be an administrator in the chat to receive these updates. */
52
- chat_boost?: ChatBoostUpdated
53
- /** A boost was removed from a chat. The bot must be an administrator in the chat to receive these updates. */
54
- removed_chat_boost?: ChatBoostRemoved
55
- }
56
-
57
- /** Describes the current status of a webhook. */
58
- export interface WebhookInfo {
59
- /** Webhook URL, may be empty if webhook is not set up */
60
- url: string
61
- /** _True_, if a custom certificate was provided for webhook certificate checks */
62
- has_custom_certificate: boolean
63
- /** Number of updates awaiting delivery */
64
- pending_update_count: number
65
- /** Currently used webhook IP address */
66
- ip_address?: string
67
- /** Unix time for the most recent error that happened when trying to deliver an update via webhook */
68
- last_error_date?: number
69
- /** Error message in human-readable format for the most recent error that happened when trying to deliver an update via webhook */
70
- last_error_message?: string
71
- /** Unix time of the most recent error that happened when trying to synchronize available updates with Telegram datacenters */
72
- last_synchronization_error_date?: number
73
- /** The maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery */
74
- max_connections?: number
75
- /** A list of update types the bot is subscribed to. Defaults to all update types except _chat\_member_ */
76
- allowed_updates?: Array<string>
77
- }
78
-
79
- /** This object represents a Telegram user or bot. */
80
- export interface User {
81
- /** Unique identifier for this user or bot. */
82
- id: number
83
- /** _True_, if this user is a bot */
84
- is_bot: boolean
85
- /** User's or bot's first name */
86
- first_name: string
87
- /** User's or bot's last name */
88
- last_name?: string
89
- /** User's or bot's username */
90
- username?: string
91
- /** [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag) of the user's language */
92
- language_code?: string
93
- /** _True_, if this user is a Telegram Premium user */
94
- is_premium?: true
95
- /** _True_, if this user added the bot to the attachment menu */
96
- added_to_attachment_menu?: true
97
- /** _True_, if the bot can be invited to groups. Returned only in [getMe](https://core.telegram.org/bots/api#getme). */
98
- can_join_groups?: boolean
99
- /** _True_, if [privacy mode](https://core.telegram.org/bots/features#privacy-mode) is disabled for the bot. Returned only in [getMe](https://core.telegram.org/bots/api#getme). */
100
- can_read_all_group_messages?: boolean
101
- /** _True_, if the bot supports inline queries. Returned only in [getMe](https://core.telegram.org/bots/api#getme). */
102
- supports_inline_queries?: boolean
103
- /** _True_, if the bot can be connected to a Telegram Business account to receive its messages. Returned only in [getMe](https://core.telegram.org/bots/api#getme). */
104
- can_connect_to_business?: boolean
105
- /** _True_, if the bot has a main Web App. Returned only in [getMe](https://core.telegram.org/bots/api#getme). */
106
- has_main_web_app?: boolean
107
- /** _True_, if the bot has forum topic mode enabled in private chats. Returned only in [getMe](https://core.telegram.org/bots/api#getme). */
108
- has_topics_enabled?: boolean
109
- }
110
-
111
- /** This object represents a chat. */
112
- export interface Chat {
113
- /** Unique identifier for this chat. */
114
- id: number
115
- /** Type of the chat, can be either “private”, “group”, “supergroup” or “channel” */
116
- type: string
117
- /** Title, for supergroups, channels and group chats */
118
- title?: string
119
- /** Username, for private chats, supergroups and channels if available */
120
- username?: string
121
- /** First name of the other party in a private chat */
122
- first_name?: string
123
- /** Last name of the other party in a private chat */
124
- last_name?: string
125
- /** _True_, if the supergroup chat is a forum (has [topics](https://telegram.org/blog/topics-in-groups-collectible-usernames#topics-in-groups) enabled) */
126
- is_forum?: true
127
- /** _True_, if the chat is the direct messages chat of a channel */
128
- is_direct_messages?: true
129
- }
130
-
131
- /** This object contains full information about a chat. */
132
- export interface ChatFullInfo {
133
- /** Unique identifier for this chat. */
134
- id: number
135
- /** Type of the chat, can be either “private”, “group”, “supergroup” or “channel” */
136
- type: string
137
- /** Title, for supergroups, channels and group chats */
138
- title?: string
139
- /** Username, for private chats, supergroups and channels if available */
140
- username?: string
141
- /** First name of the other party in a private chat */
142
- first_name?: string
143
- /** Last name of the other party in a private chat */
144
- last_name?: string
145
- /** _True_, if the supergroup chat is a forum (has [topics](https://telegram.org/blog/topics-in-groups-collectible-usernames#topics-in-groups) enabled) */
146
- is_forum?: true
147
- /** _True_, if the chat is the direct messages chat of a channel */
148
- is_direct_messages?: true
149
- /** Identifier of the accent color for the chat name and backgrounds of the chat photo, reply header, and link preview. See [accent colors](https://core.telegram.org/bots/api#accent-colors) for more details. */
150
- accent_color_id: number
151
- /** The maximum number of reactions that can be set on a message in the chat */
152
- max_reaction_count: number
153
- /** Chat photo */
154
- photo?: ChatPhoto
155
- /** If non-empty, the list of all [active chat usernames](https://telegram.org/blog/topics-in-groups-collectible-usernames#collectible-usernames); for private chats, supergroups and channels */
156
- active_usernames?: Array<string>
157
- /** For private chats, the date of birth of the user */
158
- birthdate?: Birthdate
159
- /** For private chats with business accounts, the intro of the business */
160
- business_intro?: BusinessIntro
161
- /** For private chats with business accounts, the location of the business */
162
- business_location?: BusinessLocation
163
- /** For private chats with business accounts, the opening hours of the business */
164
- business_opening_hours?: BusinessOpeningHours
165
- /** For private chats, the personal channel of the user */
166
- personal_chat?: Chat
167
- /** Information about the corresponding channel chat; for direct messages chats only */
168
- parent_chat?: Chat
169
- /** List of available reactions allowed in the chat. If omitted, then all [emoji reactions](https://core.telegram.org/bots/api#reactiontypeemoji) are allowed. */
170
- available_reactions?: Array<ReactionType>
171
- /** Custom emoji identifier of the emoji chosen by the chat for the reply header and link preview background */
172
- background_custom_emoji_id?: string
173
- /** Identifier of the accent color for the chat's profile background. See [profile accent colors](https://core.telegram.org/bots/api#profile-accent-colors) for more details. */
174
- profile_accent_color_id?: number
175
- /** Custom emoji identifier of the emoji chosen by the chat for its profile background */
176
- profile_background_custom_emoji_id?: string
177
- /** Custom emoji identifier of the emoji status of the chat or the other party in a private chat */
178
- emoji_status_custom_emoji_id?: string
179
- /** Expiration date of the emoji status of the chat or the other party in a private chat, in Unix time, if any */
180
- emoji_status_expiration_date?: number
181
- /** Bio of the other party in a private chat */
182
- bio?: string
183
- /** _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 */
184
- has_private_forwards?: true
185
- /** _True_, if the privacy settings of the other party restrict sending voice and video note messages in the private chat */
186
- has_restricted_voice_and_video_messages?: true
187
- /** _True_, if users need to join the supergroup before they can send messages */
188
- join_to_send_messages?: true
189
- /** _True_, if all users directly joining the supergroup without using an invite link need to be approved by supergroup administrators */
190
- join_by_request?: true
191
- /** Description, for groups, supergroups and channel chats */
192
- description?: string
193
- /** Primary invite link, for groups, supergroups and channel chats */
194
- invite_link?: string
195
- /** The most recent pinned message (by sending date) */
196
- pinned_message?: Message
197
- /** Default chat member permissions, for groups and supergroups */
198
- permissions?: ChatPermissions
199
- /** Information about types of gifts that are accepted by the chat or by the corresponding user for private chats */
200
- accepted_gift_types: AcceptedGiftTypes
201
- /** _True_, if paid media messages can be sent or forwarded to the channel chat. The field is available only for channel chats. */
202
- can_send_paid_media?: true
203
- /** For supergroups, the minimum allowed delay between consecutive messages sent by each unprivileged user; in seconds */
204
- slow_mode_delay?: number
205
- /** For supergroups, the minimum number of boosts that a non-administrator user needs to add in order to ignore slow mode and chat permissions */
206
- unrestrict_boost_count?: number
207
- /** The time after which all messages sent to the chat will be automatically deleted; in seconds */
208
- message_auto_delete_time?: number
209
- /** _True_, if aggressive anti-spam checks are enabled in the supergroup. The field is only available to chat administrators. */
210
- has_aggressive_anti_spam_enabled?: true
211
- /** _True_, if non-administrators can only get the list of bots and administrators in the chat */
212
- has_hidden_members?: true
213
- /** _True_, if messages from the chat can't be forwarded to other chats */
214
- has_protected_content?: true
215
- /** _True_, if new chat members will have access to old messages; available only to chat administrators */
216
- has_visible_history?: true
217
- /** For supergroups, name of the group sticker set */
218
- sticker_set_name?: string
219
- /** _True_, if the bot can change the group sticker set */
220
- can_set_sticker_set?: true
221
- /** For supergroups, the name of the group's custom emoji sticker set. Custom emoji from this set can be used by all users and bots in the group. */
222
- custom_emoji_sticker_set_name?: string
223
- /** Unique identifier for the linked chat, i.e. the discussion group identifier for a channel and vice versa; for supergroups and channel chats. */
224
- linked_chat_id?: number
225
- /** For supergroups, the location to which the supergroup is connected */
226
- location?: ChatLocation
227
- /** For private chats, the rating of the user if any */
228
- rating?: UserRating
229
- /** The color scheme based on a unique gift that must be used for the chat's name, message replies and link previews */
230
- unique_gift_colors?: UniqueGiftColors
231
- /** The number of Telegram Stars a general user have to pay to send a message to the chat */
232
- paid_message_star_count?: number
233
- }
234
-
235
- /** This object represents a message. */
236
- export interface Message {
237
- /** Unique message identifier inside this chat. In specific instances (e.g., message containing a video sent to a big chat), the server might automatically schedule a message instead of sending it immediately. In such cases, this field will be 0 and the relevant message will be unusable until it is actually sent */
238
- message_id: number
239
- /** Unique identifier of a message thread or forum topic to which the message belongs; for supergroups and private chats only */
240
- message_thread_id?: number
241
- /** Information about the direct messages chat topic that contains the message */
242
- direct_messages_topic?: DirectMessagesTopic
243
- /** Sender of the message; may be empty for messages sent to channels. For backward compatibility, if the message was sent on behalf of a chat, the field contains a fake sender user in non-channel chats */
244
- from?: User
245
- /** Sender of the message when sent on behalf of a chat. For example, the supergroup itself for messages sent by its anonymous administrators or a linked channel for messages automatically forwarded to the channel's discussion group. For backward compatibility, if the message was sent on behalf of a chat, the field _from_ contains a fake sender user in non-channel chats. */
246
- sender_chat?: Chat
247
- /** If the sender of the message boosted the chat, the number of boosts added by the user */
248
- sender_boost_count?: number
249
- /** The bot that actually sent the message on behalf of the business account. Available only for outgoing messages sent on behalf of the connected business account. */
250
- sender_business_bot?: User
251
- /** Date the message was sent in Unix time. It is always a positive number, representing a valid date. */
252
- date: number
253
- /** Unique identifier of the business connection from which the message was received. If non-empty, the message belongs to a chat of the corresponding business account that is independent from any potential bot chat which might share the same identifier. */
254
- business_connection_id?: string
255
- /** Chat the message belongs to */
256
- chat: Chat
257
- /** Information about the original message for forwarded messages */
258
- forward_origin?: MessageOrigin
259
- /** _True_, if the message is sent to a topic in a forum supergroup or a private chat with the bot */
260
- is_topic_message?: true
261
- /** _True_, if the message is a channel post that was automatically forwarded to the connected discussion group */
262
- is_automatic_forward?: true
263
- /** For replies in the same chat and message thread, the original message. Note that the [Message](https://core.telegram.org/bots/api#message) object in this field will not contain further _reply\_to\_message_ fields even if it itself is a reply. */
264
- reply_to_message?: Message
265
- /** Information about the message that is being replied to, which may come from another chat or forum topic */
266
- external_reply?: ExternalReplyInfo
267
- /** For replies that quote part of the original message, the quoted part of the message */
268
- quote?: TextQuote
269
- /** For replies to a story, the original story */
270
- reply_to_story?: Story
271
- /** Identifier of the specific checklist task that is being replied to */
272
- reply_to_checklist_task_id?: number
273
- /** Bot through which the message was sent */
274
- via_bot?: User
275
- /** Date the message was last edited in Unix time */
276
- edit_date?: number
277
- /** _True_, if the message can't be forwarded */
278
- has_protected_content?: true
279
- /** _True_, if the message was sent by an implicit action, for example, as an away or a greeting business message, or as a scheduled message */
280
- is_from_offline?: true
281
- /** _True_, if the message is a paid post. Note that such posts must not be deleted for 24 hours to receive the payment and can't be edited. */
282
- is_paid_post?: true
283
- /** The unique identifier of a media message group this message belongs to */
284
- media_group_id?: string
285
- /** Signature of the post author for messages in channels, or the custom title of an anonymous group administrator */
286
- author_signature?: string
287
- /** The number of Telegram Stars that were paid by the sender of the message to send it */
288
- paid_star_count?: number
289
- /** For text messages, the actual UTF-8 text of the message */
290
- text?: string
291
- /** For text messages, special entities like usernames, URLs, bot commands, etc. that appear in the text */
292
- entities?: Array<MessageEntity>
293
- /** Options used for link preview generation for the message, if it is a text message and link preview options were changed */
294
- link_preview_options?: LinkPreviewOptions
295
- /** Information about suggested post parameters if the message is a suggested post in a channel direct messages chat. If the message is an approved or declined suggested post, then it can't be edited. */
296
- suggested_post_info?: SuggestedPostInfo
297
- /** Unique identifier of the message effect added to the message */
298
- effect_id?: string
299
- /** Message is an animation, information about the animation. For backward compatibility, when this field is set, the _document_ field will also be set */
300
- animation?: Animation
301
- /** Message is an audio file, information about the file */
302
- audio?: Audio
303
- /** Message is a general file, information about the file */
304
- document?: Document
305
- /** Message contains paid media; information about the paid media */
306
- paid_media?: PaidMediaInfo
307
- /** Message is a photo, available sizes of the photo */
308
- photo?: Array<PhotoSize>
309
- /** Message is a sticker, information about the sticker */
310
- sticker?: Sticker
311
- /** Message is a forwarded story */
312
- story?: Story
313
- /** Message is a video, information about the video */
314
- video?: Video
315
- /** Message is a [video note](https://telegram.org/blog/video-messages-and-telescope), information about the video message */
316
- video_note?: VideoNote
317
- /** Message is a voice message, information about the file */
318
- voice?: Voice
319
- /** Caption for the animation, audio, document, paid media, photo, video or voice */
320
- caption?: string
321
- /** For messages with a caption, special entities like usernames, URLs, bot commands, etc. that appear in the caption */
322
- caption_entities?: Array<MessageEntity>
323
- /** _True_, if the caption must be shown above the message media */
324
- show_caption_above_media?: true
325
- /** _True_, if the message media is covered by a spoiler animation */
326
- has_media_spoiler?: true
327
- /** Message is a checklist */
328
- checklist?: Checklist
329
- /** Message is a shared contact, information about the contact */
330
- contact?: Contact
331
- /** Message is a dice with random value */
332
- dice?: Dice
333
- /** Message is a game, information about the game. [More about games »](https://core.telegram.org/bots/api#games) */
334
- game?: Game
335
- /** Message is a native poll, information about the poll */
336
- poll?: Poll
337
- /** Message is a venue, information about the venue. For backward compatibility, when this field is set, the _location_ field will also be set */
338
- venue?: Venue
339
- /** Message is a shared location, information about the location */
340
- location?: Location
341
- /** New members that were added to the group or supergroup and information about them (the bot itself may be one of these members) */
342
- new_chat_members?: Array<User>
343
- /** A member was removed from the group, information about them (this member may be the bot itself) */
344
- left_chat_member?: User
345
- /** A chat title was changed to this value */
346
- new_chat_title?: string
347
- /** A chat photo was change to this value */
348
- new_chat_photo?: Array<PhotoSize>
349
- /** Service message: the chat photo was deleted */
350
- delete_chat_photo?: true
351
- /** Service message: the group has been created */
352
- group_chat_created?: true
353
- /** 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. */
354
- supergroup_chat_created?: true
355
- /** 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. */
356
- channel_chat_created?: true
357
- /** Service message: auto-delete timer settings changed in the chat */
358
- message_auto_delete_timer_changed?: MessageAutoDeleteTimerChanged
359
- /** The group has been migrated to a supergroup with the specified identifier. */
360
- migrate_to_chat_id?: number
361
- /** The supergroup has been migrated from a group with the specified identifier. */
362
- migrate_from_chat_id?: number
363
- /** Specified message was pinned. Note that the [Message](https://core.telegram.org/bots/api#message) object in this field will not contain further _reply\_to\_message_ fields even if it itself is a reply. */
364
- pinned_message?: MaybeInaccessibleMessage
365
- /** Message is an invoice for a [payment](https://core.telegram.org/bots/api#payments), information about the invoice. [More about payments »](https://core.telegram.org/bots/api#payments) */
366
- invoice?: Invoice
367
- /** Message is a service message about a successful payment, information about the payment. [More about payments »](https://core.telegram.org/bots/api#payments) */
368
- successful_payment?: SuccessfulPayment
369
- /** Message is a service message about a refunded payment, information about the payment. [More about payments »](https://core.telegram.org/bots/api#payments) */
370
- refunded_payment?: RefundedPayment
371
- /** Service message: users were shared with the bot */
372
- users_shared?: UsersShared
373
- /** Service message: a chat was shared with the bot */
374
- chat_shared?: ChatShared
375
- /** Service message: a regular gift was sent or received */
376
- gift?: GiftInfo
377
- /** Service message: a unique gift was sent or received */
378
- unique_gift?: UniqueGiftInfo
379
- /** Service message: upgrade of a gift was purchased after the gift was sent */
380
- gift_upgrade_sent?: GiftInfo
381
- /** The domain name of the website on which the user has logged in. [More about Telegram Login »](https://core.telegram.org/widgets/login) */
382
- connected_website?: string
383
- /** Service message: the user allowed the bot to write messages after adding it to the attachment or side menu, launching a Web App from a link, or accepting an explicit request from a Web App sent by the method [requestWriteAccess](https://core.telegram.org/bots/webapps#initializing-mini-apps) */
384
- write_access_allowed?: WriteAccessAllowed
385
- /** Telegram Passport data */
386
- passport_data?: PassportData
387
- /** Service message. A user in the chat triggered another user's proximity alert while sharing Live Location. */
388
- proximity_alert_triggered?: ProximityAlertTriggered
389
- /** Service message: user boosted the chat */
390
- boost_added?: ChatBoostAdded
391
- /** Service message: chat background set */
392
- chat_background_set?: ChatBackground
393
- /** Service message: some tasks in a checklist were marked as done or not done */
394
- checklist_tasks_done?: ChecklistTasksDone
395
- /** Service message: tasks were added to a checklist */
396
- checklist_tasks_added?: ChecklistTasksAdded
397
- /** Service message: the price for paid messages in the corresponding direct messages chat of a channel has changed */
398
- direct_message_price_changed?: DirectMessagePriceChanged
399
- /** Service message: forum topic created */
400
- forum_topic_created?: ForumTopicCreated
401
- /** Service message: forum topic edited */
402
- forum_topic_edited?: ForumTopicEdited
403
- /** Service message: forum topic closed */
404
- forum_topic_closed?: ForumTopicClosed
405
- /** Service message: forum topic reopened */
406
- forum_topic_reopened?: ForumTopicReopened
407
- /** Service message: the 'General' forum topic hidden */
408
- general_forum_topic_hidden?: GeneralForumTopicHidden
409
- /** Service message: the 'General' forum topic unhidden */
410
- general_forum_topic_unhidden?: GeneralForumTopicUnhidden
411
- /** Service message: a scheduled giveaway was created */
412
- giveaway_created?: GiveawayCreated
413
- /** The message is a scheduled giveaway message */
414
- giveaway?: Giveaway
415
- /** A giveaway with public winners was completed */
416
- giveaway_winners?: GiveawayWinners
417
- /** Service message: a giveaway without public winners was completed */
418
- giveaway_completed?: GiveawayCompleted
419
- /** Service message: the price for paid messages has changed in the chat */
420
- paid_message_price_changed?: PaidMessagePriceChanged
421
- /** Service message: a suggested post was approved */
422
- suggested_post_approved?: SuggestedPostApproved
423
- /** Service message: approval of a suggested post has failed */
424
- suggested_post_approval_failed?: SuggestedPostApprovalFailed
425
- /** Service message: a suggested post was declined */
426
- suggested_post_declined?: SuggestedPostDeclined
427
- /** Service message: payment for a suggested post was received */
428
- suggested_post_paid?: SuggestedPostPaid
429
- /** Service message: payment for a suggested post was refunded */
430
- suggested_post_refunded?: SuggestedPostRefunded
431
- /** Service message: video chat scheduled */
432
- video_chat_scheduled?: VideoChatScheduled
433
- /** Service message: video chat started */
434
- video_chat_started?: VideoChatStarted
435
- /** Service message: video chat ended */
436
- video_chat_ended?: VideoChatEnded
437
- /** Service message: new participants invited to a video chat */
438
- video_chat_participants_invited?: VideoChatParticipantsInvited
439
- /** Service message: data sent by a Web App */
440
- web_app_data?: WebAppData
441
- /** Inline keyboard attached to the message. `login_url` buttons are represented as ordinary `url` buttons. */
442
- reply_markup?: InlineKeyboardMarkup
443
- }
444
-
445
- /** This object represents a unique message identifier. */
446
- export interface MessageId {
447
- /** Unique message identifier. In specific instances (e.g., message containing a video sent to a big chat), the server might automatically schedule a message instead of sending it immediately. In such cases, this field will be 0 and the relevant message will be unusable until it is actually sent */
448
- message_id: number
449
- }
450
-
451
- /** This object describes a message that was deleted or is otherwise inaccessible to the bot. */
452
- export interface InaccessibleMessage {
453
- /** Chat the message belonged to */
454
- chat: Chat
455
- /** Unique message identifier inside the chat */
456
- message_id: number
457
- /** Always 0. The field can be used to differentiate regular and inaccessible messages. */
458
- date: number
459
- }
460
-
461
- /**
462
- * This object describes a message that can be inaccessible to the bot. It can be one of
463
- *
464
- * - [Message](https://core.telegram.org/bots/api#message)
465
- * - [InaccessibleMessage](https://core.telegram.org/bots/api#inaccessiblemessage)
466
- */
467
- export type MaybeInaccessibleMessage = Message | InaccessibleMessage
468
-
469
- /** This object represents one special entity in a text message. For example, hashtags, usernames, URLs, etc. */
470
- export interface MessageEntity {
471
- /** Type of the entity. Currently, can be “mention” (`@username`), “hashtag” (`#hashtag` or `#hashtag@chatusername`), “cashtag” (`$USD` or `$USD@chatusername`), “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), “blockquote” (block quotation), “expandable\_blockquote” (collapsed-by-default block quotation), “code” (monowidth string), “pre” (monowidth block), “text\_link” (for clickable text URLs), “text\_mention” (for users [without usernames](https://telegram.org/blog/edit#new-mentions)), “custom\_emoji” (for inline custom emoji stickers) */
472
- type: string
473
- /** Offset in [UTF-16 code units](https://core.telegram.org/api/entities#entity-length) to the start of the entity */
474
- offset: number
475
- /** Length of the entity in [UTF-16 code units](https://core.telegram.org/api/entities#entity-length) */
476
- length: number
477
- /** For “text\_link” only, URL that will be opened after user taps on the text */
478
- url?: string
479
- /** For “text\_mention” only, the mentioned user */
480
- user?: User
481
- /** For “pre” only, the programming language of the entity text */
482
- language?: string
483
- /** For “custom\_emoji” only, unique identifier of the custom emoji. Use [getCustomEmojiStickers](https://core.telegram.org/bots/api#getcustomemojistickers) to get full information about the sticker */
484
- custom_emoji_id?: string
485
- }
486
-
487
- /** This object contains information about the quoted part of a message that is replied to by the given message. */
488
- export interface TextQuote {
489
- /** Text of the quoted part of a message that is replied to by the given message */
490
- text: string
491
- /** Special entities that appear in the quote. Currently, only _bold_, _italic_, _underline_, _strikethrough_, _spoiler_, and _custom\_emoji_ entities are kept in quotes. */
492
- entities?: Array<MessageEntity>
493
- /** Approximate quote position in the original message in UTF-16 code units as specified by the sender */
494
- position: number
495
- /** _True_, if the quote was chosen manually by the message sender. Otherwise, the quote was added automatically by the server. */
496
- is_manual?: true
497
- }
498
-
499
- /** This object contains information about a message that is being replied to, which may come from another chat or forum topic. */
500
- export interface ExternalReplyInfo {
501
- /** Origin of the message replied to by the given message */
502
- origin: MessageOrigin
503
- /** Chat the original message belongs to. Available only if the chat is a supergroup or a channel. */
504
- chat?: Chat
505
- /** Unique message identifier inside the original chat. Available only if the original chat is a supergroup or a channel. */
506
- message_id?: number
507
- /** Options used for link preview generation for the original message, if it is a text message */
508
- link_preview_options?: LinkPreviewOptions
509
- /** Message is an animation, information about the animation */
510
- animation?: Animation
511
- /** Message is an audio file, information about the file */
512
- audio?: Audio
513
- /** Message is a general file, information about the file */
514
- document?: Document
515
- /** Message contains paid media; information about the paid media */
516
- paid_media?: PaidMediaInfo
517
- /** Message is a photo, available sizes of the photo */
518
- photo?: Array<PhotoSize>
519
- /** Message is a sticker, information about the sticker */
520
- sticker?: Sticker
521
- /** Message is a forwarded story */
522
- story?: Story
523
- /** Message is a video, information about the video */
524
- video?: Video
525
- /** Message is a [video note](https://telegram.org/blog/video-messages-and-telescope), information about the video message */
526
- video_note?: VideoNote
527
- /** Message is a voice message, information about the file */
528
- voice?: Voice
529
- /** _True_, if the message media is covered by a spoiler animation */
530
- has_media_spoiler?: true
531
- /** Message is a checklist */
532
- checklist?: Checklist
533
- /** Message is a shared contact, information about the contact */
534
- contact?: Contact
535
- /** Message is a dice with random value */
536
- dice?: Dice
537
- /** Message is a game, information about the game. [More about games »](https://core.telegram.org/bots/api#games) */
538
- game?: Game
539
- /** Message is a scheduled giveaway, information about the giveaway */
540
- giveaway?: Giveaway
541
- /** A giveaway with public winners was completed */
542
- giveaway_winners?: GiveawayWinners
543
- /** Message is an invoice for a [payment](https://core.telegram.org/bots/api#payments), information about the invoice. [More about payments »](https://core.telegram.org/bots/api#payments) */
544
- invoice?: Invoice
545
- /** Message is a shared location, information about the location */
546
- location?: Location
547
- /** Message is a native poll, information about the poll */
548
- poll?: Poll
549
- /** Message is a venue, information about the venue */
550
- venue?: Venue
551
- }
552
-
553
- /** Describes reply parameters for the message that is being sent. */
554
- export interface ReplyParameters {
555
- /** Identifier of the message that will be replied to in the current chat, or in the chat _chat\_id_ if it is specified */
556
- message_id: number
557
- /** If the message to be replied to is from a different chat, unique identifier for the chat or username of the channel (in the format `@channelusername`). Not supported for messages sent on behalf of a business account and messages from channel direct messages chats. */
558
- chat_id?: number | string
559
- /** Pass _True_ if the message should be sent even if the specified message to be replied to is not found. Always _False_ for replies in another chat or forum topic. Always _True_ for messages sent on behalf of a business account. */
560
- allow_sending_without_reply?: boolean
561
- /** Quoted part of the message to be replied to; 0-1024 characters after entities parsing. The quote must be an exact substring of the message to be replied to, including _bold_, _italic_, _underline_, _strikethrough_, _spoiler_, and _custom\_emoji_ entities. The message will fail to send if the quote isn't found in the original message. */
562
- quote?: string
563
- /** Mode for parsing entities in the quote. See [formatting options](https://core.telegram.org/bots/api#formatting-options) for more details. */
564
- quote_parse_mode?: string
565
- /** An array of special entities that appear in the quote. It can be specified instead of _quote\_parse\_mode_. */
566
- quote_entities?: Array<MessageEntity>
567
- /** Position of the quote in the original message in UTF-16 code units */
568
- quote_position?: number
569
- /** Identifier of the specific checklist task to be replied to */
570
- checklist_task_id?: number
571
- }
572
-
573
- /**
574
- * This object describes the origin of a message. It can be one of
575
- *
576
- * - [MessageOriginUser](https://core.telegram.org/bots/api#messageoriginuser)
577
- * - [MessageOriginHiddenUser](https://core.telegram.org/bots/api#messageoriginhiddenuser)
578
- * - [MessageOriginChat](https://core.telegram.org/bots/api#messageoriginchat)
579
- * - [MessageOriginChannel](https://core.telegram.org/bots/api#messageoriginchannel)
580
- */
581
- export type MessageOrigin = MessageOriginUser | MessageOriginHiddenUser | MessageOriginChat | MessageOriginChannel
582
-
583
- /** The message was originally sent by a known user. */
584
- export interface MessageOriginUser {
585
- /** Type of the message origin, always “user” */
586
- type: string
587
- /** Date the message was sent originally in Unix time */
588
- date: number
589
- /** User that sent the message originally */
590
- sender_user: User
591
- }
592
-
593
- /** The message was originally sent by an unknown user. */
594
- export interface MessageOriginHiddenUser {
595
- /** Type of the message origin, always “hidden\_user” */
596
- type: string
597
- /** Date the message was sent originally in Unix time */
598
- date: number
599
- /** Name of the user that sent the message originally */
600
- sender_user_name: string
601
- }
602
-
603
- /** The message was originally sent on behalf of a chat to a group chat. */
604
- export interface MessageOriginChat {
605
- /** Type of the message origin, always “chat” */
606
- type: string
607
- /** Date the message was sent originally in Unix time */
608
- date: number
609
- /** Chat that sent the message originally */
610
- sender_chat: Chat
611
- /** For messages originally sent by an anonymous chat administrator, original message author signature */
612
- author_signature?: string
613
- }
614
-
615
- /** The message was originally sent to a channel chat. */
616
- export interface MessageOriginChannel {
617
- /** Type of the message origin, always “channel” */
618
- type: string
619
- /** Date the message was sent originally in Unix time */
620
- date: number
621
- /** Channel chat to which the message was originally sent */
622
- chat: Chat
623
- /** Unique message identifier inside the chat */
624
- message_id: number
625
- /** Signature of the original post author */
626
- author_signature?: string
627
- }
628
-
629
- /** This object represents one size of a photo or a [file](https://core.telegram.org/bots/api#document) / [sticker](https://core.telegram.org/bots/api#sticker) thumbnail. */
630
- export interface PhotoSize {
631
- /** Identifier for this file, which can be used to download or reuse the file */
632
- file_id: string
633
- /** 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. */
634
- file_unique_id: string
635
- /** Photo width */
636
- width: number
637
- /** Photo height */
638
- height: number
639
- /** File size in bytes */
640
- file_size?: number
641
- }
642
-
643
- /** This object represents an animation file (GIF or H.264/MPEG-4 AVC video without sound). */
644
- export interface Animation {
645
- /** Identifier for this file, which can be used to download or reuse the file */
646
- file_id: string
647
- /** 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. */
648
- file_unique_id: string
649
- /** Video width as defined by the sender */
650
- width: number
651
- /** Video height as defined by the sender */
652
- height: number
653
- /** Duration of the video in seconds as defined by the sender */
654
- duration: number
655
- /** Animation thumbnail as defined by the sender */
656
- thumbnail?: PhotoSize
657
- /** Original animation filename as defined by the sender */
658
- file_name?: string
659
- /** MIME type of the file as defined by the sender */
660
- mime_type?: string
661
- /** File size in bytes. */
662
- file_size?: number
663
- }
664
-
665
- /** This object represents an audio file to be treated as music by the Telegram clients. */
666
- export interface Audio {
667
- /** Identifier for this file, which can be used to download or reuse the file */
668
- file_id: string
669
- /** 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. */
670
- file_unique_id: string
671
- /** Duration of the audio in seconds as defined by the sender */
672
- duration: number
673
- /** Performer of the audio as defined by the sender or by audio tags */
674
- performer?: string
675
- /** Title of the audio as defined by the sender or by audio tags */
676
- title?: string
677
- /** Original filename as defined by the sender */
678
- file_name?: string
679
- /** MIME type of the file as defined by the sender */
680
- mime_type?: string
681
- /** File size in bytes. */
682
- file_size?: number
683
- /** Thumbnail of the album cover to which the music file belongs */
684
- thumbnail?: PhotoSize
685
- }
686
-
687
- /** This object represents a general file (as opposed to [photos](https://core.telegram.org/bots/api#photosize), [voice messages](https://core.telegram.org/bots/api#voice) and [audio files](https://core.telegram.org/bots/api#audio)). */
688
- export interface Document {
689
- /** Identifier for this file, which can be used to download or reuse the file */
690
- file_id: string
691
- /** 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. */
692
- file_unique_id: string
693
- /** Document thumbnail as defined by the sender */
694
- thumbnail?: PhotoSize
695
- /** Original filename as defined by the sender */
696
- file_name?: string
697
- /** MIME type of the file as defined by the sender */
698
- mime_type?: string
699
- /** File size in bytes. */
700
- file_size?: number
701
- }
702
-
703
- /** This object represents a story. */
704
- export interface Story {
705
- /** Chat that posted the story */
706
- chat: Chat
707
- /** Unique identifier for the story in the chat */
708
- id: number
709
- }
710
-
711
- /** This object represents a video file. */
712
- export interface Video {
713
- /** Identifier for this file, which can be used to download or reuse the file */
714
- file_id: string
715
- /** 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. */
716
- file_unique_id: string
717
- /** Video width as defined by the sender */
718
- width: number
719
- /** Video height as defined by the sender */
720
- height: number
721
- /** Duration of the video in seconds as defined by the sender */
722
- duration: number
723
- /** Video thumbnail */
724
- thumbnail?: PhotoSize
725
- /** Available sizes of the cover of the video in the message */
726
- cover?: Array<PhotoSize>
727
- /** Timestamp in seconds from which the video will play in the message */
728
- start_timestamp?: number
729
- /** Original filename as defined by the sender */
730
- file_name?: string
731
- /** MIME type of the file as defined by the sender */
732
- mime_type?: string
733
- /** File size in bytes. */
734
- file_size?: number
735
- }
736
-
737
- /** This object represents a [video message](https://telegram.org/blog/video-messages-and-telescope) (available in Telegram apps as of [v.4.0](https://telegram.org/blog/video-messages-and-telescope)). */
738
- export interface VideoNote {
739
- /** Identifier for this file, which can be used to download or reuse the file */
740
- file_id: string
741
- /** 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. */
742
- file_unique_id: string
743
- /** Video width and height (diameter of the video message) as defined by the sender */
744
- length: number
745
- /** Duration of the video in seconds as defined by the sender */
746
- duration: number
747
- /** Video thumbnail */
748
- thumbnail?: PhotoSize
749
- /** File size in bytes */
750
- file_size?: number
751
- }
752
-
753
- /** This object represents a voice note. */
754
- export interface Voice {
755
- /** Identifier for this file, which can be used to download or reuse the file */
756
- file_id: string
757
- /** 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. */
758
- file_unique_id: string
759
- /** Duration of the audio in seconds as defined by the sender */
760
- duration: number
761
- /** MIME type of the file as defined by the sender */
762
- mime_type?: string
763
- /** File size in bytes. */
764
- file_size?: number
765
- }
766
-
767
- /** Describes the paid media added to a message. */
768
- export interface PaidMediaInfo {
769
- /** The number of Telegram Stars that must be paid to buy access to the media */
770
- star_count: number
771
- /** Information about the paid media */
772
- paid_media: Array<PaidMedia>
773
- }
774
-
775
- /**
776
- * This object describes paid media. Currently, it can be one of
777
- *
778
- * - [PaidMediaPreview](https://core.telegram.org/bots/api#paidmediapreview)
779
- * - [PaidMediaPhoto](https://core.telegram.org/bots/api#paidmediaphoto)
780
- * - [PaidMediaVideo](https://core.telegram.org/bots/api#paidmediavideo)
781
- */
782
- export type PaidMedia = PaidMediaPreview | PaidMediaPhoto | PaidMediaVideo
783
-
784
- /** The paid media isn't available before the payment. */
785
- export interface PaidMediaPreview {
786
- /** Type of the paid media, always “preview” */
787
- type: string
788
- /** Media width as defined by the sender */
789
- width?: number
790
- /** Media height as defined by the sender */
791
- height?: number
792
- /** Duration of the media in seconds as defined by the sender */
793
- duration?: number
794
- }
795
-
796
- /** The paid media is a photo. */
797
- export interface PaidMediaPhoto {
798
- /** Type of the paid media, always “photo” */
799
- type: string
800
- /** The photo */
801
- photo: Array<PhotoSize>
802
- }
803
-
804
- /** The paid media is a video. */
805
- export interface PaidMediaVideo {
806
- /** Type of the paid media, always “video” */
807
- type: string
808
- /** The video */
809
- video: Video
810
- }
811
-
812
- /** This object represents a phone contact. */
813
- export interface Contact {
814
- /** Contact's phone number */
815
- phone_number: string
816
- /** Contact's first name */
817
- first_name: string
818
- /** Contact's last name */
819
- last_name?: string
820
- /** Contact's user identifier in Telegram. */
821
- user_id?: number
822
- /** Additional data about the contact in the form of a [vCard](https://en.wikipedia.org/wiki/VCard) */
823
- vcard?: string
824
- }
825
-
826
- /** This object represents an animated emoji that displays a random value. */
827
- export interface Dice {
828
- /** Emoji on which the dice throw animation is based */
829
- emoji: string
830
- /** Value of the dice, 1-6 for “![🎲](//telegram.org/img/emoji/40/F09F8EB2.png)”, “![🎯](//telegram.org/img/emoji/40/F09F8EAF.png)” and “![🎳](//telegram.org/img/emoji/40/F09F8EB3.png)” base emoji, 1-5 for “![🏀](//telegram.org/img/emoji/40/F09F8F80.png)” and “![⚽](//telegram.org/img/emoji/40/E29ABD.png)” base emoji, 1-64 for “![🎰](//telegram.org/img/emoji/40/F09F8EB0.png)” base emoji */
831
- value: number
832
- }
833
-
834
- /** This object contains information about one answer option in a poll. */
835
- export interface PollOption {
836
- /** Option text, 1-100 characters */
837
- text: string
838
- /** Special entities that appear in the option _text_. Currently, only custom emoji entities are allowed in poll option texts */
839
- text_entities?: Array<MessageEntity>
840
- /** Number of users that voted for this option */
841
- voter_count: number
842
- }
843
-
844
- /** This object contains information about one answer option in a poll to be sent. */
845
- export interface InputPollOption {
846
- /** Option text, 1-100 characters */
847
- text: string
848
- /** Mode for parsing entities in the text. See [formatting options](https://core.telegram.org/bots/api#formatting-options) for more details. Currently, only custom emoji entities are allowed */
849
- text_parse_mode?: string
850
- /** An array of special entities that appear in the poll option text. It can be specified instead of _text\_parse\_mode_ */
851
- text_entities?: Array<MessageEntity>
852
- }
853
-
854
- /** This object represents an answer of a user in a non-anonymous poll. */
855
- export interface PollAnswer {
856
- /** Unique poll identifier */
857
- poll_id: string
858
- /** The chat that changed the answer to the poll, if the voter is anonymous */
859
- voter_chat?: Chat
860
- /** The user that changed the answer to the poll, if the voter isn't anonymous */
861
- user?: User
862
- /** 0-based identifiers of chosen answer options. May be empty if the vote was retracted. */
863
- option_ids: Array<number>
864
- }
865
-
866
- /** This object contains information about a poll. */
867
- export interface Poll {
868
- /** Unique poll identifier */
869
- id: string
870
- /** Poll question, 1-300 characters */
871
- question: string
872
- /** Special entities that appear in the _question_. Currently, only custom emoji entities are allowed in poll questions */
873
- question_entities?: Array<MessageEntity>
874
- /** List of poll options */
875
- options: Array<PollOption>
876
- /** Total number of users that voted in the poll */
877
- total_voter_count: number
878
- /** _True_, if the poll is closed */
879
- is_closed: boolean
880
- /** _True_, if the poll is anonymous */
881
- is_anonymous: boolean
882
- /** Poll type, currently can be “regular” or “quiz” */
883
- type: string
884
- /** _True_, if the poll allows multiple answers */
885
- allows_multiple_answers: boolean
886
- /** 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. */
887
- correct_option_id?: number
888
- /** 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 */
889
- explanation?: string
890
- /** Special entities like usernames, URLs, bot commands, etc. that appear in the _explanation_ */
891
- explanation_entities?: Array<MessageEntity>
892
- /** Amount of time in seconds the poll will be active after creation */
893
- open_period?: number
894
- /** Point in time (Unix timestamp) when the poll will be automatically closed */
895
- close_date?: number
896
- }
897
-
898
- /** Describes a task in a checklist. */
899
- export interface ChecklistTask {
900
- /** Unique identifier of the task */
901
- id: number
902
- /** Text of the task */
903
- text: string
904
- /** Special entities that appear in the task text */
905
- text_entities?: Array<MessageEntity>
906
- /** User that completed the task; omitted if the task wasn't completed by a user */
907
- completed_by_user?: User
908
- /** Chat that completed the task; omitted if the task wasn't completed by a chat */
909
- completed_by_chat?: Chat
910
- /** Point in time (Unix timestamp) when the task was completed; 0 if the task wasn't completed */
911
- completion_date?: number
912
- }
913
-
914
- /** Describes a checklist. */
915
- export interface Checklist {
916
- /** Title of the checklist */
917
- title: string
918
- /** Special entities that appear in the checklist title */
919
- title_entities?: Array<MessageEntity>
920
- /** List of tasks in the checklist */
921
- tasks: Array<ChecklistTask>
922
- /** _True_, if users other than the creator of the list can add tasks to the list */
923
- others_can_add_tasks?: true
924
- /** _True_, if users other than the creator of the list can mark tasks as done or not done */
925
- others_can_mark_tasks_as_done?: true
926
- }
927
-
928
- /** Describes a task to add to a checklist. */
929
- export interface InputChecklistTask {
930
- /** Unique identifier of the task; must be positive and unique among all task identifiers currently present in the checklist */
931
- id: number
932
- /** Text of the task; 1-100 characters after entities parsing */
933
- text: string
934
- /** Mode for parsing entities in the text. See [formatting options](https://core.telegram.org/bots/api#formatting-options) for more details. */
935
- parse_mode?: string
936
- /** List of special entities that appear in the text, which can be specified instead of parse\_mode. Currently, only _bold_, _italic_, _underline_, _strikethrough_, _spoiler_, and _custom\_emoji_ entities are allowed. */
937
- text_entities?: Array<MessageEntity>
938
- }
939
-
940
- /** Describes a checklist to create. */
941
- export interface InputChecklist {
942
- /** Title of the checklist; 1-255 characters after entities parsing */
943
- title: string
944
- /** Mode for parsing entities in the title. See [formatting options](https://core.telegram.org/bots/api#formatting-options) for more details. */
945
- parse_mode?: string
946
- /** List of special entities that appear in the title, which can be specified instead of parse\_mode. Currently, only _bold_, _italic_, _underline_, _strikethrough_, _spoiler_, and _custom\_emoji_ entities are allowed. */
947
- title_entities?: Array<MessageEntity>
948
- /** List of 1-30 tasks in the checklist */
949
- tasks: Array<InputChecklistTask>
950
- /** Pass _True_ if other users can add tasks to the checklist */
951
- others_can_add_tasks?: boolean
952
- /** Pass _True_ if other users can mark tasks as done or not done in the checklist */
953
- others_can_mark_tasks_as_done?: boolean
954
- }
955
-
956
- /** Describes a service message about checklist tasks marked as done or not done. */
957
- export interface ChecklistTasksDone {
958
- /** Message containing the checklist whose tasks were marked as done or not done. Note that the [Message](https://core.telegram.org/bots/api#message) object in this field will not contain the _reply\_to\_message_ field even if it itself is a reply. */
959
- checklist_message?: Message
960
- /** Identifiers of the tasks that were marked as done */
961
- marked_as_done_task_ids?: Array<number>
962
- /** Identifiers of the tasks that were marked as not done */
963
- marked_as_not_done_task_ids?: Array<number>
964
- }
965
-
966
- /** Describes a service message about tasks added to a checklist. */
967
- export interface ChecklistTasksAdded {
968
- /** Message containing the checklist to which the tasks were added. Note that the [Message](https://core.telegram.org/bots/api#message) object in this field will not contain the _reply\_to\_message_ field even if it itself is a reply. */
969
- checklist_message?: Message
970
- /** List of tasks added to the checklist */
971
- tasks: Array<ChecklistTask>
972
- }
973
-
974
- /** This object represents a point on the map. */
975
- export interface Location {
976
- /** Latitude as defined by the sender */
977
- latitude: number
978
- /** Longitude as defined by the sender */
979
- longitude: number
980
- /** The radius of uncertainty for the location, measured in meters; 0-1500 */
981
- horizontal_accuracy?: number
982
- /** Time relative to the message sending date, during which the location can be updated; in seconds. For active live locations only. */
983
- live_period?: number
984
- /** The direction in which user is moving, in degrees; 1-360. For active live locations only. */
985
- heading?: number
986
- /** The maximum distance for proximity alerts about approaching another chat member, in meters. For sent live locations only. */
987
- proximity_alert_radius?: number
988
- }
989
-
990
- /** This object represents a venue. */
991
- export interface Venue {
992
- /** Venue location. Can't be a live location */
993
- location: Location
994
- /** Name of the venue */
995
- title: string
996
- /** Address of the venue */
997
- address: string
998
- /** Foursquare identifier of the venue */
999
- foursquare_id?: string
1000
- /** Foursquare type of the venue. (For example, “arts\_entertainment/default”, “arts\_entertainment/aquarium” or “food/icecream”.) */
1001
- foursquare_type?: string
1002
- /** Google Places identifier of the venue */
1003
- google_place_id?: string
1004
- /** Google Places type of the venue. (See [supported types](https://developers.google.com/places/web-service/supported_types).) */
1005
- google_place_type?: string
1006
- }
1007
-
1008
- /** Describes data sent from a [Web App](https://core.telegram.org/bots/webapps) to the bot. */
1009
- export interface WebAppData {
1010
- /** The data. Be aware that a bad client can send arbitrary data in this field. */
1011
- data: string
1012
- /** 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. */
1013
- button_text: string
1014
- }
1015
-
1016
- /** This object represents the content of a service message, sent whenever a user in the chat triggers a proximity alert set by another user. */
1017
- export interface ProximityAlertTriggered {
1018
- /** User that triggered the alert */
1019
- traveler: User
1020
- /** User that set the alert */
1021
- watcher: User
1022
- /** The distance between the users */
1023
- distance: number
1024
- }
1025
-
1026
- /** This object represents a service message about a change in auto-delete timer settings. */
1027
- export interface MessageAutoDeleteTimerChanged {
1028
- /** New auto-delete time for messages in the chat; in seconds */
1029
- message_auto_delete_time: number
1030
- }
1031
-
1032
- /** This object represents a service message about a user boosting a chat. */
1033
- export interface ChatBoostAdded {
1034
- /** Number of boosts added by the user */
1035
- boost_count: number
1036
- }
1037
-
1038
- /**
1039
- * This object describes the way a background is filled based on the selected colors. Currently, it can be one of
1040
- *
1041
- * - [BackgroundFillSolid](https://core.telegram.org/bots/api#backgroundfillsolid)
1042
- * - [BackgroundFillGradient](https://core.telegram.org/bots/api#backgroundfillgradient)
1043
- * - [BackgroundFillFreeformGradient](https://core.telegram.org/bots/api#backgroundfillfreeformgradient)
1044
- */
1045
- export type BackgroundFill = BackgroundFillSolid | BackgroundFillGradient | BackgroundFillFreeformGradient
1046
-
1047
- /** The background is filled using the selected color. */
1048
- export interface BackgroundFillSolid {
1049
- /** Type of the background fill, always “solid” */
1050
- type: string
1051
- /** The color of the background fill in the RGB24 format */
1052
- color: number
1053
- }
1054
-
1055
- /** The background is a gradient fill. */
1056
- export interface BackgroundFillGradient {
1057
- /** Type of the background fill, always “gradient” */
1058
- type: string
1059
- /** Top color of the gradient in the RGB24 format */
1060
- top_color: number
1061
- /** Bottom color of the gradient in the RGB24 format */
1062
- bottom_color: number
1063
- /** Clockwise rotation angle of the background fill in degrees; 0-359 */
1064
- rotation_angle: number
1065
- }
1066
-
1067
- /** The background is a freeform gradient that rotates after every message in the chat. */
1068
- export interface BackgroundFillFreeformGradient {
1069
- /** Type of the background fill, always “freeform\_gradient” */
1070
- type: string
1071
- /** A list of the 3 or 4 base colors that are used to generate the freeform gradient in the RGB24 format */
1072
- colors: Array<number>
1073
- }
1074
-
1075
- /**
1076
- * This object describes the type of a background. Currently, it can be one of
1077
- *
1078
- * - [BackgroundTypeFill](https://core.telegram.org/bots/api#backgroundtypefill)
1079
- * - [BackgroundTypeWallpaper](https://core.telegram.org/bots/api#backgroundtypewallpaper)
1080
- * - [BackgroundTypePattern](https://core.telegram.org/bots/api#backgroundtypepattern)
1081
- * - [BackgroundTypeChatTheme](https://core.telegram.org/bots/api#backgroundtypechattheme)
1082
- */
1083
- export type BackgroundType = BackgroundTypeFill | BackgroundTypeWallpaper | BackgroundTypePattern | BackgroundTypeChatTheme
1084
-
1085
- /** The background is automatically filled based on the selected colors. */
1086
- export interface BackgroundTypeFill {
1087
- /** Type of the background, always “fill” */
1088
- type: string
1089
- /** The background fill */
1090
- fill: BackgroundFill
1091
- /** Dimming of the background in dark themes, as a percentage; 0-100 */
1092
- dark_theme_dimming: number
1093
- }
1094
-
1095
- /** The background is a wallpaper in the JPEG format. */
1096
- export interface BackgroundTypeWallpaper {
1097
- /** Type of the background, always “wallpaper” */
1098
- type: string
1099
- /** Document with the wallpaper */
1100
- document: Document
1101
- /** Dimming of the background in dark themes, as a percentage; 0-100 */
1102
- dark_theme_dimming: number
1103
- /** _True_, if the wallpaper is downscaled to fit in a 450x450 square and then box-blurred with radius 12 */
1104
- is_blurred?: true
1105
- /** _True_, if the background moves slightly when the device is tilted */
1106
- is_moving?: true
1107
- }
1108
-
1109
- /** The background is a .PNG or .TGV (gzipped subset of SVG with MIME type “application/x-tgwallpattern”) pattern to be combined with the background fill chosen by the user. */
1110
- export interface BackgroundTypePattern {
1111
- /** Type of the background, always “pattern” */
1112
- type: string
1113
- /** Document with the pattern */
1114
- document: Document
1115
- /** The background fill that is combined with the pattern */
1116
- fill: BackgroundFill
1117
- /** Intensity of the pattern when it is shown above the filled background; 0-100 */
1118
- intensity: number
1119
- /** _True_, if the background fill must be applied only to the pattern itself. All other pixels are black in this case. For dark themes only */
1120
- is_inverted?: true
1121
- /** _True_, if the background moves slightly when the device is tilted */
1122
- is_moving?: true
1123
- }
1124
-
1125
- /** The background is taken directly from a built-in chat theme. */
1126
- export interface BackgroundTypeChatTheme {
1127
- /** Type of the background, always “chat\_theme” */
1128
- type: string
1129
- /** Name of the chat theme, which is usually an emoji */
1130
- theme_name: string
1131
- }
1132
-
1133
- /** This object represents a chat background. */
1134
- export interface ChatBackground {
1135
- /** Type of the background */
1136
- type: BackgroundType
1137
- }
1138
-
1139
- /** This object represents a service message about a new forum topic created in the chat. */
1140
- export interface ForumTopicCreated {
1141
- /** Name of the topic */
1142
- name: string
1143
- /** Color of the topic icon in RGB format */
1144
- icon_color: number
1145
- /** Unique identifier of the custom emoji shown as the topic icon */
1146
- icon_custom_emoji_id?: string
1147
- /** _True_, if the name of the topic wasn't specified explicitly by its creator and likely needs to be changed by the bot */
1148
- is_name_implicit?: true
1149
- }
1150
-
1151
- /** This object represents a service message about a forum topic closed in the chat. Currently holds no information. */
1152
- export interface ForumTopicClosed {
1153
- }
1154
-
1155
- /** This object represents a service message about an edited forum topic. */
1156
- export interface ForumTopicEdited {
1157
- /** New name of the topic, if it was edited */
1158
- name?: string
1159
- /** New identifier of the custom emoji shown as the topic icon, if it was edited; an empty string if the icon was removed */
1160
- icon_custom_emoji_id?: string
1161
- }
1162
-
1163
- /** This object represents a service message about a forum topic reopened in the chat. Currently holds no information. */
1164
- export interface ForumTopicReopened {
1165
- }
1166
-
1167
- /** This object represents a service message about General forum topic hidden in the chat. Currently holds no information. */
1168
- export interface GeneralForumTopicHidden {
1169
- }
1170
-
1171
- /** This object represents a service message about General forum topic unhidden in the chat. Currently holds no information. */
1172
- export interface GeneralForumTopicUnhidden {
1173
- }
1174
-
1175
- /** This object contains information about a user that was shared with the bot using a [KeyboardButtonRequestUsers](https://core.telegram.org/bots/api#keyboardbuttonrequestusers) button. */
1176
- export interface SharedUser {
1177
- /** Identifier of the shared user. The bot may not have access to the user and could be unable to use this identifier, unless the user is already known to the bot by some other means. */
1178
- user_id: number
1179
- /** First name of the user, if the name was requested by the bot */
1180
- first_name?: string
1181
- /** Last name of the user, if the name was requested by the bot */
1182
- last_name?: string
1183
- /** Username of the user, if the username was requested by the bot */
1184
- username?: string
1185
- /** Available sizes of the chat photo, if the photo was requested by the bot */
1186
- photo?: Array<PhotoSize>
1187
- }
1188
-
1189
- /** This object contains information about the users whose identifiers were shared with the bot using a [KeyboardButtonRequestUsers](https://core.telegram.org/bots/api#keyboardbuttonrequestusers) button. */
1190
- export interface UsersShared {
1191
- /** Identifier of the request */
1192
- request_id: number
1193
- /** Information about users shared with the bot. */
1194
- users: Array<SharedUser>
1195
- }
1196
-
1197
- /** This object contains information about a chat that was shared with the bot using a [KeyboardButtonRequestChat](https://core.telegram.org/bots/api#keyboardbuttonrequestchat) button. */
1198
- export interface ChatShared {
1199
- /** Identifier of the request */
1200
- request_id: number
1201
- /** Identifier of the shared chat. 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. */
1202
- chat_id: number
1203
- /** Title of the chat, if the title was requested by the bot. */
1204
- title?: string
1205
- /** Username of the chat, if the username was requested by the bot and available. */
1206
- username?: string
1207
- /** Available sizes of the chat photo, if the photo was requested by the bot */
1208
- photo?: Array<PhotoSize>
1209
- }
1210
-
1211
- /** This object represents a service message about a user allowing a bot to write messages after adding it to the attachment menu, launching a Web App from a link, or accepting an explicit request from a Web App sent by the method [requestWriteAccess](https://core.telegram.org/bots/webapps#initializing-mini-apps). */
1212
- export interface WriteAccessAllowed {
1213
- /** _True_, if the access was granted after the user accepted an explicit request from a Web App sent by the method [requestWriteAccess](https://core.telegram.org/bots/webapps#initializing-mini-apps) */
1214
- from_request?: boolean
1215
- /** Name of the Web App, if the access was granted when the Web App was launched from a link */
1216
- web_app_name?: string
1217
- /** _True_, if the access was granted when the bot was added to the attachment or side menu */
1218
- from_attachment_menu?: boolean
1219
- }
1220
-
1221
- /** This object represents a service message about a video chat scheduled in the chat. */
1222
- export interface VideoChatScheduled {
1223
- /** Point in time (Unix timestamp) when the video chat is supposed to be started by a chat administrator */
1224
- start_date: number
1225
- }
1226
-
1227
- /** This object represents a service message about a video chat started in the chat. Currently holds no information. */
1228
- export interface VideoChatStarted {
1229
- }
1230
-
1231
- /** This object represents a service message about a video chat ended in the chat. */
1232
- export interface VideoChatEnded {
1233
- /** Video chat duration in seconds */
1234
- duration: number
1235
- }
1236
-
1237
- /** This object represents a service message about new members invited to a video chat. */
1238
- export interface VideoChatParticipantsInvited {
1239
- /** New members that were invited to the video chat */
1240
- users: Array<User>
1241
- }
1242
-
1243
- /** Describes a service message about a change in the price of paid messages within a chat. */
1244
- export interface PaidMessagePriceChanged {
1245
- /** The new number of Telegram Stars that must be paid by non-administrator users of the supergroup chat for each sent message */
1246
- paid_message_star_count: number
1247
- }
1248
-
1249
- /** Describes a service message about a change in the price of direct messages sent to a channel chat. */
1250
- export interface DirectMessagePriceChanged {
1251
- /** _True_, if direct messages are enabled for the channel chat; false otherwise */
1252
- are_direct_messages_enabled: boolean
1253
- /** The new number of Telegram Stars that must be paid by users for each direct message sent to the channel. Does not apply to users who have been exempted by administrators. Defaults to 0. */
1254
- direct_message_star_count?: number
1255
- }
1256
-
1257
- /** Describes a service message about the approval of a suggested post. */
1258
- export interface SuggestedPostApproved {
1259
- /** Message containing the suggested post. Note that the [Message](https://core.telegram.org/bots/api#message) object in this field will not contain the _reply\_to\_message_ field even if it itself is a reply. */
1260
- suggested_post_message?: Message
1261
- /** Amount paid for the post */
1262
- price?: SuggestedPostPrice
1263
- /** Date when the post will be published */
1264
- send_date: number
1265
- }
1266
-
1267
- /** Describes a service message about the failed approval of a suggested post. Currently, only caused by insufficient user funds at the time of approval. */
1268
- export interface SuggestedPostApprovalFailed {
1269
- /** Message containing the suggested post whose approval has failed. Note that the [Message](https://core.telegram.org/bots/api#message) object in this field will not contain the _reply\_to\_message_ field even if it itself is a reply. */
1270
- suggested_post_message?: Message
1271
- /** Expected price of the post */
1272
- price: SuggestedPostPrice
1273
- }
1274
-
1275
- /** Describes a service message about the rejection of a suggested post. */
1276
- export interface SuggestedPostDeclined {
1277
- /** Message containing the suggested post. Note that the [Message](https://core.telegram.org/bots/api#message) object in this field will not contain the _reply\_to\_message_ field even if it itself is a reply. */
1278
- suggested_post_message?: Message
1279
- /** Comment with which the post was declined */
1280
- comment?: string
1281
- }
1282
-
1283
- /** Describes a service message about a successful payment for a suggested post. */
1284
- export interface SuggestedPostPaid {
1285
- /** Message containing the suggested post. Note that the [Message](https://core.telegram.org/bots/api#message) object in this field will not contain the _reply\_to\_message_ field even if it itself is a reply. */
1286
- suggested_post_message?: Message
1287
- /** Currency in which the payment was made. Currently, one of “XTR” for Telegram Stars or “TON” for toncoins */
1288
- currency: string
1289
- /** The amount of the currency that was received by the channel in nanotoncoins; for payments in toncoins only */
1290
- amount?: number
1291
- /** The amount of Telegram Stars that was received by the channel; for payments in Telegram Stars only */
1292
- star_amount?: StarAmount
1293
- }
1294
-
1295
- /** Describes a service message about a payment refund for a suggested post. */
1296
- export interface SuggestedPostRefunded {
1297
- /** Message containing the suggested post. Note that the [Message](https://core.telegram.org/bots/api#message) object in this field will not contain the _reply\_to\_message_ field even if it itself is a reply. */
1298
- suggested_post_message?: Message
1299
- /** Reason for the refund. Currently, one of “post\_deleted” if the post was deleted within 24 hours of being posted or removed from scheduled messages without being posted, or “payment\_refunded” if the payer refunded their payment. */
1300
- reason: string
1301
- }
1302
-
1303
- /** This object represents a service message about the creation of a scheduled giveaway. */
1304
- export interface GiveawayCreated {
1305
- /** The number of Telegram Stars to be split between giveaway winners; for Telegram Star giveaways only */
1306
- prize_star_count?: number
1307
- }
1308
-
1309
- /** This object represents a message about a scheduled giveaway. */
1310
- export interface Giveaway {
1311
- /** The list of chats which the user must join to participate in the giveaway */
1312
- chats: Array<Chat>
1313
- /** Point in time (Unix timestamp) when winners of the giveaway will be selected */
1314
- winners_selection_date: number
1315
- /** The number of users which are supposed to be selected as winners of the giveaway */
1316
- winner_count: number
1317
- /** _True_, if only users who join the chats after the giveaway started should be eligible to win */
1318
- only_new_members?: true
1319
- /** _True_, if the list of giveaway winners will be visible to everyone */
1320
- has_public_winners?: true
1321
- /** Description of additional giveaway prize */
1322
- prize_description?: string
1323
- /** A list of two-letter [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes indicating the countries from which eligible users for the giveaway must come. If empty, then all users can participate in the giveaway. Users with a phone number that was bought on Fragment can always participate in giveaways. */
1324
- country_codes?: Array<string>
1325
- /** The number of Telegram Stars to be split between giveaway winners; for Telegram Star giveaways only */
1326
- prize_star_count?: number
1327
- /** The number of months the Telegram Premium subscription won from the giveaway will be active for; for Telegram Premium giveaways only */
1328
- premium_subscription_month_count?: number
1329
- }
1330
-
1331
- /** This object represents a message about the completion of a giveaway with public winners. */
1332
- export interface GiveawayWinners {
1333
- /** The chat that created the giveaway */
1334
- chat: Chat
1335
- /** Identifier of the message with the giveaway in the chat */
1336
- giveaway_message_id: number
1337
- /** Point in time (Unix timestamp) when winners of the giveaway were selected */
1338
- winners_selection_date: number
1339
- /** Total number of winners in the giveaway */
1340
- winner_count: number
1341
- /** List of up to 100 winners of the giveaway */
1342
- winners: Array<User>
1343
- /** The number of other chats the user had to join in order to be eligible for the giveaway */
1344
- additional_chat_count?: number
1345
- /** The number of Telegram Stars that were split between giveaway winners; for Telegram Star giveaways only */
1346
- prize_star_count?: number
1347
- /** The number of months the Telegram Premium subscription won from the giveaway will be active for; for Telegram Premium giveaways only */
1348
- premium_subscription_month_count?: number
1349
- /** Number of undistributed prizes */
1350
- unclaimed_prize_count?: number
1351
- /** _True_, if only users who had joined the chats after the giveaway started were eligible to win */
1352
- only_new_members?: true
1353
- /** _True_, if the giveaway was canceled because the payment for it was refunded */
1354
- was_refunded?: true
1355
- /** Description of additional giveaway prize */
1356
- prize_description?: string
1357
- }
1358
-
1359
- /** This object represents a service message about the completion of a giveaway without public winners. */
1360
- export interface GiveawayCompleted {
1361
- /** Number of winners in the giveaway */
1362
- winner_count: number
1363
- /** Number of undistributed prizes */
1364
- unclaimed_prize_count?: number
1365
- /** Message with the giveaway that was completed, if it wasn't deleted */
1366
- giveaway_message?: Message
1367
- /** _True_, if the giveaway is a Telegram Star giveaway. Otherwise, currently, the giveaway is a Telegram Premium giveaway. */
1368
- is_star_giveaway?: true
1369
- }
1370
-
1371
- /** Describes the options used for link preview generation. */
1372
- export interface LinkPreviewOptions {
1373
- /** _True_, if the link preview is disabled */
1374
- is_disabled?: boolean
1375
- /** URL to use for the link preview. If empty, then the first URL found in the message text will be used */
1376
- url?: string
1377
- /** _True_, if the media in the link preview is supposed to be shrunk; ignored if the URL isn't explicitly specified or media size change isn't supported for the preview */
1378
- prefer_small_media?: boolean
1379
- /** _True_, if the media in the link preview is supposed to be enlarged; ignored if the URL isn't explicitly specified or media size change isn't supported for the preview */
1380
- prefer_large_media?: boolean
1381
- /** _True_, if the link preview must be shown above the message text; otherwise, the link preview will be shown below the message text */
1382
- show_above_text?: boolean
1383
- }
1384
-
1385
- /** Describes the price of a suggested post. */
1386
- export interface SuggestedPostPrice {
1387
- /** Currency in which the post will be paid. Currently, must be one of “XTR” for Telegram Stars or “TON” for toncoins */
1388
- currency: string
1389
- /** The amount of the currency that will be paid for the post in the _smallest units_ of the currency, i.e. Telegram Stars or nanotoncoins. Currently, price in Telegram Stars must be between 5 and 100000, and price in nanotoncoins must be between 10000000 and 10000000000000. */
1390
- amount: number
1391
- }
1392
-
1393
- /** Contains information about a suggested post. */
1394
- export interface SuggestedPostInfo {
1395
- /** State of the suggested post. Currently, it can be one of “pending”, “approved”, “declined”. */
1396
- state: string
1397
- /** Proposed price of the post. If the field is omitted, then the post is unpaid. */
1398
- price?: SuggestedPostPrice
1399
- /** Proposed send date of the post. If the field is omitted, then the post can be published at any time within 30 days at the sole discretion of the user or administrator who approves it. */
1400
- send_date?: number
1401
- }
1402
-
1403
- /** Contains parameters of a post that is being suggested by the bot. */
1404
- export interface SuggestedPostParameters {
1405
- /** Proposed price for the post. If the field is omitted, then the post is unpaid. */
1406
- price?: SuggestedPostPrice
1407
- /** Proposed send date of the post. If specified, then the date must be between 300 second and 2678400 seconds (30 days) in the future. If the field is omitted, then the post can be published at any time within 30 days at the sole discretion of the user who approves it. */
1408
- send_date?: number
1409
- }
1410
-
1411
- /** Describes a topic of a direct messages chat. */
1412
- export interface DirectMessagesTopic {
1413
- /** Unique identifier of the topic. */
1414
- topic_id: number
1415
- /** Information about the user that created the topic. Currently, it is always present */
1416
- user?: User
1417
- }
1418
-
1419
- /** This object represent a user's profile pictures. */
1420
- export interface UserProfilePhotos {
1421
- /** Total number of profile pictures the target user has */
1422
- total_count: number
1423
- /** Requested profile pictures (in up to 4 sizes each) */
1424
- photos: Array<Array<PhotoSize>>
1425
- }
1426
-
1427
- /**
1428
- * This object represents a file ready to be downloaded. The file can be downloaded via the link `https://api.telegram.org/file/bot<token>/<file_path>`. It is guaranteed that the link will be valid for at least 1 hour. When the link expires, a new one can be requested by calling [getFile](https://core.telegram.org/bots/api#getfile).
1429
- *
1430
- * > The maximum file size to download is 20 MB
1431
- */
1432
- export interface File {
1433
- /** Identifier for this file, which can be used to download or reuse the file */
1434
- file_id: string
1435
- /** 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. */
1436
- file_unique_id: string
1437
- /** File size in bytes. */
1438
- file_size?: number
1439
- /** File path. Use `https://api.telegram.org/file/bot<token>/<file_path>` to get the file. */
1440
- file_path?: string
1441
- }
1442
-
1443
- /** Describes a [Web App](https://core.telegram.org/bots/webapps). */
1444
- export interface WebAppInfo {
1445
- /** An HTTPS URL of a Web App to be opened with additional data as specified in [Initializing Web Apps](https://core.telegram.org/bots/webapps#initializing-mini-apps) */
1446
- url: string
1447
- }
1448
-
1449
- /** This object represents a [custom keyboard](https://core.telegram.org/bots/features#keyboards) with reply options (see [Introduction to bots](https://core.telegram.org/bots/features#keyboards) for details and examples). Not supported in channels and for messages sent on behalf of a Telegram Business account. */
1450
- export interface ReplyKeyboardMarkup {
1451
- /** Array of button rows, each represented by an Array of [KeyboardButton](https://core.telegram.org/bots/api#keyboardbutton) objects */
1452
- keyboard: Array<Array<KeyboardButton>>
1453
- /** Requests clients to always show the keyboard when the regular keyboard is hidden. Defaults to _false_, in which case the custom keyboard can be hidden and opened with a keyboard icon. */
1454
- is_persistent?: boolean
1455
- /** Requests clients to resize the keyboard vertically for optimal fit (e.g., make the keyboard smaller if there are just two rows of buttons). Defaults to _false_, in which case the custom keyboard is always of the same height as the app's standard keyboard. */
1456
- resize_keyboard?: boolean
1457
- /** Requests clients to hide the keyboard as soon as it's been used. The keyboard will still be available, but clients will automatically display the usual letter-keyboard in the chat - the user can press a special button in the input field to see the custom keyboard again. Defaults to _false_. */
1458
- one_time_keyboard?: boolean
1459
- /** The placeholder to be shown in the input field when the keyboard is active; 1-64 characters */
1460
- input_field_placeholder?: string
1461
- /**
1462
- * Use this parameter if you want to show the keyboard to specific users only. Targets: 1) users that are @mentioned in the _text_ of the [Message](https://core.telegram.org/bots/api#message) object; 2) if the bot's message is a reply to a message in the same chat and forum topic, sender of the original message.
1463
- *
1464
- * _Example:_ A user requests to change the bot's language, bot replies to the request with a keyboard to select the new language. Other users in the group don't see the keyboard.
1465
- */
1466
- selective?: boolean
1467
- }
1468
-
1469
- /**
1470
- * This object represents one button of the reply keyboard. At most one of the optional fields must be used to specify type of the button. For simple text buttons, _String_ can be used instead of this object to specify the button text.
1471
- *
1472
- * **Note:** _request\_users_ and _request\_chat_ options will only work in Telegram versions released after 3 February, 2023. Older clients will display _unsupported message_.
1473
- */
1474
- export interface KeyboardButton {
1475
- /** Text of the button. If none of the optional fields are used, it will be sent as a message when the button is pressed */
1476
- text: string
1477
- /** If specified, pressing the button will open a list of suitable users. Identifiers of selected users will be sent to the bot in a “users\_shared” service message. Available in private chats only. */
1478
- request_users?: KeyboardButtonRequestUsers
1479
- /** If specified, pressing the button will open a list of suitable chats. Tapping on a chat will send its identifier to the bot in a “chat\_shared” service message. Available in private chats only. */
1480
- request_chat?: KeyboardButtonRequestChat
1481
- /** If _True_, the user's phone number will be sent as a contact when the button is pressed. Available in private chats only. */
1482
- request_contact?: boolean
1483
- /** If _True_, the user's current location will be sent when the button is pressed. Available in private chats only. */
1484
- request_location?: boolean
1485
- /** If specified, the user will be asked to create a poll and send it to the bot when the button is pressed. Available in private chats only. */
1486
- request_poll?: KeyboardButtonPollType
1487
- /** If specified, the described [Web App](https://core.telegram.org/bots/webapps) will be launched when the button is pressed. The Web App will be able to send a “web\_app\_data” service message. Available in private chats only. */
1488
- web_app?: WebAppInfo
1489
- }
1490
-
1491
- /** This object defines the criteria used to request suitable users. Information about the selected users will be shared with the bot when the corresponding button is pressed. [More about requesting users »](https://core.telegram.org/bots/features#chat-and-user-selection) */
1492
- export interface KeyboardButtonRequestUsers {
1493
- /** Signed 32-bit identifier of the request that will be received back in the [UsersShared](https://core.telegram.org/bots/api#usersshared) object. Must be unique within the message */
1494
- request_id: number
1495
- /** Pass _True_ to request bots, pass _False_ to request regular users. If not specified, no additional restrictions are applied. */
1496
- user_is_bot?: boolean
1497
- /** Pass _True_ to request premium users, pass _False_ to request non-premium users. If not specified, no additional restrictions are applied. */
1498
- user_is_premium?: boolean
1499
- /** The maximum number of users to be selected; 1-10. Defaults to 1. */
1500
- max_quantity?: number
1501
- /** Pass _True_ to request the users' first and last names */
1502
- request_name?: boolean
1503
- /** Pass _True_ to request the users' usernames */
1504
- request_username?: boolean
1505
- /** Pass _True_ to request the users' photos */
1506
- request_photo?: boolean
1507
- }
1508
-
1509
- /** This object defines the criteria used to request a suitable chat. Information about the selected chat will be shared with the bot when the corresponding button is pressed. The bot will be granted requested rights in the chat if appropriate. [More about requesting chats »](https://core.telegram.org/bots/features#chat-and-user-selection). */
1510
- export interface KeyboardButtonRequestChat {
1511
- /** Signed 32-bit identifier of the request, which will be received back in the [ChatShared](https://core.telegram.org/bots/api#chatshared) object. Must be unique within the message */
1512
- request_id: number
1513
- /** Pass _True_ to request a channel chat, pass _False_ to request a group or a supergroup chat. */
1514
- chat_is_channel: boolean
1515
- /** Pass _True_ to request a forum supergroup, pass _False_ to request a non-forum chat. If not specified, no additional restrictions are applied. */
1516
- chat_is_forum?: boolean
1517
- /** Pass _True_ to request a supergroup or a channel with a username, pass _False_ to request a chat without a username. If not specified, no additional restrictions are applied. */
1518
- chat_has_username?: boolean
1519
- /** Pass _True_ to request a chat owned by the user. Otherwise, no additional restrictions are applied. */
1520
- chat_is_created?: boolean
1521
- /** An object listing the required administrator rights of the user in the chat. The rights must be a superset of _bot\_administrator\_rights_. If not specified, no additional restrictions are applied. */
1522
- user_administrator_rights?: ChatAdministratorRights
1523
- /** An object listing the required administrator rights of the bot in the chat. The rights must be a subset of _user\_administrator\_rights_. If not specified, no additional restrictions are applied. */
1524
- bot_administrator_rights?: ChatAdministratorRights
1525
- /** Pass _True_ to request a chat with the bot as a member. Otherwise, no additional restrictions are applied. */
1526
- bot_is_member?: boolean
1527
- /** Pass _True_ to request the chat's title */
1528
- request_title?: boolean
1529
- /** Pass _True_ to request the chat's username */
1530
- request_username?: boolean
1531
- /** Pass _True_ to request the chat's photo */
1532
- request_photo?: boolean
1533
- }
1534
-
1535
- /** This object represents type of a poll, which is allowed to be created and sent when the corresponding button is pressed. */
1536
- export interface KeyboardButtonPollType {
1537
- /** If _quiz_ is passed, the user will be allowed to create only polls in the quiz mode. If _regular_ is passed, only regular polls will be allowed. Otherwise, the user will be allowed to create a poll of any type. */
1538
- type?: string
1539
- }
1540
-
1541
- /** Upon receiving a message with this object, Telegram clients will remove the current custom keyboard and display the default letter-keyboard. By default, custom keyboards are displayed until a new keyboard is sent by a bot. An exception is made for one-time keyboards that are hidden immediately after the user presses a button (see [ReplyKeyboardMarkup](https://core.telegram.org/bots/api#replykeyboardmarkup)). Not supported in channels and for messages sent on behalf of a Telegram Business account. */
1542
- export interface ReplyKeyboardRemove {
1543
- /** Requests clients to remove the custom keyboard (user will not be able to summon this keyboard; if you want to hide the keyboard from sight but keep it accessible, use _one\_time\_keyboard_ in [ReplyKeyboardMarkup](https://core.telegram.org/bots/api#replykeyboardmarkup)) */
1544
- remove_keyboard: true
1545
- /**
1546
- * Use this parameter if you want to remove the keyboard for specific users only. Targets: 1) users that are @mentioned in the _text_ of the [Message](https://core.telegram.org/bots/api#message) object; 2) if the bot's message is a reply to a message in the same chat and forum topic, sender of the original message.
1547
- *
1548
- * _Example:_ A user votes in a poll, bot returns confirmation message in reply to the vote and removes the keyboard for that user, while still showing the keyboard with poll options to users who haven't voted yet.
1549
- */
1550
- selective?: boolean
1551
- }
1552
-
1553
- /** This object represents an [inline keyboard](https://core.telegram.org/bots/features#inline-keyboards) that appears right next to the message it belongs to. */
1554
- export interface InlineKeyboardMarkup {
1555
- /** Array of button rows, each represented by an Array of [InlineKeyboardButton](https://core.telegram.org/bots/api#inlinekeyboardbutton) objects */
1556
- inline_keyboard: Array<Array<InlineKeyboardButton>>
1557
- }
1558
-
1559
- /** This object represents one button of an inline keyboard. Exactly one of the optional fields must be used to specify type of the button. */
1560
- export interface InlineKeyboardButton {
1561
- /** Label text on the button */
1562
- text: string
1563
- /** 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 identifier without using a username, if this is allowed by their privacy settings. */
1564
- url?: string
1565
- /** Data to be sent in a [callback query](https://core.telegram.org/bots/api#callbackquery) to the bot when the button is pressed, 1-64 bytes */
1566
- callback_data?: string
1567
- /** Description of the [Web App](https://core.telegram.org/bots/webapps) that will be launched when the user presses the button. The Web App will be able to send an arbitrary message on behalf of the user using the method [answerWebAppQuery](https://core.telegram.org/bots/api#answerwebappquery). Available only in private chats between a user and the bot. Not supported for messages sent on behalf of a Telegram Business account. */
1568
- web_app?: WebAppInfo
1569
- /** An HTTPS URL used to automatically authorize the user. Can be used as a replacement for the [Telegram Login Widget](https://core.telegram.org/widgets/login). */
1570
- login_url?: LoginUrl
1571
- /** If set, pressing the button will prompt the user to select one of their chats, open that chat and insert the bot's username and the specified inline query in the input field. May be empty, in which case just the bot's username will be inserted. Not supported for messages sent in channel direct messages chats and on behalf of a Telegram Business account. */
1572
- switch_inline_query?: string
1573
- /**
1574
- * If set, pressing the button will insert the bot's username and the specified inline query in the current chat's input field. May be empty, in which case only the bot's username will be inserted.
1575
- *
1576
- * This offers a quick way for the user to open your bot in inline mode in the same chat - good for selecting something from multiple options. Not supported in channels and for messages sent in channel direct messages chats and on behalf of a Telegram Business account.
1577
- */
1578
- switch_inline_query_current_chat?: string
1579
- /** If set, pressing the button will prompt the user to select one of their chats of the specified type, open that chat and insert the bot's username and the specified inline query in the input field. Not supported for messages sent in channel direct messages chats and on behalf of a Telegram Business account. */
1580
- switch_inline_query_chosen_chat?: SwitchInlineQueryChosenChat
1581
- /** Description of the button that copies the specified text to the clipboard. */
1582
- copy_text?: CopyTextButton
1583
- /**
1584
- * Description of the game that will be launched when the user presses the button.
1585
- *
1586
- * **NOTE:** This type of button **must** always be the first button in the first row.
1587
- */
1588
- callback_game?: CallbackGame
1589
- /**
1590
- * Specify _True_, to send a [Pay button](https://core.telegram.org/bots/api#payments). Substrings “![⭐](//telegram.org/img/emoji/40/E2AD90.png)” and “XTR” in the buttons's text will be replaced with a Telegram Star icon.
1591
- *
1592
- * **NOTE:** This type of button **must** always be the first button in the first row and can only be used in invoice messages.
1593
- */
1594
- pay?: boolean
1595
- }
1596
-
1597
- /**
1598
- * This object represents a parameter of the inline keyboard button used to automatically authorize a user. Serves as a great replacement for the [Telegram Login Widget](https://core.telegram.org/widgets/login) when the user is coming from Telegram. All the user needs to do is tap/click a button and confirm that they want to log in:
1599
- *
1600
- * [![TITLE](/file/811140909/1631/20k1Z53eiyY.23995/c541e89b74253623d9 "TITLE")](https://core.telegram.org/file/811140015/1734/8VZFkwWXalM.97872/6127fa62d8a0bf2b3c)
1601
- *
1602
- * Telegram apps support these buttons as of [version 5.7](https://telegram.org/blog/privacy-discussions-web-bots#meet-seamless-web-bots).
1603
- *
1604
- * > Sample bot: [@discussbot](https://t.me/discussbot)
1605
- */
1606
- export interface LoginUrl {
1607
- /**
1608
- * An HTTPS URL to be opened with user authorization data added to the query string when the button is pressed. If the user refuses to provide authorization data, the original URL without information about the user will be opened. The data added is the same as described in [Receiving authorization data](https://core.telegram.org/widgets/login#receiving-authorization-data).
1609
- *
1610
- * **NOTE:** You **must** always check the hash of the received data to verify the authentication and the integrity of the data as described in [Checking authorization](https://core.telegram.org/widgets/login#checking-authorization).
1611
- */
1612
- url: string
1613
- /** New text of the button in forwarded messages. */
1614
- forward_text?: string
1615
- /** Username of a bot, which will be used for user authorization. See [Setting up a bot](https://core.telegram.org/widgets/login#setting-up-a-bot) for more details. If not specified, the current bot's username will be assumed. The _url_'s domain must be the same as the domain linked with the bot. See [Linking your domain to the bot](https://core.telegram.org/widgets/login#linking-your-domain-to-the-bot) for more details. */
1616
- bot_username?: string
1617
- /** Pass _True_ to request the permission for your bot to send messages to the user. */
1618
- request_write_access?: boolean
1619
- }
1620
-
1621
- /** This object represents an inline button that switches the current user to inline mode in a chosen chat, with an optional default inline query. */
1622
- export interface SwitchInlineQueryChosenChat {
1623
- /** The default inline query to be inserted in the input field. If left empty, only the bot's username will be inserted */
1624
- query?: string
1625
- /** _True_, if private chats with users can be chosen */
1626
- allow_user_chats?: boolean
1627
- /** _True_, if private chats with bots can be chosen */
1628
- allow_bot_chats?: boolean
1629
- /** _True_, if group and supergroup chats can be chosen */
1630
- allow_group_chats?: boolean
1631
- /** _True_, if channel chats can be chosen */
1632
- allow_channel_chats?: boolean
1633
- }
1634
-
1635
- /** This object represents an inline keyboard button that copies specified text to the clipboard. */
1636
- export interface CopyTextButton {
1637
- /** The text to be copied to the clipboard; 1-256 characters */
1638
- text: string
1639
- }
1640
-
1641
- /**
1642
- * This object represents an incoming callback query from a callback button in an [inline keyboard](https://core.telegram.org/bots/features#inline-keyboards). If the button that originated the query was attached to a message sent by the bot, the field _message_ will be present. If the button was attached to a message sent via the bot (in [inline mode](https://core.telegram.org/bots/api#inline-mode)), the field _inline\_message\_id_ will be present. Exactly one of the fields _data_ or _game\_short\_name_ will be present.
1643
- *
1644
- * > **NOTE:** After the user presses a callback button, Telegram clients will display a progress bar until you call [answerCallbackQuery](https://core.telegram.org/bots/api#answercallbackquery). It is, therefore, necessary to react by calling [answerCallbackQuery](https://core.telegram.org/bots/api#answercallbackquery) even if no notification to the user is needed (e.g., without specifying any of the optional parameters).
1645
- */
1646
- export interface CallbackQuery {
1647
- /** Unique identifier for this query */
1648
- id: string
1649
- /** Sender */
1650
- from: User
1651
- /** Message sent by the bot with the callback button that originated the query */
1652
- message?: MaybeInaccessibleMessage
1653
- /** Identifier of the message sent via the bot in inline mode, that originated the query. */
1654
- inline_message_id?: string
1655
- /** Global identifier, uniquely corresponding to the chat to which the message with the callback button was sent. Useful for high scores in [games](https://core.telegram.org/bots/api#games). */
1656
- chat_instance: string
1657
- /** Data associated with the callback button. Be aware that the message originated the query can contain no callback buttons with this data. */
1658
- data?: string
1659
- /** Short name of a [Game](https://core.telegram.org/bots/api#games) to be returned, serves as the unique identifier for the game */
1660
- game_short_name?: string
1661
- }
1662
-
1663
- /**
1664
- * Upon receiving a message with this object, Telegram clients will display a reply interface to the user (act as if the user has selected the bot's message and tapped 'Reply'). This can be extremely useful if you want to create user-friendly step-by-step interfaces without having to sacrifice [privacy mode](https://core.telegram.org/bots/features#privacy-mode). Not supported in channels and for messages sent on behalf of a Telegram Business account.
1665
- *
1666
- * > **Example:** A [poll bot](https://t.me/PollBot) for groups runs in privacy mode (only receives commands, replies to its messages and mentions). There could be two ways to create a new poll:
1667
- * >
1668
- * > - Explain the user how to send a command with parameters (e.g. /newpoll question answer1 answer2). May be appealing for hardcore users but lacks modern day polish.
1669
- * > - Guide the user through a step-by-step process. 'Please send me your question', 'Cool, now let's add the first answer option', 'Great. Keep adding answer options, then send /done when you're ready'.
1670
- * >
1671
- * > The last option is definitely more attractive. And if you use [ForceReply](https://core.telegram.org/bots/api#forcereply) in your bot's questions, it will receive the user's answers even if it only receives replies, commands and mentions - without any extra work for the user.
1672
- */
1673
- export interface ForceReply {
1674
- /** Shows reply interface to the user, as if they manually selected the bot's message and tapped 'Reply' */
1675
- force_reply: true
1676
- /** The placeholder to be shown in the input field when the reply is active; 1-64 characters */
1677
- input_field_placeholder?: string
1678
- /** Use this parameter if you want to force reply from specific users only. Targets: 1) users that are @mentioned in the _text_ of the [Message](https://core.telegram.org/bots/api#message) object; 2) if the bot's message is a reply to a message in the same chat and forum topic, sender of the original message. */
1679
- selective?: boolean
1680
- }
1681
-
1682
- /** This object represents a chat photo. */
1683
- export interface ChatPhoto {
1684
- /** File identifier of small (160x160) chat photo. This file\_id can be used only for photo download and only for as long as the photo is not changed. */
1685
- small_file_id: string
1686
- /** Unique file identifier of small (160x160) chat photo, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file. */
1687
- small_file_unique_id: string
1688
- /** File identifier of big (640x640) chat photo. This file\_id can be used only for photo download and only for as long as the photo is not changed. */
1689
- big_file_id: string
1690
- /** Unique file identifier of big (640x640) chat photo, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file. */
1691
- big_file_unique_id: string
1692
- }
1693
-
1694
- /** Represents an invite link for a chat. */
1695
- export interface ChatInviteLink {
1696
- /** The invite link. If the link was created by another chat administrator, then the second part of the link will be replaced with “…”. */
1697
- invite_link: string
1698
- /** Creator of the link */
1699
- creator: User
1700
- /** _True_, if users joining the chat via the link need to be approved by chat administrators */
1701
- creates_join_request: boolean
1702
- /** _True_, if the link is primary */
1703
- is_primary: boolean
1704
- /** _True_, if the link is revoked */
1705
- is_revoked: boolean
1706
- /** Invite link name */
1707
- name?: string
1708
- /** Point in time (Unix timestamp) when the link will expire or has been expired */
1709
- expire_date?: number
1710
- /** The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999 */
1711
- member_limit?: number
1712
- /** Number of pending join requests created using this link */
1713
- pending_join_request_count?: number
1714
- /** The number of seconds the subscription will be active for before the next payment */
1715
- subscription_period?: number
1716
- /** The amount of Telegram Stars a user must pay initially and after each subsequent subscription period to be a member of the chat using the link */
1717
- subscription_price?: number
1718
- }
1719
-
1720
- /** Represents the rights of an administrator in a chat. */
1721
- export interface ChatAdministratorRights {
1722
- /** _True_, if the user's presence in the chat is hidden */
1723
- is_anonymous: boolean
1724
- /** _True_, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege. */
1725
- can_manage_chat: boolean
1726
- /** _True_, if the administrator can delete messages of other users */
1727
- can_delete_messages: boolean
1728
- /** _True_, if the administrator can manage video chats */
1729
- can_manage_video_chats: boolean
1730
- /** _True_, if the administrator can restrict, ban or unban chat members, or access supergroup statistics */
1731
- can_restrict_members: boolean
1732
- /** _True_, if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have promoted, directly or indirectly (promoted by administrators that were appointed by the user) */
1733
- can_promote_members: boolean
1734
- /** _True_, if the user is allowed to change the chat title, photo and other settings */
1735
- can_change_info: boolean
1736
- /** _True_, if the user is allowed to invite new users to the chat */
1737
- can_invite_users: boolean
1738
- /** _True_, if the administrator can post stories to the chat */
1739
- can_post_stories: boolean
1740
- /** _True_, if the administrator can edit stories posted by other users, post stories to the chat page, pin chat stories, and access the chat's story archive */
1741
- can_edit_stories: boolean
1742
- /** _True_, if the administrator can delete stories posted by other users */
1743
- can_delete_stories: boolean
1744
- /** _True_, if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only */
1745
- can_post_messages?: boolean
1746
- /** _True_, if the administrator can edit messages of other users and can pin messages; for channels only */
1747
- can_edit_messages?: boolean
1748
- /** _True_, if the user is allowed to pin messages; for groups and supergroups only */
1749
- can_pin_messages?: boolean
1750
- /** _True_, if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only */
1751
- can_manage_topics?: boolean
1752
- /** _True_, if the administrator can manage direct messages of the channel and decline suggested posts; for channels only */
1753
- can_manage_direct_messages?: boolean
1754
- }
1755
-
1756
- /** This object represents changes in the status of a chat member. */
1757
- export interface ChatMemberUpdated {
1758
- /** Chat the user belongs to */
1759
- chat: Chat
1760
- /** Performer of the action, which resulted in the change */
1761
- from: User
1762
- /** Date the change was done in Unix time */
1763
- date: number
1764
- /** Previous information about the chat member */
1765
- old_chat_member: ChatMember
1766
- /** New information about the chat member */
1767
- new_chat_member: ChatMember
1768
- /** Chat invite link, which was used by the user to join the chat; for joining by invite link events only. */
1769
- invite_link?: ChatInviteLink
1770
- /** _True_, if the user joined the chat after sending a direct join request without using an invite link and being approved by an administrator */
1771
- via_join_request?: boolean
1772
- /** _True_, if the user joined the chat via a chat folder invite link */
1773
- via_chat_folder_invite_link?: boolean
1774
- }
1775
-
1776
- /**
1777
- * This object contains information about one member of a chat. Currently, the following 6 types of chat members are supported:
1778
- *
1779
- * - [ChatMemberOwner](https://core.telegram.org/bots/api#chatmemberowner)
1780
- * - [ChatMemberAdministrator](https://core.telegram.org/bots/api#chatmemberadministrator)
1781
- * - [ChatMemberMember](https://core.telegram.org/bots/api#chatmembermember)
1782
- * - [ChatMemberRestricted](https://core.telegram.org/bots/api#chatmemberrestricted)
1783
- * - [ChatMemberLeft](https://core.telegram.org/bots/api#chatmemberleft)
1784
- * - [ChatMemberBanned](https://core.telegram.org/bots/api#chatmemberbanned)
1785
- */
1786
- export type ChatMember = ChatMemberOwner | ChatMemberAdministrator | ChatMemberMember | ChatMemberRestricted | ChatMemberLeft | ChatMemberBanned
1787
-
1788
- /** Represents a [chat member](https://core.telegram.org/bots/api#chatmember) that owns the chat and has all administrator privileges. */
1789
- export interface ChatMemberOwner {
1790
- /** The member's status in the chat, always “creator” */
1791
- status: string
1792
- /** Information about the user */
1793
- user: User
1794
- /** _True_, if the user's presence in the chat is hidden */
1795
- is_anonymous: boolean
1796
- /** Custom title for this user */
1797
- custom_title?: string
1798
- }
1799
-
1800
- /** Represents a [chat member](https://core.telegram.org/bots/api#chatmember) that has some additional privileges. */
1801
- export interface ChatMemberAdministrator {
1802
- /** The member's status in the chat, always “administrator” */
1803
- status: string
1804
- /** Information about the user */
1805
- user: User
1806
- /** _True_, if the bot is allowed to edit administrator privileges of that user */
1807
- can_be_edited: boolean
1808
- /** _True_, if the user's presence in the chat is hidden */
1809
- is_anonymous: boolean
1810
- /** _True_, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege. */
1811
- can_manage_chat: boolean
1812
- /** _True_, if the administrator can delete messages of other users */
1813
- can_delete_messages: boolean
1814
- /** _True_, if the administrator can manage video chats */
1815
- can_manage_video_chats: boolean
1816
- /** _True_, if the administrator can restrict, ban or unban chat members, or access supergroup statistics */
1817
- can_restrict_members: boolean
1818
- /** _True_, if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have promoted, directly or indirectly (promoted by administrators that were appointed by the user) */
1819
- can_promote_members: boolean
1820
- /** _True_, if the user is allowed to change the chat title, photo and other settings */
1821
- can_change_info: boolean
1822
- /** _True_, if the user is allowed to invite new users to the chat */
1823
- can_invite_users: boolean
1824
- /** _True_, if the administrator can post stories to the chat */
1825
- can_post_stories: boolean
1826
- /** _True_, if the administrator can edit stories posted by other users, post stories to the chat page, pin chat stories, and access the chat's story archive */
1827
- can_edit_stories: boolean
1828
- /** _True_, if the administrator can delete stories posted by other users */
1829
- can_delete_stories: boolean
1830
- /** _True_, if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only */
1831
- can_post_messages?: boolean
1832
- /** _True_, if the administrator can edit messages of other users and can pin messages; for channels only */
1833
- can_edit_messages?: boolean
1834
- /** _True_, if the user is allowed to pin messages; for groups and supergroups only */
1835
- can_pin_messages?: boolean
1836
- /** _True_, if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only */
1837
- can_manage_topics?: boolean
1838
- /** _True_, if the administrator can manage direct messages of the channel and decline suggested posts; for channels only */
1839
- can_manage_direct_messages?: boolean
1840
- /** Custom title for this user */
1841
- custom_title?: string
1842
- }
1843
-
1844
- /** Represents a [chat member](https://core.telegram.org/bots/api#chatmember) that has no additional privileges or restrictions. */
1845
- export interface ChatMemberMember {
1846
- /** The member's status in the chat, always “member” */
1847
- status: string
1848
- /** Information about the user */
1849
- user: User
1850
- /** Date when the user's subscription will expire; Unix time */
1851
- until_date?: number
1852
- }
1853
-
1854
- /** Represents a [chat member](https://core.telegram.org/bots/api#chatmember) that is under certain restrictions in the chat. Supergroups only. */
1855
- export interface ChatMemberRestricted {
1856
- /** The member's status in the chat, always “restricted” */
1857
- status: string
1858
- /** Information about the user */
1859
- user: User
1860
- /** _True_, if the user is a member of the chat at the moment of the request */
1861
- is_member: boolean
1862
- /** _True_, if the user is allowed to send text messages, contacts, giveaways, giveaway winners, invoices, locations and venues */
1863
- can_send_messages: boolean
1864
- /** _True_, if the user is allowed to send audios */
1865
- can_send_audios: boolean
1866
- /** _True_, if the user is allowed to send documents */
1867
- can_send_documents: boolean
1868
- /** _True_, if the user is allowed to send photos */
1869
- can_send_photos: boolean
1870
- /** _True_, if the user is allowed to send videos */
1871
- can_send_videos: boolean
1872
- /** _True_, if the user is allowed to send video notes */
1873
- can_send_video_notes: boolean
1874
- /** _True_, if the user is allowed to send voice notes */
1875
- can_send_voice_notes: boolean
1876
- /** _True_, if the user is allowed to send polls and checklists */
1877
- can_send_polls: boolean
1878
- /** _True_, if the user is allowed to send animations, games, stickers and use inline bots */
1879
- can_send_other_messages: boolean
1880
- /** _True_, if the user is allowed to add web page previews to their messages */
1881
- can_add_web_page_previews: boolean
1882
- /** _True_, if the user is allowed to change the chat title, photo and other settings */
1883
- can_change_info: boolean
1884
- /** _True_, if the user is allowed to invite new users to the chat */
1885
- can_invite_users: boolean
1886
- /** _True_, if the user is allowed to pin messages */
1887
- can_pin_messages: boolean
1888
- /** _True_, if the user is allowed to create forum topics */
1889
- can_manage_topics: boolean
1890
- /** Date when restrictions will be lifted for this user; Unix time. If 0, then the user is restricted forever */
1891
- until_date: number
1892
- }
1893
-
1894
- /** Represents a [chat member](https://core.telegram.org/bots/api#chatmember) that isn't currently a member of the chat, but may join it themselves. */
1895
- export interface ChatMemberLeft {
1896
- /** The member's status in the chat, always “left” */
1897
- status: string
1898
- /** Information about the user */
1899
- user: User
1900
- }
1901
-
1902
- /** Represents a [chat member](https://core.telegram.org/bots/api#chatmember) that was banned in the chat and can't return to the chat or view chat messages. */
1903
- export interface ChatMemberBanned {
1904
- /** The member's status in the chat, always “kicked” */
1905
- status: string
1906
- /** Information about the user */
1907
- user: User
1908
- /** Date when restrictions will be lifted for this user; Unix time. If 0, then the user is banned forever */
1909
- until_date: number
1910
- }
1911
-
1912
- /** Represents a join request sent to a chat. */
1913
- export interface ChatJoinRequest {
1914
- /** Chat to which the request was sent */
1915
- chat: Chat
1916
- /** User that sent the join request */
1917
- from: User
1918
- /** Identifier of a private chat with the user who sent the join request. The bot can use this identifier for 5 minutes to send messages until the join request is processed, assuming no other administrator contacted the user. */
1919
- user_chat_id: number
1920
- /** Date the request was sent in Unix time */
1921
- date: number
1922
- /** Bio of the user. */
1923
- bio?: string
1924
- /** Chat invite link that was used by the user to send the join request */
1925
- invite_link?: ChatInviteLink
1926
- }
1927
-
1928
- /** Describes actions that a non-administrator user is allowed to take in a chat. */
1929
- export interface ChatPermissions {
1930
- /** _True_, if the user is allowed to send text messages, contacts, giveaways, giveaway winners, invoices, locations and venues */
1931
- can_send_messages?: boolean
1932
- /** _True_, if the user is allowed to send audios */
1933
- can_send_audios?: boolean
1934
- /** _True_, if the user is allowed to send documents */
1935
- can_send_documents?: boolean
1936
- /** _True_, if the user is allowed to send photos */
1937
- can_send_photos?: boolean
1938
- /** _True_, if the user is allowed to send videos */
1939
- can_send_videos?: boolean
1940
- /** _True_, if the user is allowed to send video notes */
1941
- can_send_video_notes?: boolean
1942
- /** _True_, if the user is allowed to send voice notes */
1943
- can_send_voice_notes?: boolean
1944
- /** _True_, if the user is allowed to send polls and checklists */
1945
- can_send_polls?: boolean
1946
- /** _True_, if the user is allowed to send animations, games, stickers and use inline bots */
1947
- can_send_other_messages?: boolean
1948
- /** _True_, if the user is allowed to add web page previews to their messages */
1949
- can_add_web_page_previews?: boolean
1950
- /** _True_, if the user is allowed to change the chat title, photo and other settings. Ignored in public supergroups */
1951
- can_change_info?: boolean
1952
- /** _True_, if the user is allowed to invite new users to the chat */
1953
- can_invite_users?: boolean
1954
- /** _True_, if the user is allowed to pin messages. Ignored in public supergroups */
1955
- can_pin_messages?: boolean
1956
- /** _True_, if the user is allowed to create forum topics. If omitted defaults to the value of can\_pin\_messages */
1957
- can_manage_topics?: boolean
1958
- }
1959
-
1960
- /** Describes the birthdate of a user. */
1961
- export interface Birthdate {
1962
- /** Day of the user's birth; 1-31 */
1963
- day: number
1964
- /** Month of the user's birth; 1-12 */
1965
- month: number
1966
- /** Year of the user's birth */
1967
- year?: number
1968
- }
1969
-
1970
- /** Contains information about the start page settings of a Telegram Business account. */
1971
- export interface BusinessIntro {
1972
- /** Title text of the business intro */
1973
- title?: string
1974
- /** Message text of the business intro */
1975
- message?: string
1976
- /** Sticker of the business intro */
1977
- sticker?: Sticker
1978
- }
1979
-
1980
- /** Contains information about the location of a Telegram Business account. */
1981
- export interface BusinessLocation {
1982
- /** Address of the business */
1983
- address: string
1984
- /** Location of the business */
1985
- location?: Location
1986
- }
1987
-
1988
- /** Describes an interval of time during which a business is open. */
1989
- export interface BusinessOpeningHoursInterval {
1990
- /** The minute's sequence number in a week, starting on Monday, marking the start of the time interval during which the business is open; 0 - 7 \* 24 \* 60 */
1991
- opening_minute: number
1992
- /** The minute's sequence number in a week, starting on Monday, marking the end of the time interval during which the business is open; 0 - 8 \* 24 \* 60 */
1993
- closing_minute: number
1994
- }
1995
-
1996
- /** Describes the opening hours of a business. */
1997
- export interface BusinessOpeningHours {
1998
- /** Unique name of the time zone for which the opening hours are defined */
1999
- time_zone_name: string
2000
- /** List of time intervals describing business opening hours */
2001
- opening_hours: Array<BusinessOpeningHoursInterval>
2002
- }
2003
-
2004
- /** This object describes the rating of a user based on their Telegram Star spendings. */
2005
- export interface UserRating {
2006
- /** Current level of the user, indicating their reliability when purchasing digital goods and services. A higher level suggests a more trustworthy customer; a negative level is likely reason for concern. */
2007
- level: number
2008
- /** Numerical value of the user's rating; the higher the rating, the better */
2009
- rating: number
2010
- /** The rating value required to get the current level */
2011
- current_level_rating: number
2012
- /** The rating value required to get to the next level; omitted if the maximum level was reached */
2013
- next_level_rating?: number
2014
- }
2015
-
2016
- /** Describes the position of a clickable area within a story. */
2017
- export interface StoryAreaPosition {
2018
- /** The abscissa of the area's center, as a percentage of the media width */
2019
- x_percentage: number
2020
- /** The ordinate of the area's center, as a percentage of the media height */
2021
- y_percentage: number
2022
- /** The width of the area's rectangle, as a percentage of the media width */
2023
- width_percentage: number
2024
- /** The height of the area's rectangle, as a percentage of the media height */
2025
- height_percentage: number
2026
- /** The clockwise rotation angle of the rectangle, in degrees; 0-360 */
2027
- rotation_angle: number
2028
- /** The radius of the rectangle corner rounding, as a percentage of the media width */
2029
- corner_radius_percentage: number
2030
- }
2031
-
2032
- /** Describes the physical address of a location. */
2033
- export interface LocationAddress {
2034
- /** The two-letter ISO 3166-1 alpha-2 country code of the country where the location is located */
2035
- country_code: string
2036
- /** State of the location */
2037
- state?: string
2038
- /** City of the location */
2039
- city?: string
2040
- /** Street address of the location */
2041
- street?: string
2042
- }
2043
-
2044
- /**
2045
- * Describes the type of a clickable area on a story. Currently, it can be one of
2046
- *
2047
- * - [StoryAreaTypeLocation](https://core.telegram.org/bots/api#storyareatypelocation)
2048
- * - [StoryAreaTypeSuggestedReaction](https://core.telegram.org/bots/api#storyareatypesuggestedreaction)
2049
- * - [StoryAreaTypeLink](https://core.telegram.org/bots/api#storyareatypelink)
2050
- * - [StoryAreaTypeWeather](https://core.telegram.org/bots/api#storyareatypeweather)
2051
- * - [StoryAreaTypeUniqueGift](https://core.telegram.org/bots/api#storyareatypeuniquegift)
2052
- */
2053
- export type StoryAreaType = StoryAreaTypeLocation | StoryAreaTypeSuggestedReaction | StoryAreaTypeLink | StoryAreaTypeWeather | StoryAreaTypeUniqueGift
2054
-
2055
- /** Describes a story area pointing to a location. Currently, a story can have up to 10 location areas. */
2056
- export interface StoryAreaTypeLocation {
2057
- /** Type of the area, always “location” */
2058
- type: string
2059
- /** Location latitude in degrees */
2060
- latitude: number
2061
- /** Location longitude in degrees */
2062
- longitude: number
2063
- /** Address of the location */
2064
- address?: LocationAddress
2065
- }
2066
-
2067
- /** Describes a story area pointing to a suggested reaction. Currently, a story can have up to 5 suggested reaction areas. */
2068
- export interface StoryAreaTypeSuggestedReaction {
2069
- /** Type of the area, always “suggested\_reaction” */
2070
- type: string
2071
- /** Type of the reaction */
2072
- reaction_type: ReactionType
2073
- /** Pass _True_ if the reaction area has a dark background */
2074
- is_dark?: boolean
2075
- /** Pass _True_ if reaction area corner is flipped */
2076
- is_flipped?: boolean
2077
- }
2078
-
2079
- /** Describes a story area pointing to an HTTP or tg:// link. Currently, a story can have up to 3 link areas. */
2080
- export interface StoryAreaTypeLink {
2081
- /** Type of the area, always “link” */
2082
- type: string
2083
- /** HTTP or tg:// URL to be opened when the area is clicked */
2084
- url: string
2085
- }
2086
-
2087
- /** Describes a story area containing weather information. Currently, a story can have up to 3 weather areas. */
2088
- export interface StoryAreaTypeWeather {
2089
- /** Type of the area, always “weather” */
2090
- type: string
2091
- /** Temperature, in degree Celsius */
2092
- temperature: number
2093
- /** Emoji representing the weather */
2094
- emoji: string
2095
- /** A color of the area background in the ARGB format */
2096
- background_color: number
2097
- }
2098
-
2099
- /** Describes a story area pointing to a unique gift. Currently, a story can have at most 1 unique gift area. */
2100
- export interface StoryAreaTypeUniqueGift {
2101
- /** Type of the area, always “unique\_gift” */
2102
- type: string
2103
- /** Unique name of the gift */
2104
- name: string
2105
- }
2106
-
2107
- /** Describes a clickable area on a story media. */
2108
- export interface StoryArea {
2109
- /** Position of the area */
2110
- position: StoryAreaPosition
2111
- /** Type of the area */
2112
- type: StoryAreaType
2113
- }
2114
-
2115
- /** Represents a location to which a chat is connected. */
2116
- export interface ChatLocation {
2117
- /** The location to which the supergroup is connected. Can't be a live location. */
2118
- location: Location
2119
- /** Location address; 1-64 characters, as defined by the chat owner */
2120
- address: string
2121
- }
2122
-
2123
- /**
2124
- * This object describes the type of a reaction. Currently, it can be one of
2125
- *
2126
- * - [ReactionTypeEmoji](https://core.telegram.org/bots/api#reactiontypeemoji)
2127
- * - [ReactionTypeCustomEmoji](https://core.telegram.org/bots/api#reactiontypecustomemoji)
2128
- * - [ReactionTypePaid](https://core.telegram.org/bots/api#reactiontypepaid)
2129
- */
2130
- export type ReactionType = ReactionTypeEmoji | ReactionTypeCustomEmoji | ReactionTypePaid
2131
-
2132
- /** The reaction is based on an emoji. */
2133
- export interface ReactionTypeEmoji {
2134
- /** Type of the reaction, always “emoji” */
2135
- type: string
2136
- /** Reaction emoji. Currently, it can be one of "![❤](//telegram.org/img/emoji/40/E29DA4.png)", "![👍](//telegram.org/img/emoji/40/F09F918D.png)", "![👎](//telegram.org/img/emoji/40/F09F918E.png)", "![🔥](//telegram.org/img/emoji/40/F09F94A5.png)", "![🥰](//telegram.org/img/emoji/40/F09FA5B0.png)", "![👏](//telegram.org/img/emoji/40/F09F918F.png)", "![😁](//telegram.org/img/emoji/40/F09F9881.png)", "![🤔](//telegram.org/img/emoji/40/F09FA494.png)", "![🤯](//telegram.org/img/emoji/40/F09FA4AF.png)", "![😱](//telegram.org/img/emoji/40/F09F98B1.png)", "![🤬](//telegram.org/img/emoji/40/F09FA4AC.png)", "![😢](//telegram.org/img/emoji/40/F09F98A2.png)", "![🎉](//telegram.org/img/emoji/40/F09F8E89.png)", "![🤩](//telegram.org/img/emoji/40/F09FA4A9.png)", "![🤮](//telegram.org/img/emoji/40/F09FA4AE.png)", "![💩](//telegram.org/img/emoji/40/F09F92A9.png)", "![🙏](//telegram.org/img/emoji/40/F09F998F.png)", "![👌](//telegram.org/img/emoji/40/F09F918C.png)", "![🕊](//telegram.org/img/emoji/40/F09F958A.png)", "![🤡](//telegram.org/img/emoji/40/F09FA4A1.png)", "![🥱](//telegram.org/img/emoji/40/F09FA5B1.png)", "![🥴](//telegram.org/img/emoji/40/F09FA5B4.png)", "![😍](//telegram.org/img/emoji/40/F09F988D.png)", "![🐳](//telegram.org/img/emoji/40/F09F90B3.png)", "![❤‍🔥](//telegram.org/img/emoji/40/E29DA4E2808DF09F94A5.png)", "![🌚](//telegram.org/img/emoji/40/F09F8C9A.png)", "![🌭](//telegram.org/img/emoji/40/F09F8CAD.png)", "![💯](//telegram.org/img/emoji/40/F09F92AF.png)", "![🤣](//telegram.org/img/emoji/40/F09FA4A3.png)", "![⚡](//telegram.org/img/emoji/40/E29AA1.png)", "![🍌](//telegram.org/img/emoji/40/F09F8D8C.png)", "![🏆](//telegram.org/img/emoji/40/F09F8F86.png)", "![💔](//telegram.org/img/emoji/40/F09F9294.png)", "![🤨](//telegram.org/img/emoji/40/F09FA4A8.png)", "![😐](//telegram.org/img/emoji/40/F09F9890.png)", "![🍓](//telegram.org/img/emoji/40/F09F8D93.png)", "![🍾](//telegram.org/img/emoji/40/F09F8DBE.png)", "![💋](//telegram.org/img/emoji/40/F09F928B.png)", "![🖕](//telegram.org/img/emoji/40/F09F9695.png)", "![😈](//telegram.org/img/emoji/40/F09F9888.png)", "![😴](//telegram.org/img/emoji/40/F09F98B4.png)", "![😭](//telegram.org/img/emoji/40/F09F98AD.png)", "![🤓](//telegram.org/img/emoji/40/F09FA493.png)", "![👻](//telegram.org/img/emoji/40/F09F91BB.png)", "![👨‍💻](//telegram.org/img/emoji/40/F09F91A8E2808DF09F92BB.png)", "![👀](//telegram.org/img/emoji/40/F09F9180.png)", "![🎃](//telegram.org/img/emoji/40/F09F8E83.png)", "![🙈](//telegram.org/img/emoji/40/F09F9988.png)", "![😇](//telegram.org/img/emoji/40/F09F9887.png)", "![😨](//telegram.org/img/emoji/40/F09F98A8.png)", "![🤝](//telegram.org/img/emoji/40/F09FA49D.png)", "![✍](//telegram.org/img/emoji/40/E29C8D.png)", "![🤗](//telegram.org/img/emoji/40/F09FA497.png)", "![🫡](//telegram.org/img/emoji/40/F09FABA1.png)", "![🎅](//telegram.org/img/emoji/40/F09F8E85.png)", "![🎄](//telegram.org/img/emoji/40/F09F8E84.png)", "![☃](//telegram.org/img/emoji/40/E29883.png)", "![💅](//telegram.org/img/emoji/40/F09F9285.png)", "![🤪](//telegram.org/img/emoji/40/F09FA4AA.png)", "![🗿](//telegram.org/img/emoji/40/F09F97BF.png)", "![🆒](//telegram.org/img/emoji/40/F09F8692.png)", "![💘](//telegram.org/img/emoji/40/F09F9298.png)", "![🙉](//telegram.org/img/emoji/40/F09F9989.png)", "![🦄](//telegram.org/img/emoji/40/F09FA684.png)", "![😘](//telegram.org/img/emoji/40/F09F9898.png)", "![💊](//telegram.org/img/emoji/40/F09F928A.png)", "![🙊](//telegram.org/img/emoji/40/F09F998A.png)", "![😎](//telegram.org/img/emoji/40/F09F988E.png)", "![👾](//telegram.org/img/emoji/40/F09F91BE.png)", "![🤷‍♂](//telegram.org/img/emoji/40/F09FA4B7E2808DE29982.png)", "![🤷](//telegram.org/img/emoji/40/F09FA4B7.png)", "![🤷‍♀](//telegram.org/img/emoji/40/F09FA4B7E2808DE29980.png)", "![😡](//telegram.org/img/emoji/40/F09F98A1.png)" */
2137
- emoji: string
2138
- }
2139
-
2140
- /** The reaction is based on a custom emoji. */
2141
- export interface ReactionTypeCustomEmoji {
2142
- /** Type of the reaction, always “custom\_emoji” */
2143
- type: string
2144
- /** Custom emoji identifier */
2145
- custom_emoji_id: string
2146
- }
2147
-
2148
- /** The reaction is paid. */
2149
- export interface ReactionTypePaid {
2150
- /** Type of the reaction, always “paid” */
2151
- type: string
2152
- }
2153
-
2154
- /** Represents a reaction added to a message along with the number of times it was added. */
2155
- export interface ReactionCount {
2156
- /** Type of the reaction */
2157
- type: ReactionType
2158
- /** Number of times the reaction was added */
2159
- total_count: number
2160
- }
2161
-
2162
- /** This object represents a change of a reaction on a message performed by a user. */
2163
- export interface MessageReactionUpdated {
2164
- /** The chat containing the message the user reacted to */
2165
- chat: Chat
2166
- /** Unique identifier of the message inside the chat */
2167
- message_id: number
2168
- /** The user that changed the reaction, if the user isn't anonymous */
2169
- user?: User
2170
- /** The chat on behalf of which the reaction was changed, if the user is anonymous */
2171
- actor_chat?: Chat
2172
- /** Date of the change in Unix time */
2173
- date: number
2174
- /** Previous list of reaction types that were set by the user */
2175
- old_reaction: Array<ReactionType>
2176
- /** New list of reaction types that have been set by the user */
2177
- new_reaction: Array<ReactionType>
2178
- }
2179
-
2180
- /** This object represents reaction changes on a message with anonymous reactions. */
2181
- export interface MessageReactionCountUpdated {
2182
- /** The chat containing the message */
2183
- chat: Chat
2184
- /** Unique message identifier inside the chat */
2185
- message_id: number
2186
- /** Date of the change in Unix time */
2187
- date: number
2188
- /** List of reactions that are present on the message */
2189
- reactions: Array<ReactionCount>
2190
- }
2191
-
2192
- /** This object represents a forum topic. */
2193
- export interface ForumTopic {
2194
- /** Unique identifier of the forum topic */
2195
- message_thread_id: number
2196
- /** Name of the topic */
2197
- name: string
2198
- /** Color of the topic icon in RGB format */
2199
- icon_color: number
2200
- /** Unique identifier of the custom emoji shown as the topic icon */
2201
- icon_custom_emoji_id?: string
2202
- /** _True_, if the name of the topic wasn't specified explicitly by its creator and likely needs to be changed by the bot */
2203
- is_name_implicit?: true
2204
- }
2205
-
2206
- /** This object describes the background of a gift. */
2207
- export interface GiftBackground {
2208
- /** Center color of the background in RGB format */
2209
- center_color: number
2210
- /** Edge color of the background in RGB format */
2211
- edge_color: number
2212
- /** Text color of the background in RGB format */
2213
- text_color: number
2214
- }
2215
-
2216
- /** This object represents a gift that can be sent by the bot. */
2217
- export interface Gift {
2218
- /** Unique identifier of the gift */
2219
- id: string
2220
- /** The sticker that represents the gift */
2221
- sticker: Sticker
2222
- /** The number of Telegram Stars that must be paid to send the sticker */
2223
- star_count: number
2224
- /** The number of Telegram Stars that must be paid to upgrade the gift to a unique one */
2225
- upgrade_star_count?: number
2226
- /** _True_, if the gift can only be purchased by Telegram Premium subscribers */
2227
- is_premium?: true
2228
- /** _True_, if the gift can be used (after being upgraded) to customize a user's appearance */
2229
- has_colors?: true
2230
- /** The total number of gifts of this type that can be sent by all users; for limited gifts only */
2231
- total_count?: number
2232
- /** The number of remaining gifts of this type that can be sent by all users; for limited gifts only */
2233
- remaining_count?: number
2234
- /** The total number of gifts of this type that can be sent by the bot; for limited gifts only */
2235
- personal_total_count?: number
2236
- /** The number of remaining gifts of this type that can be sent by the bot; for limited gifts only */
2237
- personal_remaining_count?: number
2238
- /** Background of the gift */
2239
- background?: GiftBackground
2240
- /** The total number of different unique gifts that can be obtained by upgrading the gift */
2241
- unique_gift_variant_count?: number
2242
- /** Information about the chat that published the gift */
2243
- publisher_chat?: Chat
2244
- }
2245
-
2246
- /** This object represent a list of gifts. */
2247
- export interface Gifts {
2248
- /** The list of gifts */
2249
- gifts: Array<Gift>
2250
- }
2251
-
2252
- /** This object describes the model of a unique gift. */
2253
- export interface UniqueGiftModel {
2254
- /** Name of the model */
2255
- name: string
2256
- /** The sticker that represents the unique gift */
2257
- sticker: Sticker
2258
- /** The number of unique gifts that receive this model for every 1000 gifts upgraded */
2259
- rarity_per_mille: number
2260
- }
2261
-
2262
- /** This object describes the symbol shown on the pattern of a unique gift. */
2263
- export interface UniqueGiftSymbol {
2264
- /** Name of the symbol */
2265
- name: string
2266
- /** The sticker that represents the unique gift */
2267
- sticker: Sticker
2268
- /** The number of unique gifts that receive this model for every 1000 gifts upgraded */
2269
- rarity_per_mille: number
2270
- }
2271
-
2272
- /** This object describes the colors of the backdrop of a unique gift. */
2273
- export interface UniqueGiftBackdropColors {
2274
- /** The color in the center of the backdrop in RGB format */
2275
- center_color: number
2276
- /** The color on the edges of the backdrop in RGB format */
2277
- edge_color: number
2278
- /** The color to be applied to the symbol in RGB format */
2279
- symbol_color: number
2280
- /** The color for the text on the backdrop in RGB format */
2281
- text_color: number
2282
- }
2283
-
2284
- /** This object describes the backdrop of a unique gift. */
2285
- export interface UniqueGiftBackdrop {
2286
- /** Name of the backdrop */
2287
- name: string
2288
- /** Colors of the backdrop */
2289
- colors: UniqueGiftBackdropColors
2290
- /** The number of unique gifts that receive this backdrop for every 1000 gifts upgraded */
2291
- rarity_per_mille: number
2292
- }
2293
-
2294
- /** This object contains information about the color scheme for a user's name, message replies and link previews based on a unique gift. */
2295
- export interface UniqueGiftColors {
2296
- /** Custom emoji identifier of the unique gift's model */
2297
- model_custom_emoji_id: string
2298
- /** Custom emoji identifier of the unique gift's symbol */
2299
- symbol_custom_emoji_id: string
2300
- /** Main color used in light themes; RGB format */
2301
- light_theme_main_color: number
2302
- /** List of 1-3 additional colors used in light themes; RGB format */
2303
- light_theme_other_colors: Array<number>
2304
- /** Main color used in dark themes; RGB format */
2305
- dark_theme_main_color: number
2306
- /** List of 1-3 additional colors used in dark themes; RGB format */
2307
- dark_theme_other_colors: Array<number>
2308
- }
2309
-
2310
- /** This object describes a unique gift that was upgraded from a regular gift. */
2311
- export interface UniqueGift {
2312
- /** Identifier of the regular gift from which the gift was upgraded */
2313
- gift_id: string
2314
- /** Human-readable name of the regular gift from which this unique gift was upgraded */
2315
- base_name: string
2316
- /** Unique name of the gift. This name can be used in `https://t.me/nft/...` links and story areas */
2317
- name: string
2318
- /** Unique number of the upgraded gift among gifts upgraded from the same regular gift */
2319
- number: number
2320
- /** Model of the gift */
2321
- model: UniqueGiftModel
2322
- /** Symbol of the gift */
2323
- symbol: UniqueGiftSymbol
2324
- /** Backdrop of the gift */
2325
- backdrop: UniqueGiftBackdrop
2326
- /** _True_, if the original regular gift was exclusively purchaseable by Telegram Premium subscribers */
2327
- is_premium?: true
2328
- /** _True_, if the gift is assigned from the TON blockchain and can't be resold or transferred in Telegram */
2329
- is_from_blockchain?: true
2330
- /** The color scheme that can be used by the gift's owner for the chat's name, replies to messages and link previews; for business account gifts and gifts that are currently on sale only */
2331
- colors?: UniqueGiftColors
2332
- /** Information about the chat that published the gift */
2333
- publisher_chat?: Chat
2334
- }
2335
-
2336
- /** Describes a service message about a regular gift that was sent or received. */
2337
- export interface GiftInfo {
2338
- /** Information about the gift */
2339
- gift: Gift
2340
- /** Unique identifier of the received gift for the bot; only present for gifts received on behalf of business accounts */
2341
- owned_gift_id?: string
2342
- /** Number of Telegram Stars that can be claimed by the receiver by converting the gift; omitted if conversion to Telegram Stars is impossible */
2343
- convert_star_count?: number
2344
- /** Number of Telegram Stars that were prepaid for the ability to upgrade the gift */
2345
- prepaid_upgrade_star_count?: number
2346
- /** _True_, if the gift's upgrade was purchased after the gift was sent */
2347
- is_upgrade_separate?: true
2348
- /** _True_, if the gift can be upgraded to a unique gift */
2349
- can_be_upgraded?: true
2350
- /** Text of the message that was added to the gift */
2351
- text?: string
2352
- /** Special entities that appear in the text */
2353
- entities?: Array<MessageEntity>
2354
- /** _True_, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them */
2355
- is_private?: true
2356
- /** Unique number reserved for this gift when upgraded. See the _number_ field in [UniqueGift](https://core.telegram.org/bots/api#uniquegift) */
2357
- unique_gift_number?: number
2358
- }
2359
-
2360
- /** Describes a service message about a unique gift that was sent or received. */
2361
- export interface UniqueGiftInfo {
2362
- /** Information about the gift */
2363
- gift: UniqueGift
2364
- /** Origin of the gift. Currently, either “upgrade” for gifts upgraded from regular gifts, “transfer” for gifts transferred from other users or channels, “resale” for gifts bought from other users, “gifted\_upgrade” for upgrades purchased after the gift was sent, or “offer” for gifts bought or sold through gift purchase offers */
2365
- origin: string
2366
- /** For gifts bought from other users, the currency in which the payment for the gift was done. Currently, one of “XTR” for Telegram Stars or “TON” for toncoins. */
2367
- last_resale_currency?: string
2368
- /** For gifts bought from other users, the price paid for the gift in either Telegram Stars or nanotoncoins */
2369
- last_resale_amount?: number
2370
- /** Unique identifier of the received gift for the bot; only present for gifts received on behalf of business accounts */
2371
- owned_gift_id?: string
2372
- /** Number of Telegram Stars that must be paid to transfer the gift; omitted if the bot cannot transfer the gift */
2373
- transfer_star_count?: number
2374
- /** Point in time (Unix timestamp) when the gift can be transferred. If it is in the past, then the gift can be transferred now */
2375
- next_transfer_date?: number
2376
- }
2377
-
2378
- /**
2379
- * This object describes a gift received and owned by a user or a chat. Currently, it can be one of
2380
- *
2381
- * - [OwnedGiftRegular](https://core.telegram.org/bots/api#ownedgiftregular)
2382
- * - [OwnedGiftUnique](https://core.telegram.org/bots/api#ownedgiftunique)
2383
- */
2384
- export type OwnedGift = OwnedGiftRegular | OwnedGiftUnique
2385
-
2386
- /** Describes a regular gift owned by a user or a chat. */
2387
- export interface OwnedGiftRegular {
2388
- /** Type of the gift, always “regular” */
2389
- type: string
2390
- /** Information about the regular gift */
2391
- gift: Gift
2392
- /** Unique identifier of the gift for the bot; for gifts received on behalf of business accounts only */
2393
- owned_gift_id?: string
2394
- /** Sender of the gift if it is a known user */
2395
- sender_user?: User
2396
- /** Date the gift was sent in Unix time */
2397
- send_date: number
2398
- /** Text of the message that was added to the gift */
2399
- text?: string
2400
- /** Special entities that appear in the text */
2401
- entities?: Array<MessageEntity>
2402
- /** _True_, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them */
2403
- is_private?: true
2404
- /** _True_, if the gift is displayed on the account's profile page; for gifts received on behalf of business accounts only */
2405
- is_saved?: true
2406
- /** _True_, if the gift can be upgraded to a unique gift; for gifts received on behalf of business accounts only */
2407
- can_be_upgraded?: true
2408
- /** _True_, if the gift was refunded and isn't available anymore */
2409
- was_refunded?: true
2410
- /** Number of Telegram Stars that can be claimed by the receiver instead of the gift; omitted if the gift cannot be converted to Telegram Stars; for gifts received on behalf of business accounts only */
2411
- convert_star_count?: number
2412
- /** Number of Telegram Stars that were paid for the ability to upgrade the gift */
2413
- prepaid_upgrade_star_count?: number
2414
- /** _True_, if the gift's upgrade was purchased after the gift was sent; for gifts received on behalf of business accounts only */
2415
- is_upgrade_separate?: true
2416
- /** Unique number reserved for this gift when upgraded. See the _number_ field in [UniqueGift](https://core.telegram.org/bots/api#uniquegift) */
2417
- unique_gift_number?: number
2418
- }
2419
-
2420
- /** Describes a unique gift received and owned by a user or a chat. */
2421
- export interface OwnedGiftUnique {
2422
- /** Type of the gift, always “unique” */
2423
- type: string
2424
- /** Information about the unique gift */
2425
- gift: UniqueGift
2426
- /** Unique identifier of the received gift for the bot; for gifts received on behalf of business accounts only */
2427
- owned_gift_id?: string
2428
- /** Sender of the gift if it is a known user */
2429
- sender_user?: User
2430
- /** Date the gift was sent in Unix time */
2431
- send_date: number
2432
- /** _True_, if the gift is displayed on the account's profile page; for gifts received on behalf of business accounts only */
2433
- is_saved?: true
2434
- /** _True_, if the gift can be transferred to another owner; for gifts received on behalf of business accounts only */
2435
- can_be_transferred?: true
2436
- /** Number of Telegram Stars that must be paid to transfer the gift; omitted if the bot cannot transfer the gift */
2437
- transfer_star_count?: number
2438
- /** Point in time (Unix timestamp) when the gift can be transferred. If it is in the past, then the gift can be transferred now */
2439
- next_transfer_date?: number
2440
- }
2441
-
2442
- /** Contains the list of gifts received and owned by a user or a chat. */
2443
- export interface OwnedGifts {
2444
- /** The total number of gifts owned by the user or the chat */
2445
- total_count: number
2446
- /** The list of gifts */
2447
- gifts: Array<OwnedGift>
2448
- /** Offset for the next request. If empty, then there are no more results */
2449
- next_offset?: string
2450
- }
2451
-
2452
- /** This object describes the types of gifts that can be gifted to a user or a chat. */
2453
- export interface AcceptedGiftTypes {
2454
- /** _True_, if unlimited regular gifts are accepted */
2455
- unlimited_gifts: boolean
2456
- /** _True_, if limited regular gifts are accepted */
2457
- limited_gifts: boolean
2458
- /** _True_, if unique gifts or gifts that can be upgraded to unique for free are accepted */
2459
- unique_gifts: boolean
2460
- /** _True_, if a Telegram Premium subscription is accepted */
2461
- premium_subscription: boolean
2462
- /** _True_, if transfers of unique gifts from channels are accepted */
2463
- gifts_from_channels: boolean
2464
- }
2465
-
2466
- /** Describes an amount of Telegram Stars. */
2467
- export interface StarAmount {
2468
- /** Integer amount of Telegram Stars, rounded to 0; can be negative */
2469
- amount: number
2470
- /** The number of 1/1000000000 shares of Telegram Stars; from -999999999 to 999999999; can be negative if and only if _amount_ is non-positive */
2471
- nanostar_amount?: number
2472
- }
2473
-
2474
- /** This object represents a bot command. */
2475
- export interface BotCommand {
2476
- /** Text of the command; 1-32 characters. Can contain only lowercase English letters, digits and underscores. */
2477
- command: string
2478
- /** Description of the command; 1-256 characters. */
2479
- description: string
2480
- }
2481
-
2482
- /**
2483
- * This object represents the scope to which bot commands are applied. Currently, the following 7 scopes are supported:
2484
- *
2485
- * - [BotCommandScopeDefault](https://core.telegram.org/bots/api#botcommandscopedefault)
2486
- * - [BotCommandScopeAllPrivateChats](https://core.telegram.org/bots/api#botcommandscopeallprivatechats)
2487
- * - [BotCommandScopeAllGroupChats](https://core.telegram.org/bots/api#botcommandscopeallgroupchats)
2488
- * - [BotCommandScopeAllChatAdministrators](https://core.telegram.org/bots/api#botcommandscopeallchatadministrators)
2489
- * - [BotCommandScopeChat](https://core.telegram.org/bots/api#botcommandscopechat)
2490
- * - [BotCommandScopeChatAdministrators](https://core.telegram.org/bots/api#botcommandscopechatadministrators)
2491
- * - [BotCommandScopeChatMember](https://core.telegram.org/bots/api#botcommandscopechatmember)
2492
- */
2493
- export type BotCommandScope = BotCommandScopeDefault | BotCommandScopeAllPrivateChats | BotCommandScopeAllGroupChats | BotCommandScopeAllChatAdministrators | BotCommandScopeChat | BotCommandScopeChatAdministrators | BotCommandScopeChatMember
2494
-
2495
- /** Represents the default [scope](https://core.telegram.org/bots/api#botcommandscope) of bot commands. Default commands are used if no commands with a [narrower scope](https://core.telegram.org/bots/api#determining-list-of-commands) are specified for the user. */
2496
- export interface BotCommandScopeDefault {
2497
- /** Scope type, must be _default_ */
2498
- type: string
2499
- }
2500
-
2501
- /** Represents the [scope](https://core.telegram.org/bots/api#botcommandscope) of bot commands, covering all private chats. */
2502
- export interface BotCommandScopeAllPrivateChats {
2503
- /** Scope type, must be _all\_private\_chats_ */
2504
- type: string
2505
- }
2506
-
2507
- /** Represents the [scope](https://core.telegram.org/bots/api#botcommandscope) of bot commands, covering all group and supergroup chats. */
2508
- export interface BotCommandScopeAllGroupChats {
2509
- /** Scope type, must be _all\_group\_chats_ */
2510
- type: string
2511
- }
2512
-
2513
- /** Represents the [scope](https://core.telegram.org/bots/api#botcommandscope) of bot commands, covering all group and supergroup chat administrators. */
2514
- export interface BotCommandScopeAllChatAdministrators {
2515
- /** Scope type, must be _all\_chat\_administrators_ */
2516
- type: string
2517
- }
2518
-
2519
- /** Represents the [scope](https://core.telegram.org/bots/api#botcommandscope) of bot commands, covering a specific chat. */
2520
- export interface BotCommandScopeChat {
2521
- /** Scope type, must be _chat_ */
2522
- type: string
2523
- /** Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`). Channel direct messages chats and channel chats aren't supported. */
2524
- chat_id: number | string
2525
- }
2526
-
2527
- /** Represents the [scope](https://core.telegram.org/bots/api#botcommandscope) of bot commands, covering all administrators of a specific group or supergroup chat. */
2528
- export interface BotCommandScopeChatAdministrators {
2529
- /** Scope type, must be _chat\_administrators_ */
2530
- type: string
2531
- /** Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`). Channel direct messages chats and channel chats aren't supported. */
2532
- chat_id: number | string
2533
- }
2534
-
2535
- /** Represents the [scope](https://core.telegram.org/bots/api#botcommandscope) of bot commands, covering a specific member of a group or supergroup chat. */
2536
- export interface BotCommandScopeChatMember {
2537
- /** Scope type, must be _chat\_member_ */
2538
- type: string
2539
- /** Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`). Channel direct messages chats and channel chats aren't supported. */
2540
- chat_id: number | string
2541
- /** Unique identifier of the target user */
2542
- user_id: number
2543
- }
2544
-
2545
- /** This object represents the bot's name. */
2546
- export interface BotName {
2547
- /** The bot's name */
2548
- name: string
2549
- }
2550
-
2551
- /** This object represents the bot's description. */
2552
- export interface BotDescription {
2553
- /** The bot's description */
2554
- description: string
2555
- }
2556
-
2557
- /** This object represents the bot's short description. */
2558
- export interface BotShortDescription {
2559
- /** The bot's short description */
2560
- short_description: string
2561
- }
2562
-
2563
- /**
2564
- * This object describes the bot's menu button in a private chat. It should be one of
2565
- *
2566
- * - [MenuButtonCommands](https://core.telegram.org/bots/api#menubuttoncommands)
2567
- * - [MenuButtonWebApp](https://core.telegram.org/bots/api#menubuttonwebapp)
2568
- * - [MenuButtonDefault](https://core.telegram.org/bots/api#menubuttondefault)
2569
- *
2570
- * If a menu button other than [MenuButtonDefault](https://core.telegram.org/bots/api#menubuttondefault) is set for a private chat, then it is applied in the chat. Otherwise the default menu button is applied. By default, the menu button opens the list of bot commands.
2571
- */
2572
- export type MenuButton = MenuButtonCommands | MenuButtonWebApp | MenuButtonDefault
2573
-
2574
- /** Represents a menu button, which opens the bot's list of commands. */
2575
- export interface MenuButtonCommands {
2576
- /** Type of the button, must be _commands_ */
2577
- type: string
2578
- }
2579
-
2580
- /** Represents a menu button, which launches a [Web App](https://core.telegram.org/bots/webapps). */
2581
- export interface MenuButtonWebApp {
2582
- /** Type of the button, must be _web\_app_ */
2583
- type: string
2584
- /** Text on the button */
2585
- text: string
2586
- /** Description of the Web App that will be launched when the user presses the button. The Web App will be able to send an arbitrary message on behalf of the user using the method [answerWebAppQuery](https://core.telegram.org/bots/api#answerwebappquery). Alternatively, a `t.me` link to a Web App of the bot can be specified in the object instead of the Web App's URL, in which case the Web App will be opened as if the user pressed the link. */
2587
- web_app: WebAppInfo
2588
- }
2589
-
2590
- /** Describes that no specific value for the menu button was set. */
2591
- export interface MenuButtonDefault {
2592
- /** Type of the button, must be _default_ */
2593
- type: string
2594
- }
2595
-
2596
- /**
2597
- * This object describes the source of a chat boost. It can be one of
2598
- *
2599
- * - [ChatBoostSourcePremium](https://core.telegram.org/bots/api#chatboostsourcepremium)
2600
- * - [ChatBoostSourceGiftCode](https://core.telegram.org/bots/api#chatboostsourcegiftcode)
2601
- * - [ChatBoostSourceGiveaway](https://core.telegram.org/bots/api#chatboostsourcegiveaway)
2602
- */
2603
- export type ChatBoostSource = ChatBoostSourcePremium | ChatBoostSourceGiftCode | ChatBoostSourceGiveaway
2604
-
2605
- /** The boost was obtained by subscribing to Telegram Premium or by gifting a Telegram Premium subscription to another user. */
2606
- export interface ChatBoostSourcePremium {
2607
- /** Source of the boost, always “premium” */
2608
- source: string
2609
- /** User that boosted the chat */
2610
- user: User
2611
- }
2612
-
2613
- /** The boost was obtained by the creation of Telegram Premium gift codes to boost a chat. Each such code boosts the chat 4 times for the duration of the corresponding Telegram Premium subscription. */
2614
- export interface ChatBoostSourceGiftCode {
2615
- /** Source of the boost, always “gift\_code” */
2616
- source: string
2617
- /** User for which the gift code was created */
2618
- user: User
2619
- }
2620
-
2621
- /** The boost was obtained by the creation of a Telegram Premium or a Telegram Star giveaway. This boosts the chat 4 times for the duration of the corresponding Telegram Premium subscription for Telegram Premium giveaways and _prize\_star\_count_ / 500 times for one year for Telegram Star giveaways. */
2622
- export interface ChatBoostSourceGiveaway {
2623
- /** Source of the boost, always “giveaway” */
2624
- source: string
2625
- /** Identifier of a message in the chat with the giveaway; the message could have been deleted already. May be 0 if the message isn't sent yet. */
2626
- giveaway_message_id: number
2627
- /** User that won the prize in the giveaway if any; for Telegram Premium giveaways only */
2628
- user?: User
2629
- /** The number of Telegram Stars to be split between giveaway winners; for Telegram Star giveaways only */
2630
- prize_star_count?: number
2631
- /** _True_, if the giveaway was completed, but there was no user to win the prize */
2632
- is_unclaimed?: true
2633
- }
2634
-
2635
- /** This object contains information about a chat boost. */
2636
- export interface ChatBoost {
2637
- /** Unique identifier of the boost */
2638
- boost_id: string
2639
- /** Point in time (Unix timestamp) when the chat was boosted */
2640
- add_date: number
2641
- /** Point in time (Unix timestamp) when the boost will automatically expire, unless the booster's Telegram Premium subscription is prolonged */
2642
- expiration_date: number
2643
- /** Source of the added boost */
2644
- source: ChatBoostSource
2645
- }
2646
-
2647
- /** This object represents a boost added to a chat or changed. */
2648
- export interface ChatBoostUpdated {
2649
- /** Chat which was boosted */
2650
- chat: Chat
2651
- /** Information about the chat boost */
2652
- boost: ChatBoost
2653
- }
2654
-
2655
- /** This object represents a boost removed from a chat. */
2656
- export interface ChatBoostRemoved {
2657
- /** Chat which was boosted */
2658
- chat: Chat
2659
- /** Unique identifier of the boost */
2660
- boost_id: string
2661
- /** Point in time (Unix timestamp) when the boost was removed */
2662
- remove_date: number
2663
- /** Source of the removed boost */
2664
- source: ChatBoostSource
2665
- }
2666
-
2667
- /** This object represents a list of boosts added to a chat by a user. */
2668
- export interface UserChatBoosts {
2669
- /** The list of boosts added to the chat by the user */
2670
- boosts: Array<ChatBoost>
2671
- }
2672
-
2673
- /** Represents the rights of a business bot. */
2674
- export interface BusinessBotRights {
2675
- /** _True_, if the bot can send and edit messages in the private chats that had incoming messages in the last 24 hours */
2676
- can_reply?: true
2677
- /** _True_, if the bot can mark incoming private messages as read */
2678
- can_read_messages?: true
2679
- /** _True_, if the bot can delete messages sent by the bot */
2680
- can_delete_sent_messages?: true
2681
- /** _True_, if the bot can delete all private messages in managed chats */
2682
- can_delete_all_messages?: true
2683
- /** _True_, if the bot can edit the first and last name of the business account */
2684
- can_edit_name?: true
2685
- /** _True_, if the bot can edit the bio of the business account */
2686
- can_edit_bio?: true
2687
- /** _True_, if the bot can edit the profile photo of the business account */
2688
- can_edit_profile_photo?: true
2689
- /** _True_, if the bot can edit the username of the business account */
2690
- can_edit_username?: true
2691
- /** _True_, if the bot can change the privacy settings pertaining to gifts for the business account */
2692
- can_change_gift_settings?: true
2693
- /** _True_, if the bot can view gifts and the amount of Telegram Stars owned by the business account */
2694
- can_view_gifts_and_stars?: true
2695
- /** _True_, if the bot can convert regular gifts owned by the business account to Telegram Stars */
2696
- can_convert_gifts_to_stars?: true
2697
- /** _True_, if the bot can transfer and upgrade gifts owned by the business account */
2698
- can_transfer_and_upgrade_gifts?: true
2699
- /** _True_, if the bot can transfer Telegram Stars received by the business account to its own account, or use them to upgrade and transfer gifts */
2700
- can_transfer_stars?: true
2701
- /** _True_, if the bot can post, edit and delete stories on behalf of the business account */
2702
- can_manage_stories?: true
2703
- }
2704
-
2705
- /** Describes the connection of the bot with a business account. */
2706
- export interface BusinessConnection {
2707
- /** Unique identifier of the business connection */
2708
- id: string
2709
- /** Business account user that created the business connection */
2710
- user: User
2711
- /** Identifier of a private chat with the user who created the business connection. */
2712
- user_chat_id: number
2713
- /** Date the connection was established in Unix time */
2714
- date: number
2715
- /** Rights of the business bot */
2716
- rights?: BusinessBotRights
2717
- /** _True_, if the connection is active */
2718
- is_enabled: boolean
2719
- }
2720
-
2721
- /** This object is received when messages are deleted from a connected business account. */
2722
- export interface BusinessMessagesDeleted {
2723
- /** Unique identifier of the business connection */
2724
- business_connection_id: string
2725
- /** Information about a chat in the business account. The bot may not have access to the chat or the corresponding user. */
2726
- chat: Chat
2727
- /** The list of identifiers of deleted messages in the chat of the business account */
2728
- message_ids: Array<number>
2729
- }
2730
-
2731
- /** Describes why a request was unsuccessful. */
2732
- export interface ResponseParameters {
2733
- /** The group has been migrated to a supergroup with the specified identifier. */
2734
- migrate_to_chat_id?: number
2735
- /** In case of exceeding flood control, the number of seconds left to wait before the request can be repeated */
2736
- retry_after?: number
2737
- }
2738
-
2739
- /**
2740
- * This object represents the content of a media message to be sent. It should be one of
2741
- *
2742
- * - [InputMediaAnimation](https://core.telegram.org/bots/api#inputmediaanimation)
2743
- * - [InputMediaDocument](https://core.telegram.org/bots/api#inputmediadocument)
2744
- * - [InputMediaAudio](https://core.telegram.org/bots/api#inputmediaaudio)
2745
- * - [InputMediaPhoto](https://core.telegram.org/bots/api#inputmediaphoto)
2746
- * - [InputMediaVideo](https://core.telegram.org/bots/api#inputmediavideo)
2747
- */
2748
- export type InputMedia = InputMediaAnimation | InputMediaDocument | InputMediaAudio | InputMediaPhoto | InputMediaVideo
2749
-
2750
- /** Represents a photo to be sent. */
2751
- export interface InputMediaPhoto {
2752
- /** Type of the result, must be _photo_ */
2753
- type: string
2754
- /** File to send. Pass a file\_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://<file\_attach\_name>” to upload a new one using multipart/form-data under <file\_attach\_name> name. [More information on Sending Files »](https://core.telegram.org/bots/api#sending-files) */
2755
- media: string
2756
- /** Caption of the photo to be sent, 0-1024 characters after entities parsing */
2757
- caption?: string
2758
- /** Mode for parsing entities in the photo caption. See [formatting options](https://core.telegram.org/bots/api#formatting-options) for more details. */
2759
- parse_mode?: string
2760
- /** List of special entities that appear in the caption, which can be specified instead of _parse\_mode_ */
2761
- caption_entities?: Array<MessageEntity>
2762
- /** Pass _True_, if the caption must be shown above the message media */
2763
- show_caption_above_media?: boolean
2764
- /** Pass _True_ if the photo needs to be covered with a spoiler animation */
2765
- has_spoiler?: boolean
2766
- }
2767
-
2768
- /** Represents a video to be sent. */
2769
- export interface InputMediaVideo {
2770
- /** Type of the result, must be _video_ */
2771
- type: string
2772
- /** File to send. Pass a file\_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://<file\_attach\_name>” to upload a new one using multipart/form-data under <file\_attach\_name> name. [More information on Sending Files »](https://core.telegram.org/bots/api#sending-files) */
2773
- media: string
2774
- /** Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass “attach://<file\_attach\_name>” if the thumbnail was uploaded using multipart/form-data under <file\_attach\_name>. [More information on Sending Files »](https://core.telegram.org/bots/api#sending-files) */
2775
- thumbnail?: string
2776
- /** Cover for the video in the message. Pass a file\_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://<file\_attach\_name>” to upload a new one using multipart/form-data under <file\_attach\_name> name. [More information on Sending Files »](https://core.telegram.org/bots/api#sending-files) */
2777
- cover?: string
2778
- /** Start timestamp for the video in the message */
2779
- start_timestamp?: number
2780
- /** Caption of the video to be sent, 0-1024 characters after entities parsing */
2781
- caption?: string
2782
- /** Mode for parsing entities in the video caption. See [formatting options](https://core.telegram.org/bots/api#formatting-options) for more details. */
2783
- parse_mode?: string
2784
- /** List of special entities that appear in the caption, which can be specified instead of _parse\_mode_ */
2785
- caption_entities?: Array<MessageEntity>
2786
- /** Pass _True_, if the caption must be shown above the message media */
2787
- show_caption_above_media?: boolean
2788
- /** Video width */
2789
- width?: number
2790
- /** Video height */
2791
- height?: number
2792
- /** Video duration in seconds */
2793
- duration?: number
2794
- /** Pass _True_ if the uploaded video is suitable for streaming */
2795
- supports_streaming?: boolean
2796
- /** Pass _True_ if the video needs to be covered with a spoiler animation */
2797
- has_spoiler?: boolean
2798
- }
2799
-
2800
- /** Represents an animation file (GIF or H.264/MPEG-4 AVC video without sound) to be sent. */
2801
- export interface InputMediaAnimation {
2802
- /** Type of the result, must be _animation_ */
2803
- type: string
2804
- /** File to send. Pass a file\_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://<file\_attach\_name>” to upload a new one using multipart/form-data under <file\_attach\_name> name. [More information on Sending Files »](https://core.telegram.org/bots/api#sending-files) */
2805
- media: string
2806
- /** Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass “attach://<file\_attach\_name>” if the thumbnail was uploaded using multipart/form-data under <file\_attach\_name>. [More information on Sending Files »](https://core.telegram.org/bots/api#sending-files) */
2807
- thumbnail?: string
2808
- /** Caption of the animation to be sent, 0-1024 characters after entities parsing */
2809
- caption?: string
2810
- /** Mode for parsing entities in the animation caption. See [formatting options](https://core.telegram.org/bots/api#formatting-options) for more details. */
2811
- parse_mode?: string
2812
- /** List of special entities that appear in the caption, which can be specified instead of _parse\_mode_ */
2813
- caption_entities?: Array<MessageEntity>
2814
- /** Pass _True_, if the caption must be shown above the message media */
2815
- show_caption_above_media?: boolean
2816
- /** Animation width */
2817
- width?: number
2818
- /** Animation height */
2819
- height?: number
2820
- /** Animation duration in seconds */
2821
- duration?: number
2822
- /** Pass _True_ if the animation needs to be covered with a spoiler animation */
2823
- has_spoiler?: boolean
2824
- }
2825
-
2826
- /** Represents an audio file to be treated as music to be sent. */
2827
- export interface InputMediaAudio {
2828
- /** Type of the result, must be _audio_ */
2829
- type: string
2830
- /** File to send. Pass a file\_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://<file\_attach\_name>” to upload a new one using multipart/form-data under <file\_attach\_name> name. [More information on Sending Files »](https://core.telegram.org/bots/api#sending-files) */
2831
- media: string
2832
- /** Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass “attach://<file\_attach\_name>” if the thumbnail was uploaded using multipart/form-data under <file\_attach\_name>. [More information on Sending Files »](https://core.telegram.org/bots/api#sending-files) */
2833
- thumbnail?: string
2834
- /** Caption of the audio to be sent, 0-1024 characters after entities parsing */
2835
- caption?: string
2836
- /** Mode for parsing entities in the audio caption. See [formatting options](https://core.telegram.org/bots/api#formatting-options) for more details. */
2837
- parse_mode?: string
2838
- /** List of special entities that appear in the caption, which can be specified instead of _parse\_mode_ */
2839
- caption_entities?: Array<MessageEntity>
2840
- /** Duration of the audio in seconds */
2841
- duration?: number
2842
- /** Performer of the audio */
2843
- performer?: string
2844
- /** Title of the audio */
2845
- title?: string
2846
- }
2847
-
2848
- /** Represents a general file to be sent. */
2849
- export interface InputMediaDocument {
2850
- /** Type of the result, must be _document_ */
2851
- type: string
2852
- /** File to send. Pass a file\_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://<file\_attach\_name>” to upload a new one using multipart/form-data under <file\_attach\_name> name. [More information on Sending Files »](https://core.telegram.org/bots/api#sending-files) */
2853
- media: string
2854
- /** Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass “attach://<file\_attach\_name>” if the thumbnail was uploaded using multipart/form-data under <file\_attach\_name>. [More information on Sending Files »](https://core.telegram.org/bots/api#sending-files) */
2855
- thumbnail?: string
2856
- /** Caption of the document to be sent, 0-1024 characters after entities parsing */
2857
- caption?: string
2858
- /** Mode for parsing entities in the document caption. See [formatting options](https://core.telegram.org/bots/api#formatting-options) for more details. */
2859
- parse_mode?: string
2860
- /** List of special entities that appear in the caption, which can be specified instead of _parse\_mode_ */
2861
- caption_entities?: Array<MessageEntity>
2862
- /** 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. */
2863
- disable_content_type_detection?: boolean
2864
- }
2865
-
2866
- /**
2867
- * This object describes the paid media to be sent. Currently, it can be one of
2868
- *
2869
- * - [InputPaidMediaPhoto](https://core.telegram.org/bots/api#inputpaidmediaphoto)
2870
- * - [InputPaidMediaVideo](https://core.telegram.org/bots/api#inputpaidmediavideo)
2871
- */
2872
- export type InputPaidMedia = InputPaidMediaPhoto | InputPaidMediaVideo
2873
-
2874
- /** The paid media to send is a photo. */
2875
- export interface InputPaidMediaPhoto {
2876
- /** Type of the media, must be _photo_ */
2877
- type: string
2878
- /** File to send. Pass a file\_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://<file\_attach\_name>” to upload a new one using multipart/form-data under <file\_attach\_name> name. [More information on Sending Files »](https://core.telegram.org/bots/api#sending-files) */
2879
- media: string
2880
- }
2881
-
2882
- /** The paid media to send is a video. */
2883
- export interface InputPaidMediaVideo {
2884
- /** Type of the media, must be _video_ */
2885
- type: string
2886
- /** File to send. Pass a file\_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://<file\_attach\_name>” to upload a new one using multipart/form-data under <file\_attach\_name> name. [More information on Sending Files »](https://core.telegram.org/bots/api#sending-files) */
2887
- media: string
2888
- /** Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass “attach://<file\_attach\_name>” if the thumbnail was uploaded using multipart/form-data under <file\_attach\_name>. [More information on Sending Files »](https://core.telegram.org/bots/api#sending-files) */
2889
- thumbnail?: string
2890
- /** Cover for the video in the message. Pass a file\_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://<file\_attach\_name>” to upload a new one using multipart/form-data under <file\_attach\_name> name. [More information on Sending Files »](https://core.telegram.org/bots/api#sending-files) */
2891
- cover?: string
2892
- /** Start timestamp for the video in the message */
2893
- start_timestamp?: number
2894
- /** Video width */
2895
- width?: number
2896
- /** Video height */
2897
- height?: number
2898
- /** Video duration in seconds */
2899
- duration?: number
2900
- /** Pass _True_ if the uploaded video is suitable for streaming */
2901
- supports_streaming?: boolean
2902
- }
2903
-
2904
- /**
2905
- * This object describes a profile photo to set. Currently, it can be one of
2906
- *
2907
- * - [InputProfilePhotoStatic](https://core.telegram.org/bots/api#inputprofilephotostatic)
2908
- * - [InputProfilePhotoAnimated](https://core.telegram.org/bots/api#inputprofilephotoanimated)
2909
- */
2910
- export type InputProfilePhoto = InputProfilePhotoStatic | InputProfilePhotoAnimated
2911
-
2912
- /** A static profile photo in the .JPG format. */
2913
- export interface InputProfilePhotoStatic {
2914
- /** Type of the profile photo, must be _static_ */
2915
- type: string
2916
- /** The static profile photo. Profile photos can't be reused and can only be uploaded as a new file, so you can pass “attach://<file\_attach\_name>” if the photo was uploaded using multipart/form-data under <file\_attach\_name>. [More information on Sending Files »](https://core.telegram.org/bots/api#sending-files) */
2917
- photo: string
2918
- }
2919
-
2920
- /** An animated profile photo in the MPEG4 format. */
2921
- export interface InputProfilePhotoAnimated {
2922
- /** Type of the profile photo, must be _animated_ */
2923
- type: string
2924
- /** The animated profile photo. Profile photos can't be reused and can only be uploaded as a new file, so you can pass “attach://<file\_attach\_name>” if the photo was uploaded using multipart/form-data under <file\_attach\_name>. [More information on Sending Files »](https://core.telegram.org/bots/api#sending-files) */
2925
- animation: string
2926
- /** Timestamp in seconds of the frame that will be used as the static profile photo. Defaults to 0.0. */
2927
- main_frame_timestamp?: number
2928
- }
2929
-
2930
- /**
2931
- * This object describes the content of a story to post. Currently, it can be one of
2932
- *
2933
- * - [InputStoryContentPhoto](https://core.telegram.org/bots/api#inputstorycontentphoto)
2934
- * - [InputStoryContentVideo](https://core.telegram.org/bots/api#inputstorycontentvideo)
2935
- */
2936
- export type InputStoryContent = InputStoryContentPhoto | InputStoryContentVideo
2937
-
2938
- /** Describes a photo to post as a story. */
2939
- export interface InputStoryContentPhoto {
2940
- /** Type of the content, must be _photo_ */
2941
- type: string
2942
- /** The photo to post as a story. The photo must be of the size 1080x1920 and must not exceed 10 MB. The photo can't be reused and can only be uploaded as a new file, so you can pass “attach://<file\_attach\_name>” if the photo was uploaded using multipart/form-data under <file\_attach\_name>. [More information on Sending Files »](https://core.telegram.org/bots/api#sending-files) */
2943
- photo: string
2944
- }
2945
-
2946
- /** Describes a video to post as a story. */
2947
- export interface InputStoryContentVideo {
2948
- /** Type of the content, must be _video_ */
2949
- type: string
2950
- /** The video to post as a story. The video must be of the size 720x1280, streamable, encoded with H.265 codec, with key frames added each second in the MPEG4 format, and must not exceed 30 MB. The video can't be reused and can only be uploaded as a new file, so you can pass “attach://<file\_attach\_name>” if the video was uploaded using multipart/form-data under <file\_attach\_name>. [More information on Sending Files »](https://core.telegram.org/bots/api#sending-files) */
2951
- video: string
2952
- /** Precise duration of the video in seconds; 0-60 */
2953
- duration?: number
2954
- /** Timestamp in seconds of the frame that will be used as the static cover for the story. Defaults to 0.0. */
2955
- cover_frame_timestamp?: number
2956
- /** Pass _True_ if the video has no sound */
2957
- is_animation?: boolean
2958
- }
2959
-
2960
- /** This object represents a sticker. */
2961
- export interface Sticker {
2962
- /** Identifier for this file, which can be used to download or reuse the file */
2963
- file_id: string
2964
- /** 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. */
2965
- file_unique_id: string
2966
- /** 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_. */
2967
- type: string
2968
- /** Sticker width */
2969
- width: number
2970
- /** Sticker height */
2971
- height: number
2972
- /** _True_, if the sticker is [animated](https://telegram.org/blog/animated-stickers) */
2973
- is_animated: boolean
2974
- /** _True_, if the sticker is a [video sticker](https://telegram.org/blog/video-stickers-better-reactions) */
2975
- is_video: boolean
2976
- /** Sticker thumbnail in the .WEBP or .JPG format */
2977
- thumbnail?: PhotoSize
2978
- /** Emoji associated with the sticker */
2979
- emoji?: string
2980
- /** Name of the sticker set to which the sticker belongs */
2981
- set_name?: string
2982
- /** For premium regular stickers, premium animation for the sticker */
2983
- premium_animation?: File
2984
- /** For mask stickers, the position where the mask should be placed */
2985
- mask_position?: MaskPosition
2986
- /** For custom emoji stickers, unique identifier of the custom emoji */
2987
- custom_emoji_id?: string
2988
- /** _True_, if the sticker must be repainted to a text color in messages, the color of the Telegram Premium badge in emoji status, white color on chat photos, or another appropriate color in other places */
2989
- needs_repainting?: true
2990
- /** File size in bytes */
2991
- file_size?: number
2992
- }
2993
-
2994
- /** This object represents a sticker set. */
2995
- export interface StickerSet {
2996
- /** Sticker set name */
2997
- name: string
2998
- /** Sticker set title */
2999
- title: string
3000
- /** Type of stickers in the set, currently one of “regular”, “mask”, “custom\_emoji” */
3001
- sticker_type: string
3002
- /** List of all set stickers */
3003
- stickers: Array<Sticker>
3004
- /** Sticker set thumbnail in the .WEBP, .TGS, or .WEBM format */
3005
- thumbnail?: PhotoSize
3006
- }
3007
-
3008
- /** This object describes the position on faces where a mask should be placed by default. */
3009
- export interface MaskPosition {
3010
- /** The part of the face relative to which the mask should be placed. One of “forehead”, “eyes”, “mouth”, or “chin”. */
3011
- point: string
3012
- /** 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. */
3013
- x_shift: number
3014
- /** 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. */
3015
- y_shift: number
3016
- /** Mask scaling coefficient. For example, 2.0 means double size. */
3017
- scale: number
3018
- }
3019
-
3020
- /** This object describes a sticker to be added to a sticker set. */
3021
- export interface InputSticker {
3022
- /** The added sticker. Pass a _file\_id_ as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or pass “attach://<file\_attach\_name>” to upload a new file using multipart/form-data under <file\_attach\_name> name. Animated and video stickers can't be uploaded via HTTP URL. [More information on Sending Files »](https://core.telegram.org/bots/api#sending-files) */
3023
- sticker: string
3024
- /** Format of the added sticker, must be one of “static” for a **.WEBP** or **.PNG** image, “animated” for a **.TGS** animation, “video” for a **.WEBM** video */
3025
- format: string
3026
- /** List of 1-20 emoji associated with the sticker */
3027
- emoji_list: Array<string>
3028
- /** Position where the mask should be placed on faces. For “mask” stickers only. */
3029
- mask_position?: MaskPosition
3030
- /** List of 0-20 search keywords for the sticker with total length of up to 64 characters. For “regular” and “custom\_emoji” stickers only. */
3031
- keywords?: Array<string>
3032
- }
3033
-
3034
- /** This object represents an incoming inline query. When the user sends an empty query, your bot could return some default or trending results. */
3035
- export interface InlineQuery {
3036
- /** Unique identifier for this query */
3037
- id: string
3038
- /** Sender */
3039
- from: User
3040
- /** Text of the query (up to 256 characters) */
3041
- query: string
3042
- /** Offset of the results to be returned, can be controlled by the bot */
3043
- offset: string
3044
- /** Type of the chat from which the inline query was sent. Can be either “sender” for a private chat with the inline query sender, “private”, “group”, “supergroup”, or “channel”. The chat type should be always known for requests sent from official clients and most third-party clients, unless the request was sent from a secret chat */
3045
- chat_type?: string
3046
- /** Sender location, only for bots that request user location */
3047
- location?: Location
3048
- }
3049
-
3050
- /** This object represents a button to be shown above inline query results. You **must** use exactly one of the optional fields. */
3051
- export interface InlineQueryResultsButton {
3052
- /** Label text on the button */
3053
- text: string
3054
- /** Description of the [Web App](https://core.telegram.org/bots/webapps) that will be launched when the user presses the button. The Web App will be able to switch back to the inline mode using the method [switchInlineQuery](https://core.telegram.org/bots/webapps#initializing-mini-apps) inside the Web App. */
3055
- web_app?: WebAppInfo
3056
- /**
3057
- * [Deep-linking](https://core.telegram.org/bots/features#deep-linking) parameter for the /start message sent to the bot when a user presses the button. 1-64 characters, only `A-Z`, `a-z`, `0-9`, `_` and `-` are allowed.
3058
- *
3059
- * _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_](https://core.telegram.org/bots/api#inlinekeyboardmarkup) button so that the user can easily return to the chat where they wanted to use the bot's inline capabilities.
3060
- */
3061
- start_parameter?: string
3062
- }
3063
-
3064
- /**
3065
- * This object represents one result of an inline query. Telegram clients currently support results of the following 20 types:
3066
- *
3067
- * - [InlineQueryResultCachedAudio](https://core.telegram.org/bots/api#inlinequeryresultcachedaudio)
3068
- * - [InlineQueryResultCachedDocument](https://core.telegram.org/bots/api#inlinequeryresultcacheddocument)
3069
- * - [InlineQueryResultCachedGif](https://core.telegram.org/bots/api#inlinequeryresultcachedgif)
3070
- * - [InlineQueryResultCachedMpeg4Gif](https://core.telegram.org/bots/api#inlinequeryresultcachedmpeg4gif)
3071
- * - [InlineQueryResultCachedPhoto](https://core.telegram.org/bots/api#inlinequeryresultcachedphoto)
3072
- * - [InlineQueryResultCachedSticker](https://core.telegram.org/bots/api#inlinequeryresultcachedsticker)
3073
- * - [InlineQueryResultCachedVideo](https://core.telegram.org/bots/api#inlinequeryresultcachedvideo)
3074
- * - [InlineQueryResultCachedVoice](https://core.telegram.org/bots/api#inlinequeryresultcachedvoice)
3075
- * - [InlineQueryResultArticle](https://core.telegram.org/bots/api#inlinequeryresultarticle)
3076
- * - [InlineQueryResultAudio](https://core.telegram.org/bots/api#inlinequeryresultaudio)
3077
- * - [InlineQueryResultContact](https://core.telegram.org/bots/api#inlinequeryresultcontact)
3078
- * - [InlineQueryResultGame](https://core.telegram.org/bots/api#inlinequeryresultgame)
3079
- * - [InlineQueryResultDocument](https://core.telegram.org/bots/api#inlinequeryresultdocument)
3080
- * - [InlineQueryResultGif](https://core.telegram.org/bots/api#inlinequeryresultgif)
3081
- * - [InlineQueryResultLocation](https://core.telegram.org/bots/api#inlinequeryresultlocation)
3082
- * - [InlineQueryResultMpeg4Gif](https://core.telegram.org/bots/api#inlinequeryresultmpeg4gif)
3083
- * - [InlineQueryResultPhoto](https://core.telegram.org/bots/api#inlinequeryresultphoto)
3084
- * - [InlineQueryResultVenue](https://core.telegram.org/bots/api#inlinequeryresultvenue)
3085
- * - [InlineQueryResultVideo](https://core.telegram.org/bots/api#inlinequeryresultvideo)
3086
- * - [InlineQueryResultVoice](https://core.telegram.org/bots/api#inlinequeryresultvoice)
3087
- *
3088
- * **Note:** All URLs passed in inline query results will be available to end users and therefore must be assumed to be **public**.
3089
- */
3090
- export type InlineQueryResult = InlineQueryResultCachedAudio | InlineQueryResultCachedDocument | InlineQueryResultCachedGif | InlineQueryResultCachedMpeg4Gif | InlineQueryResultCachedPhoto | InlineQueryResultCachedSticker | InlineQueryResultCachedVideo | InlineQueryResultCachedVoice | InlineQueryResultArticle | InlineQueryResultAudio | InlineQueryResultContact | InlineQueryResultGame | InlineQueryResultDocument | InlineQueryResultGif | InlineQueryResultLocation | InlineQueryResultMpeg4Gif | InlineQueryResultPhoto | InlineQueryResultVenue | InlineQueryResultVideo | InlineQueryResultVoice
3091
-
3092
- /** Represents a link to an article or web page. */
3093
- export interface InlineQueryResultArticle {
3094
- /** Type of the result, must be _article_ */
3095
- type: string
3096
- /** Unique identifier for this result, 1-64 Bytes */
3097
- id: string
3098
- /** Title of the result */
3099
- title: string
3100
- /** Content of the message to be sent */
3101
- input_message_content: InputMessageContent
3102
- /** [Inline keyboard](https://core.telegram.org/bots/features#inline-keyboards) attached to the message */
3103
- reply_markup?: InlineKeyboardMarkup
3104
- /** URL of the result */
3105
- url?: string
3106
- /** Short description of the result */
3107
- description?: string
3108
- /** Url of the thumbnail for the result */
3109
- thumbnail_url?: string
3110
- /** Thumbnail width */
3111
- thumbnail_width?: number
3112
- /** Thumbnail height */
3113
- thumbnail_height?: number
3114
- }
3115
-
3116
- /** Represents a link to a photo. By default, this photo will be sent by the user with optional caption. Alternatively, you can use _input\_message\_content_ to send a message with the specified content instead of the photo. */
3117
- export interface InlineQueryResultPhoto {
3118
- /** Type of the result, must be _photo_ */
3119
- type: string
3120
- /** Unique identifier for this result, 1-64 bytes */
3121
- id: string
3122
- /** A valid URL of the photo. Photo must be in **JPEG** format. Photo size must not exceed 5MB */
3123
- photo_url: string
3124
- /** URL of the thumbnail for the photo */
3125
- thumbnail_url: string
3126
- /** Width of the photo */
3127
- photo_width?: number
3128
- /** Height of the photo */
3129
- photo_height?: number
3130
- /** Title for the result */
3131
- title?: string
3132
- /** Short description of the result */
3133
- description?: string
3134
- /** Caption of the photo to be sent, 0-1024 characters after entities parsing */
3135
- caption?: string
3136
- /** Mode for parsing entities in the photo caption. See [formatting options](https://core.telegram.org/bots/api#formatting-options) for more details. */
3137
- parse_mode?: string
3138
- /** List of special entities that appear in the caption, which can be specified instead of _parse\_mode_ */
3139
- caption_entities?: Array<MessageEntity>
3140
- /** Pass _True_, if the caption must be shown above the message media */
3141
- show_caption_above_media?: boolean
3142
- /** [Inline keyboard](https://core.telegram.org/bots/features#inline-keyboards) attached to the message */
3143
- reply_markup?: InlineKeyboardMarkup
3144
- /** Content of the message to be sent instead of the photo */
3145
- input_message_content?: InputMessageContent
3146
- }
3147
-
3148
- /** Represents a link to an animated GIF file. By default, this animated GIF file will be sent by the user with optional caption. Alternatively, you can use _input\_message\_content_ to send a message with the specified content instead of the animation. */
3149
- export interface InlineQueryResultGif {
3150
- /** Type of the result, must be _gif_ */
3151
- type: string
3152
- /** Unique identifier for this result, 1-64 bytes */
3153
- id: string
3154
- /** A valid URL for the GIF file */
3155
- gif_url: string
3156
- /** Width of the GIF */
3157
- gif_width?: number
3158
- /** Height of the GIF */
3159
- gif_height?: number
3160
- /** Duration of the GIF in seconds */
3161
- gif_duration?: number
3162
- /** URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result */
3163
- thumbnail_url: string
3164
- /** MIME type of the thumbnail, must be one of “image/jpeg”, “image/gif”, or “video/mp4”. Defaults to “image/jpeg” */
3165
- thumbnail_mime_type?: string
3166
- /** Title for the result */
3167
- title?: string
3168
- /** Caption of the GIF file to be sent, 0-1024 characters after entities parsing */
3169
- caption?: string
3170
- /** Mode for parsing entities in the caption. See [formatting options](https://core.telegram.org/bots/api#formatting-options) for more details. */
3171
- parse_mode?: string
3172
- /** List of special entities that appear in the caption, which can be specified instead of _parse\_mode_ */
3173
- caption_entities?: Array<MessageEntity>
3174
- /** Pass _True_, if the caption must be shown above the message media */
3175
- show_caption_above_media?: boolean
3176
- /** [Inline keyboard](https://core.telegram.org/bots/features#inline-keyboards) attached to the message */
3177
- reply_markup?: InlineKeyboardMarkup
3178
- /** Content of the message to be sent instead of the GIF animation */
3179
- input_message_content?: InputMessageContent
3180
- }
3181
-
3182
- /** Represents a link to a video animation (H.264/MPEG-4 AVC video without sound). By default, this animated MPEG-4 file will be sent by the user with optional caption. Alternatively, you can use _input\_message\_content_ to send a message with the specified content instead of the animation. */
3183
- export interface InlineQueryResultMpeg4Gif {
3184
- /** Type of the result, must be _mpeg4\_gif_ */
3185
- type: string
3186
- /** Unique identifier for this result, 1-64 bytes */
3187
- id: string
3188
- /** A valid URL for the MPEG4 file */
3189
- mpeg4_url: string
3190
- /** Video width */
3191
- mpeg4_width?: number
3192
- /** Video height */
3193
- mpeg4_height?: number
3194
- /** Video duration in seconds */
3195
- mpeg4_duration?: number
3196
- /** URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result */
3197
- thumbnail_url: string
3198
- /** MIME type of the thumbnail, must be one of “image/jpeg”, “image/gif”, or “video/mp4”. Defaults to “image/jpeg” */
3199
- thumbnail_mime_type?: string
3200
- /** Title for the result */
3201
- title?: string
3202
- /** Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing */
3203
- caption?: string
3204
- /** Mode for parsing entities in the caption. See [formatting options](https://core.telegram.org/bots/api#formatting-options) for more details. */
3205
- parse_mode?: string
3206
- /** List of special entities that appear in the caption, which can be specified instead of _parse\_mode_ */
3207
- caption_entities?: Array<MessageEntity>
3208
- /** Pass _True_, if the caption must be shown above the message media */
3209
- show_caption_above_media?: boolean
3210
- /** [Inline keyboard](https://core.telegram.org/bots/features#inline-keyboards) attached to the message */
3211
- reply_markup?: InlineKeyboardMarkup
3212
- /** Content of the message to be sent instead of the video animation */
3213
- input_message_content?: InputMessageContent
3214
- }
3215
-
3216
- /**
3217
- * Represents a link to a page containing an embedded video player or a video file. By default, this video file will be sent by the user with an optional caption. Alternatively, you can use _input\_message\_content_ to send a message with the specified content instead of the video.
3218
- *
3219
- * > If an InlineQueryResultVideo message contains an embedded video (e.g., YouTube), you **must** replace its content using _input\_message\_content_.
3220
- */
3221
- export interface InlineQueryResultVideo {
3222
- /** Type of the result, must be _video_ */
3223
- type: string
3224
- /** Unique identifier for this result, 1-64 bytes */
3225
- id: string
3226
- /** A valid URL for the embedded video player or video file */
3227
- video_url: string
3228
- /** MIME type of the content of the video URL, “text/html” or “video/mp4” */
3229
- mime_type: string
3230
- /** URL of the thumbnail (JPEG only) for the video */
3231
- thumbnail_url: string
3232
- /** Title for the result */
3233
- title: string
3234
- /** Caption of the video to be sent, 0-1024 characters after entities parsing */
3235
- caption?: string
3236
- /** Mode for parsing entities in the video caption. See [formatting options](https://core.telegram.org/bots/api#formatting-options) for more details. */
3237
- parse_mode?: string
3238
- /** List of special entities that appear in the caption, which can be specified instead of _parse\_mode_ */
3239
- caption_entities?: Array<MessageEntity>
3240
- /** Pass _True_, if the caption must be shown above the message media */
3241
- show_caption_above_media?: boolean
3242
- /** Video width */
3243
- video_width?: number
3244
- /** Video height */
3245
- video_height?: number
3246
- /** Video duration in seconds */
3247
- video_duration?: number
3248
- /** Short description of the result */
3249
- description?: string
3250
- /** [Inline keyboard](https://core.telegram.org/bots/features#inline-keyboards) attached to the message */
3251
- reply_markup?: InlineKeyboardMarkup
3252
- /** Content of the message to be sent instead of the video. This field is **required** if InlineQueryResultVideo is used to send an HTML-page as a result (e.g., a YouTube video). */
3253
- input_message_content?: InputMessageContent
3254
- }
3255
-
3256
- /** Represents a link to an MP3 audio file. By default, this audio file will be sent by the user. Alternatively, you can use _input\_message\_content_ to send a message with the specified content instead of the audio. */
3257
- export interface InlineQueryResultAudio {
3258
- /** Type of the result, must be _audio_ */
3259
- type: string
3260
- /** Unique identifier for this result, 1-64 bytes */
3261
- id: string
3262
- /** A valid URL for the audio file */
3263
- audio_url: string
3264
- /** Title */
3265
- title: string
3266
- /** Caption, 0-1024 characters after entities parsing */
3267
- caption?: string
3268
- /** Mode for parsing entities in the audio caption. See [formatting options](https://core.telegram.org/bots/api#formatting-options) for more details. */
3269
- parse_mode?: string
3270
- /** List of special entities that appear in the caption, which can be specified instead of _parse\_mode_ */
3271
- caption_entities?: Array<MessageEntity>
3272
- /** Performer */
3273
- performer?: string
3274
- /** Audio duration in seconds */
3275
- audio_duration?: number
3276
- /** [Inline keyboard](https://core.telegram.org/bots/features#inline-keyboards) attached to the message */
3277
- reply_markup?: InlineKeyboardMarkup
3278
- /** Content of the message to be sent instead of the audio */
3279
- input_message_content?: InputMessageContent
3280
- }
3281
-
3282
- /** Represents a link to a voice recording in an .OGG container encoded with OPUS. By default, this voice recording will be sent by the user. Alternatively, you can use _input\_message\_content_ to send a message with the specified content instead of the the voice message. */
3283
- export interface InlineQueryResultVoice {
3284
- /** Type of the result, must be _voice_ */
3285
- type: string
3286
- /** Unique identifier for this result, 1-64 bytes */
3287
- id: string
3288
- /** A valid URL for the voice recording */
3289
- voice_url: string
3290
- /** Recording title */
3291
- title: string
3292
- /** Caption, 0-1024 characters after entities parsing */
3293
- caption?: string
3294
- /** Mode for parsing entities in the voice message caption. See [formatting options](https://core.telegram.org/bots/api#formatting-options) for more details. */
3295
- parse_mode?: string
3296
- /** List of special entities that appear in the caption, which can be specified instead of _parse\_mode_ */
3297
- caption_entities?: Array<MessageEntity>
3298
- /** Recording duration in seconds */
3299
- voice_duration?: number
3300
- /** [Inline keyboard](https://core.telegram.org/bots/features#inline-keyboards) attached to the message */
3301
- reply_markup?: InlineKeyboardMarkup
3302
- /** Content of the message to be sent instead of the voice recording */
3303
- input_message_content?: InputMessageContent
3304
- }
3305
-
3306
- /** Represents a link to a file. By default, this file will be sent by the user with an optional caption. Alternatively, you can use _input\_message\_content_ to send a message with the specified content instead of the file. Currently, only **.PDF** and **.ZIP** files can be sent using this method. */
3307
- export interface InlineQueryResultDocument {
3308
- /** Type of the result, must be _document_ */
3309
- type: string
3310
- /** Unique identifier for this result, 1-64 bytes */
3311
- id: string
3312
- /** Title for the result */
3313
- title: string
3314
- /** Caption of the document to be sent, 0-1024 characters after entities parsing */
3315
- caption?: string
3316
- /** Mode for parsing entities in the document caption. See [formatting options](https://core.telegram.org/bots/api#formatting-options) for more details. */
3317
- parse_mode?: string
3318
- /** List of special entities that appear in the caption, which can be specified instead of _parse\_mode_ */
3319
- caption_entities?: Array<MessageEntity>
3320
- /** A valid URL for the file */
3321
- document_url: string
3322
- /** MIME type of the content of the file, either “application/pdf” or “application/zip” */
3323
- mime_type: string
3324
- /** Short description of the result */
3325
- description?: string
3326
- /** Inline keyboard attached to the message */
3327
- reply_markup?: InlineKeyboardMarkup
3328
- /** Content of the message to be sent instead of the file */
3329
- input_message_content?: InputMessageContent
3330
- /** URL of the thumbnail (JPEG only) for the file */
3331
- thumbnail_url?: string
3332
- /** Thumbnail width */
3333
- thumbnail_width?: number
3334
- /** Thumbnail height */
3335
- thumbnail_height?: number
3336
- }
3337
-
3338
- /** Represents a location on a map. By default, the location will be sent by the user. Alternatively, you can use _input\_message\_content_ to send a message with the specified content instead of the location. */
3339
- export interface InlineQueryResultLocation {
3340
- /** Type of the result, must be _location_ */
3341
- type: string
3342
- /** Unique identifier for this result, 1-64 Bytes */
3343
- id: string
3344
- /** Location latitude in degrees */
3345
- latitude: number
3346
- /** Location longitude in degrees */
3347
- longitude: number
3348
- /** Location title */
3349
- title: string
3350
- /** The radius of uncertainty for the location, measured in meters; 0-1500 */
3351
- horizontal_accuracy?: number
3352
- /** Period in seconds during which the location can be updated, should be between 60 and 86400, or 0x7FFFFFFF for live locations that can be edited indefinitely. */
3353
- live_period?: number
3354
- /** For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified. */
3355
- heading?: number
3356
- /** For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified. */
3357
- proximity_alert_radius?: number
3358
- /** [Inline keyboard](https://core.telegram.org/bots/features#inline-keyboards) attached to the message */
3359
- reply_markup?: InlineKeyboardMarkup
3360
- /** Content of the message to be sent instead of the location */
3361
- input_message_content?: InputMessageContent
3362
- /** Url of the thumbnail for the result */
3363
- thumbnail_url?: string
3364
- /** Thumbnail width */
3365
- thumbnail_width?: number
3366
- /** Thumbnail height */
3367
- thumbnail_height?: number
3368
- }
3369
-
3370
- /** Represents a venue. By default, the venue will be sent by the user. Alternatively, you can use _input\_message\_content_ to send a message with the specified content instead of the venue. */
3371
- export interface InlineQueryResultVenue {
3372
- /** Type of the result, must be _venue_ */
3373
- type: string
3374
- /** Unique identifier for this result, 1-64 Bytes */
3375
- id: string
3376
- /** Latitude of the venue location in degrees */
3377
- latitude: number
3378
- /** Longitude of the venue location in degrees */
3379
- longitude: number
3380
- /** Title of the venue */
3381
- title: string
3382
- /** Address of the venue */
3383
- address: string
3384
- /** Foursquare identifier of the venue if known */
3385
- foursquare_id?: string
3386
- /** Foursquare type of the venue, if known. (For example, “arts\_entertainment/default”, “arts\_entertainment/aquarium” or “food/icecream”.) */
3387
- foursquare_type?: string
3388
- /** Google Places identifier of the venue */
3389
- google_place_id?: string
3390
- /** Google Places type of the venue. (See [supported types](https://developers.google.com/places/web-service/supported_types).) */
3391
- google_place_type?: string
3392
- /** [Inline keyboard](https://core.telegram.org/bots/features#inline-keyboards) attached to the message */
3393
- reply_markup?: InlineKeyboardMarkup
3394
- /** Content of the message to be sent instead of the venue */
3395
- input_message_content?: InputMessageContent
3396
- /** Url of the thumbnail for the result */
3397
- thumbnail_url?: string
3398
- /** Thumbnail width */
3399
- thumbnail_width?: number
3400
- /** Thumbnail height */
3401
- thumbnail_height?: number
3402
- }
3403
-
3404
- /** Represents a contact with a phone number. By default, this contact will be sent by the user. Alternatively, you can use _input\_message\_content_ to send a message with the specified content instead of the contact. */
3405
- export interface InlineQueryResultContact {
3406
- /** Type of the result, must be _contact_ */
3407
- type: string
3408
- /** Unique identifier for this result, 1-64 Bytes */
3409
- id: string
3410
- /** Contact's phone number */
3411
- phone_number: string
3412
- /** Contact's first name */
3413
- first_name: string
3414
- /** Contact's last name */
3415
- last_name?: string
3416
- /** Additional data about the contact in the form of a [vCard](https://en.wikipedia.org/wiki/VCard), 0-2048 bytes */
3417
- vcard?: string
3418
- /** [Inline keyboard](https://core.telegram.org/bots/features#inline-keyboards) attached to the message */
3419
- reply_markup?: InlineKeyboardMarkup
3420
- /** Content of the message to be sent instead of the contact */
3421
- input_message_content?: InputMessageContent
3422
- /** Url of the thumbnail for the result */
3423
- thumbnail_url?: string
3424
- /** Thumbnail width */
3425
- thumbnail_width?: number
3426
- /** Thumbnail height */
3427
- thumbnail_height?: number
3428
- }
3429
-
3430
- /** Represents a [Game](https://core.telegram.org/bots/api#games). */
3431
- export interface InlineQueryResultGame {
3432
- /** Type of the result, must be _game_ */
3433
- type: string
3434
- /** Unique identifier for this result, 1-64 bytes */
3435
- id: string
3436
- /** Short name of the game */
3437
- game_short_name: string
3438
- /** [Inline keyboard](https://core.telegram.org/bots/features#inline-keyboards) attached to the message */
3439
- reply_markup?: InlineKeyboardMarkup
3440
- }
3441
-
3442
- /** Represents a link to a photo stored on the Telegram servers. By default, this photo will be sent by the user with an optional caption. Alternatively, you can use _input\_message\_content_ to send a message with the specified content instead of the photo. */
3443
- export interface InlineQueryResultCachedPhoto {
3444
- /** Type of the result, must be _photo_ */
3445
- type: string
3446
- /** Unique identifier for this result, 1-64 bytes */
3447
- id: string
3448
- /** A valid file identifier of the photo */
3449
- photo_file_id: string
3450
- /** Title for the result */
3451
- title?: string
3452
- /** Short description of the result */
3453
- description?: string
3454
- /** Caption of the photo to be sent, 0-1024 characters after entities parsing */
3455
- caption?: string
3456
- /** Mode for parsing entities in the photo caption. See [formatting options](https://core.telegram.org/bots/api#formatting-options) for more details. */
3457
- parse_mode?: string
3458
- /** List of special entities that appear in the caption, which can be specified instead of _parse\_mode_ */
3459
- caption_entities?: Array<MessageEntity>
3460
- /** Pass _True_, if the caption must be shown above the message media */
3461
- show_caption_above_media?: boolean
3462
- /** [Inline keyboard](https://core.telegram.org/bots/features#inline-keyboards) attached to the message */
3463
- reply_markup?: InlineKeyboardMarkup
3464
- /** Content of the message to be sent instead of the photo */
3465
- input_message_content?: InputMessageContent
3466
- }
3467
-
3468
- /** Represents a link to an animated GIF file stored on the Telegram servers. By default, this animated GIF file will be sent by the user with an optional caption. Alternatively, you can use _input\_message\_content_ to send a message with specified content instead of the animation. */
3469
- export interface InlineQueryResultCachedGif {
3470
- /** Type of the result, must be _gif_ */
3471
- type: string
3472
- /** Unique identifier for this result, 1-64 bytes */
3473
- id: string
3474
- /** A valid file identifier for the GIF file */
3475
- gif_file_id: string
3476
- /** Title for the result */
3477
- title?: string
3478
- /** Caption of the GIF file to be sent, 0-1024 characters after entities parsing */
3479
- caption?: string
3480
- /** Mode for parsing entities in the caption. See [formatting options](https://core.telegram.org/bots/api#formatting-options) for more details. */
3481
- parse_mode?: string
3482
- /** List of special entities that appear in the caption, which can be specified instead of _parse\_mode_ */
3483
- caption_entities?: Array<MessageEntity>
3484
- /** Pass _True_, if the caption must be shown above the message media */
3485
- show_caption_above_media?: boolean
3486
- /** [Inline keyboard](https://core.telegram.org/bots/features#inline-keyboards) attached to the message */
3487
- reply_markup?: InlineKeyboardMarkup
3488
- /** Content of the message to be sent instead of the GIF animation */
3489
- input_message_content?: InputMessageContent
3490
- }
3491
-
3492
- /** Represents a link to a video animation (H.264/MPEG-4 AVC video without sound) stored on the Telegram servers. By default, this animated MPEG-4 file will be sent by the user with an optional caption. Alternatively, you can use _input\_message\_content_ to send a message with the specified content instead of the animation. */
3493
- export interface InlineQueryResultCachedMpeg4Gif {
3494
- /** Type of the result, must be _mpeg4\_gif_ */
3495
- type: string
3496
- /** Unique identifier for this result, 1-64 bytes */
3497
- id: string
3498
- /** A valid file identifier for the MPEG4 file */
3499
- mpeg4_file_id: string
3500
- /** Title for the result */
3501
- title?: string
3502
- /** Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing */
3503
- caption?: string
3504
- /** Mode for parsing entities in the caption. See [formatting options](https://core.telegram.org/bots/api#formatting-options) for more details. */
3505
- parse_mode?: string
3506
- /** List of special entities that appear in the caption, which can be specified instead of _parse\_mode_ */
3507
- caption_entities?: Array<MessageEntity>
3508
- /** Pass _True_, if the caption must be shown above the message media */
3509
- show_caption_above_media?: boolean
3510
- /** [Inline keyboard](https://core.telegram.org/bots/features#inline-keyboards) attached to the message */
3511
- reply_markup?: InlineKeyboardMarkup
3512
- /** Content of the message to be sent instead of the video animation */
3513
- input_message_content?: InputMessageContent
3514
- }
3515
-
3516
- /** Represents a link to a sticker stored on the Telegram servers. By default, this sticker will be sent by the user. Alternatively, you can use _input\_message\_content_ to send a message with the specified content instead of the sticker. */
3517
- export interface InlineQueryResultCachedSticker {
3518
- /** Type of the result, must be _sticker_ */
3519
- type: string
3520
- /** Unique identifier for this result, 1-64 bytes */
3521
- id: string
3522
- /** A valid file identifier of the sticker */
3523
- sticker_file_id: string
3524
- /** [Inline keyboard](https://core.telegram.org/bots/features#inline-keyboards) attached to the message */
3525
- reply_markup?: InlineKeyboardMarkup
3526
- /** Content of the message to be sent instead of the sticker */
3527
- input_message_content?: InputMessageContent
3528
- }
3529
-
3530
- /** Represents a link to a file stored on the Telegram servers. By default, this file will be sent by the user with an optional caption. Alternatively, you can use _input\_message\_content_ to send a message with the specified content instead of the file. */
3531
- export interface InlineQueryResultCachedDocument {
3532
- /** Type of the result, must be _document_ */
3533
- type: string
3534
- /** Unique identifier for this result, 1-64 bytes */
3535
- id: string
3536
- /** Title for the result */
3537
- title: string
3538
- /** A valid file identifier for the file */
3539
- document_file_id: string
3540
- /** Short description of the result */
3541
- description?: string
3542
- /** Caption of the document to be sent, 0-1024 characters after entities parsing */
3543
- caption?: string
3544
- /** Mode for parsing entities in the document caption. See [formatting options](https://core.telegram.org/bots/api#formatting-options) for more details. */
3545
- parse_mode?: string
3546
- /** List of special entities that appear in the caption, which can be specified instead of _parse\_mode_ */
3547
- caption_entities?: Array<MessageEntity>
3548
- /** [Inline keyboard](https://core.telegram.org/bots/features#inline-keyboards) attached to the message */
3549
- reply_markup?: InlineKeyboardMarkup
3550
- /** Content of the message to be sent instead of the file */
3551
- input_message_content?: InputMessageContent
3552
- }
3553
-
3554
- /** Represents a link to a video file stored on the Telegram servers. By default, this video file will be sent by the user with an optional caption. Alternatively, you can use _input\_message\_content_ to send a message with the specified content instead of the video. */
3555
- export interface InlineQueryResultCachedVideo {
3556
- /** Type of the result, must be _video_ */
3557
- type: string
3558
- /** Unique identifier for this result, 1-64 bytes */
3559
- id: string
3560
- /** A valid file identifier for the video file */
3561
- video_file_id: string
3562
- /** Title for the result */
3563
- title: string
3564
- /** Short description of the result */
3565
- description?: string
3566
- /** Caption of the video to be sent, 0-1024 characters after entities parsing */
3567
- caption?: string
3568
- /** Mode for parsing entities in the video caption. See [formatting options](https://core.telegram.org/bots/api#formatting-options) for more details. */
3569
- parse_mode?: string
3570
- /** List of special entities that appear in the caption, which can be specified instead of _parse\_mode_ */
3571
- caption_entities?: Array<MessageEntity>
3572
- /** Pass _True_, if the caption must be shown above the message media */
3573
- show_caption_above_media?: boolean
3574
- /** [Inline keyboard](https://core.telegram.org/bots/features#inline-keyboards) attached to the message */
3575
- reply_markup?: InlineKeyboardMarkup
3576
- /** Content of the message to be sent instead of the video */
3577
- input_message_content?: InputMessageContent
3578
- }
3579
-
3580
- /** Represents a link to a voice message stored on the Telegram servers. By default, this voice message will be sent by the user. Alternatively, you can use _input\_message\_content_ to send a message with the specified content instead of the voice message. */
3581
- export interface InlineQueryResultCachedVoice {
3582
- /** Type of the result, must be _voice_ */
3583
- type: string
3584
- /** Unique identifier for this result, 1-64 bytes */
3585
- id: string
3586
- /** A valid file identifier for the voice message */
3587
- voice_file_id: string
3588
- /** Voice message title */
3589
- title: string
3590
- /** Caption, 0-1024 characters after entities parsing */
3591
- caption?: string
3592
- /** Mode for parsing entities in the voice message caption. See [formatting options](https://core.telegram.org/bots/api#formatting-options) for more details. */
3593
- parse_mode?: string
3594
- /** List of special entities that appear in the caption, which can be specified instead of _parse\_mode_ */
3595
- caption_entities?: Array<MessageEntity>
3596
- /** [Inline keyboard](https://core.telegram.org/bots/features#inline-keyboards) attached to the message */
3597
- reply_markup?: InlineKeyboardMarkup
3598
- /** Content of the message to be sent instead of the voice message */
3599
- input_message_content?: InputMessageContent
3600
- }
3601
-
3602
- /** Represents a link to an MP3 audio file stored on the Telegram servers. By default, this audio file will be sent by the user. Alternatively, you can use _input\_message\_content_ to send a message with the specified content instead of the audio. */
3603
- export interface InlineQueryResultCachedAudio {
3604
- /** Type of the result, must be _audio_ */
3605
- type: string
3606
- /** Unique identifier for this result, 1-64 bytes */
3607
- id: string
3608
- /** A valid file identifier for the audio file */
3609
- audio_file_id: string
3610
- /** Caption, 0-1024 characters after entities parsing */
3611
- caption?: string
3612
- /** Mode for parsing entities in the audio caption. See [formatting options](https://core.telegram.org/bots/api#formatting-options) for more details. */
3613
- parse_mode?: string
3614
- /** List of special entities that appear in the caption, which can be specified instead of _parse\_mode_ */
3615
- caption_entities?: Array<MessageEntity>
3616
- /** [Inline keyboard](https://core.telegram.org/bots/features#inline-keyboards) attached to the message */
3617
- reply_markup?: InlineKeyboardMarkup
3618
- /** Content of the message to be sent instead of the audio */
3619
- input_message_content?: InputMessageContent
3620
- }
3621
-
3622
- /**
3623
- * This object represents the content of a message to be sent as a result of an inline query. Telegram clients currently support the following 5 types:
3624
- *
3625
- * - [InputTextMessageContent](https://core.telegram.org/bots/api#inputtextmessagecontent)
3626
- * - [InputLocationMessageContent](https://core.telegram.org/bots/api#inputlocationmessagecontent)
3627
- * - [InputVenueMessageContent](https://core.telegram.org/bots/api#inputvenuemessagecontent)
3628
- * - [InputContactMessageContent](https://core.telegram.org/bots/api#inputcontactmessagecontent)
3629
- * - [InputInvoiceMessageContent](https://core.telegram.org/bots/api#inputinvoicemessagecontent)
3630
- */
3631
- export type InputMessageContent = InputTextMessageContent | InputLocationMessageContent | InputVenueMessageContent | InputContactMessageContent | InputInvoiceMessageContent
3632
-
3633
- /** Represents the [content](https://core.telegram.org/bots/api#inputmessagecontent) of a text message to be sent as the result of an inline query. */
3634
- export interface InputTextMessageContent {
3635
- /** Text of the message to be sent, 1-4096 characters */
3636
- message_text: string
3637
- /** Mode for parsing entities in the message text. See [formatting options](https://core.telegram.org/bots/api#formatting-options) for more details. */
3638
- parse_mode?: string
3639
- /** List of special entities that appear in message text, which can be specified instead of _parse\_mode_ */
3640
- entities?: Array<MessageEntity>
3641
- /** Link preview generation options for the message */
3642
- link_preview_options?: LinkPreviewOptions
3643
- }
3644
-
3645
- /** Represents the [content](https://core.telegram.org/bots/api#inputmessagecontent) of a location message to be sent as the result of an inline query. */
3646
- export interface InputLocationMessageContent {
3647
- /** Latitude of the location in degrees */
3648
- latitude: number
3649
- /** Longitude of the location in degrees */
3650
- longitude: number
3651
- /** The radius of uncertainty for the location, measured in meters; 0-1500 */
3652
- horizontal_accuracy?: number
3653
- /** Period in seconds during which the location can be updated, should be between 60 and 86400, or 0x7FFFFFFF for live locations that can be edited indefinitely. */
3654
- live_period?: number
3655
- /** For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified. */
3656
- heading?: number
3657
- /** For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified. */
3658
- proximity_alert_radius?: number
3659
- }
3660
-
3661
- /** Represents the [content](https://core.telegram.org/bots/api#inputmessagecontent) of a venue message to be sent as the result of an inline query. */
3662
- export interface InputVenueMessageContent {
3663
- /** Latitude of the venue in degrees */
3664
- latitude: number
3665
- /** Longitude of the venue in degrees */
3666
- longitude: number
3667
- /** Name of the venue */
3668
- title: string
3669
- /** Address of the venue */
3670
- address: string
3671
- /** Foursquare identifier of the venue, if known */
3672
- foursquare_id?: string
3673
- /** Foursquare type of the venue, if known. (For example, “arts\_entertainment/default”, “arts\_entertainment/aquarium” or “food/icecream”.) */
3674
- foursquare_type?: string
3675
- /** Google Places identifier of the venue */
3676
- google_place_id?: string
3677
- /** Google Places type of the venue. (See [supported types](https://developers.google.com/places/web-service/supported_types).) */
3678
- google_place_type?: string
3679
- }
3680
-
3681
- /** Represents the [content](https://core.telegram.org/bots/api#inputmessagecontent) of a contact message to be sent as the result of an inline query. */
3682
- export interface InputContactMessageContent {
3683
- /** Contact's phone number */
3684
- phone_number: string
3685
- /** Contact's first name */
3686
- first_name: string
3687
- /** Contact's last name */
3688
- last_name?: string
3689
- /** Additional data about the contact in the form of a [vCard](https://en.wikipedia.org/wiki/VCard), 0-2048 bytes */
3690
- vcard?: string
3691
- }
3692
-
3693
- /** Represents the [content](https://core.telegram.org/bots/api#inputmessagecontent) of an invoice message to be sent as the result of an inline query. */
3694
- export interface InputInvoiceMessageContent {
3695
- /** Product name, 1-32 characters */
3696
- title: string
3697
- /** Product description, 1-255 characters */
3698
- description: string
3699
- /** Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use it for your internal processes. */
3700
- payload: string
3701
- /** Payment provider token, obtained via [@BotFather](https://t.me/botfather). Pass an empty string for payments in [Telegram Stars](https://t.me/BotNews/90). */
3702
- provider_token?: string
3703
- /** Three-letter ISO 4217 currency code, see [more on currencies](https://core.telegram.org/bots/payments#supported-currencies). Pass “XTR” for payments in [Telegram Stars](https://t.me/BotNews/90). */
3704
- currency: string
3705
- /** Price breakdown, an array of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.). Must contain exactly one item for payments in [Telegram Stars](https://t.me/BotNews/90). */
3706
- prices: Array<LabeledPrice>
3707
- /** The maximum accepted amount for tips in the _smallest units_ of the currency (integer, **not** float/double). For example, for a maximum tip of `US$ 1.45` pass `max_tip_amount = 145`. See the _exp_ parameter in [currencies.json](https://core.telegram.org/bots/payments/currencies.json), it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0. Not supported for payments in [Telegram Stars](https://t.me/BotNews/90). */
3708
- max_tip_amount?: number
3709
- /** An array of suggested amounts of tip in the _smallest units_ of the currency (integer, **not** float/double). At most 4 suggested tip amounts can be specified. The suggested tip amounts must be positive, passed in a strictly increased order and must not exceed _max\_tip\_amount_. */
3710
- suggested_tip_amounts?: Array<number>
3711
- /** A JSON-serialized object for data about the invoice, which will be shared with the payment provider. A detailed description of the required fields should be provided by the payment provider. */
3712
- provider_data?: string
3713
- /** URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service. */
3714
- photo_url?: string
3715
- /** Photo size in bytes */
3716
- photo_size?: number
3717
- /** Photo width */
3718
- photo_width?: number
3719
- /** Photo height */
3720
- photo_height?: number
3721
- /** Pass _True_ if you require the user's full name to complete the order. Ignored for payments in [Telegram Stars](https://t.me/BotNews/90). */
3722
- need_name?: boolean
3723
- /** Pass _True_ if you require the user's phone number to complete the order. Ignored for payments in [Telegram Stars](https://t.me/BotNews/90). */
3724
- need_phone_number?: boolean
3725
- /** Pass _True_ if you require the user's email address to complete the order. Ignored for payments in [Telegram Stars](https://t.me/BotNews/90). */
3726
- need_email?: boolean
3727
- /** Pass _True_ if you require the user's shipping address to complete the order. Ignored for payments in [Telegram Stars](https://t.me/BotNews/90). */
3728
- need_shipping_address?: boolean
3729
- /** Pass _True_ if the user's phone number should be sent to the provider. Ignored for payments in [Telegram Stars](https://t.me/BotNews/90). */
3730
- send_phone_number_to_provider?: boolean
3731
- /** Pass _True_ if the user's email address should be sent to the provider. Ignored for payments in [Telegram Stars](https://t.me/BotNews/90). */
3732
- send_email_to_provider?: boolean
3733
- /** Pass _True_ if the final price depends on the shipping method. Ignored for payments in [Telegram Stars](https://t.me/BotNews/90). */
3734
- is_flexible?: boolean
3735
- }
3736
-
3737
- /**
3738
- * Represents a [result](https://core.telegram.org/bots/api#inlinequeryresult) of an inline query that was chosen by the user and sent to their chat partner.
3739
- *
3740
- * **Note:** It is necessary to enable [inline feedback](https://core.telegram.org/bots/inline#collecting-feedback) via [@BotFather](https://t.me/botfather) in order to receive these objects in updates.
3741
- */
3742
- export interface ChosenInlineResult {
3743
- /** The unique identifier for the result that was chosen */
3744
- result_id: string
3745
- /** The user that chose the result */
3746
- from: User
3747
- /** Sender location, only for bots that require user location */
3748
- location?: Location
3749
- /** Identifier of the sent inline message. Available only if there is an [inline keyboard](https://core.telegram.org/bots/api#inlinekeyboardmarkup) attached to the message. Will be also received in [callback queries](https://core.telegram.org/bots/api#callbackquery) and can be used to [edit](https://core.telegram.org/bots/api#updating-messages) the message. */
3750
- inline_message_id?: string
3751
- /** The query that was used to obtain the result */
3752
- query: string
3753
- }
3754
-
3755
- /** Describes an inline message sent by a [Web App](https://core.telegram.org/bots/webapps) on behalf of a user. */
3756
- export interface SentWebAppMessage {
3757
- /** Identifier of the sent inline message. Available only if there is an [inline keyboard](https://core.telegram.org/bots/api#inlinekeyboardmarkup) attached to the message. */
3758
- inline_message_id?: string
3759
- }
3760
-
3761
- /** Describes an inline message to be sent by a user of a Mini App. */
3762
- export interface PreparedInlineMessage {
3763
- /** Unique identifier of the prepared message */
3764
- id: string
3765
- /** Expiration date of the prepared message, in Unix time. Expired prepared messages can no longer be used */
3766
- expiration_date: number
3767
- }
3768
-
3769
- /** This object represents a portion of the price for goods or services. */
3770
- export interface LabeledPrice {
3771
- /** Portion label */
3772
- label: string
3773
- /** Price of the product in the _smallest units_ of the [currency](https://core.telegram.org/bots/payments#supported-currencies) (integer, **not** float/double). For example, for a price of `US$ 1.45` pass `amount = 145`. See the _exp_ parameter in [currencies.json](https://core.telegram.org/bots/payments/currencies.json), it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). */
3774
- amount: number
3775
- }
3776
-
3777
- /** This object contains basic information about an invoice. */
3778
- export interface Invoice {
3779
- /** Product name */
3780
- title: string
3781
- /** Product description */
3782
- description: string
3783
- /** Unique bot deep-linking parameter that can be used to generate this invoice */
3784
- start_parameter: string
3785
- /** Three-letter ISO 4217 [currency](https://core.telegram.org/bots/payments#supported-currencies) code, or “XTR” for payments in [Telegram Stars](https://t.me/BotNews/90) */
3786
- currency: string
3787
- /** Total price in the _smallest units_ of the currency (integer, **not** float/double). For example, for a price of `US$ 1.45` pass `amount = 145`. See the _exp_ parameter in [currencies.json](https://core.telegram.org/bots/payments/currencies.json), it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). */
3788
- total_amount: number
3789
- }
3790
-
3791
- /** This object represents a shipping address. */
3792
- export interface ShippingAddress {
3793
- /** Two-letter [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code */
3794
- country_code: string
3795
- /** State, if applicable */
3796
- state: string
3797
- /** City */
3798
- city: string
3799
- /** First line for the address */
3800
- street_line1: string
3801
- /** Second line for the address */
3802
- street_line2: string
3803
- /** Address post code */
3804
- post_code: string
3805
- }
3806
-
3807
- /** This object represents information about an order. */
3808
- export interface OrderInfo {
3809
- /** User name */
3810
- name?: string
3811
- /** User's phone number */
3812
- phone_number?: string
3813
- /** User email */
3814
- email?: string
3815
- /** User shipping address */
3816
- shipping_address?: ShippingAddress
3817
- }
3818
-
3819
- /** This object represents one shipping option. */
3820
- export interface ShippingOption {
3821
- /** Shipping option identifier */
3822
- id: string
3823
- /** Option title */
3824
- title: string
3825
- /** List of price portions */
3826
- prices: Array<LabeledPrice>
3827
- }
3828
-
3829
- /** This object contains basic information about a successful payment. Note that if the buyer initiates a chargeback with the relevant payment provider following this transaction, the funds may be debited from your balance. This is outside of Telegram's control. */
3830
- export interface SuccessfulPayment {
3831
- /** Three-letter ISO 4217 [currency](https://core.telegram.org/bots/payments#supported-currencies) code, or “XTR” for payments in [Telegram Stars](https://t.me/BotNews/90) */
3832
- currency: string
3833
- /** Total price in the _smallest units_ of the currency (integer, **not** float/double). For example, for a price of `US$ 1.45` pass `amount = 145`. See the _exp_ parameter in [currencies.json](https://core.telegram.org/bots/payments/currencies.json), it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). */
3834
- total_amount: number
3835
- /** Bot-specified invoice payload */
3836
- invoice_payload: string
3837
- /** Expiration date of the subscription, in Unix time; for recurring payments only */
3838
- subscription_expiration_date?: number
3839
- /** _True_, if the payment is a recurring payment for a subscription */
3840
- is_recurring?: true
3841
- /** _True_, if the payment is the first payment for a subscription */
3842
- is_first_recurring?: true
3843
- /** Identifier of the shipping option chosen by the user */
3844
- shipping_option_id?: string
3845
- /** Order information provided by the user */
3846
- order_info?: OrderInfo
3847
- /** Telegram payment identifier */
3848
- telegram_payment_charge_id: string
3849
- /** Provider payment identifier */
3850
- provider_payment_charge_id: string
3851
- }
3852
-
3853
- /** This object contains basic information about a refunded payment. */
3854
- export interface RefundedPayment {
3855
- /** Three-letter ISO 4217 [currency](https://core.telegram.org/bots/payments#supported-currencies) code, or “XTR” for payments in [Telegram Stars](https://t.me/BotNews/90). Currently, always “XTR” */
3856
- currency: string
3857
- /** Total refunded price in the _smallest units_ of the currency (integer, **not** float/double). For example, for a price of `US$ 1.45`, `total_amount = 145`. See the _exp_ parameter in [currencies.json](https://core.telegram.org/bots/payments/currencies.json), it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). */
3858
- total_amount: number
3859
- /** Bot-specified invoice payload */
3860
- invoice_payload: string
3861
- /** Telegram payment identifier */
3862
- telegram_payment_charge_id: string
3863
- /** Provider payment identifier */
3864
- provider_payment_charge_id?: string
3865
- }
3866
-
3867
- /** This object contains information about an incoming shipping query. */
3868
- export interface ShippingQuery {
3869
- /** Unique query identifier */
3870
- id: string
3871
- /** User who sent the query */
3872
- from: User
3873
- /** Bot-specified invoice payload */
3874
- invoice_payload: string
3875
- /** User specified shipping address */
3876
- shipping_address: ShippingAddress
3877
- }
3878
-
3879
- /** This object contains information about an incoming pre-checkout query. */
3880
- export interface PreCheckoutQuery {
3881
- /** Unique query identifier */
3882
- id: string
3883
- /** User who sent the query */
3884
- from: User
3885
- /** Three-letter ISO 4217 [currency](https://core.telegram.org/bots/payments#supported-currencies) code, or “XTR” for payments in [Telegram Stars](https://t.me/BotNews/90) */
3886
- currency: string
3887
- /** Total price in the _smallest units_ of the currency (integer, **not** float/double). For example, for a price of `US$ 1.45` pass `amount = 145`. See the _exp_ parameter in [currencies.json](https://core.telegram.org/bots/payments/currencies.json), it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). */
3888
- total_amount: number
3889
- /** Bot-specified invoice payload */
3890
- invoice_payload: string
3891
- /** Identifier of the shipping option chosen by the user */
3892
- shipping_option_id?: string
3893
- /** Order information provided by the user */
3894
- order_info?: OrderInfo
3895
- }
3896
-
3897
- /** This object contains information about a paid media purchase. */
3898
- export interface PaidMediaPurchased {
3899
- /** User who purchased the media */
3900
- from: User
3901
- /** Bot-specified paid media payload */
3902
- paid_media_payload: string
3903
- }
3904
-
3905
- /**
3906
- * This object describes the state of a revenue withdrawal operation. Currently, it can be one of
3907
- *
3908
- * - [RevenueWithdrawalStatePending](https://core.telegram.org/bots/api#revenuewithdrawalstatepending)
3909
- * - [RevenueWithdrawalStateSucceeded](https://core.telegram.org/bots/api#revenuewithdrawalstatesucceeded)
3910
- * - [RevenueWithdrawalStateFailed](https://core.telegram.org/bots/api#revenuewithdrawalstatefailed)
3911
- */
3912
- export type RevenueWithdrawalState = RevenueWithdrawalStatePending | RevenueWithdrawalStateSucceeded | RevenueWithdrawalStateFailed
3913
-
3914
- /** The withdrawal is in progress. */
3915
- export interface RevenueWithdrawalStatePending {
3916
- /** Type of the state, always “pending” */
3917
- type: string
3918
- }
3919
-
3920
- /** The withdrawal succeeded. */
3921
- export interface RevenueWithdrawalStateSucceeded {
3922
- /** Type of the state, always “succeeded” */
3923
- type: string
3924
- /** Date the withdrawal was completed in Unix time */
3925
- date: number
3926
- /** An HTTPS URL that can be used to see transaction details */
3927
- url: string
3928
- }
3929
-
3930
- /** The withdrawal failed and the transaction was refunded. */
3931
- export interface RevenueWithdrawalStateFailed {
3932
- /** Type of the state, always “failed” */
3933
- type: string
3934
- }
3935
-
3936
- /** Contains information about the affiliate that received a commission via this transaction. */
3937
- export interface AffiliateInfo {
3938
- /** The bot or the user that received an affiliate commission if it was received by a bot or a user */
3939
- affiliate_user?: User
3940
- /** The chat that received an affiliate commission if it was received by a chat */
3941
- affiliate_chat?: Chat
3942
- /** The number of Telegram Stars received by the affiliate for each 1000 Telegram Stars received by the bot from referred users */
3943
- commission_per_mille: number
3944
- /** Integer amount of Telegram Stars received by the affiliate from the transaction, rounded to 0; can be negative for refunds */
3945
- amount: number
3946
- /** The number of 1/1000000000 shares of Telegram Stars received by the affiliate; from -999999999 to 999999999; can be negative for refunds */
3947
- nanostar_amount?: number
3948
- }
3949
-
3950
- /**
3951
- * This object describes the source of a transaction, or its recipient for outgoing transactions. Currently, it can be one of
3952
- *
3953
- * - [TransactionPartnerUser](https://core.telegram.org/bots/api#transactionpartneruser)
3954
- * - [TransactionPartnerChat](https://core.telegram.org/bots/api#transactionpartnerchat)
3955
- * - [TransactionPartnerAffiliateProgram](https://core.telegram.org/bots/api#transactionpartneraffiliateprogram)
3956
- * - [TransactionPartnerFragment](https://core.telegram.org/bots/api#transactionpartnerfragment)
3957
- * - [TransactionPartnerTelegramAds](https://core.telegram.org/bots/api#transactionpartnertelegramads)
3958
- * - [TransactionPartnerTelegramApi](https://core.telegram.org/bots/api#transactionpartnertelegramapi)
3959
- * - [TransactionPartnerOther](https://core.telegram.org/bots/api#transactionpartnerother)
3960
- */
3961
- export type TransactionPartner = TransactionPartnerUser | TransactionPartnerChat | TransactionPartnerAffiliateProgram | TransactionPartnerFragment | TransactionPartnerTelegramAds | TransactionPartnerTelegramApi | TransactionPartnerOther
3962
-
3963
- /** Describes a transaction with a user. */
3964
- export interface TransactionPartnerUser {
3965
- /** Type of the transaction partner, always “user” */
3966
- type: string
3967
- /** Type of the transaction, currently one of “invoice\_payment” for payments via invoices, “paid\_media\_payment” for payments for paid media, “gift\_purchase” for gifts sent by the bot, “premium\_purchase” for Telegram Premium subscriptions gifted by the bot, “business\_account\_transfer” for direct transfers from managed business accounts */
3968
- transaction_type: string
3969
- /** Information about the user */
3970
- user: User
3971
- /** Information about the affiliate that received a commission via this transaction. Can be available only for “invoice\_payment” and “paid\_media\_payment” transactions. */
3972
- affiliate?: AffiliateInfo
3973
- /** Bot-specified invoice payload. Can be available only for “invoice\_payment” transactions. */
3974
- invoice_payload?: string
3975
- /** The duration of the paid subscription. Can be available only for “invoice\_payment” transactions. */
3976
- subscription_period?: number
3977
- /** Information about the paid media bought by the user; for “paid\_media\_payment” transactions only */
3978
- paid_media?: Array<PaidMedia>
3979
- /** Bot-specified paid media payload. Can be available only for “paid\_media\_payment” transactions. */
3980
- paid_media_payload?: string
3981
- /** The gift sent to the user by the bot; for “gift\_purchase” transactions only */
3982
- gift?: Gift
3983
- /** Number of months the gifted Telegram Premium subscription will be active for; for “premium\_purchase” transactions only */
3984
- premium_subscription_duration?: number
3985
- }
3986
-
3987
- /** Describes a transaction with a chat. */
3988
- export interface TransactionPartnerChat {
3989
- /** Type of the transaction partner, always “chat” */
3990
- type: string
3991
- /** Information about the chat */
3992
- chat: Chat
3993
- /** The gift sent to the chat by the bot */
3994
- gift?: Gift
3995
- }
3996
-
3997
- /** Describes the affiliate program that issued the affiliate commission received via this transaction. */
3998
- export interface TransactionPartnerAffiliateProgram {
3999
- /** Type of the transaction partner, always “affiliate\_program” */
4000
- type: string
4001
- /** Information about the bot that sponsored the affiliate program */
4002
- sponsor_user?: User
4003
- /** The number of Telegram Stars received by the bot for each 1000 Telegram Stars received by the affiliate program sponsor from referred users */
4004
- commission_per_mille: number
4005
- }
4006
-
4007
- /** Describes a withdrawal transaction with Fragment. */
4008
- export interface TransactionPartnerFragment {
4009
- /** Type of the transaction partner, always “fragment” */
4010
- type: string
4011
- /** State of the transaction if the transaction is outgoing */
4012
- withdrawal_state?: RevenueWithdrawalState
4013
- }
4014
-
4015
- /** Describes a withdrawal transaction to the Telegram Ads platform. */
4016
- export interface TransactionPartnerTelegramAds {
4017
- /** Type of the transaction partner, always “telegram\_ads” */
4018
- type: string
4019
- }
4020
-
4021
- /** Describes a transaction with payment for [paid broadcasting](https://core.telegram.org/bots/api#paid-broadcasts). */
4022
- export interface TransactionPartnerTelegramApi {
4023
- /** Type of the transaction partner, always “telegram\_api” */
4024
- type: string
4025
- /** The number of successful requests that exceeded regular limits and were therefore billed */
4026
- request_count: number
4027
- }
4028
-
4029
- /** Describes a transaction with an unknown source or recipient. */
4030
- export interface TransactionPartnerOther {
4031
- /** Type of the transaction partner, always “other” */
4032
- type: string
4033
- }
4034
-
4035
- /** Describes a Telegram Star transaction. Note that if the buyer initiates a chargeback with the payment provider from whom they acquired Stars (e.g., Apple, Google) following this transaction, the refunded Stars will be deducted from the bot's balance. This is outside of Telegram's control. */
4036
- export interface StarTransaction {
4037
- /** Unique identifier of the transaction. Coincides with the identifier of the original transaction for refund transactions. Coincides with _SuccessfulPayment.telegram\_payment\_charge\_id_ for successful incoming payments from users. */
4038
- id: string
4039
- /** Integer amount of Telegram Stars transferred by the transaction */
4040
- amount: number
4041
- /** The number of 1/1000000000 shares of Telegram Stars transferred by the transaction; from 0 to 999999999 */
4042
- nanostar_amount?: number
4043
- /** Date the transaction was created in Unix time */
4044
- date: number
4045
- /** Source of an incoming transaction (e.g., a user purchasing goods or services, Fragment refunding a failed withdrawal). Only for incoming transactions */
4046
- source?: TransactionPartner
4047
- /** Receiver of an outgoing transaction (e.g., a user for a purchase refund, Fragment for a withdrawal). Only for outgoing transactions */
4048
- receiver?: TransactionPartner
4049
- }
4050
-
4051
- /** Contains a list of Telegram Star transactions. */
4052
- export interface StarTransactions {
4053
- /** The list of transactions */
4054
- transactions: Array<StarTransaction>
4055
- }
4056
-
4057
- /** Describes Telegram Passport data shared with the bot by the user. */
4058
- export interface PassportData {
4059
- /** Array with information about documents and other Telegram Passport elements that was shared with the bot */
4060
- data: Array<EncryptedPassportElement>
4061
- /** Encrypted credentials required to decrypt the data */
4062
- credentials: EncryptedCredentials
4063
- }
4064
-
4065
- /** This object represents a file uploaded to Telegram Passport. Currently all Telegram Passport files are in JPEG format when decrypted and don't exceed 10MB. */
4066
- export interface PassportFile {
4067
- /** Identifier for this file, which can be used to download or reuse the file */
4068
- file_id: string
4069
- /** 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. */
4070
- file_unique_id: string
4071
- /** File size in bytes */
4072
- file_size: number
4073
- /** Unix time when the file was uploaded */
4074
- file_date: number
4075
- }
4076
-
4077
- /** Describes documents or other Telegram Passport elements shared with the bot by the user. */
4078
- export interface EncryptedPassportElement {
4079
- /** Element type. One of “personal\_details”, “passport”, “driver\_license”, “identity\_card”, “internal\_passport”, “address”, “utility\_bill”, “bank\_statement”, “rental\_agreement”, “passport\_registration”, “temporary\_registration”, “phone\_number”, “email”. */
4080
- type: string
4081
- /** Base64-encoded encrypted Telegram Passport element data provided by the user; available only for “personal\_details”, “passport”, “driver\_license”, “identity\_card”, “internal\_passport” and “address” types. Can be decrypted and verified using the accompanying [EncryptedCredentials](https://core.telegram.org/bots/api#encryptedcredentials). */
4082
- data?: string
4083
- /** User's verified phone number; available only for “phone\_number” type */
4084
- phone_number?: string
4085
- /** User's verified email address; available only for “email” type */
4086
- email?: string
4087
- /** Array of encrypted files with documents provided by the user; available only for “utility\_bill”, “bank\_statement”, “rental\_agreement”, “passport\_registration” and “temporary\_registration” types. Files can be decrypted and verified using the accompanying [EncryptedCredentials](https://core.telegram.org/bots/api#encryptedcredentials). */
4088
- files?: Array<PassportFile>
4089
- /** Encrypted file with the front side of the document, provided by the user; available only for “passport”, “driver\_license”, “identity\_card” and “internal\_passport”. The file can be decrypted and verified using the accompanying [EncryptedCredentials](https://core.telegram.org/bots/api#encryptedcredentials). */
4090
- front_side?: PassportFile
4091
- /** Encrypted file with the reverse side of the document, provided by the user; available only for “driver\_license” and “identity\_card”. The file can be decrypted and verified using the accompanying [EncryptedCredentials](https://core.telegram.org/bots/api#encryptedcredentials). */
4092
- reverse_side?: PassportFile
4093
- /** Encrypted file with the selfie of the user holding a document, provided by the user; available if requested for “passport”, “driver\_license”, “identity\_card” and “internal\_passport”. The file can be decrypted and verified using the accompanying [EncryptedCredentials](https://core.telegram.org/bots/api#encryptedcredentials). */
4094
- selfie?: PassportFile
4095
- /** Array of encrypted files with translated versions of documents provided by the user; available if requested for “passport”, “driver\_license”, “identity\_card”, “internal\_passport”, “utility\_bill”, “bank\_statement”, “rental\_agreement”, “passport\_registration” and “temporary\_registration” types. Files can be decrypted and verified using the accompanying [EncryptedCredentials](https://core.telegram.org/bots/api#encryptedcredentials). */
4096
- translation?: Array<PassportFile>
4097
- /** Base64-encoded element hash for using in [PassportElementErrorUnspecified](https://core.telegram.org/bots/api#passportelementerrorunspecified) */
4098
- hash: string
4099
- }
4100
-
4101
- /** Describes data required for decrypting and authenticating [EncryptedPassportElement](https://core.telegram.org/bots/api#encryptedpassportelement). See the [Telegram Passport Documentation](https://core.telegram.org/passport#receiving-information) for a complete description of the data decryption and authentication processes. */
4102
- export interface EncryptedCredentials {
4103
- /** Base64-encoded encrypted JSON-serialized data with unique user's payload, data hashes and secrets required for [EncryptedPassportElement](https://core.telegram.org/bots/api#encryptedpassportelement) decryption and authentication */
4104
- data: string
4105
- /** Base64-encoded data hash for data authentication */
4106
- hash: string
4107
- /** Base64-encoded secret, encrypted with the bot's public RSA key, required for data decryption */
4108
- secret: string
4109
- }
4110
-
4111
- /**
4112
- * This object represents an error in the Telegram Passport element which was submitted that should be resolved by the user. It should be one of:
4113
- *
4114
- * - [PassportElementErrorDataField](https://core.telegram.org/bots/api#passportelementerrordatafield)
4115
- * - [PassportElementErrorFrontSide](https://core.telegram.org/bots/api#passportelementerrorfrontside)
4116
- * - [PassportElementErrorReverseSide](https://core.telegram.org/bots/api#passportelementerrorreverseside)
4117
- * - [PassportElementErrorSelfie](https://core.telegram.org/bots/api#passportelementerrorselfie)
4118
- * - [PassportElementErrorFile](https://core.telegram.org/bots/api#passportelementerrorfile)
4119
- * - [PassportElementErrorFiles](https://core.telegram.org/bots/api#passportelementerrorfiles)
4120
- * - [PassportElementErrorTranslationFile](https://core.telegram.org/bots/api#passportelementerrortranslationfile)
4121
- * - [PassportElementErrorTranslationFiles](https://core.telegram.org/bots/api#passportelementerrortranslationfiles)
4122
- * - [PassportElementErrorUnspecified](https://core.telegram.org/bots/api#passportelementerrorunspecified)
4123
- */
4124
- export type PassportElementError = PassportElementErrorDataField | PassportElementErrorFrontSide | PassportElementErrorReverseSide | PassportElementErrorSelfie | PassportElementErrorFile | PassportElementErrorFiles | PassportElementErrorTranslationFile | PassportElementErrorTranslationFiles | PassportElementErrorUnspecified
4125
-
4126
- /** Represents an issue in one of the data fields that was provided by the user. The error is considered resolved when the field's value changes. */
4127
- export interface PassportElementErrorDataField {
4128
- /** Error source, must be _data_ */
4129
- source: string
4130
- /** The section of the user's Telegram Passport which has the error, one of “personal\_details”, “passport”, “driver\_license”, “identity\_card”, “internal\_passport”, “address” */
4131
- type: string
4132
- /** Name of the data field which has the error */
4133
- field_name: string
4134
- /** Base64-encoded data hash */
4135
- data_hash: string
4136
- /** Error message */
4137
- message: string
4138
- }
4139
-
4140
- /** Represents an issue with the front side of a document. The error is considered resolved when the file with the front side of the document changes. */
4141
- export interface PassportElementErrorFrontSide {
4142
- /** Error source, must be _front\_side_ */
4143
- source: string
4144
- /** The section of the user's Telegram Passport which has the issue, one of “passport”, “driver\_license”, “identity\_card”, “internal\_passport” */
4145
- type: string
4146
- /** Base64-encoded hash of the file with the front side of the document */
4147
- file_hash: string
4148
- /** Error message */
4149
- message: string
4150
- }
4151
-
4152
- /** Represents an issue with the reverse side of a document. The error is considered resolved when the file with reverse side of the document changes. */
4153
- export interface PassportElementErrorReverseSide {
4154
- /** Error source, must be _reverse\_side_ */
4155
- source: string
4156
- /** The section of the user's Telegram Passport which has the issue, one of “driver\_license”, “identity\_card” */
4157
- type: string
4158
- /** Base64-encoded hash of the file with the reverse side of the document */
4159
- file_hash: string
4160
- /** Error message */
4161
- message: string
4162
- }
4163
-
4164
- /** Represents an issue with the selfie with a document. The error is considered resolved when the file with the selfie changes. */
4165
- export interface PassportElementErrorSelfie {
4166
- /** Error source, must be _selfie_ */
4167
- source: string
4168
- /** The section of the user's Telegram Passport which has the issue, one of “passport”, “driver\_license”, “identity\_card”, “internal\_passport” */
4169
- type: string
4170
- /** Base64-encoded hash of the file with the selfie */
4171
- file_hash: string
4172
- /** Error message */
4173
- message: string
4174
- }
4175
-
4176
- /** Represents an issue with a document scan. The error is considered resolved when the file with the document scan changes. */
4177
- export interface PassportElementErrorFile {
4178
- /** Error source, must be _file_ */
4179
- source: string
4180
- /** The section of the user's Telegram Passport which has the issue, one of “utility\_bill”, “bank\_statement”, “rental\_agreement”, “passport\_registration”, “temporary\_registration” */
4181
- type: string
4182
- /** Base64-encoded file hash */
4183
- file_hash: string
4184
- /** Error message */
4185
- message: string
4186
- }
4187
-
4188
- /** Represents an issue with a list of scans. The error is considered resolved when the list of files containing the scans changes. */
4189
- export interface PassportElementErrorFiles {
4190
- /** Error source, must be _files_ */
4191
- source: string
4192
- /** The section of the user's Telegram Passport which has the issue, one of “utility\_bill”, “bank\_statement”, “rental\_agreement”, “passport\_registration”, “temporary\_registration” */
4193
- type: string
4194
- /** List of base64-encoded file hashes */
4195
- file_hashes: Array<string>
4196
- /** Error message */
4197
- message: string
4198
- }
4199
-
4200
- /** Represents an issue with one of the files that constitute the translation of a document. The error is considered resolved when the file changes. */
4201
- export interface PassportElementErrorTranslationFile {
4202
- /** Error source, must be _translation\_file_ */
4203
- source: string
4204
- /** Type of element of the user's Telegram Passport which has the issue, one of “passport”, “driver\_license”, “identity\_card”, “internal\_passport”, “utility\_bill”, “bank\_statement”, “rental\_agreement”, “passport\_registration”, “temporary\_registration” */
4205
- type: string
4206
- /** Base64-encoded file hash */
4207
- file_hash: string
4208
- /** Error message */
4209
- message: string
4210
- }
4211
-
4212
- /** Represents an issue with the translated version of a document. The error is considered resolved when a file with the document translation change. */
4213
- export interface PassportElementErrorTranslationFiles {
4214
- /** Error source, must be _translation\_files_ */
4215
- source: string
4216
- /** Type of element of the user's Telegram Passport which has the issue, one of “passport”, “driver\_license”, “identity\_card”, “internal\_passport”, “utility\_bill”, “bank\_statement”, “rental\_agreement”, “passport\_registration”, “temporary\_registration” */
4217
- type: string
4218
- /** List of base64-encoded file hashes */
4219
- file_hashes: Array<string>
4220
- /** Error message */
4221
- message: string
4222
- }
4223
-
4224
- /** Represents an issue in an unspecified place. The error is considered resolved when new data is added. */
4225
- export interface PassportElementErrorUnspecified {
4226
- /** Error source, must be _unspecified_ */
4227
- source: string
4228
- /** Type of element of the user's Telegram Passport which has the issue */
4229
- type: string
4230
- /** Base64-encoded element hash */
4231
- element_hash: string
4232
- /** Error message */
4233
- message: string
4234
- }
4235
-
4236
- /** This object represents a game. Use BotFather to create and edit games, their short names will act as unique identifiers. */
4237
- export interface Game {
4238
- /** Title of the game */
4239
- title: string
4240
- /** Description of the game */
4241
- description: string
4242
- /** Photo that will be displayed in the game message in chats. */
4243
- photo: Array<PhotoSize>
4244
- /** 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](https://core.telegram.org/bots/api#setgamescore), or manually edited using [editMessageText](https://core.telegram.org/bots/api#editmessagetext). 0-4096 characters. */
4245
- text?: string
4246
- /** Special entities that appear in _text_, such as usernames, URLs, bot commands, etc. */
4247
- text_entities?: Array<MessageEntity>
4248
- /** Animation that will be displayed in the game message in chats. Upload via [BotFather](https://t.me/botfather) */
4249
- animation?: Animation
4250
- }
4251
-
4252
- /** A placeholder, currently holds no information. Use [BotFather](https://t.me/botfather) to set up your game. */
4253
- export interface CallbackGame {
4254
- }
4255
-
4256
- /** This object represents one row of the high scores table for a game. */
4257
- export interface GameHighScore {
4258
- /** Position in high score table for the game */
4259
- position: number
4260
- /** User */
4261
- user: User
4262
- /** Score */
4263
- score: number
4264
- }