@effect-ak/tg-bot-client 0.0.2

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.
@@ -0,0 +1,3021 @@
1
+ import * as T from "./types.js";
2
+ export interface Api {
3
+ /**
4
+ * Use this method to receive incoming updates using long polling (<a href="https://en
5
+ * wikipedia
6
+ * org/wiki/Push_technology#Long_polling">wiki)
7
+ */
8
+ get_updates(_: GetUpdatesInput): T.Update[];
9
+ /**
10
+ * Use this method to specify a URL and receive incoming updates via an outgoing webhook
11
+ * Whenever there is an update for the bot, we will send an HTTPS POST request to the specified URL, containing a JSON-serialized Update
12
+ * In case of an unsuccessful request, we will give up after a reasonable amount of attempts
13
+ * If you&#39;d like to make sure that the webhook was set by you, you can specify secret data in the parameter secret_token
14
+ * If specified, the request will contain a header “X-Telegram-Bot-Api-Secret-Token” with the secret token as content
15
+ */
16
+ set_webhook(_: SetWebhookInput): boolean;
17
+ /** Use this method to remove webhook integration if you decide to switch back to getUpdates */
18
+ delete_webhook(_: DeleteWebhookInput): boolean;
19
+ /**
20
+ * Use this method to get current webhook status
21
+ * Requires no parameters
22
+ * If the bot is using getUpdates, will return an object with the url field empty
23
+ */
24
+ get_webhook_info(_: GetWebhookInfoInput): T.WebhookInfo;
25
+ /**
26
+ * A simple method for testing your bot&#39;s authentication token
27
+ * Requires no parameters
28
+ */
29
+ get_me(_: GetMeInput): T.User;
30
+ /**
31
+ * Use this method to log out from the cloud Bot API server before launching the bot locally
32
+ * You must log out the bot before running it locally, otherwise there is no guarantee that the bot will receive updates
33
+ * After a successful call, you can immediately log in on a local server, but will not be able to log in back to the cloud Bot API server for 10 minutes
34
+ * Requires no parameters
35
+ */
36
+ log_out(_: LogOutInput): boolean;
37
+ /**
38
+ * Use this method to close the bot instance before moving it from one local server to another
39
+ * You need to delete the webhook before calling this method to ensure that the bot isn&#39;t launched again after server restart
40
+ * The method will return error 429 in the first 10 minutes after the bot is launched
41
+ * Requires no parameters
42
+ */
43
+ close(_: CloseInput): boolean;
44
+ /** Use this method to send text messages */
45
+ send_message(_: SendMessageInput): T.Message;
46
+ /**
47
+ * Use this method to forward messages of any kind
48
+ * Service messages and messages with protected content can&#39;t be forwarded
49
+ */
50
+ forward_message(_: ForwardMessageInput): T.Message;
51
+ /**
52
+ * Use this method to forward multiple messages of any kind
53
+ * If some of the specified messages can&#39;t be found or forwarded, they are skipped
54
+ * Service messages and messages with protected content can&#39;t be forwarded
55
+ * Album grouping is kept for forwarded messages
56
+ */
57
+ forward_messages(_: ForwardMessagesInput): T.MessageId[];
58
+ /**
59
+ * Use this method to copy messages of any kind
60
+ * Service messages, paid media messages, giveaway messages, giveaway winners messages, and invoice messages can&#39;t be copied
61
+ * A quiz poll can be copied only if the value of the field correct_option_id is known to the bot
62
+ * The method is analogous to the method forwardMessage, but the copied message doesn&#39;t have a link to the original message
63
+ */
64
+ copy_message(_: CopyMessageInput): T.MessageId;
65
+ /**
66
+ * Use this method to copy messages of any kind
67
+ * If some of the specified messages can&#39;t be found or copied, they are skipped
68
+ * Service messages, paid media messages, giveaway messages, giveaway winners messages, and invoice messages can&#39;t be copied
69
+ * A quiz poll can be copied only if the value of the field correct_option_id is known to the bot
70
+ * The method is analogous to the method forwardMessages, but the copied messages don&#39;t have a link to the original message
71
+ * Album grouping is kept for copied messages
72
+ */
73
+ copy_messages(_: CopyMessagesInput): T.MessageId[];
74
+ /** Use this method to send photos */
75
+ send_photo(_: SendPhotoInput): T.Message;
76
+ /**
77
+ * Use this method to send audio files, if you want Telegram clients to display them in the music player
78
+ * Your audio must be in the
79
+ * MP3 or
80
+ * M4A format
81
+ * Bots can currently send audio files of up to 50 MB in size, this limit may be changed in the future
82
+ * For sending voice messages, use the sendVoice method instead
83
+ */
84
+ send_audio(_: SendAudioInput): T.Message;
85
+ /**
86
+ * Use this method to send general files
87
+ * Bots can currently send files of any type of up to 50 MB in size, this limit may be changed in the future
88
+ */
89
+ send_document(_: SendDocumentInput): T.Message;
90
+ /**
91
+ * Use this method to send video files, Telegram clients support MPEG4 videos (other formats may be sent as Document)
92
+ * Bots can currently send video files of up to 50 MB in size, this limit may be changed in the future
93
+ */
94
+ send_video(_: SendVideoInput): T.Message;
95
+ /**
96
+ * Use this method to send animation files (GIF or H
97
+ * 264/MPEG-4 AVC video without sound)
98
+ * Bots can currently send animation files of up to 50 MB in size, this limit may be changed in the future
99
+ */
100
+ send_animation(_: SendAnimationInput): T.Message;
101
+ /**
102
+ * Use this method to send audio files, if you want Telegram clients to display the file as a playable voice message
103
+ * For this to work, your audio must be in an
104
+ * OGG file encoded with OPUS, or in
105
+ * MP3 format, or in
106
+ * M4A format (other formats may be sent as Audio or Document)
107
+ * Bots can currently send voice messages of up to 50 MB in size, this limit may be changed in the future
108
+ */
109
+ send_voice(_: SendVoiceInput): T.Message;
110
+ /**
111
+ * As of <a href="https://telegram
112
+ * org/blog/video-messages-and-telescope">v
113
+ * 4
114
+ * 0, Telegram clients support rounded square MPEG4 videos of up to 1 minute long
115
+ * Use this method to send video messages
116
+ */
117
+ send_video_note(_: SendVideoNoteInput): T.Message;
118
+ /** Use this method to send paid media */
119
+ send_paid_media(_: SendPaidMediaInput): T.Message;
120
+ /**
121
+ * Use this method to send a group of photos, videos, documents or audios as an album
122
+ * Documents and audio files can be only grouped in an album with messages of the same type
123
+ * On success, an array of Messages that were sent is returned
124
+ */
125
+ send_media_group(_: SendMediaGroupInput): T.Message[];
126
+ /** Use this method to send point on the map */
127
+ send_location(_: SendLocationInput): T.Message;
128
+ /** Use this method to send information about a venue */
129
+ send_venue(_: SendVenueInput): T.Message;
130
+ /** Use this method to send phone contacts */
131
+ send_contact(_: SendContactInput): T.Message;
132
+ /** Use this method to send a native poll */
133
+ send_poll(_: SendPollInput): T.Message;
134
+ /** Use this method to send an animated emoji that will display a random value */
135
+ send_dice(_: SendDiceInput): T.Message;
136
+ /**
137
+ * Use this method when you need to tell the user that something is happening on the bot&#39;s side
138
+ * The status is set for 5 seconds or less (when a message arrives from your bot, Telegram clients clear its typing status)
139
+ *
140
+ * Example: The <a href="https://t
141
+ * me/imagebot">ImageBot needs some time to process a request and upload the image
142
+ * Instead of sending a text message along the lines of “Retrieving image, please wait…”, the bot may use sendChatAction with action = upload_photo
143
+ * The user will see a “sending photo” status for the bot
144
+ *
145
+ *
146
+ * We only recommend using this method when a response from the bot will take a noticeable amount of time to arrive
147
+ */
148
+ send_chat_action(_: SendChatActionInput): boolean;
149
+ /**
150
+ * Use this method to change the chosen reactions on a message
151
+ * Service messages can&#39;t be reacted to
152
+ * Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel
153
+ * Bots can&#39;t use paid reactions
154
+ */
155
+ set_message_reaction(_: SetMessageReactionInput): boolean;
156
+ /** Use this method to get a list of profile pictures for a user */
157
+ get_user_profile_photos(_: GetUserProfilePhotosInput): T.UserProfilePhotos;
158
+ /** Changes the emoji status for a given user that previously allowed the bot to manage their emoji status via the Mini App method requestEmojiStatusAccess */
159
+ set_user_emoji_status(_: SetUserEmojiStatusInput): boolean;
160
+ /**
161
+ * Use this method to get basic information about a file and prepare it for downloading
162
+ * For the moment, bots can download files of up to 20MB in size
163
+ * The file can then be downloaded via the link https://api
164
+ * telegram
165
+ * org/file/bot&lt;token&gt;/&lt;file_path&gt;, where &lt;file_path&gt; is taken from the response
166
+ * It is guaranteed that the link will be valid for at least 1 hour
167
+ * When the link expires, a new one can be requested by calling getFile again
168
+ */
169
+ get_file(_: GetFileInput): T.File;
170
+ /**
171
+ * Use this method to ban a user in a group, a supergroup or a channel
172
+ * In the case of supergroups and channels, the user will not be able to return to the chat on their own using invite links, etc
173
+ * , unless unbanned first
174
+ * The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights
175
+ */
176
+ ban_chat_member(_: BanChatMemberInput): boolean;
177
+ /**
178
+ * Use this method to unban a previously banned user in a supergroup or channel
179
+ * The user will not return to the group or channel automatically, but will be able to join via link, etc
180
+ * The bot must be an administrator for this to work
181
+ * By default, this method guarantees that after the call the user is not a member of the chat, but will be able to join it
182
+ * So if the user is a member of the chat they will also be removed from the chat
183
+ * If you don&#39;t want this, use the parameter only_if_banned
184
+ */
185
+ unban_chat_member(_: UnbanChatMemberInput): boolean;
186
+ /**
187
+ * Use this method to restrict a user in a supergroup
188
+ * The bot must be an administrator in the supergroup for this to work and must have the appropriate administrator rights
189
+ * Pass True for all permissions to lift restrictions from a user
190
+ */
191
+ restrict_chat_member(_: RestrictChatMemberInput): boolean;
192
+ /**
193
+ * Use this method to promote or demote a user in a supergroup or a channel
194
+ * The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights
195
+ * Pass False for all boolean parameters to demote a user
196
+ */
197
+ promote_chat_member(_: PromoteChatMemberInput): boolean;
198
+ /** Use this method to set a custom title for an administrator in a supergroup promoted by the bot */
199
+ set_chat_administrator_custom_title(_: SetChatAdministratorCustomTitleInput): boolean;
200
+ /**
201
+ * Use this method to ban a channel chat in a supergroup or a channel
202
+ * Until the chat is unbanned, the owner of the banned chat won&#39;t be able to send messages on behalf of any of their channels
203
+ * The bot must be an administrator in the supergroup or channel for this to work and must have the appropriate administrator rights
204
+ */
205
+ ban_chat_sender_chat(_: BanChatSenderChatInput): boolean;
206
+ /**
207
+ * Use this method to unban a previously banned channel chat in a supergroup or channel
208
+ * The bot must be an administrator for this to work and must have the appropriate administrator rights
209
+ */
210
+ unban_chat_sender_chat(_: UnbanChatSenderChatInput): boolean;
211
+ /**
212
+ * Use this method to set default chat permissions for all members
213
+ * The bot must be an administrator in the group or a supergroup for this to work and must have the can_restrict_members administrator rights
214
+ */
215
+ set_chat_permissions(_: SetChatPermissionsInput): boolean;
216
+ /**
217
+ * Use this method to generate a new primary invite link for a chat; any previously generated primary link is revoked
218
+ * The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights
219
+ */
220
+ export_chat_invite_link(_: ExportChatInviteLinkInput): string;
221
+ /**
222
+ * Use this method to create an additional invite link for a chat
223
+ * The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights
224
+ * The link can be revoked using the method revokeChatInviteLink
225
+ */
226
+ create_chat_invite_link(_: CreateChatInviteLinkInput): T.ChatInviteLink;
227
+ /**
228
+ * Use this method to edit a non-primary invite link created by the bot
229
+ * The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights
230
+ */
231
+ edit_chat_invite_link(_: EditChatInviteLinkInput): T.ChatInviteLink;
232
+ /**
233
+ * Use this method to create a <a href="https://telegram
234
+ * org/blog/superchannels-star-reactions-subscriptions#star-subscriptions">subscription invite link for a channel chat
235
+ * The bot must have the can_invite_users administrator rights
236
+ * The link can be edited using the method editChatSubscriptionInviteLink or revoked using the method revokeChatInviteLink
237
+ */
238
+ create_chat_subscription_invite_link(_: CreateChatSubscriptionInviteLinkInput): T.ChatInviteLink;
239
+ /**
240
+ * Use this method to edit a subscription invite link created by the bot
241
+ * The bot must have the can_invite_users administrator rights
242
+ */
243
+ edit_chat_subscription_invite_link(_: EditChatSubscriptionInviteLinkInput): T.ChatInviteLink;
244
+ /**
245
+ * Use this method to revoke an invite link created by the bot
246
+ * If the primary link is revoked, a new link is automatically generated
247
+ * The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights
248
+ */
249
+ revoke_chat_invite_link(_: RevokeChatInviteLinkInput): T.ChatInviteLink;
250
+ /**
251
+ * Use this method to approve a chat join request
252
+ * The bot must be an administrator in the chat for this to work and must have the can_invite_users administrator right
253
+ */
254
+ approve_chat_join_request(_: ApproveChatJoinRequestInput): boolean;
255
+ /**
256
+ * Use this method to decline a chat join request
257
+ * The bot must be an administrator in the chat for this to work and must have the can_invite_users administrator right
258
+ */
259
+ decline_chat_join_request(_: DeclineChatJoinRequestInput): boolean;
260
+ /**
261
+ * Use this method to set a new profile photo for the chat
262
+ * Photos can&#39;t be changed for private chats
263
+ * The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights
264
+ */
265
+ set_chat_photo(_: SetChatPhotoInput): boolean;
266
+ /**
267
+ * Use this method to delete a chat photo
268
+ * Photos can&#39;t be changed for private chats
269
+ * The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights
270
+ */
271
+ delete_chat_photo(_: DeleteChatPhotoInput): boolean;
272
+ /**
273
+ * Use this method to change the title of a chat
274
+ * Titles can&#39;t be changed for private chats
275
+ * The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights
276
+ */
277
+ set_chat_title(_: SetChatTitleInput): boolean;
278
+ /**
279
+ * Use this method to change the description of a group, a supergroup or a channel
280
+ * The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights
281
+ */
282
+ set_chat_description(_: SetChatDescriptionInput): boolean;
283
+ /**
284
+ * Use this method to add a message to the list of pinned messages in a chat
285
+ * If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the &#39;can_pin_messages&#39; administrator right in a supergroup or &#39;can_edit_messages&#39; administrator right in a channel
286
+ */
287
+ pin_chat_message(_: PinChatMessageInput): boolean;
288
+ /**
289
+ * Use this method to remove a message from the list of pinned messages in a chat
290
+ * If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the &#39;can_pin_messages&#39; administrator right in a supergroup or &#39;can_edit_messages&#39; administrator right in a channel
291
+ */
292
+ unpin_chat_message(_: UnpinChatMessageInput): boolean;
293
+ /**
294
+ * Use this method to clear the list of pinned messages in a chat
295
+ * If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the &#39;can_pin_messages&#39; administrator right in a supergroup or &#39;can_edit_messages&#39; administrator right in a channel
296
+ */
297
+ unpin_all_chat_messages(_: UnpinAllChatMessagesInput): boolean;
298
+ /** Use this method for your bot to leave a group, supergroup or channel */
299
+ leave_chat(_: LeaveChatInput): boolean;
300
+ /** Use this method to get up-to-date information about the chat */
301
+ get_chat(_: GetChatInput): T.ChatFullInfo;
302
+ /** Use this method to get a list of administrators in a chat, which aren&#39;t bots */
303
+ get_chat_administrators(_: GetChatAdministratorsInput): T.ChatMember[];
304
+ /** Use this method to get the number of members in a chat */
305
+ get_chat_member_count(_: GetChatMemberCountInput): number;
306
+ /**
307
+ * Use this method to get information about a member of a chat
308
+ * The method is only guaranteed to work for other users if the bot is an administrator in the chat
309
+ */
310
+ get_chat_member(_: GetChatMemberInput): T.ChatMember;
311
+ /**
312
+ * Use this method to set a new group sticker set for a supergroup
313
+ * The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights
314
+ * Use the field can_set_sticker_set optionally returned in getChat requests to check if the bot can use this method
315
+ */
316
+ set_chat_sticker_set(_: SetChatStickerSetInput): boolean;
317
+ /**
318
+ * Use this method to delete a group sticker set from a supergroup
319
+ * The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights
320
+ * Use the field can_set_sticker_set optionally returned in getChat requests to check if the bot can use this method
321
+ */
322
+ delete_chat_sticker_set(_: DeleteChatStickerSetInput): boolean;
323
+ /**
324
+ * Use this method to get custom emoji stickers, which can be used as a forum topic icon by any user
325
+ * Requires no parameters
326
+ */
327
+ get_forum_topic_icon_stickers(_: GetForumTopicIconStickersInput): T.Sticker[];
328
+ /**
329
+ * Use this method to create a topic in a forum supergroup chat
330
+ * The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights
331
+ */
332
+ create_forum_topic(_: CreateForumTopicInput): T.ForumTopic;
333
+ /**
334
+ * Use this method to edit name and icon of a topic in a forum supergroup chat
335
+ * The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights, unless it is the creator of the topic
336
+ */
337
+ edit_forum_topic(_: EditForumTopicInput): boolean;
338
+ /**
339
+ * Use this method to close an open topic in a forum supergroup chat
340
+ * The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights, unless it is the creator of the topic
341
+ */
342
+ close_forum_topic(_: CloseForumTopicInput): boolean;
343
+ /**
344
+ * Use this method to reopen a closed topic in a forum supergroup chat
345
+ * The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights, unless it is the creator of the topic
346
+ */
347
+ reopen_forum_topic(_: ReopenForumTopicInput): boolean;
348
+ /**
349
+ * Use this method to delete a forum topic along with all its messages in a forum supergroup chat
350
+ * The bot must be an administrator in the chat for this to work and must have the can_delete_messages administrator rights
351
+ */
352
+ delete_forum_topic(_: DeleteForumTopicInput): boolean;
353
+ /**
354
+ * Use this method to clear the list of pinned messages in a forum topic
355
+ * The bot must be an administrator in the chat for this to work and must have the can_pin_messages administrator right in the supergroup
356
+ */
357
+ unpin_all_forum_topic_messages(_: UnpinAllForumTopicMessagesInput): boolean;
358
+ /**
359
+ * Use this method to edit the name of the &#39;General&#39; topic in a forum supergroup chat
360
+ * The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights
361
+ */
362
+ edit_general_forum_topic(_: EditGeneralForumTopicInput): boolean;
363
+ /**
364
+ * Use this method to close an open &#39;General&#39; topic in a forum supergroup chat
365
+ * The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights
366
+ */
367
+ close_general_forum_topic(_: CloseGeneralForumTopicInput): boolean;
368
+ /**
369
+ * Use this method to reopen a closed &#39;General&#39; topic in a forum supergroup chat
370
+ * The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights
371
+ * The topic will be automatically unhidden if it was hidden
372
+ */
373
+ reopen_general_forum_topic(_: ReopenGeneralForumTopicInput): boolean;
374
+ /**
375
+ * Use this method to hide the &#39;General&#39; topic in a forum supergroup chat
376
+ * The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights
377
+ * The topic will be automatically closed if it was open
378
+ */
379
+ hide_general_forum_topic(_: HideGeneralForumTopicInput): boolean;
380
+ /**
381
+ * Use this method to unhide the &#39;General&#39; topic in a forum supergroup chat
382
+ * The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights
383
+ */
384
+ unhide_general_forum_topic(_: UnhideGeneralForumTopicInput): boolean;
385
+ /**
386
+ * Use this method to clear the list of pinned messages in a General forum topic
387
+ * The bot must be an administrator in the chat for this to work and must have the can_pin_messages administrator right in the supergroup
388
+ */
389
+ unpin_all_general_forum_topic_messages(_: UnpinAllGeneralForumTopicMessagesInput): boolean;
390
+ /**
391
+ * Use this method to send answers to callback queries sent from inline keyboards
392
+ * The answer will be displayed to the user as a notification at the top of the chat screen or as an alert
393
+ *
394
+ * Alternatively, the user can be redirected to the specified Game URL
395
+ * For this option to work, you must first create a game for your bot via <a href="https://t
396
+ * me/botfather">@BotFather and accept the terms
397
+ * Otherwise, you may use links like t
398
+ * me/your_bot?start=XXXX that open your bot with a parameter
399
+ *
400
+ *
401
+ */
402
+ answer_callback_query(_: AnswerCallbackQueryInput): boolean;
403
+ /**
404
+ * Use this method to get the list of boosts added to a chat by a user
405
+ * Requires administrator rights in the chat
406
+ */
407
+ get_user_chat_boosts(_: GetUserChatBoostsInput): T.UserChatBoosts;
408
+ /** Use this method to get information about the connection of the bot with a business account */
409
+ get_business_connection(_: GetBusinessConnectionInput): T.BusinessConnection;
410
+ /**
411
+ * Use this method to change the list of the bot&#39;s commands
412
+ * See this manual for more details about bot commands
413
+ */
414
+ set_my_commands(_: SetMyCommandsInput): boolean;
415
+ /**
416
+ * Use this method to delete the list of the bot&#39;s commands for the given scope and user language
417
+ * After deletion, higher level commands will be shown to affected users
418
+ */
419
+ delete_my_commands(_: DeleteMyCommandsInput): boolean;
420
+ /**
421
+ * Use this method to get the current list of the bot&#39;s commands for the given scope and user language
422
+ * If commands aren&#39;t set, an empty list is returned
423
+ */
424
+ get_my_commands(_: GetMyCommandsInput): T.BotCommand[];
425
+ /** Use this method to change the bot&#39;s name */
426
+ set_my_name(_: SetMyNameInput): boolean;
427
+ /** Use this method to get the current bot name for the given user language */
428
+ get_my_name(_: GetMyNameInput): T.BotName;
429
+ /** Use this method to change the bot&#39;s description, which is shown in the chat with the bot if the chat is empty */
430
+ set_my_description(_: SetMyDescriptionInput): boolean;
431
+ /** Use this method to get the current bot description for the given user language */
432
+ get_my_description(_: GetMyDescriptionInput): T.BotDescription;
433
+ /** Use this method to change the bot&#39;s short description, which is shown on the bot&#39;s profile page and is sent together with the link when users share the bot */
434
+ set_my_short_description(_: SetMyShortDescriptionInput): boolean;
435
+ /** Use this method to get the current bot short description for the given user language */
436
+ get_my_short_description(_: GetMyShortDescriptionInput): T.BotShortDescription;
437
+ /** Use this method to change the bot&#39;s menu button in a private chat, or the default menu button */
438
+ set_chat_menu_button(_: SetChatMenuButtonInput): boolean;
439
+ /** Use this method to get the current value of the bot&#39;s menu button in a private chat, or the default menu button */
440
+ get_chat_menu_button(_: GetChatMenuButtonInput): T.MenuButton;
441
+ /**
442
+ * Use this method to change the default administrator rights requested by the bot when it&#39;s added as an administrator to groups or channels
443
+ * These rights will be suggested to users, but they are free to modify the list before adding the bot
444
+ */
445
+ set_my_default_administrator_rights(_: SetMyDefaultAdministratorRightsInput): boolean;
446
+ /** Use this method to get the current default administrator rights of the bot */
447
+ get_my_default_administrator_rights(_: GetMyDefaultAdministratorRightsInput): T.ChatAdministratorRights;
448
+ /**
449
+ * Use this method to edit text and game messages
450
+ * Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within 48 hours from the time they were sent
451
+ */
452
+ edit_message_text(_: EditMessageTextInput): T.Message | boolean;
453
+ /**
454
+ * Use this method to edit captions of messages
455
+ * Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within 48 hours from the time they were sent
456
+ */
457
+ edit_message_caption(_: EditMessageCaptionInput): T.Message | boolean;
458
+ /**
459
+ * Use this method to edit animation, audio, document, photo, or video messages, or to add media to text messages
460
+ * If a message is part of a message album, then it can be edited only to an audio for audio albums, only to a document for document albums and to a photo or a video otherwise
461
+ * When an inline message is edited, a new file can&#39;t be uploaded; use a previously uploaded file via its file_id or specify a URL
462
+ * Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within 48 hours from the time they were sent
463
+ */
464
+ edit_message_media(_: EditMessageMediaInput): T.Message | boolean;
465
+ /**
466
+ * Use this method to edit live location messages
467
+ * A location can be edited until its live_period expires or editing is explicitly disabled by a call to stopMessageLiveLocation
468
+ */
469
+ edit_message_live_location(_: EditMessageLiveLocationInput): T.Message | boolean;
470
+ /** Use this method to stop updating a live location message before live_period expires */
471
+ stop_message_live_location(_: StopMessageLiveLocationInput): T.Message | boolean;
472
+ /**
473
+ * Use this method to edit only the reply markup of messages
474
+ * Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within 48 hours from the time they were sent
475
+ */
476
+ edit_message_reply_markup(_: EditMessageReplyMarkupInput): T.Message | boolean;
477
+ /** Use this method to stop a poll which was sent by the bot */
478
+ stop_poll(_: StopPollInput): T.Poll;
479
+ /**
480
+ * Use this method to delete a message, including service messages, with the following limitations:- A message can only be deleted if it was sent less than 48 hours ago
481
+ * - Service messages about a supergroup, channel, or forum topic creation can&#39;t be deleted
482
+ * - A dice message in a private chat can only be deleted if it was sent more than 24 hours ago
483
+ * - Bots can delete outgoing messages in private chats, groups, and supergroups
484
+ * - Bots can delete incoming messages in private chats
485
+ * - Bots granted can_post_messages permissions can delete outgoing messages in channels
486
+ * - If the bot is an administrator of a group, it can delete any message there
487
+ * - If the bot has can_delete_messages permission in a supergroup or a channel, it can delete any message there
488
+ */
489
+ delete_message(_: DeleteMessageInput): boolean;
490
+ /**
491
+ * Use this method to delete multiple messages simultaneously
492
+ * If some of the specified messages can&#39;t be found, they are skipped
493
+ */
494
+ delete_messages(_: DeleteMessagesInput): boolean;
495
+ /**
496
+ * Use this method to send static
497
+ * WEBP, <a href="https://telegram
498
+ * org/blog/animated-stickers">animated
499
+ * TGS, or <a href="https://telegram
500
+ * org/blog/video-stickers-better-reactions">video
501
+ * WEBM stickers
502
+ */
503
+ send_sticker(_: SendStickerInput): T.Message;
504
+ /** Use this method to get a sticker set */
505
+ get_sticker_set(_: GetStickerSetInput): T.StickerSet;
506
+ /** Use this method to get information about custom emoji stickers by their identifiers */
507
+ get_custom_emoji_stickers(_: GetCustomEmojiStickersInput): T.Sticker[];
508
+ /** Use this method to upload a file with a sticker for later use in the createNewStickerSet, addStickerToSet, or replaceStickerInSet methods (the file can be used multiple times) */
509
+ upload_sticker_file(_: UploadStickerFileInput): T.File;
510
+ /**
511
+ * Use this method to create a new sticker set owned by a user
512
+ * The bot will be able to edit the sticker set thus created
513
+ */
514
+ create_new_sticker_set(_: CreateNewStickerSetInput): boolean;
515
+ /**
516
+ * Use this method to add a new sticker to a set created by the bot
517
+ * Emoji sticker sets can have up to 200 stickers
518
+ * Other sticker sets can have up to 120 stickers
519
+ */
520
+ add_sticker_to_set(_: AddStickerToSetInput): boolean;
521
+ /** Use this method to move a sticker in a set created by the bot to a specific position */
522
+ set_sticker_position_in_set(_: SetStickerPositionInSetInput): boolean;
523
+ /** Use this method to delete a sticker from a set created by the bot */
524
+ delete_sticker_from_set(_: DeleteStickerFromSetInput): boolean;
525
+ /**
526
+ * Use this method to replace an existing sticker in a sticker set with a new one
527
+ * The method is equivalent to calling deleteStickerFromSet, then addStickerToSet, then setStickerPositionInSet
528
+ */
529
+ replace_sticker_in_set(_: ReplaceStickerInSetInput): boolean;
530
+ /**
531
+ * Use this method to change the list of emoji assigned to a regular or custom emoji sticker
532
+ * The sticker must belong to a sticker set created by the bot
533
+ */
534
+ set_sticker_emoji_list(_: SetStickerEmojiListInput): boolean;
535
+ /**
536
+ * Use this method to change search keywords assigned to a regular or custom emoji sticker
537
+ * The sticker must belong to a sticker set created by the bot
538
+ */
539
+ set_sticker_keywords(_: SetStickerKeywordsInput): boolean;
540
+ /**
541
+ * Use this method to change the mask position of a mask sticker
542
+ * The sticker must belong to a sticker set that was created by the bot
543
+ */
544
+ set_sticker_mask_position(_: SetStickerMaskPositionInput): boolean;
545
+ /** Use this method to set the title of a created sticker set */
546
+ set_sticker_set_title(_: SetStickerSetTitleInput): boolean;
547
+ /**
548
+ * Use this method to set the thumbnail of a regular or mask sticker set
549
+ * The format of the thumbnail file must match the format of the stickers in the set
550
+ */
551
+ set_sticker_set_thumbnail(_: SetStickerSetThumbnailInput): boolean;
552
+ /** Use this method to set the thumbnail of a custom emoji sticker set */
553
+ set_custom_emoji_sticker_set_thumbnail(_: SetCustomEmojiStickerSetThumbnailInput): boolean;
554
+ /** Use this method to delete a sticker set that was created by the bot */
555
+ delete_sticker_set(_: DeleteStickerSetInput): boolean;
556
+ /**
557
+ * Returns the list of gifts that can be sent by the bot to users
558
+ * Requires no parameters
559
+ */
560
+ get_available_gifts(_: GetAvailableGiftsInput): T.Gifts;
561
+ /**
562
+ * Sends a gift to the given user
563
+ * The gift can&#39;t be converted to Telegram Stars by the user
564
+ */
565
+ send_gift(_: SendGiftInput): boolean;
566
+ /**
567
+ * Use this method to send answers to an inline query
568
+ * No more than 50 results per query are allowed
569
+ */
570
+ answer_inline_query(_: AnswerInlineQueryInput): boolean;
571
+ /** Use this method to set the result of an interaction with a Web App and send a corresponding message on behalf of the user to the chat from which the query originated */
572
+ answer_web_app_query(_: AnswerWebAppQueryInput): T.SentWebAppMessage;
573
+ /** Stores a message that can be sent by a user of a Mini App */
574
+ save_prepared_inline_message(_: SavePreparedInlineMessageInput): T.PreparedInlineMessage;
575
+ /** Use this method to send invoices */
576
+ send_invoice(_: SendInvoiceInput): T.Message;
577
+ /** Use this method to create a link for an invoice */
578
+ create_invoice_link(_: CreateInvoiceLinkInput): string;
579
+ /**
580
+ * If you sent an invoice requesting a shipping address and the parameter is_flexible was specified, the Bot API will send an Update with a shipping_query field to the bot
581
+ * Use this method to reply to shipping queries
582
+ */
583
+ answer_shipping_query(_: AnswerShippingQueryInput): boolean;
584
+ /**
585
+ * Once the user has confirmed their payment and shipping details, the Bot API sends the final confirmation in the form of an Update with the field pre_checkout_query
586
+ * Use this method to respond to such pre-checkout queries
587
+ * Note: The Bot API must receive an answer within 10 seconds after the pre-checkout query was sent
588
+ */
589
+ answer_pre_checkout_query(_: AnswerPreCheckoutQueryInput): boolean;
590
+ /** Returns the bot&#39;s Telegram Star transactions in chronological order */
591
+ get_star_transactions(_: GetStarTransactionsInput): T.StarTransactions;
592
+ /**
593
+ * Refunds a successful payment in <a href="https://t
594
+ * me/BotNews/90">Telegram Stars
595
+ */
596
+ refund_star_payment(_: RefundStarPaymentInput): boolean;
597
+ /** Allows the bot to cancel or re-enable extension of a subscription paid in Telegram Stars */
598
+ edit_user_star_subscription(_: EditUserStarSubscriptionInput): boolean;
599
+ /**
600
+ * Informs a user that some of the Telegram Passport elements they provided contains errors
601
+ * The user will not be able to re-submit their Passport to you until the errors are fixed (the contents of the field for which you returned the error must change)
602
+ * Use this if the data submitted by the user doesn&#39;t satisfy the standards your service requires for any reason
603
+ * For example, if a birthday date seems invalid, a submitted document is blurry, a scan shows evidence of tampering, etc
604
+ * Supply some details in the error message to make sure the user knows how to correct the issues
605
+ */
606
+ set_passport_data_errors(_: SetPassportDataErrorsInput): boolean;
607
+ /** Use this method to send a game */
608
+ send_game(_: SendGameInput): T.Message;
609
+ /** Use this method to set the score of the specified user in a game message */
610
+ set_game_score(_: SetGameScoreInput): T.Message | boolean;
611
+ /**
612
+ * Use this method to get data for high score tables
613
+ * Will return the score of the specified user and several of their neighbors in a game
614
+ *
615
+ * This method will currently return scores for the target user, plus two of their closest neighbors on each side
616
+ * Will also return the top three users if the user and their neighbors are not among them
617
+ * Please note that this behavior is subject to change
618
+ *
619
+ *
620
+ */
621
+ get_game_high_scores(_: GetGameHighScoresInput): T.GameHighScore[];
622
+ }
623
+ interface GetUpdatesInput extends Record<string, unknown> {
624
+ /**
625
+ * Identifier of the first update to be returned
626
+ * Must be greater by one than the highest among the identifiers of previously received updates
627
+ * By default, updates starting with the earliest unconfirmed update are returned
628
+ * An update is considered confirmed as soon as getUpdates is called with an offset higher than its update_id
629
+ * The negative offset can be specified to retrieve updates starting from -offset update from the end of the updates queue
630
+ * All previous updates will be forgotten
631
+ */
632
+ offset?: number;
633
+ /**
634
+ * Limits the number of updates to be retrieved
635
+ * Values between 1-100 are accepted
636
+ * Defaults to 100
637
+ */
638
+ limit?: number;
639
+ /**
640
+ * Timeout in seconds for long polling
641
+ * Defaults to 0, i
642
+ * e
643
+ * usual short polling
644
+ * Should be positive, short polling should be used for testing purposes only
645
+ */
646
+ timeout?: number;
647
+ /**
648
+ * A JSON-serialized list of the update types you want your bot to receive
649
+ * For example, specify ["message", "edited_channel_post", "callback_query"] to only receive updates of these types
650
+ * See Update for a complete list of available update types
651
+ * Specify an empty list to receive all update types except chat_member, message_reaction, and message_reaction_count (default)
652
+ * If not specified, the previous setting will be used
653
+ * Please note that this parameter doesn't affect updates created before the call to the getUpdates, so unwanted updates may be received for a short period of time
654
+ */
655
+ allowed_updates?: string[];
656
+ }
657
+ interface SetWebhookInput extends Record<string, unknown> {
658
+ /**
659
+ * HTTPS URL to send updates to
660
+ * Use an empty string to remove webhook integration
661
+ */
662
+ url: string;
663
+ /**
664
+ * Upload your public key certificate so that the root certificate in use can be checked
665
+ * See our self-signed guide for details
666
+ */
667
+ certificate?: T.InputFile;
668
+ /** The fixed IP address which will be used to send webhook requests instead of the IP address resolved through DNS */
669
+ ip_address?: string;
670
+ /**
671
+ * The maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery, 1-100
672
+ * Defaults to 40
673
+ * Use lower values to limit the load on your bot's server, and higher values to increase your bot's throughput
674
+ */
675
+ max_connections?: number;
676
+ /**
677
+ * A JSON-serialized list of the update types you want your bot to receive
678
+ * For example, specify ["message", "edited_channel_post", "callback_query"] to only receive updates of these types
679
+ * See Update for a complete list of available update types
680
+ * Specify an empty list to receive all update types except chat_member, message_reaction, and message_reaction_count (default)
681
+ * If not specified, the previous setting will be used
682
+ * Please note that this parameter doesn't affect updates created before the call to the setWebhook, so unwanted updates may be received for a short period of time
683
+ */
684
+ allowed_updates?: string[];
685
+ /** Pass True to drop all pending updates */
686
+ drop_pending_updates?: boolean;
687
+ /**
688
+ * A secret token to be sent in a header “X-Telegram-Bot-Api-Secret-Token” in every webhook request, 1-256 characters
689
+ * Only characters A-Z, a-z, 0-9, _ and - are allowed
690
+ * The header is useful to ensure that the request comes from a webhook set by you
691
+ */
692
+ secret_token?: string;
693
+ }
694
+ interface DeleteWebhookInput extends Record<string, unknown> {
695
+ /** Pass True to drop all pending updates */
696
+ drop_pending_updates?: boolean;
697
+ }
698
+ interface GetWebhookInfoInput extends Record<string, unknown> {
699
+ }
700
+ interface GetMeInput extends Record<string, unknown> {
701
+ }
702
+ interface LogOutInput extends Record<string, unknown> {
703
+ }
704
+ interface CloseInput extends Record<string, unknown> {
705
+ }
706
+ interface SendMessageInput extends Record<string, unknown> {
707
+ /** Unique identifier of the business connection on behalf of which the message will be sent */
708
+ business_connection_id?: string;
709
+ /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
710
+ chat_id: number | string;
711
+ /** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
712
+ message_thread_id?: number;
713
+ /** Text of the message to be sent, 1-4096 characters after entities parsing */
714
+ text: string;
715
+ /**
716
+ * Mode for parsing entities in the message text
717
+ * See formatting options for more details
718
+ */
719
+ parse_mode?: string;
720
+ /** A JSON-serialized list of special entities that appear in message text, which can be specified instead of parse_mode */
721
+ entities?: T.MessageEntity[];
722
+ /** Link preview generation options for the message */
723
+ link_preview_options?: T.LinkPreviewOptions;
724
+ /**
725
+ * Sends the message silently
726
+ * Users will receive a notification with no sound
727
+ */
728
+ disable_notification?: boolean;
729
+ /** Protects the contents of the sent message from forwarding and saving */
730
+ protect_content?: boolean;
731
+ /**
732
+ * Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0
733
+ * 1 Telegram Stars per message
734
+ * The relevant Stars will be withdrawn from the bot's balance
735
+ */
736
+ allow_paid_broadcast?: boolean;
737
+ /** Unique identifier of the message effect to be added to the message; for private chats only */
738
+ message_effect_id?: string;
739
+ /** Description of the message to reply to */
740
+ reply_parameters?: T.ReplyParameters;
741
+ /**
742
+ * Additional interface options
743
+ * A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user
744
+ */
745
+ reply_markup?: T.InlineKeyboardMarkup | T.ReplyKeyboardMarkup | T.ReplyKeyboardRemove | T.ForceReply;
746
+ }
747
+ interface ForwardMessageInput extends Record<string, unknown> {
748
+ /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
749
+ chat_id: number | string;
750
+ /** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
751
+ message_thread_id?: number;
752
+ /** Unique identifier for the chat where the original message was sent (or channel username in the format @channelusername) */
753
+ from_chat_id: number | string;
754
+ /**
755
+ * Sends the message silently
756
+ * Users will receive a notification with no sound
757
+ */
758
+ disable_notification?: boolean;
759
+ /** Protects the contents of the forwarded message from forwarding and saving */
760
+ protect_content?: boolean;
761
+ /** Message identifier in the chat specified in from_chat_id */
762
+ message_id: number;
763
+ }
764
+ interface ForwardMessagesInput extends Record<string, unknown> {
765
+ /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
766
+ chat_id: number | string;
767
+ /** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
768
+ message_thread_id?: number;
769
+ /** Unique identifier for the chat where the original messages were sent (or channel username in the format @channelusername) */
770
+ from_chat_id: number | string;
771
+ /**
772
+ * A JSON-serialized list of 1-100 identifiers of messages in the chat from_chat_id to forward
773
+ * The identifiers must be specified in a strictly increasing order
774
+ */
775
+ message_ids: number[];
776
+ /**
777
+ * Sends the messages silently
778
+ * Users will receive a notification with no sound
779
+ */
780
+ disable_notification?: boolean;
781
+ /** Protects the contents of the forwarded messages from forwarding and saving */
782
+ protect_content?: boolean;
783
+ }
784
+ interface CopyMessageInput extends Record<string, unknown> {
785
+ /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
786
+ chat_id: number | string;
787
+ /** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
788
+ message_thread_id?: number;
789
+ /** Unique identifier for the chat where the original message was sent (or channel username in the format @channelusername) */
790
+ from_chat_id: number | string;
791
+ /** Message identifier in the chat specified in from_chat_id */
792
+ message_id: number;
793
+ /**
794
+ * New caption for media, 0-1024 characters after entities parsing
795
+ * If not specified, the original caption is kept
796
+ */
797
+ caption?: string;
798
+ /**
799
+ * Mode for parsing entities in the new caption
800
+ * See formatting options for more details
801
+ */
802
+ parse_mode?: string;
803
+ /** A JSON-serialized list of special entities that appear in the new caption, which can be specified instead of parse_mode */
804
+ caption_entities?: T.MessageEntity[];
805
+ /**
806
+ * Pass True, if the caption must be shown above the message media
807
+ * Ignored if a new caption isn't specified
808
+ */
809
+ show_caption_above_media?: boolean;
810
+ /**
811
+ * Sends the message silently
812
+ * Users will receive a notification with no sound
813
+ */
814
+ disable_notification?: boolean;
815
+ /** Protects the contents of the sent message from forwarding and saving */
816
+ protect_content?: boolean;
817
+ /**
818
+ * Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0
819
+ * 1 Telegram Stars per message
820
+ * The relevant Stars will be withdrawn from the bot's balance
821
+ */
822
+ allow_paid_broadcast?: boolean;
823
+ /** Description of the message to reply to */
824
+ reply_parameters?: T.ReplyParameters;
825
+ /**
826
+ * Additional interface options
827
+ * A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user
828
+ */
829
+ reply_markup?: T.InlineKeyboardMarkup | T.ReplyKeyboardMarkup | T.ReplyKeyboardRemove | T.ForceReply;
830
+ }
831
+ interface CopyMessagesInput extends Record<string, unknown> {
832
+ /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
833
+ chat_id: number | string;
834
+ /** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
835
+ message_thread_id?: number;
836
+ /** Unique identifier for the chat where the original messages were sent (or channel username in the format @channelusername) */
837
+ from_chat_id: number | string;
838
+ /**
839
+ * A JSON-serialized list of 1-100 identifiers of messages in the chat from_chat_id to copy
840
+ * The identifiers must be specified in a strictly increasing order
841
+ */
842
+ message_ids: number[];
843
+ /**
844
+ * Sends the messages silently
845
+ * Users will receive a notification with no sound
846
+ */
847
+ disable_notification?: boolean;
848
+ /** Protects the contents of the sent messages from forwarding and saving */
849
+ protect_content?: boolean;
850
+ /** Pass True to copy the messages without their captions */
851
+ remove_caption?: boolean;
852
+ }
853
+ interface SendPhotoInput extends Record<string, unknown> {
854
+ /** Unique identifier of the business connection on behalf of which the message will be sent */
855
+ business_connection_id?: string;
856
+ /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
857
+ chat_id: number | string;
858
+ /** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
859
+ message_thread_id?: number;
860
+ /**
861
+ * Photo to send
862
+ * Pass a file_id as String to send a photo that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a photo from the Internet, or upload a new photo using multipart/form-data
863
+ * The photo must be at most 10 MB in size
864
+ * The photo's width and height must not exceed 10000 in total
865
+ * Width and height ratio must be at most 20
866
+ * More information on Sending Files »
867
+ */
868
+ photo: T.InputFile | string;
869
+ /** Photo caption (may also be used when resending photos by file_id), 0-1024 characters after entities parsing */
870
+ caption?: string;
871
+ /**
872
+ * Mode for parsing entities in the photo caption
873
+ * See formatting options for more details
874
+ */
875
+ parse_mode?: string;
876
+ /** A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode */
877
+ caption_entities?: T.MessageEntity[];
878
+ /** Pass True, if the caption must be shown above the message media */
879
+ show_caption_above_media?: boolean;
880
+ /** Pass True if the photo needs to be covered with a spoiler animation */
881
+ has_spoiler?: boolean;
882
+ /**
883
+ * Sends the message silently
884
+ * Users will receive a notification with no sound
885
+ */
886
+ disable_notification?: boolean;
887
+ /** Protects the contents of the sent message from forwarding and saving */
888
+ protect_content?: boolean;
889
+ /**
890
+ * Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0
891
+ * 1 Telegram Stars per message
892
+ * The relevant Stars will be withdrawn from the bot's balance
893
+ */
894
+ allow_paid_broadcast?: boolean;
895
+ /** Unique identifier of the message effect to be added to the message; for private chats only */
896
+ message_effect_id?: string;
897
+ /** Description of the message to reply to */
898
+ reply_parameters?: T.ReplyParameters;
899
+ /**
900
+ * Additional interface options
901
+ * A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user
902
+ */
903
+ reply_markup?: T.InlineKeyboardMarkup | T.ReplyKeyboardMarkup | T.ReplyKeyboardRemove | T.ForceReply;
904
+ }
905
+ interface SendAudioInput extends Record<string, unknown> {
906
+ /** Unique identifier of the business connection on behalf of which the message will be sent */
907
+ business_connection_id?: string;
908
+ /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
909
+ chat_id: number | string;
910
+ /** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
911
+ message_thread_id?: number;
912
+ /**
913
+ * Audio file to send
914
+ * Pass a file_id as String to send an audio file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an audio file from the Internet, or upload a new one using multipart/form-data
915
+ * More information on Sending Files »
916
+ */
917
+ audio: T.InputFile | string;
918
+ /** Audio caption, 0-1024 characters after entities parsing */
919
+ caption?: string;
920
+ /**
921
+ * Mode for parsing entities in the audio caption
922
+ * See formatting options for more details
923
+ */
924
+ parse_mode?: string;
925
+ /** A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode */
926
+ caption_entities?: T.MessageEntity[];
927
+ /** Duration of the audio in seconds */
928
+ duration?: number;
929
+ /** Performer */
930
+ performer?: string;
931
+ /** Track name */
932
+ title?: string;
933
+ /**
934
+ * Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side
935
+ * The thumbnail should be in JPEG format and less than 200 kB in size
936
+ * A thumbnail's width and height should not exceed 320
937
+ * Ignored if the file is not uploaded using multipart/form-data
938
+ * 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>
939
+ * More information on Sending Files »
940
+ */
941
+ thumbnail?: T.InputFile | string;
942
+ /**
943
+ * Sends the message silently
944
+ * Users will receive a notification with no sound
945
+ */
946
+ disable_notification?: boolean;
947
+ /** Protects the contents of the sent message from forwarding and saving */
948
+ protect_content?: boolean;
949
+ /**
950
+ * Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0
951
+ * 1 Telegram Stars per message
952
+ * The relevant Stars will be withdrawn from the bot's balance
953
+ */
954
+ allow_paid_broadcast?: boolean;
955
+ /** Unique identifier of the message effect to be added to the message; for private chats only */
956
+ message_effect_id?: string;
957
+ /** Description of the message to reply to */
958
+ reply_parameters?: T.ReplyParameters;
959
+ /**
960
+ * Additional interface options
961
+ * A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user
962
+ */
963
+ reply_markup?: T.InlineKeyboardMarkup | T.ReplyKeyboardMarkup | T.ReplyKeyboardRemove | T.ForceReply;
964
+ }
965
+ interface SendDocumentInput extends Record<string, unknown> {
966
+ /** Unique identifier of the business connection on behalf of which the message will be sent */
967
+ business_connection_id?: string;
968
+ /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
969
+ chat_id: number | string;
970
+ /** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
971
+ message_thread_id?: number;
972
+ /**
973
+ * File to send
974
+ * Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data
975
+ * More information on Sending Files »
976
+ */
977
+ document: T.InputFile | string;
978
+ /**
979
+ * Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side
980
+ * The thumbnail should be in JPEG format and less than 200 kB in size
981
+ * A thumbnail's width and height should not exceed 320
982
+ * Ignored if the file is not uploaded using multipart/form-data
983
+ * 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>
984
+ * More information on Sending Files »
985
+ */
986
+ thumbnail?: T.InputFile | string;
987
+ /** Document caption (may also be used when resending documents by file_id), 0-1024 characters after entities parsing */
988
+ caption?: string;
989
+ /**
990
+ * Mode for parsing entities in the document caption
991
+ * See formatting options for more details
992
+ */
993
+ parse_mode?: string;
994
+ /** A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode */
995
+ caption_entities?: T.MessageEntity[];
996
+ /** Disables automatic server-side content type detection for files uploaded using multipart/form-data */
997
+ disable_content_type_detection?: boolean;
998
+ /**
999
+ * Sends the message silently
1000
+ * Users will receive a notification with no sound
1001
+ */
1002
+ disable_notification?: boolean;
1003
+ /** Protects the contents of the sent message from forwarding and saving */
1004
+ protect_content?: boolean;
1005
+ /**
1006
+ * Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0
1007
+ * 1 Telegram Stars per message
1008
+ * The relevant Stars will be withdrawn from the bot's balance
1009
+ */
1010
+ allow_paid_broadcast?: boolean;
1011
+ /** Unique identifier of the message effect to be added to the message; for private chats only */
1012
+ message_effect_id?: string;
1013
+ /** Description of the message to reply to */
1014
+ reply_parameters?: T.ReplyParameters;
1015
+ /**
1016
+ * Additional interface options
1017
+ * A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user
1018
+ */
1019
+ reply_markup?: T.InlineKeyboardMarkup | T.ReplyKeyboardMarkup | T.ReplyKeyboardRemove | T.ForceReply;
1020
+ }
1021
+ interface SendVideoInput extends Record<string, unknown> {
1022
+ /** Unique identifier of the business connection on behalf of which the message will be sent */
1023
+ business_connection_id?: string;
1024
+ /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
1025
+ chat_id: number | string;
1026
+ /** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
1027
+ message_thread_id?: number;
1028
+ /**
1029
+ * Video to send
1030
+ * Pass a file_id as String to send a video that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a video from the Internet, or upload a new video using multipart/form-data
1031
+ * More information on Sending Files »
1032
+ */
1033
+ video: T.InputFile | string;
1034
+ /** Duration of sent video in seconds */
1035
+ duration?: number;
1036
+ /** Video width */
1037
+ width?: number;
1038
+ /** Video height */
1039
+ height?: number;
1040
+ /**
1041
+ * Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side
1042
+ * The thumbnail should be in JPEG format and less than 200 kB in size
1043
+ * A thumbnail's width and height should not exceed 320
1044
+ * Ignored if the file is not uploaded using multipart/form-data
1045
+ * 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>
1046
+ * More information on Sending Files »
1047
+ */
1048
+ thumbnail?: T.InputFile | string;
1049
+ /** Video caption (may also be used when resending videos by file_id), 0-1024 characters after entities parsing */
1050
+ caption?: string;
1051
+ /**
1052
+ * Mode for parsing entities in the video caption
1053
+ * See formatting options for more details
1054
+ */
1055
+ parse_mode?: string;
1056
+ /** A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode */
1057
+ caption_entities?: T.MessageEntity[];
1058
+ /** Pass True, if the caption must be shown above the message media */
1059
+ show_caption_above_media?: boolean;
1060
+ /** Pass True if the video needs to be covered with a spoiler animation */
1061
+ has_spoiler?: boolean;
1062
+ /** Pass True if the uploaded video is suitable for streaming */
1063
+ supports_streaming?: boolean;
1064
+ /**
1065
+ * Sends the message silently
1066
+ * Users will receive a notification with no sound
1067
+ */
1068
+ disable_notification?: boolean;
1069
+ /** Protects the contents of the sent message from forwarding and saving */
1070
+ protect_content?: boolean;
1071
+ /**
1072
+ * Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0
1073
+ * 1 Telegram Stars per message
1074
+ * The relevant Stars will be withdrawn from the bot's balance
1075
+ */
1076
+ allow_paid_broadcast?: boolean;
1077
+ /** Unique identifier of the message effect to be added to the message; for private chats only */
1078
+ message_effect_id?: string;
1079
+ /** Description of the message to reply to */
1080
+ reply_parameters?: T.ReplyParameters;
1081
+ /**
1082
+ * Additional interface options
1083
+ * A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user
1084
+ */
1085
+ reply_markup?: T.InlineKeyboardMarkup | T.ReplyKeyboardMarkup | T.ReplyKeyboardRemove | T.ForceReply;
1086
+ }
1087
+ interface SendAnimationInput extends Record<string, unknown> {
1088
+ /** Unique identifier of the business connection on behalf of which the message will be sent */
1089
+ business_connection_id?: string;
1090
+ /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
1091
+ chat_id: number | string;
1092
+ /** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
1093
+ message_thread_id?: number;
1094
+ /**
1095
+ * Animation to send
1096
+ * Pass a file_id as String to send an animation that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get an animation from the Internet, or upload a new animation using multipart/form-data
1097
+ * More information on Sending Files »
1098
+ */
1099
+ animation: T.InputFile | string;
1100
+ /** Duration of sent animation in seconds */
1101
+ duration?: number;
1102
+ /** Animation width */
1103
+ width?: number;
1104
+ /** Animation height */
1105
+ height?: number;
1106
+ /**
1107
+ * Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side
1108
+ * The thumbnail should be in JPEG format and less than 200 kB in size
1109
+ * A thumbnail's width and height should not exceed 320
1110
+ * Ignored if the file is not uploaded using multipart/form-data
1111
+ * 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>
1112
+ * More information on Sending Files »
1113
+ */
1114
+ thumbnail?: T.InputFile | string;
1115
+ /** Animation caption (may also be used when resending animation by file_id), 0-1024 characters after entities parsing */
1116
+ caption?: string;
1117
+ /**
1118
+ * Mode for parsing entities in the animation caption
1119
+ * See formatting options for more details
1120
+ */
1121
+ parse_mode?: string;
1122
+ /** A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode */
1123
+ caption_entities?: T.MessageEntity[];
1124
+ /** Pass True, if the caption must be shown above the message media */
1125
+ show_caption_above_media?: boolean;
1126
+ /** Pass True if the animation needs to be covered with a spoiler animation */
1127
+ has_spoiler?: boolean;
1128
+ /**
1129
+ * Sends the message silently
1130
+ * Users will receive a notification with no sound
1131
+ */
1132
+ disable_notification?: boolean;
1133
+ /** Protects the contents of the sent message from forwarding and saving */
1134
+ protect_content?: boolean;
1135
+ /**
1136
+ * Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0
1137
+ * 1 Telegram Stars per message
1138
+ * The relevant Stars will be withdrawn from the bot's balance
1139
+ */
1140
+ allow_paid_broadcast?: boolean;
1141
+ /** Unique identifier of the message effect to be added to the message; for private chats only */
1142
+ message_effect_id?: string;
1143
+ /** Description of the message to reply to */
1144
+ reply_parameters?: T.ReplyParameters;
1145
+ /**
1146
+ * Additional interface options
1147
+ * A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user
1148
+ */
1149
+ reply_markup?: T.InlineKeyboardMarkup | T.ReplyKeyboardMarkup | T.ReplyKeyboardRemove | T.ForceReply;
1150
+ }
1151
+ interface SendVoiceInput extends Record<string, unknown> {
1152
+ /** Unique identifier of the business connection on behalf of which the message will be sent */
1153
+ business_connection_id?: string;
1154
+ /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
1155
+ chat_id: number | string;
1156
+ /** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
1157
+ message_thread_id?: number;
1158
+ /**
1159
+ * Audio file to send
1160
+ * Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data
1161
+ * More information on Sending Files »
1162
+ */
1163
+ voice: T.InputFile | string;
1164
+ /** Voice message caption, 0-1024 characters after entities parsing */
1165
+ caption?: string;
1166
+ /**
1167
+ * Mode for parsing entities in the voice message caption
1168
+ * See formatting options for more details
1169
+ */
1170
+ parse_mode?: string;
1171
+ /** A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode */
1172
+ caption_entities?: T.MessageEntity[];
1173
+ /** Duration of the voice message in seconds */
1174
+ duration?: number;
1175
+ /**
1176
+ * Sends the message silently
1177
+ * Users will receive a notification with no sound
1178
+ */
1179
+ disable_notification?: boolean;
1180
+ /** Protects the contents of the sent message from forwarding and saving */
1181
+ protect_content?: boolean;
1182
+ /**
1183
+ * Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0
1184
+ * 1 Telegram Stars per message
1185
+ * The relevant Stars will be withdrawn from the bot's balance
1186
+ */
1187
+ allow_paid_broadcast?: boolean;
1188
+ /** Unique identifier of the message effect to be added to the message; for private chats only */
1189
+ message_effect_id?: string;
1190
+ /** Description of the message to reply to */
1191
+ reply_parameters?: T.ReplyParameters;
1192
+ /**
1193
+ * Additional interface options
1194
+ * A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user
1195
+ */
1196
+ reply_markup?: T.InlineKeyboardMarkup | T.ReplyKeyboardMarkup | T.ReplyKeyboardRemove | T.ForceReply;
1197
+ }
1198
+ interface SendVideoNoteInput extends Record<string, unknown> {
1199
+ /** Unique identifier of the business connection on behalf of which the message will be sent */
1200
+ business_connection_id?: string;
1201
+ /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
1202
+ chat_id: number | string;
1203
+ /** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
1204
+ message_thread_id?: number;
1205
+ /**
1206
+ * Video note to send
1207
+ * Pass a file_id as String to send a video note that exists on the Telegram servers (recommended) or upload a new video using multipart/form-data
1208
+ * More information on Sending Files »
1209
+ * Sending video notes by a URL is currently unsupported
1210
+ */
1211
+ video_note: T.InputFile | string;
1212
+ /** Duration of sent video in seconds */
1213
+ duration?: number;
1214
+ /**
1215
+ * Video width and height, i
1216
+ * e
1217
+ * diameter of the video message
1218
+ */
1219
+ length?: number;
1220
+ /**
1221
+ * Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side
1222
+ * The thumbnail should be in JPEG format and less than 200 kB in size
1223
+ * A thumbnail's width and height should not exceed 320
1224
+ * Ignored if the file is not uploaded using multipart/form-data
1225
+ * 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>
1226
+ * More information on Sending Files »
1227
+ */
1228
+ thumbnail?: T.InputFile | string;
1229
+ /**
1230
+ * Sends the message silently
1231
+ * Users will receive a notification with no sound
1232
+ */
1233
+ disable_notification?: boolean;
1234
+ /** Protects the contents of the sent message from forwarding and saving */
1235
+ protect_content?: boolean;
1236
+ /**
1237
+ * Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0
1238
+ * 1 Telegram Stars per message
1239
+ * The relevant Stars will be withdrawn from the bot's balance
1240
+ */
1241
+ allow_paid_broadcast?: boolean;
1242
+ /** Unique identifier of the message effect to be added to the message; for private chats only */
1243
+ message_effect_id?: string;
1244
+ /** Description of the message to reply to */
1245
+ reply_parameters?: T.ReplyParameters;
1246
+ /**
1247
+ * Additional interface options
1248
+ * A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user
1249
+ */
1250
+ reply_markup?: T.InlineKeyboardMarkup | T.ReplyKeyboardMarkup | T.ReplyKeyboardRemove | T.ForceReply;
1251
+ }
1252
+ interface SendPaidMediaInput extends Record<string, unknown> {
1253
+ /** Unique identifier of the business connection on behalf of which the message will be sent */
1254
+ business_connection_id?: string;
1255
+ /**
1256
+ * Unique identifier for the target chat or username of the target channel (in the format @channelusername)
1257
+ * If the chat is a channel, all Telegram Star proceeds from this media will be credited to the chat's balance
1258
+ * Otherwise, they will be credited to the bot's balance
1259
+ */
1260
+ chat_id: number | string;
1261
+ /** The number of Telegram Stars that must be paid to buy access to the media; 1-2500 */
1262
+ star_count: number;
1263
+ /** A JSON-serialized array describing the media to be sent; up to 10 items */
1264
+ media: T.InputPaidMedia[];
1265
+ /**
1266
+ * Bot-defined paid media payload, 0-128 bytes
1267
+ * This will not be displayed to the user, use it for your internal processes
1268
+ */
1269
+ payload?: string;
1270
+ /** Media caption, 0-1024 characters after entities parsing */
1271
+ caption?: string;
1272
+ /**
1273
+ * Mode for parsing entities in the media caption
1274
+ * See formatting options for more details
1275
+ */
1276
+ parse_mode?: string;
1277
+ /** A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode */
1278
+ caption_entities?: T.MessageEntity[];
1279
+ /** Pass True, if the caption must be shown above the message media */
1280
+ show_caption_above_media?: boolean;
1281
+ /**
1282
+ * Sends the message silently
1283
+ * Users will receive a notification with no sound
1284
+ */
1285
+ disable_notification?: boolean;
1286
+ /** Protects the contents of the sent message from forwarding and saving */
1287
+ protect_content?: boolean;
1288
+ /**
1289
+ * Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0
1290
+ * 1 Telegram Stars per message
1291
+ * The relevant Stars will be withdrawn from the bot's balance
1292
+ */
1293
+ allow_paid_broadcast?: boolean;
1294
+ /** Description of the message to reply to */
1295
+ reply_parameters?: T.ReplyParameters;
1296
+ /**
1297
+ * Additional interface options
1298
+ * A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user
1299
+ */
1300
+ reply_markup?: T.InlineKeyboardMarkup | T.ReplyKeyboardMarkup | T.ReplyKeyboardRemove | T.ForceReply;
1301
+ }
1302
+ interface SendMediaGroupInput extends Record<string, unknown> {
1303
+ /** Unique identifier of the business connection on behalf of which the message will be sent */
1304
+ business_connection_id?: string;
1305
+ /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
1306
+ chat_id: number | string;
1307
+ /** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
1308
+ message_thread_id?: number;
1309
+ /** A JSON-serialized array describing messages to be sent, must include 2-10 items */
1310
+ media: (T.InputMediaAudio | T.InputMediaDocument | T.InputMediaPhoto | T.InputMediaVideo)[];
1311
+ /**
1312
+ * Sends messages silently
1313
+ * Users will receive a notification with no sound
1314
+ */
1315
+ disable_notification?: boolean;
1316
+ /** Protects the contents of the sent messages from forwarding and saving */
1317
+ protect_content?: boolean;
1318
+ /**
1319
+ * Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0
1320
+ * 1 Telegram Stars per message
1321
+ * The relevant Stars will be withdrawn from the bot's balance
1322
+ */
1323
+ allow_paid_broadcast?: boolean;
1324
+ /** Unique identifier of the message effect to be added to the message; for private chats only */
1325
+ message_effect_id?: string;
1326
+ /** Description of the message to reply to */
1327
+ reply_parameters?: T.ReplyParameters;
1328
+ }
1329
+ interface SendLocationInput extends Record<string, unknown> {
1330
+ /** Unique identifier of the business connection on behalf of which the message will be sent */
1331
+ business_connection_id?: string;
1332
+ /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
1333
+ chat_id: number | string;
1334
+ /** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
1335
+ message_thread_id?: number;
1336
+ /** Latitude of the location */
1337
+ latitude: number;
1338
+ /** Longitude of the location */
1339
+ longitude: number;
1340
+ /** The radius of uncertainty for the location, measured in meters; 0-1500 */
1341
+ horizontal_accuracy?: number;
1342
+ /** Period in seconds during which the location will be updated (see Live Locations, should be between 60 and 86400, or 0x7FFFFFFF for live locations that can be edited indefinitely */
1343
+ live_period?: number;
1344
+ /**
1345
+ * For live locations, a direction in which the user is moving, in degrees
1346
+ * Must be between 1 and 360 if specified
1347
+ */
1348
+ heading?: number;
1349
+ /**
1350
+ * For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters
1351
+ * Must be between 1 and 100000 if specified
1352
+ */
1353
+ proximity_alert_radius?: number;
1354
+ /**
1355
+ * Sends the message silently
1356
+ * Users will receive a notification with no sound
1357
+ */
1358
+ disable_notification?: boolean;
1359
+ /** Protects the contents of the sent message from forwarding and saving */
1360
+ protect_content?: boolean;
1361
+ /**
1362
+ * Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0
1363
+ * 1 Telegram Stars per message
1364
+ * The relevant Stars will be withdrawn from the bot's balance
1365
+ */
1366
+ allow_paid_broadcast?: boolean;
1367
+ /** Unique identifier of the message effect to be added to the message; for private chats only */
1368
+ message_effect_id?: string;
1369
+ /** Description of the message to reply to */
1370
+ reply_parameters?: T.ReplyParameters;
1371
+ /**
1372
+ * Additional interface options
1373
+ * A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user
1374
+ */
1375
+ reply_markup?: T.InlineKeyboardMarkup | T.ReplyKeyboardMarkup | T.ReplyKeyboardRemove | T.ForceReply;
1376
+ }
1377
+ interface SendVenueInput extends Record<string, unknown> {
1378
+ /** Unique identifier of the business connection on behalf of which the message will be sent */
1379
+ business_connection_id?: string;
1380
+ /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
1381
+ chat_id: number | string;
1382
+ /** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
1383
+ message_thread_id?: number;
1384
+ /** Latitude of the venue */
1385
+ latitude: number;
1386
+ /** Longitude of the venue */
1387
+ longitude: number;
1388
+ /** Name of the venue */
1389
+ title: string;
1390
+ /** Address of the venue */
1391
+ address: string;
1392
+ /** Foursquare identifier of the venue */
1393
+ foursquare_id?: string;
1394
+ /**
1395
+ * Foursquare type of the venue, if known
1396
+ * (For example, “arts_entertainment/default”, “arts_entertainment/aquarium” or “food/icecream”
1397
+ */
1398
+ foursquare_type?: string;
1399
+ /** Google Places identifier of the venue */
1400
+ google_place_id?: string;
1401
+ /**
1402
+ * Google Places type of the venue
1403
+ * (See supported types
1404
+ */
1405
+ google_place_type?: string;
1406
+ /**
1407
+ * Sends the message silently
1408
+ * Users will receive a notification with no sound
1409
+ */
1410
+ disable_notification?: boolean;
1411
+ /** Protects the contents of the sent message from forwarding and saving */
1412
+ protect_content?: boolean;
1413
+ /**
1414
+ * Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0
1415
+ * 1 Telegram Stars per message
1416
+ * The relevant Stars will be withdrawn from the bot's balance
1417
+ */
1418
+ allow_paid_broadcast?: boolean;
1419
+ /** Unique identifier of the message effect to be added to the message; for private chats only */
1420
+ message_effect_id?: string;
1421
+ /** Description of the message to reply to */
1422
+ reply_parameters?: T.ReplyParameters;
1423
+ /**
1424
+ * Additional interface options
1425
+ * A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user
1426
+ */
1427
+ reply_markup?: T.InlineKeyboardMarkup | T.ReplyKeyboardMarkup | T.ReplyKeyboardRemove | T.ForceReply;
1428
+ }
1429
+ interface SendContactInput extends Record<string, unknown> {
1430
+ /** Unique identifier of the business connection on behalf of which the message will be sent */
1431
+ business_connection_id?: string;
1432
+ /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
1433
+ chat_id: number | string;
1434
+ /** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
1435
+ message_thread_id?: number;
1436
+ /** Contact's phone number */
1437
+ phone_number: string;
1438
+ /** Contact's first name */
1439
+ first_name: string;
1440
+ /** Contact's last name */
1441
+ last_name?: string;
1442
+ /** Additional data about the contact in the form of a vCard, 0-2048 bytes */
1443
+ vcard?: string;
1444
+ /**
1445
+ * Sends the message silently
1446
+ * Users will receive a notification with no sound
1447
+ */
1448
+ disable_notification?: boolean;
1449
+ /** Protects the contents of the sent message from forwarding and saving */
1450
+ protect_content?: boolean;
1451
+ /**
1452
+ * Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0
1453
+ * 1 Telegram Stars per message
1454
+ * The relevant Stars will be withdrawn from the bot's balance
1455
+ */
1456
+ allow_paid_broadcast?: boolean;
1457
+ /** Unique identifier of the message effect to be added to the message; for private chats only */
1458
+ message_effect_id?: string;
1459
+ /** Description of the message to reply to */
1460
+ reply_parameters?: T.ReplyParameters;
1461
+ /**
1462
+ * Additional interface options
1463
+ * A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user
1464
+ */
1465
+ reply_markup?: T.InlineKeyboardMarkup | T.ReplyKeyboardMarkup | T.ReplyKeyboardRemove | T.ForceReply;
1466
+ }
1467
+ interface SendPollInput extends Record<string, unknown> {
1468
+ /** Unique identifier of the business connection on behalf of which the message will be sent */
1469
+ business_connection_id?: string;
1470
+ /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
1471
+ chat_id: number | string;
1472
+ /** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
1473
+ message_thread_id?: number;
1474
+ /** Poll question, 1-300 characters */
1475
+ question: string;
1476
+ /**
1477
+ * Mode for parsing entities in the question
1478
+ * See formatting options for more details
1479
+ * Currently, only custom emoji entities are allowed
1480
+ */
1481
+ question_parse_mode?: string;
1482
+ /**
1483
+ * A JSON-serialized list of special entities that appear in the poll question
1484
+ * It can be specified instead of question_parse_mode
1485
+ */
1486
+ question_entities?: T.MessageEntity[];
1487
+ /** A JSON-serialized list of 2-10 answer options */
1488
+ options: T.InputPollOption[];
1489
+ /** True, if the poll needs to be anonymous, defaults to True */
1490
+ is_anonymous?: boolean;
1491
+ /** Poll type, “quiz” or “regular”, defaults to “regular” */
1492
+ type?: string;
1493
+ /** True, if the poll allows multiple answers, ignored for polls in quiz mode, defaults to False */
1494
+ allows_multiple_answers?: boolean;
1495
+ /** 0-based identifier of the correct answer option, required for polls in quiz mode */
1496
+ correct_option_id?: number;
1497
+ /** 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 with at most 2 line feeds after entities parsing */
1498
+ explanation?: string;
1499
+ /**
1500
+ * Mode for parsing entities in the explanation
1501
+ * See formatting options for more details
1502
+ */
1503
+ explanation_parse_mode?: string;
1504
+ /**
1505
+ * A JSON-serialized list of special entities that appear in the poll explanation
1506
+ * It can be specified instead of explanation_parse_mode
1507
+ */
1508
+ explanation_entities?: T.MessageEntity[];
1509
+ /**
1510
+ * Amount of time in seconds the poll will be active after creation, 5-600
1511
+ * Can't be used together with close_date
1512
+ */
1513
+ open_period?: number;
1514
+ /**
1515
+ * Point in time (Unix timestamp) when the poll will be automatically closed
1516
+ * Must be at least 5 and no more than 600 seconds in the future
1517
+ * Can't be used together with open_period
1518
+ */
1519
+ close_date?: number;
1520
+ /**
1521
+ * Pass True if the poll needs to be immediately closed
1522
+ * This can be useful for poll preview
1523
+ */
1524
+ is_closed?: boolean;
1525
+ /**
1526
+ * Sends the message silently
1527
+ * Users will receive a notification with no sound
1528
+ */
1529
+ disable_notification?: boolean;
1530
+ /** Protects the contents of the sent message from forwarding and saving */
1531
+ protect_content?: boolean;
1532
+ /**
1533
+ * Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0
1534
+ * 1 Telegram Stars per message
1535
+ * The relevant Stars will be withdrawn from the bot's balance
1536
+ */
1537
+ allow_paid_broadcast?: boolean;
1538
+ /** Unique identifier of the message effect to be added to the message; for private chats only */
1539
+ message_effect_id?: string;
1540
+ /** Description of the message to reply to */
1541
+ reply_parameters?: T.ReplyParameters;
1542
+ /**
1543
+ * Additional interface options
1544
+ * A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user
1545
+ */
1546
+ reply_markup?: T.InlineKeyboardMarkup | T.ReplyKeyboardMarkup | T.ReplyKeyboardRemove | T.ForceReply;
1547
+ }
1548
+ interface SendDiceInput extends Record<string, unknown> {
1549
+ /** Unique identifier of the business connection on behalf of which the message will be sent */
1550
+ business_connection_id?: string;
1551
+ /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
1552
+ chat_id: number | string;
1553
+ /** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
1554
+ message_thread_id?: number;
1555
+ /**
1556
+ * Emoji on which the dice throw animation is based
1557
+ * Currently, must be one of “”, “”, “”, “”, “”, or “”
1558
+ * Dice can have values 1-6 for “”, “” and “”, values 1-5 for “” and “”, and values 1-64 for “”
1559
+ * Defaults to “”
1560
+ */
1561
+ emoji?: "🎲" | "🎯" | "🏀" | "⚽" | "🎰";
1562
+ /**
1563
+ * Sends the message silently
1564
+ * Users will receive a notification with no sound
1565
+ */
1566
+ disable_notification?: boolean;
1567
+ /** Protects the contents of the sent message from forwarding */
1568
+ protect_content?: boolean;
1569
+ /**
1570
+ * Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0
1571
+ * 1 Telegram Stars per message
1572
+ * The relevant Stars will be withdrawn from the bot's balance
1573
+ */
1574
+ allow_paid_broadcast?: boolean;
1575
+ /** Unique identifier of the message effect to be added to the message; for private chats only */
1576
+ message_effect_id?: string;
1577
+ /** Description of the message to reply to */
1578
+ reply_parameters?: T.ReplyParameters;
1579
+ /**
1580
+ * Additional interface options
1581
+ * A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user
1582
+ */
1583
+ reply_markup?: T.InlineKeyboardMarkup | T.ReplyKeyboardMarkup | T.ReplyKeyboardRemove | T.ForceReply;
1584
+ }
1585
+ interface SendChatActionInput extends Record<string, unknown> {
1586
+ /** Unique identifier of the business connection on behalf of which the action will be sent */
1587
+ business_connection_id?: string;
1588
+ /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
1589
+ chat_id: number | string;
1590
+ /** Unique identifier for the target message thread; for supergroups only */
1591
+ message_thread_id?: number;
1592
+ /**
1593
+ * Type of action to broadcast
1594
+ * Choose one, depending on what the user is about to receive: typing for text messages, upload_photo for photos, record_video or upload_video for videos, record_voice or upload_voice for voice notes, upload_document for general files, choose_sticker for stickers, find_location for location data, record_video_note or upload_video_note for video notes
1595
+ */
1596
+ action: string;
1597
+ }
1598
+ interface SetMessageReactionInput extends Record<string, unknown> {
1599
+ /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
1600
+ chat_id: number | string;
1601
+ /**
1602
+ * Identifier of the target message
1603
+ * If the message belongs to a media group, the reaction is set to the first non-deleted message in the group instead
1604
+ */
1605
+ message_id: number;
1606
+ /**
1607
+ * A JSON-serialized list of reaction types to set on the message
1608
+ * Currently, as non-premium users, bots can set up to one reaction per message
1609
+ * A custom emoji reaction can be used if it is either already present on the message or explicitly allowed by chat administrators
1610
+ * Paid reactions can't be used by bots
1611
+ */
1612
+ reaction?: T.ReactionType[];
1613
+ /** Pass True to set the reaction with a big animation */
1614
+ is_big?: boolean;
1615
+ }
1616
+ interface GetUserProfilePhotosInput extends Record<string, unknown> {
1617
+ /** Unique identifier of the target user */
1618
+ user_id: number;
1619
+ /**
1620
+ * Sequential number of the first photo to be returned
1621
+ * By default, all photos are returned
1622
+ */
1623
+ offset?: number;
1624
+ /**
1625
+ * Limits the number of photos to be retrieved
1626
+ * Values between 1-100 are accepted
1627
+ * Defaults to 100
1628
+ */
1629
+ limit?: number;
1630
+ }
1631
+ interface SetUserEmojiStatusInput extends Record<string, unknown> {
1632
+ /** Unique identifier of the target user */
1633
+ user_id: number;
1634
+ /**
1635
+ * Custom emoji identifier of the emoji status to set
1636
+ * Pass an empty string to remove the status
1637
+ */
1638
+ emoji_status_custom_emoji_id?: string;
1639
+ /** Expiration date of the emoji status, if any */
1640
+ emoji_status_expiration_date?: number;
1641
+ }
1642
+ interface GetFileInput extends Record<string, unknown> {
1643
+ /** File identifier to get information about */
1644
+ file_id: string;
1645
+ }
1646
+ interface BanChatMemberInput extends Record<string, unknown> {
1647
+ /** Unique identifier for the target group or username of the target supergroup or channel (in the format @channelusername) */
1648
+ chat_id: number | string;
1649
+ /** Unique identifier of the target user */
1650
+ user_id: number;
1651
+ /**
1652
+ * Date when the user will be unbanned; Unix time
1653
+ * If user is banned for more than 366 days or less than 30 seconds from the current time they are considered to be banned forever
1654
+ * Applied for supergroups and channels only
1655
+ */
1656
+ until_date?: number;
1657
+ /**
1658
+ * Pass True to delete all messages from the chat for the user that is being removed
1659
+ * If False, the user will be able to see messages in the group that were sent before the user was removed
1660
+ * Always True for supergroups and channels
1661
+ */
1662
+ revoke_messages?: boolean;
1663
+ }
1664
+ interface UnbanChatMemberInput extends Record<string, unknown> {
1665
+ /** Unique identifier for the target group or username of the target supergroup or channel (in the format @channelusername) */
1666
+ chat_id: number | string;
1667
+ /** Unique identifier of the target user */
1668
+ user_id: number;
1669
+ /** Do nothing if the user is not banned */
1670
+ only_if_banned?: boolean;
1671
+ }
1672
+ interface RestrictChatMemberInput extends Record<string, unknown> {
1673
+ /** Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername) */
1674
+ chat_id: number | string;
1675
+ /** Unique identifier of the target user */
1676
+ user_id: number;
1677
+ /** A JSON-serialized object for new user permissions */
1678
+ permissions: T.ChatPermissions;
1679
+ /**
1680
+ * Pass True if chat permissions are set independently
1681
+ * Otherwise, the can_send_other_messages and can_add_web_page_previews permissions will imply the can_send_messages, can_send_audios, can_send_documents, can_send_photos, can_send_videos, can_send_video_notes, and can_send_voice_notes permissions; the can_send_polls permission will imply the can_send_messages permission
1682
+ */
1683
+ use_independent_chat_permissions?: boolean;
1684
+ /**
1685
+ * Date when restrictions will be lifted for the user; Unix time
1686
+ * If user is restricted for more than 366 days or less than 30 seconds from the current time, they are considered to be restricted forever
1687
+ */
1688
+ until_date?: number;
1689
+ }
1690
+ interface PromoteChatMemberInput extends Record<string, unknown> {
1691
+ /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
1692
+ chat_id: number | string;
1693
+ /** Unique identifier of the target user */
1694
+ user_id: number;
1695
+ /** Pass True if the administrator's presence in the chat is hidden */
1696
+ is_anonymous?: boolean;
1697
+ /**
1698
+ * Pass True if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages and ignore slow mode
1699
+ * Implied by any other administrator privilege
1700
+ */
1701
+ can_manage_chat?: boolean;
1702
+ /** Pass True if the administrator can delete messages of other users */
1703
+ can_delete_messages?: boolean;
1704
+ /** Pass True if the administrator can manage video chats */
1705
+ can_manage_video_chats?: boolean;
1706
+ /** Pass True if the administrator can restrict, ban or unban chat members, or access supergroup statistics */
1707
+ can_restrict_members?: boolean;
1708
+ /** Pass 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 him) */
1709
+ can_promote_members?: boolean;
1710
+ /** Pass True if the administrator can change chat title, photo and other settings */
1711
+ can_change_info?: boolean;
1712
+ /** Pass True if the administrator can invite new users to the chat */
1713
+ can_invite_users?: boolean;
1714
+ /** Pass True if the administrator can post stories to the chat */
1715
+ can_post_stories?: boolean;
1716
+ /** Pass True if the administrator can edit stories posted by other users, post stories to the chat page, pin chat stories, and access the chat's story archive */
1717
+ can_edit_stories?: boolean;
1718
+ /** Pass True if the administrator can delete stories posted by other users */
1719
+ can_delete_stories?: boolean;
1720
+ /** Pass True if the administrator can post messages in the channel, or access channel statistics; for channels only */
1721
+ can_post_messages?: boolean;
1722
+ /** Pass True if the administrator can edit messages of other users and can pin messages; for channels only */
1723
+ can_edit_messages?: boolean;
1724
+ /** Pass True if the administrator can pin messages; for supergroups only */
1725
+ can_pin_messages?: boolean;
1726
+ /** Pass True if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only */
1727
+ can_manage_topics?: boolean;
1728
+ }
1729
+ interface SetChatAdministratorCustomTitleInput extends Record<string, unknown> {
1730
+ /** Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername) */
1731
+ chat_id: number | string;
1732
+ /** Unique identifier of the target user */
1733
+ user_id: number;
1734
+ /** New custom title for the administrator; 0-16 characters, emoji are not allowed */
1735
+ custom_title: string;
1736
+ }
1737
+ interface BanChatSenderChatInput extends Record<string, unknown> {
1738
+ /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
1739
+ chat_id: number | string;
1740
+ /** Unique identifier of the target sender chat */
1741
+ sender_chat_id: number;
1742
+ }
1743
+ interface UnbanChatSenderChatInput extends Record<string, unknown> {
1744
+ /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
1745
+ chat_id: number | string;
1746
+ /** Unique identifier of the target sender chat */
1747
+ sender_chat_id: number;
1748
+ }
1749
+ interface SetChatPermissionsInput extends Record<string, unknown> {
1750
+ /** Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername) */
1751
+ chat_id: number | string;
1752
+ /** A JSON-serialized object for new default chat permissions */
1753
+ permissions: T.ChatPermissions;
1754
+ /**
1755
+ * Pass True if chat permissions are set independently
1756
+ * Otherwise, the can_send_other_messages and can_add_web_page_previews permissions will imply the can_send_messages, can_send_audios, can_send_documents, can_send_photos, can_send_videos, can_send_video_notes, and can_send_voice_notes permissions; the can_send_polls permission will imply the can_send_messages permission
1757
+ */
1758
+ use_independent_chat_permissions?: boolean;
1759
+ }
1760
+ interface ExportChatInviteLinkInput extends Record<string, unknown> {
1761
+ /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
1762
+ chat_id: number | string;
1763
+ }
1764
+ interface CreateChatInviteLinkInput extends Record<string, unknown> {
1765
+ /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
1766
+ chat_id: number | string;
1767
+ /** Invite link name; 0-32 characters */
1768
+ name?: string;
1769
+ /** Point in time (Unix timestamp) when the link will expire */
1770
+ expire_date?: number;
1771
+ /** The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999 */
1772
+ member_limit?: number;
1773
+ /**
1774
+ * True, if users joining the chat via the link need to be approved by chat administrators
1775
+ * If True, member_limit can't be specified
1776
+ */
1777
+ creates_join_request?: boolean;
1778
+ }
1779
+ interface EditChatInviteLinkInput extends Record<string, unknown> {
1780
+ /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
1781
+ chat_id: number | string;
1782
+ /** The invite link to edit */
1783
+ invite_link: string;
1784
+ /** Invite link name; 0-32 characters */
1785
+ name?: string;
1786
+ /** Point in time (Unix timestamp) when the link will expire */
1787
+ expire_date?: number;
1788
+ /** The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999 */
1789
+ member_limit?: number;
1790
+ /**
1791
+ * True, if users joining the chat via the link need to be approved by chat administrators
1792
+ * If True, member_limit can't be specified
1793
+ */
1794
+ creates_join_request?: boolean;
1795
+ }
1796
+ interface CreateChatSubscriptionInviteLinkInput extends Record<string, unknown> {
1797
+ /** Unique identifier for the target channel chat or username of the target channel (in the format @channelusername) */
1798
+ chat_id: number | string;
1799
+ /** Invite link name; 0-32 characters */
1800
+ name?: string;
1801
+ /**
1802
+ * The number of seconds the subscription will be active for before the next payment
1803
+ * Currently, it must always be 2592000 (30 days)
1804
+ */
1805
+ subscription_period: number;
1806
+ /** The amount of Telegram Stars a user must pay initially and after each subsequent subscription period to be a member of the chat; 1-2500 */
1807
+ subscription_price: number;
1808
+ }
1809
+ interface EditChatSubscriptionInviteLinkInput extends Record<string, unknown> {
1810
+ /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
1811
+ chat_id: number | string;
1812
+ /** The invite link to edit */
1813
+ invite_link: string;
1814
+ /** Invite link name; 0-32 characters */
1815
+ name?: string;
1816
+ }
1817
+ interface RevokeChatInviteLinkInput extends Record<string, unknown> {
1818
+ /** Unique identifier of the target chat or username of the target channel (in the format @channelusername) */
1819
+ chat_id: number | string;
1820
+ /** The invite link to revoke */
1821
+ invite_link: string;
1822
+ }
1823
+ interface ApproveChatJoinRequestInput extends Record<string, unknown> {
1824
+ /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
1825
+ chat_id: number | string;
1826
+ /** Unique identifier of the target user */
1827
+ user_id: number;
1828
+ }
1829
+ interface DeclineChatJoinRequestInput extends Record<string, unknown> {
1830
+ /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
1831
+ chat_id: number | string;
1832
+ /** Unique identifier of the target user */
1833
+ user_id: number;
1834
+ }
1835
+ interface SetChatPhotoInput extends Record<string, unknown> {
1836
+ /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
1837
+ chat_id: number | string;
1838
+ /** New chat photo, uploaded using multipart/form-data */
1839
+ photo: T.InputFile;
1840
+ }
1841
+ interface DeleteChatPhotoInput extends Record<string, unknown> {
1842
+ /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
1843
+ chat_id: number | string;
1844
+ }
1845
+ interface SetChatTitleInput extends Record<string, unknown> {
1846
+ /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
1847
+ chat_id: number | string;
1848
+ /** New chat title, 1-128 characters */
1849
+ title: string;
1850
+ }
1851
+ interface SetChatDescriptionInput extends Record<string, unknown> {
1852
+ /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
1853
+ chat_id: number | string;
1854
+ /** New chat description, 0-255 characters */
1855
+ description?: string;
1856
+ }
1857
+ interface PinChatMessageInput extends Record<string, unknown> {
1858
+ /** Unique identifier of the business connection on behalf of which the message will be pinned */
1859
+ business_connection_id?: string;
1860
+ /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
1861
+ chat_id: number | string;
1862
+ /** Identifier of a message to pin */
1863
+ message_id: number;
1864
+ /**
1865
+ * Pass True if it is not necessary to send a notification to all chat members about the new pinned message
1866
+ * Notifications are always disabled in channels and private chats
1867
+ */
1868
+ disable_notification?: boolean;
1869
+ }
1870
+ interface UnpinChatMessageInput extends Record<string, unknown> {
1871
+ /** Unique identifier of the business connection on behalf of which the message will be unpinned */
1872
+ business_connection_id?: string;
1873
+ /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
1874
+ chat_id: number | string;
1875
+ /**
1876
+ * Identifier of the message to unpin
1877
+ * Required if business_connection_id is specified
1878
+ * If not specified, the most recent pinned message (by sending date) will be unpinned
1879
+ */
1880
+ message_id?: number;
1881
+ }
1882
+ interface UnpinAllChatMessagesInput extends Record<string, unknown> {
1883
+ /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
1884
+ chat_id: number | string;
1885
+ }
1886
+ interface LeaveChatInput extends Record<string, unknown> {
1887
+ /** Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername) */
1888
+ chat_id: number | string;
1889
+ }
1890
+ interface GetChatInput extends Record<string, unknown> {
1891
+ /** Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername) */
1892
+ chat_id: number | string;
1893
+ }
1894
+ interface GetChatAdministratorsInput extends Record<string, unknown> {
1895
+ /** Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername) */
1896
+ chat_id: number | string;
1897
+ }
1898
+ interface GetChatMemberCountInput extends Record<string, unknown> {
1899
+ /** Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername) */
1900
+ chat_id: number | string;
1901
+ }
1902
+ interface GetChatMemberInput extends Record<string, unknown> {
1903
+ /** Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername) */
1904
+ chat_id: number | string;
1905
+ /** Unique identifier of the target user */
1906
+ user_id: number;
1907
+ }
1908
+ interface SetChatStickerSetInput extends Record<string, unknown> {
1909
+ /** Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername) */
1910
+ chat_id: number | string;
1911
+ /** Name of the sticker set to be set as the group sticker set */
1912
+ sticker_set_name: string;
1913
+ }
1914
+ interface DeleteChatStickerSetInput extends Record<string, unknown> {
1915
+ /** Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername) */
1916
+ chat_id: number | string;
1917
+ }
1918
+ interface GetForumTopicIconStickersInput extends Record<string, unknown> {
1919
+ }
1920
+ interface CreateForumTopicInput extends Record<string, unknown> {
1921
+ /** Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername) */
1922
+ chat_id: number | string;
1923
+ /** Topic name, 1-128 characters */
1924
+ name: string;
1925
+ /**
1926
+ * Color of the topic icon in RGB format
1927
+ * Currently, must be one of 7322096 (0x6FB9F0), 16766590 (0xFFD67E), 13338331 (0xCB86DB), 9367192 (0x8EEE98), 16749490 (0xFF93B2), or 16478047 (0xFB6F5F)
1928
+ */
1929
+ icon_color?: number;
1930
+ /**
1931
+ * Unique identifier of the custom emoji shown as the topic icon
1932
+ * Use getForumTopicIconStickers to get all allowed custom emoji identifiers
1933
+ */
1934
+ icon_custom_emoji_id?: string;
1935
+ }
1936
+ interface EditForumTopicInput extends Record<string, unknown> {
1937
+ /** Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername) */
1938
+ chat_id: number | string;
1939
+ /** Unique identifier for the target message thread of the forum topic */
1940
+ message_thread_id: number;
1941
+ /**
1942
+ * New topic name, 0-128 characters
1943
+ * If not specified or empty, the current name of the topic will be kept
1944
+ */
1945
+ name?: string;
1946
+ /**
1947
+ * New unique identifier of the custom emoji shown as the topic icon
1948
+ * Use getForumTopicIconStickers to get all allowed custom emoji identifiers
1949
+ * Pass an empty string to remove the icon
1950
+ * If not specified, the current icon will be kept
1951
+ */
1952
+ icon_custom_emoji_id?: string;
1953
+ }
1954
+ interface CloseForumTopicInput extends Record<string, unknown> {
1955
+ /** Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername) */
1956
+ chat_id: number | string;
1957
+ /** Unique identifier for the target message thread of the forum topic */
1958
+ message_thread_id: number;
1959
+ }
1960
+ interface ReopenForumTopicInput extends Record<string, unknown> {
1961
+ /** Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername) */
1962
+ chat_id: number | string;
1963
+ /** Unique identifier for the target message thread of the forum topic */
1964
+ message_thread_id: number;
1965
+ }
1966
+ interface DeleteForumTopicInput extends Record<string, unknown> {
1967
+ /** Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername) */
1968
+ chat_id: number | string;
1969
+ /** Unique identifier for the target message thread of the forum topic */
1970
+ message_thread_id: number;
1971
+ }
1972
+ interface UnpinAllForumTopicMessagesInput extends Record<string, unknown> {
1973
+ /** Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername) */
1974
+ chat_id: number | string;
1975
+ /** Unique identifier for the target message thread of the forum topic */
1976
+ message_thread_id: number;
1977
+ }
1978
+ interface EditGeneralForumTopicInput extends Record<string, unknown> {
1979
+ /** Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername) */
1980
+ chat_id: number | string;
1981
+ /** New topic name, 1-128 characters */
1982
+ name: string;
1983
+ }
1984
+ interface CloseGeneralForumTopicInput extends Record<string, unknown> {
1985
+ /** Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername) */
1986
+ chat_id: number | string;
1987
+ }
1988
+ interface ReopenGeneralForumTopicInput extends Record<string, unknown> {
1989
+ /** Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername) */
1990
+ chat_id: number | string;
1991
+ }
1992
+ interface HideGeneralForumTopicInput extends Record<string, unknown> {
1993
+ /** Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername) */
1994
+ chat_id: number | string;
1995
+ }
1996
+ interface UnhideGeneralForumTopicInput extends Record<string, unknown> {
1997
+ /** Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername) */
1998
+ chat_id: number | string;
1999
+ }
2000
+ interface UnpinAllGeneralForumTopicMessagesInput extends Record<string, unknown> {
2001
+ /** Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername) */
2002
+ chat_id: number | string;
2003
+ }
2004
+ interface AnswerCallbackQueryInput extends Record<string, unknown> {
2005
+ /** Unique identifier for the query to be answered */
2006
+ callback_query_id: string;
2007
+ /**
2008
+ * Text of the notification
2009
+ * If not specified, nothing will be shown to the user, 0-200 characters
2010
+ */
2011
+ text?: string;
2012
+ /**
2013
+ * If True, an alert will be shown by the client instead of a notification at the top of the chat screen
2014
+ * Defaults to false
2015
+ */
2016
+ show_alert?: boolean;
2017
+ /**
2018
+ * URL that will be opened by the user's client
2019
+ * If you have created a Game and accepted the conditions via @BotFather, specify the URL that opens your game - note that this will only work if the query comes from a callback_game button
2020
+ * Otherwise, you may use links like t
2021
+ * me/your_bot?start=XXXX that open your bot with a parameter
2022
+ */
2023
+ url?: string;
2024
+ /**
2025
+ * The maximum amount of time in seconds that the result of the callback query may be cached client-side
2026
+ * Telegram apps will support caching starting in version 3
2027
+ * 14
2028
+ * Defaults to 0
2029
+ */
2030
+ cache_time?: number;
2031
+ }
2032
+ interface GetUserChatBoostsInput extends Record<string, unknown> {
2033
+ /** Unique identifier for the chat or username of the channel (in the format @channelusername) */
2034
+ chat_id: number | string;
2035
+ /** Unique identifier of the target user */
2036
+ user_id: number;
2037
+ }
2038
+ interface GetBusinessConnectionInput extends Record<string, unknown> {
2039
+ /** Unique identifier of the business connection */
2040
+ business_connection_id: string;
2041
+ }
2042
+ interface SetMyCommandsInput extends Record<string, unknown> {
2043
+ /**
2044
+ * A JSON-serialized list of bot commands to be set as the list of the bot's commands
2045
+ * At most 100 commands can be specified
2046
+ */
2047
+ commands: T.BotCommand[];
2048
+ /**
2049
+ * A JSON-serialized object, describing scope of users for which the commands are relevant
2050
+ * Defaults to BotCommandScopeDefault
2051
+ */
2052
+ scope?: T.BotCommandScope;
2053
+ /**
2054
+ * A two-letter ISO 639-1 language code
2055
+ * If empty, commands will be applied to all users from the given scope, for whose language there are no dedicated commands
2056
+ */
2057
+ language_code?: string;
2058
+ }
2059
+ interface DeleteMyCommandsInput extends Record<string, unknown> {
2060
+ /**
2061
+ * A JSON-serialized object, describing scope of users for which the commands are relevant
2062
+ * Defaults to BotCommandScopeDefault
2063
+ */
2064
+ scope?: T.BotCommandScope;
2065
+ /**
2066
+ * A two-letter ISO 639-1 language code
2067
+ * If empty, commands will be applied to all users from the given scope, for whose language there are no dedicated commands
2068
+ */
2069
+ language_code?: string;
2070
+ }
2071
+ interface GetMyCommandsInput extends Record<string, unknown> {
2072
+ /**
2073
+ * A JSON-serialized object, describing scope of users
2074
+ * Defaults to BotCommandScopeDefault
2075
+ */
2076
+ scope?: T.BotCommandScope;
2077
+ /** A two-letter ISO 639-1 language code or an empty string */
2078
+ language_code?: string;
2079
+ }
2080
+ interface SetMyNameInput extends Record<string, unknown> {
2081
+ /**
2082
+ * New bot name; 0-64 characters
2083
+ * Pass an empty string to remove the dedicated name for the given language
2084
+ */
2085
+ name?: string;
2086
+ /**
2087
+ * A two-letter ISO 639-1 language code
2088
+ * If empty, the name will be shown to all users for whose language there is no dedicated name
2089
+ */
2090
+ language_code?: string;
2091
+ }
2092
+ interface GetMyNameInput extends Record<string, unknown> {
2093
+ /** A two-letter ISO 639-1 language code or an empty string */
2094
+ language_code?: string;
2095
+ }
2096
+ interface SetMyDescriptionInput extends Record<string, unknown> {
2097
+ /**
2098
+ * New bot description; 0-512 characters
2099
+ * Pass an empty string to remove the dedicated description for the given language
2100
+ */
2101
+ description?: string;
2102
+ /**
2103
+ * A two-letter ISO 639-1 language code
2104
+ * If empty, the description will be applied to all users for whose language there is no dedicated description
2105
+ */
2106
+ language_code?: string;
2107
+ }
2108
+ interface GetMyDescriptionInput extends Record<string, unknown> {
2109
+ /** A two-letter ISO 639-1 language code or an empty string */
2110
+ language_code?: string;
2111
+ }
2112
+ interface SetMyShortDescriptionInput extends Record<string, unknown> {
2113
+ /**
2114
+ * New short description for the bot; 0-120 characters
2115
+ * Pass an empty string to remove the dedicated short description for the given language
2116
+ */
2117
+ short_description?: string;
2118
+ /**
2119
+ * A two-letter ISO 639-1 language code
2120
+ * If empty, the short description will be applied to all users for whose language there is no dedicated short description
2121
+ */
2122
+ language_code?: string;
2123
+ }
2124
+ interface GetMyShortDescriptionInput extends Record<string, unknown> {
2125
+ /** A two-letter ISO 639-1 language code or an empty string */
2126
+ language_code?: string;
2127
+ }
2128
+ interface SetChatMenuButtonInput extends Record<string, unknown> {
2129
+ /**
2130
+ * Unique identifier for the target private chat
2131
+ * If not specified, default bot's menu button will be changed
2132
+ */
2133
+ chat_id?: number;
2134
+ /**
2135
+ * A JSON-serialized object for the bot's new menu button
2136
+ * Defaults to MenuButtonDefault
2137
+ */
2138
+ menu_button?: T.MenuButton;
2139
+ }
2140
+ interface GetChatMenuButtonInput extends Record<string, unknown> {
2141
+ /**
2142
+ * Unique identifier for the target private chat
2143
+ * If not specified, default bot's menu button will be returned
2144
+ */
2145
+ chat_id?: number;
2146
+ }
2147
+ interface SetMyDefaultAdministratorRightsInput extends Record<string, unknown> {
2148
+ /**
2149
+ * A JSON-serialized object describing new default administrator rights
2150
+ * If not specified, the default administrator rights will be cleared
2151
+ */
2152
+ rights?: T.ChatAdministratorRights;
2153
+ /**
2154
+ * Pass True to change the default administrator rights of the bot in channels
2155
+ * Otherwise, the default administrator rights of the bot for groups and supergroups will be changed
2156
+ */
2157
+ for_channels?: boolean;
2158
+ }
2159
+ interface GetMyDefaultAdministratorRightsInput extends Record<string, unknown> {
2160
+ /**
2161
+ * Pass True to get default administrator rights of the bot in channels
2162
+ * Otherwise, default administrator rights of the bot for groups and supergroups will be returned
2163
+ */
2164
+ for_channels?: boolean;
2165
+ }
2166
+ interface EditMessageTextInput extends Record<string, unknown> {
2167
+ /** Unique identifier of the business connection on behalf of which the message to be edited was sent */
2168
+ business_connection_id?: string;
2169
+ /**
2170
+ * Required if inline_message_id is not specified
2171
+ * Unique identifier for the target chat or username of the target channel (in the format @channelusername)
2172
+ */
2173
+ chat_id?: number | string;
2174
+ /**
2175
+ * Required if inline_message_id is not specified
2176
+ * Identifier of the message to edit
2177
+ */
2178
+ message_id?: number;
2179
+ /**
2180
+ * Required if chat_id and message_id are not specified
2181
+ * Identifier of the inline message
2182
+ */
2183
+ inline_message_id?: string;
2184
+ /** New text of the message, 1-4096 characters after entities parsing */
2185
+ text: string;
2186
+ /**
2187
+ * Mode for parsing entities in the message text
2188
+ * See formatting options for more details
2189
+ */
2190
+ parse_mode?: string;
2191
+ /** A JSON-serialized list of special entities that appear in message text, which can be specified instead of parse_mode */
2192
+ entities?: T.MessageEntity[];
2193
+ /** Link preview generation options for the message */
2194
+ link_preview_options?: T.LinkPreviewOptions;
2195
+ /** A JSON-serialized object for an inline keyboard */
2196
+ reply_markup?: T.InlineKeyboardMarkup;
2197
+ }
2198
+ interface EditMessageCaptionInput extends Record<string, unknown> {
2199
+ /** Unique identifier of the business connection on behalf of which the message to be edited was sent */
2200
+ business_connection_id?: string;
2201
+ /**
2202
+ * Required if inline_message_id is not specified
2203
+ * Unique identifier for the target chat or username of the target channel (in the format @channelusername)
2204
+ */
2205
+ chat_id?: number | string;
2206
+ /**
2207
+ * Required if inline_message_id is not specified
2208
+ * Identifier of the message to edit
2209
+ */
2210
+ message_id?: number;
2211
+ /**
2212
+ * Required if chat_id and message_id are not specified
2213
+ * Identifier of the inline message
2214
+ */
2215
+ inline_message_id?: string;
2216
+ /** New caption of the message, 0-1024 characters after entities parsing */
2217
+ caption?: string;
2218
+ /**
2219
+ * Mode for parsing entities in the message caption
2220
+ * See formatting options for more details
2221
+ */
2222
+ parse_mode?: string;
2223
+ /** A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode */
2224
+ caption_entities?: T.MessageEntity[];
2225
+ /**
2226
+ * Pass True, if the caption must be shown above the message media
2227
+ * Supported only for animation, photo and video messages
2228
+ */
2229
+ show_caption_above_media?: boolean;
2230
+ /** A JSON-serialized object for an inline keyboard */
2231
+ reply_markup?: T.InlineKeyboardMarkup;
2232
+ }
2233
+ interface EditMessageMediaInput extends Record<string, unknown> {
2234
+ /** Unique identifier of the business connection on behalf of which the message to be edited was sent */
2235
+ business_connection_id?: string;
2236
+ /**
2237
+ * Required if inline_message_id is not specified
2238
+ * Unique identifier for the target chat or username of the target channel (in the format @channelusername)
2239
+ */
2240
+ chat_id?: number | string;
2241
+ /**
2242
+ * Required if inline_message_id is not specified
2243
+ * Identifier of the message to edit
2244
+ */
2245
+ message_id?: number;
2246
+ /**
2247
+ * Required if chat_id and message_id are not specified
2248
+ * Identifier of the inline message
2249
+ */
2250
+ inline_message_id?: string;
2251
+ /** A JSON-serialized object for a new media content of the message */
2252
+ media: T.InputMedia;
2253
+ /** A JSON-serialized object for a new inline keyboard */
2254
+ reply_markup?: T.InlineKeyboardMarkup;
2255
+ }
2256
+ interface EditMessageLiveLocationInput extends Record<string, unknown> {
2257
+ /** Unique identifier of the business connection on behalf of which the message to be edited was sent */
2258
+ business_connection_id?: string;
2259
+ /**
2260
+ * Required if inline_message_id is not specified
2261
+ * Unique identifier for the target chat or username of the target channel (in the format @channelusername)
2262
+ */
2263
+ chat_id?: number | string;
2264
+ /**
2265
+ * Required if inline_message_id is not specified
2266
+ * Identifier of the message to edit
2267
+ */
2268
+ message_id?: number;
2269
+ /**
2270
+ * Required if chat_id and message_id are not specified
2271
+ * Identifier of the inline message
2272
+ */
2273
+ inline_message_id?: string;
2274
+ /** Latitude of new location */
2275
+ latitude: number;
2276
+ /** Longitude of new location */
2277
+ longitude: number;
2278
+ /**
2279
+ * New period in seconds during which the location can be updated, starting from the message send date
2280
+ * If 0x7FFFFFFF is specified, then the location can be updated forever
2281
+ * Otherwise, the new value must not exceed the current live_period by more than a day, and the live location expiration date must remain within the next 90 days
2282
+ * If not specified, then live_period remains unchanged
2283
+ */
2284
+ live_period?: number;
2285
+ /** The radius of uncertainty for the location, measured in meters; 0-1500 */
2286
+ horizontal_accuracy?: number;
2287
+ /**
2288
+ * Direction in which the user is moving, in degrees
2289
+ * Must be between 1 and 360 if specified
2290
+ */
2291
+ heading?: number;
2292
+ /**
2293
+ * The maximum distance for proximity alerts about approaching another chat member, in meters
2294
+ * Must be between 1 and 100000 if specified
2295
+ */
2296
+ proximity_alert_radius?: number;
2297
+ /** A JSON-serialized object for a new inline keyboard */
2298
+ reply_markup?: T.InlineKeyboardMarkup;
2299
+ }
2300
+ interface StopMessageLiveLocationInput extends Record<string, unknown> {
2301
+ /** Unique identifier of the business connection on behalf of which the message to be edited was sent */
2302
+ business_connection_id?: string;
2303
+ /**
2304
+ * Required if inline_message_id is not specified
2305
+ * Unique identifier for the target chat or username of the target channel (in the format @channelusername)
2306
+ */
2307
+ chat_id?: number | string;
2308
+ /**
2309
+ * Required if inline_message_id is not specified
2310
+ * Identifier of the message with live location to stop
2311
+ */
2312
+ message_id?: number;
2313
+ /**
2314
+ * Required if chat_id and message_id are not specified
2315
+ * Identifier of the inline message
2316
+ */
2317
+ inline_message_id?: string;
2318
+ /** A JSON-serialized object for a new inline keyboard */
2319
+ reply_markup?: T.InlineKeyboardMarkup;
2320
+ }
2321
+ interface EditMessageReplyMarkupInput extends Record<string, unknown> {
2322
+ /** Unique identifier of the business connection on behalf of which the message to be edited was sent */
2323
+ business_connection_id?: string;
2324
+ /**
2325
+ * Required if inline_message_id is not specified
2326
+ * Unique identifier for the target chat or username of the target channel (in the format @channelusername)
2327
+ */
2328
+ chat_id?: number | string;
2329
+ /**
2330
+ * Required if inline_message_id is not specified
2331
+ * Identifier of the message to edit
2332
+ */
2333
+ message_id?: number;
2334
+ /**
2335
+ * Required if chat_id and message_id are not specified
2336
+ * Identifier of the inline message
2337
+ */
2338
+ inline_message_id?: string;
2339
+ /** A JSON-serialized object for an inline keyboard */
2340
+ reply_markup?: T.InlineKeyboardMarkup;
2341
+ }
2342
+ interface StopPollInput extends Record<string, unknown> {
2343
+ /** Unique identifier of the business connection on behalf of which the message to be edited was sent */
2344
+ business_connection_id?: string;
2345
+ /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
2346
+ chat_id: number | string;
2347
+ /** Identifier of the original message with the poll */
2348
+ message_id: number;
2349
+ /** A JSON-serialized object for a new message inline keyboard */
2350
+ reply_markup?: T.InlineKeyboardMarkup;
2351
+ }
2352
+ interface DeleteMessageInput extends Record<string, unknown> {
2353
+ /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
2354
+ chat_id: number | string;
2355
+ /** Identifier of the message to delete */
2356
+ message_id: number;
2357
+ }
2358
+ interface DeleteMessagesInput extends Record<string, unknown> {
2359
+ /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
2360
+ chat_id: number | string;
2361
+ /**
2362
+ * A JSON-serialized list of 1-100 identifiers of messages to delete
2363
+ * See deleteMessage for limitations on which messages can be deleted
2364
+ */
2365
+ message_ids: number[];
2366
+ }
2367
+ interface SendStickerInput extends Record<string, unknown> {
2368
+ /** Unique identifier of the business connection on behalf of which the message will be sent */
2369
+ business_connection_id?: string;
2370
+ /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
2371
+ chat_id: number | string;
2372
+ /** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
2373
+ message_thread_id?: number;
2374
+ /**
2375
+ * Sticker to send
2376
+ * Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a
2377
+ * WEBP sticker from the Internet, or upload a new
2378
+ * WEBP,
2379
+ * TGS, or
2380
+ * WEBM sticker using multipart/form-data
2381
+ * More information on Sending Files »
2382
+ * Video and animated stickers can't be sent via an HTTP URL
2383
+ */
2384
+ sticker: T.InputFile | string;
2385
+ /** Emoji associated with the sticker; only for just uploaded stickers */
2386
+ emoji?: string;
2387
+ /**
2388
+ * Sends the message silently
2389
+ * Users will receive a notification with no sound
2390
+ */
2391
+ disable_notification?: boolean;
2392
+ /** Protects the contents of the sent message from forwarding and saving */
2393
+ protect_content?: boolean;
2394
+ /**
2395
+ * Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0
2396
+ * 1 Telegram Stars per message
2397
+ * The relevant Stars will be withdrawn from the bot's balance
2398
+ */
2399
+ allow_paid_broadcast?: boolean;
2400
+ /** Unique identifier of the message effect to be added to the message; for private chats only */
2401
+ message_effect_id?: string;
2402
+ /** Description of the message to reply to */
2403
+ reply_parameters?: T.ReplyParameters;
2404
+ /**
2405
+ * Additional interface options
2406
+ * A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user
2407
+ */
2408
+ reply_markup?: T.InlineKeyboardMarkup | T.ReplyKeyboardMarkup | T.ReplyKeyboardRemove | T.ForceReply;
2409
+ }
2410
+ interface GetStickerSetInput extends Record<string, unknown> {
2411
+ /** Name of the sticker set */
2412
+ name: string;
2413
+ }
2414
+ interface GetCustomEmojiStickersInput extends Record<string, unknown> {
2415
+ /**
2416
+ * A JSON-serialized list of custom emoji identifiers
2417
+ * At most 200 custom emoji identifiers can be specified
2418
+ */
2419
+ custom_emoji_ids: string[];
2420
+ }
2421
+ interface UploadStickerFileInput extends Record<string, unknown> {
2422
+ /** User identifier of sticker file owner */
2423
+ user_id: number;
2424
+ /**
2425
+ * A file with the sticker in
2426
+ * WEBP,
2427
+ * PNG,
2428
+ * TGS, or
2429
+ * WEBM format
2430
+ * See https://core
2431
+ * telegram
2432
+ * org/stickers for technical requirements
2433
+ * More information on Sending Files »
2434
+ */
2435
+ sticker: T.InputFile;
2436
+ /** Format of the sticker, must be one of “static”, “animated”, “video” */
2437
+ sticker_format: string;
2438
+ }
2439
+ interface CreateNewStickerSetInput extends Record<string, unknown> {
2440
+ /** User identifier of created sticker set owner */
2441
+ user_id: number;
2442
+ /**
2443
+ * Short name of sticker set, to be used in t
2444
+ * me/addstickers/ URLs (e
2445
+ * g
2446
+ * , animals)
2447
+ * Can contain only English letters, digits and underscores
2448
+ * Must begin with a letter, can't contain consecutive underscores and must end in "_by_<bot_username>"
2449
+ * <bot_username> is case insensitive
2450
+ * 1-64 characters
2451
+ */
2452
+ name: string;
2453
+ /** Sticker set title, 1-64 characters */
2454
+ title: string;
2455
+ /** A JSON-serialized list of 1-50 initial stickers to be added to the sticker set */
2456
+ stickers: T.InputSticker[];
2457
+ /**
2458
+ * Type of stickers in the set, pass “regular”, “mask”, or “custom_emoji”
2459
+ * By default, a regular sticker set is created
2460
+ */
2461
+ sticker_type?: string;
2462
+ /** Pass True if stickers in the sticker set must be repainted to the color of text when used in messages, the accent color if used as emoji status, white on chat photos, or another appropriate color based on context; for custom emoji sticker sets only */
2463
+ needs_repainting?: boolean;
2464
+ }
2465
+ interface AddStickerToSetInput extends Record<string, unknown> {
2466
+ /** User identifier of sticker set owner */
2467
+ user_id: number;
2468
+ /** Sticker set name */
2469
+ name: string;
2470
+ /**
2471
+ * A JSON-serialized object with information about the added sticker
2472
+ * If exactly the same sticker had already been added to the set, then the set isn't changed
2473
+ */
2474
+ sticker: T.InputSticker;
2475
+ }
2476
+ interface SetStickerPositionInSetInput extends Record<string, unknown> {
2477
+ /** File identifier of the sticker */
2478
+ sticker: string;
2479
+ /** New sticker position in the set, zero-based */
2480
+ position: number;
2481
+ }
2482
+ interface DeleteStickerFromSetInput extends Record<string, unknown> {
2483
+ /** File identifier of the sticker */
2484
+ sticker: string;
2485
+ }
2486
+ interface ReplaceStickerInSetInput extends Record<string, unknown> {
2487
+ /** User identifier of the sticker set owner */
2488
+ user_id: number;
2489
+ /** Sticker set name */
2490
+ name: string;
2491
+ /** File identifier of the replaced sticker */
2492
+ old_sticker: string;
2493
+ /**
2494
+ * A JSON-serialized object with information about the added sticker
2495
+ * If exactly the same sticker had already been added to the set, then the set remains unchanged
2496
+ */
2497
+ sticker: T.InputSticker;
2498
+ }
2499
+ interface SetStickerEmojiListInput extends Record<string, unknown> {
2500
+ /** File identifier of the sticker */
2501
+ sticker: string;
2502
+ /** A JSON-serialized list of 1-20 emoji associated with the sticker */
2503
+ emoji_list: string[];
2504
+ }
2505
+ interface SetStickerKeywordsInput extends Record<string, unknown> {
2506
+ /** File identifier of the sticker */
2507
+ sticker: string;
2508
+ /** A JSON-serialized list of 0-20 search keywords for the sticker with total length of up to 64 characters */
2509
+ keywords?: string[];
2510
+ }
2511
+ interface SetStickerMaskPositionInput extends Record<string, unknown> {
2512
+ /** File identifier of the sticker */
2513
+ sticker: string;
2514
+ /**
2515
+ * A JSON-serialized object with the position where the mask should be placed on faces
2516
+ * Omit the parameter to remove the mask position
2517
+ */
2518
+ mask_position?: T.MaskPosition;
2519
+ }
2520
+ interface SetStickerSetTitleInput extends Record<string, unknown> {
2521
+ /** Sticker set name */
2522
+ name: string;
2523
+ /** Sticker set title, 1-64 characters */
2524
+ title: string;
2525
+ }
2526
+ interface SetStickerSetThumbnailInput extends Record<string, unknown> {
2527
+ /** Sticker set name */
2528
+ name: string;
2529
+ /** User identifier of the sticker set owner */
2530
+ user_id: number;
2531
+ /**
2532
+ * A
2533
+ * WEBP or
2534
+ * PNG image with the thumbnail, must be up to 128 kilobytes in size and have a width and height of exactly 100px, or a
2535
+ * TGS animation with a thumbnail up to 32 kilobytes in size (see https://core
2536
+ * telegram
2537
+ * org/stickers#animation-requirements for animated sticker technical requirements), or a WEBM video with the thumbnail up to 32 kilobytes in size; see https://core
2538
+ * telegram
2539
+ * org/stickers#video-requirements for video sticker technical requirements
2540
+ * 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 upload a new one using multipart/form-data
2541
+ * More information on Sending Files »
2542
+ * Animated and video sticker set thumbnails can't be uploaded via HTTP URL
2543
+ * If omitted, then the thumbnail is dropped and the first sticker is used as the thumbnail
2544
+ */
2545
+ thumbnail?: T.InputFile | string;
2546
+ /**
2547
+ * Format of the thumbnail, must be one of “static” for a
2548
+ * WEBP or
2549
+ * PNG image, “animated” for a
2550
+ * TGS animation, or “video” for a WEBM video
2551
+ */
2552
+ format: string;
2553
+ }
2554
+ interface SetCustomEmojiStickerSetThumbnailInput extends Record<string, unknown> {
2555
+ /** Sticker set name */
2556
+ name: string;
2557
+ /** Custom emoji identifier of a sticker from the sticker set; pass an empty string to drop the thumbnail and use the first sticker as the thumbnail */
2558
+ custom_emoji_id?: string;
2559
+ }
2560
+ interface DeleteStickerSetInput extends Record<string, unknown> {
2561
+ /** Sticker set name */
2562
+ name: string;
2563
+ }
2564
+ interface GetAvailableGiftsInput extends Record<string, unknown> {
2565
+ }
2566
+ interface SendGiftInput extends Record<string, unknown> {
2567
+ /** Unique identifier of the target user that will receive the gift */
2568
+ user_id: number;
2569
+ /** Identifier of the gift */
2570
+ gift_id: string;
2571
+ /** Text that will be shown along with the gift; 0-255 characters */
2572
+ text?: string;
2573
+ /**
2574
+ * Mode for parsing entities in the text
2575
+ * See formatting options for more details
2576
+ * Entities other than “bold”, “italic”, “underline”, “strikethrough”, “spoiler”, and “custom_emoji” are ignored
2577
+ */
2578
+ text_parse_mode?: string;
2579
+ /**
2580
+ * A JSON-serialized list of special entities that appear in the gift text
2581
+ * It can be specified instead of text_parse_mode
2582
+ * Entities other than “bold”, “italic”, “underline”, “strikethrough”, “spoiler”, and “custom_emoji” are ignored
2583
+ */
2584
+ text_entities?: T.MessageEntity[];
2585
+ }
2586
+ interface AnswerInlineQueryInput extends Record<string, unknown> {
2587
+ /** Unique identifier for the answered query */
2588
+ inline_query_id: string;
2589
+ /** A JSON-serialized array of results for the inline query */
2590
+ results: T.InlineQueryResult[];
2591
+ /**
2592
+ * The maximum amount of time in seconds that the result of the inline query may be cached on the server
2593
+ * Defaults to 300
2594
+ */
2595
+ cache_time?: number;
2596
+ /**
2597
+ * Pass True if results may be cached on the server side only for the user that sent the query
2598
+ * By default, results may be returned to any user who sends the same query
2599
+ */
2600
+ is_personal?: boolean;
2601
+ /**
2602
+ * Pass the offset that a client should send in the next query with the same text to receive more results
2603
+ * Pass an empty string if there are no more results or if you don't support pagination
2604
+ * Offset length can't exceed 64 bytes
2605
+ */
2606
+ next_offset?: string;
2607
+ /** A JSON-serialized object describing a button to be shown above inline query results */
2608
+ button?: T.InlineQueryResultsButton;
2609
+ }
2610
+ interface AnswerWebAppQueryInput extends Record<string, unknown> {
2611
+ /** Unique identifier for the query to be answered */
2612
+ web_app_query_id: string;
2613
+ /** A JSON-serialized object describing the message to be sent */
2614
+ result: T.InlineQueryResult;
2615
+ }
2616
+ interface SavePreparedInlineMessageInput extends Record<string, unknown> {
2617
+ /** Unique identifier of the target user that can use the prepared message */
2618
+ user_id: number;
2619
+ /** A JSON-serialized object describing the message to be sent */
2620
+ result: T.InlineQueryResult;
2621
+ /** Pass True if the message can be sent to private chats with users */
2622
+ allow_user_chats?: boolean;
2623
+ /** Pass True if the message can be sent to private chats with bots */
2624
+ allow_bot_chats?: boolean;
2625
+ /** Pass True if the message can be sent to group and supergroup chats */
2626
+ allow_group_chats?: boolean;
2627
+ /** Pass True if the message can be sent to channel chats */
2628
+ allow_channel_chats?: boolean;
2629
+ }
2630
+ interface SendInvoiceInput extends Record<string, unknown> {
2631
+ /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
2632
+ chat_id: number | string;
2633
+ /** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
2634
+ message_thread_id?: number;
2635
+ /** Product name, 1-32 characters */
2636
+ title: string;
2637
+ /** Product description, 1-255 characters */
2638
+ description: string;
2639
+ /**
2640
+ * Bot-defined invoice payload, 1-128 bytes
2641
+ * This will not be displayed to the user, use it for your internal processes
2642
+ */
2643
+ payload: string;
2644
+ /**
2645
+ * Payment provider token, obtained via @BotFather
2646
+ * Pass an empty string for payments in Telegram Stars
2647
+ */
2648
+ provider_token?: string;
2649
+ /**
2650
+ * Three-letter ISO 4217 currency code, see more on currencies
2651
+ * Pass “XTR” for payments in Telegram Stars
2652
+ */
2653
+ currency: string;
2654
+ /**
2655
+ * Price breakdown, a JSON-serialized list of components (e
2656
+ * g
2657
+ * product price, tax, discount, delivery cost, delivery tax, bonus, etc
2658
+ * Must contain exactly one item for payments in Telegram Stars
2659
+ */
2660
+ prices: T.LabeledPrice[];
2661
+ /**
2662
+ * The maximum accepted amount for tips in the smallest units of the currency (integer, not float/double)
2663
+ * For example, for a maximum tip of US$ 1
2664
+ * 45 pass max_tip_amount = 145
2665
+ * See the exp parameter in currencies
2666
+ * json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)
2667
+ * Defaults to 0
2668
+ * Not supported for payments in Telegram Stars
2669
+ */
2670
+ max_tip_amount?: number;
2671
+ /**
2672
+ * A JSON-serialized array of suggested amounts of tips in the smallest units of the currency (integer, not float/double)
2673
+ * At most 4 suggested tip amounts can be specified
2674
+ * The suggested tip amounts must be positive, passed in a strictly increased order and must not exceed max_tip_amount
2675
+ */
2676
+ suggested_tip_amounts?: number[];
2677
+ /**
2678
+ * Unique deep-linking parameter
2679
+ * If left empty, forwarded copies of the sent message will have a Pay button, allowing multiple users to pay directly from the forwarded message, using the same invoice
2680
+ * If non-empty, forwarded copies of the sent message will have a URL button with a deep link to the bot (instead of a Pay button), with the value used as the start parameter
2681
+ */
2682
+ start_parameter?: string;
2683
+ /**
2684
+ * JSON-serialized data about the invoice, which will be shared with the payment provider
2685
+ * A detailed description of required fields should be provided by the payment provider
2686
+ */
2687
+ provider_data?: string;
2688
+ /**
2689
+ * URL of the product photo for the invoice
2690
+ * Can be a photo of the goods or a marketing image for a service
2691
+ * People like it better when they see what they are paying for
2692
+ */
2693
+ photo_url?: string;
2694
+ /** Photo size in bytes */
2695
+ photo_size?: number;
2696
+ /** Photo width */
2697
+ photo_width?: number;
2698
+ /** Photo height */
2699
+ photo_height?: number;
2700
+ /**
2701
+ * Pass True if you require the user's full name to complete the order
2702
+ * Ignored for payments in Telegram Stars
2703
+ */
2704
+ need_name?: boolean;
2705
+ /**
2706
+ * Pass True if you require the user's phone number to complete the order
2707
+ * Ignored for payments in Telegram Stars
2708
+ */
2709
+ need_phone_number?: boolean;
2710
+ /**
2711
+ * Pass True if you require the user's email address to complete the order
2712
+ * Ignored for payments in Telegram Stars
2713
+ */
2714
+ need_email?: boolean;
2715
+ /**
2716
+ * Pass True if you require the user's shipping address to complete the order
2717
+ * Ignored for payments in Telegram Stars
2718
+ */
2719
+ need_shipping_address?: boolean;
2720
+ /**
2721
+ * Pass True if the user's phone number should be sent to the provider
2722
+ * Ignored for payments in Telegram Stars
2723
+ */
2724
+ send_phone_number_to_provider?: boolean;
2725
+ /**
2726
+ * Pass True if the user's email address should be sent to the provider
2727
+ * Ignored for payments in Telegram Stars
2728
+ */
2729
+ send_email_to_provider?: boolean;
2730
+ /**
2731
+ * Pass True if the final price depends on the shipping method
2732
+ * Ignored for payments in Telegram Stars
2733
+ */
2734
+ is_flexible?: boolean;
2735
+ /**
2736
+ * Sends the message silently
2737
+ * Users will receive a notification with no sound
2738
+ */
2739
+ disable_notification?: boolean;
2740
+ /** Protects the contents of the sent message from forwarding and saving */
2741
+ protect_content?: boolean;
2742
+ /**
2743
+ * Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0
2744
+ * 1 Telegram Stars per message
2745
+ * The relevant Stars will be withdrawn from the bot's balance
2746
+ */
2747
+ allow_paid_broadcast?: boolean;
2748
+ /** Unique identifier of the message effect to be added to the message; for private chats only */
2749
+ message_effect_id?: string;
2750
+ /** Description of the message to reply to */
2751
+ reply_parameters?: T.ReplyParameters;
2752
+ /**
2753
+ * A JSON-serialized object for an inline keyboard
2754
+ * If empty, one 'Pay total price' button will be shown
2755
+ * If not empty, the first button must be a Pay button
2756
+ */
2757
+ reply_markup?: T.InlineKeyboardMarkup;
2758
+ }
2759
+ interface CreateInvoiceLinkInput extends Record<string, unknown> {
2760
+ /**
2761
+ * Unique identifier of the business connection on behalf of which the link will be created
2762
+ * For payments in Telegram Stars only
2763
+ */
2764
+ business_connection_id?: string;
2765
+ /** Product name, 1-32 characters */
2766
+ title: string;
2767
+ /** Product description, 1-255 characters */
2768
+ description: string;
2769
+ /**
2770
+ * Bot-defined invoice payload, 1-128 bytes
2771
+ * This will not be displayed to the user, use it for your internal processes
2772
+ */
2773
+ payload: string;
2774
+ /**
2775
+ * Payment provider token, obtained via @BotFather
2776
+ * Pass an empty string for payments in Telegram Stars
2777
+ */
2778
+ provider_token?: string;
2779
+ /**
2780
+ * Three-letter ISO 4217 currency code, see more on currencies
2781
+ * Pass “XTR” for payments in Telegram Stars
2782
+ */
2783
+ currency: string;
2784
+ /**
2785
+ * Price breakdown, a JSON-serialized list of components (e
2786
+ * g
2787
+ * product price, tax, discount, delivery cost, delivery tax, bonus, etc
2788
+ * Must contain exactly one item for payments in Telegram Stars
2789
+ */
2790
+ prices: T.LabeledPrice[];
2791
+ /**
2792
+ * The number of seconds the subscription will be active for before the next payment
2793
+ * The currency must be set to “XTR” (Telegram Stars) if the parameter is used
2794
+ * Currently, it must always be 2592000 (30 days) if specified
2795
+ * Any number of subscriptions can be active for a given bot at the same time, including multiple concurrent subscriptions from the same user
2796
+ * Subscription price must no exceed 2500 Telegram Stars
2797
+ */
2798
+ subscription_period?: number;
2799
+ /**
2800
+ * The maximum accepted amount for tips in the smallest units of the currency (integer, not float/double)
2801
+ * For example, for a maximum tip of US$ 1
2802
+ * 45 pass max_tip_amount = 145
2803
+ * See the exp parameter in currencies
2804
+ * json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)
2805
+ * Defaults to 0
2806
+ * Not supported for payments in Telegram Stars
2807
+ */
2808
+ max_tip_amount?: number;
2809
+ /**
2810
+ * A JSON-serialized array of suggested amounts of tips in the smallest units of the currency (integer, not float/double)
2811
+ * At most 4 suggested tip amounts can be specified
2812
+ * The suggested tip amounts must be positive, passed in a strictly increased order and must not exceed max_tip_amount
2813
+ */
2814
+ suggested_tip_amounts?: number[];
2815
+ /**
2816
+ * JSON-serialized data about the invoice, which will be shared with the payment provider
2817
+ * A detailed description of required fields should be provided by the payment provider
2818
+ */
2819
+ provider_data?: string;
2820
+ /**
2821
+ * URL of the product photo for the invoice
2822
+ * Can be a photo of the goods or a marketing image for a service
2823
+ */
2824
+ photo_url?: string;
2825
+ /** Photo size in bytes */
2826
+ photo_size?: number;
2827
+ /** Photo width */
2828
+ photo_width?: number;
2829
+ /** Photo height */
2830
+ photo_height?: number;
2831
+ /**
2832
+ * Pass True if you require the user's full name to complete the order
2833
+ * Ignored for payments in Telegram Stars
2834
+ */
2835
+ need_name?: boolean;
2836
+ /**
2837
+ * Pass True if you require the user's phone number to complete the order
2838
+ * Ignored for payments in Telegram Stars
2839
+ */
2840
+ need_phone_number?: boolean;
2841
+ /**
2842
+ * Pass True if you require the user's email address to complete the order
2843
+ * Ignored for payments in Telegram Stars
2844
+ */
2845
+ need_email?: boolean;
2846
+ /**
2847
+ * Pass True if you require the user's shipping address to complete the order
2848
+ * Ignored for payments in Telegram Stars
2849
+ */
2850
+ need_shipping_address?: boolean;
2851
+ /**
2852
+ * Pass True if the user's phone number should be sent to the provider
2853
+ * Ignored for payments in Telegram Stars
2854
+ */
2855
+ send_phone_number_to_provider?: boolean;
2856
+ /**
2857
+ * Pass True if the user's email address should be sent to the provider
2858
+ * Ignored for payments in Telegram Stars
2859
+ */
2860
+ send_email_to_provider?: boolean;
2861
+ /**
2862
+ * Pass True if the final price depends on the shipping method
2863
+ * Ignored for payments in Telegram Stars
2864
+ */
2865
+ is_flexible?: boolean;
2866
+ }
2867
+ interface AnswerShippingQueryInput extends Record<string, unknown> {
2868
+ /** Unique identifier for the query to be answered */
2869
+ shipping_query_id: string;
2870
+ /** Pass True if delivery to the specified address is possible and False if there are any problems (for example, if delivery to the specified address is not possible) */
2871
+ ok: boolean;
2872
+ /**
2873
+ * Required if ok is True
2874
+ * A JSON-serialized array of available shipping options
2875
+ */
2876
+ shipping_options?: T.ShippingOption[];
2877
+ /**
2878
+ * Required if ok is False
2879
+ * Error message in human readable form that explains why it is impossible to complete the order (e
2880
+ * g
2881
+ * "Sorry, delivery to your desired address is unavailable')
2882
+ * Telegram will display this message to the user
2883
+ */
2884
+ error_message?: string;
2885
+ }
2886
+ interface AnswerPreCheckoutQueryInput extends Record<string, unknown> {
2887
+ /** Unique identifier for the query to be answered */
2888
+ pre_checkout_query_id: string;
2889
+ /**
2890
+ * Specify True if everything is alright (goods are available, etc
2891
+ * ) and the bot is ready to proceed with the order
2892
+ * Use False if there are any problems
2893
+ */
2894
+ ok: boolean;
2895
+ /**
2896
+ * Required if ok is False
2897
+ * Error message in human readable form that explains the reason for failure to proceed with the checkout (e
2898
+ * g
2899
+ * "Sorry, somebody just bought the last of our amazing black T-shirts while you were busy filling out your payment details
2900
+ * Please choose a different color or garment!")
2901
+ * Telegram will display this message to the user
2902
+ */
2903
+ error_message?: string;
2904
+ }
2905
+ interface GetStarTransactionsInput extends Record<string, unknown> {
2906
+ /** Number of transactions to skip in the response */
2907
+ offset?: number;
2908
+ /**
2909
+ * The maximum number of transactions to be retrieved
2910
+ * Values between 1-100 are accepted
2911
+ * Defaults to 100
2912
+ */
2913
+ limit?: number;
2914
+ }
2915
+ interface RefundStarPaymentInput extends Record<string, unknown> {
2916
+ /** Identifier of the user whose payment will be refunded */
2917
+ user_id: number;
2918
+ /** Telegram payment identifier */
2919
+ telegram_payment_charge_id: string;
2920
+ }
2921
+ interface EditUserStarSubscriptionInput extends Record<string, unknown> {
2922
+ /** Identifier of the user whose subscription will be edited */
2923
+ user_id: number;
2924
+ /** Telegram payment identifier for the subscription */
2925
+ telegram_payment_charge_id: string;
2926
+ /**
2927
+ * Pass True to cancel extension of the user subscription; the subscription must be active up to the end of the current subscription period
2928
+ * Pass False to allow the user to re-enable a subscription that was previously canceled by the bot
2929
+ */
2930
+ is_canceled: boolean;
2931
+ }
2932
+ interface SetPassportDataErrorsInput extends Record<string, unknown> {
2933
+ /** User identifier */
2934
+ user_id: number;
2935
+ /** A JSON-serialized array describing the errors */
2936
+ errors: T.PassportElementError[];
2937
+ }
2938
+ interface SendGameInput extends Record<string, unknown> {
2939
+ /** Unique identifier of the business connection on behalf of which the message will be sent */
2940
+ business_connection_id?: string;
2941
+ /** Unique identifier for the target chat */
2942
+ chat_id: number;
2943
+ /** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
2944
+ message_thread_id?: number;
2945
+ /**
2946
+ * Short name of the game, serves as the unique identifier for the game
2947
+ * Set up your games via @BotFather
2948
+ */
2949
+ game_short_name: string;
2950
+ /**
2951
+ * Sends the message silently
2952
+ * Users will receive a notification with no sound
2953
+ */
2954
+ disable_notification?: boolean;
2955
+ /** Protects the contents of the sent message from forwarding and saving */
2956
+ protect_content?: boolean;
2957
+ /**
2958
+ * Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0
2959
+ * 1 Telegram Stars per message
2960
+ * The relevant Stars will be withdrawn from the bot's balance
2961
+ */
2962
+ allow_paid_broadcast?: boolean;
2963
+ /** Unique identifier of the message effect to be added to the message; for private chats only */
2964
+ message_effect_id?: string;
2965
+ /** Description of the message to reply to */
2966
+ reply_parameters?: T.ReplyParameters;
2967
+ /**
2968
+ * A JSON-serialized object for an inline keyboard
2969
+ * If empty, one 'Play game_title' button will be shown
2970
+ * If not empty, the first button must launch the game
2971
+ */
2972
+ reply_markup?: T.InlineKeyboardMarkup;
2973
+ }
2974
+ interface SetGameScoreInput extends Record<string, unknown> {
2975
+ /** User identifier */
2976
+ user_id: number;
2977
+ /** New score, must be non-negative */
2978
+ score: number;
2979
+ /**
2980
+ * Pass True if the high score is allowed to decrease
2981
+ * This can be useful when fixing mistakes or banning cheaters
2982
+ */
2983
+ force?: boolean;
2984
+ /** Pass True if the game message should not be automatically edited to include the current scoreboard */
2985
+ disable_edit_message?: boolean;
2986
+ /**
2987
+ * Required if inline_message_id is not specified
2988
+ * Unique identifier for the target chat
2989
+ */
2990
+ chat_id?: number;
2991
+ /**
2992
+ * Required if inline_message_id is not specified
2993
+ * Identifier of the sent message
2994
+ */
2995
+ message_id?: number;
2996
+ /**
2997
+ * Required if chat_id and message_id are not specified
2998
+ * Identifier of the inline message
2999
+ */
3000
+ inline_message_id?: string;
3001
+ }
3002
+ interface GetGameHighScoresInput extends Record<string, unknown> {
3003
+ /** Target user id */
3004
+ user_id: number;
3005
+ /**
3006
+ * Required if inline_message_id is not specified
3007
+ * Unique identifier for the target chat
3008
+ */
3009
+ chat_id?: number;
3010
+ /**
3011
+ * Required if inline_message_id is not specified
3012
+ * Identifier of the sent message
3013
+ */
3014
+ message_id?: number;
3015
+ /**
3016
+ * Required if chat_id and message_id are not specified
3017
+ * Identifier of the inline message
3018
+ */
3019
+ inline_message_id?: string;
3020
+ }
3021
+ export {};