@grom.js/effect-tg 0.4.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (122) hide show
  1. package/dist/Bot.d.ts +5 -1
  2. package/dist/Bot.d.ts.map +1 -1
  3. package/dist/Bot.js +2 -0
  4. package/dist/Bot.js.map +1 -0
  5. package/dist/BotApi.d.ts +12 -3
  6. package/dist/BotApi.d.ts.map +1 -1
  7. package/dist/BotApi.js +7 -2
  8. package/dist/BotApi.js.map +1 -0
  9. package/dist/BotApiTransport.d.ts +11 -10
  10. package/dist/BotApiTransport.d.ts.map +1 -1
  11. package/dist/BotApiTransport.js +6 -8
  12. package/dist/BotApiTransport.js.map +1 -0
  13. package/dist/BotApiUrl.d.ts +14 -0
  14. package/dist/BotApiUrl.d.ts.map +1 -0
  15. package/dist/BotApiUrl.js +13 -0
  16. package/dist/BotApiUrl.js.map +1 -0
  17. package/dist/Content.d.ts +288 -16
  18. package/dist/Content.d.ts.map +1 -1
  19. package/dist/Content.js +189 -28
  20. package/dist/Content.js.map +1 -0
  21. package/dist/Dialog.d.ts +61 -0
  22. package/dist/Dialog.d.ts.map +1 -0
  23. package/dist/Dialog.js +35 -0
  24. package/dist/Dialog.js.map +1 -0
  25. package/dist/File.d.ts +23 -0
  26. package/dist/File.d.ts.map +1 -0
  27. package/dist/File.js +24 -0
  28. package/dist/File.js.map +1 -0
  29. package/dist/LinkPreview.d.ts +2 -2
  30. package/dist/LinkPreview.d.ts.map +1 -1
  31. package/dist/LinkPreview.js +17 -16
  32. package/dist/LinkPreview.js.map +1 -0
  33. package/dist/Markup.d.ts +41 -0
  34. package/dist/Markup.d.ts.map +1 -0
  35. package/dist/Markup.js +10 -0
  36. package/dist/Markup.js.map +1 -0
  37. package/dist/Runner.d.ts +3 -3
  38. package/dist/Runner.d.ts.map +1 -1
  39. package/dist/Runner.js +1 -0
  40. package/dist/Runner.js.map +1 -0
  41. package/dist/Send.d.ts +177 -13
  42. package/dist/Send.d.ts.map +1 -1
  43. package/dist/Send.js +187 -18
  44. package/dist/Send.js.map +1 -0
  45. package/dist/Text.d.ts +21 -11
  46. package/dist/Text.d.ts.map +1 -1
  47. package/dist/Text.js +10 -17
  48. package/dist/Text.js.map +1 -0
  49. package/dist/index.d.ts +4 -4
  50. package/dist/index.d.ts.map +1 -1
  51. package/dist/index.js +5 -4
  52. package/dist/index.js.map +1 -0
  53. package/dist/internal/botApi.d.ts +3 -4
  54. package/dist/internal/botApi.d.ts.map +1 -1
  55. package/dist/internal/botApi.js +18 -22
  56. package/dist/internal/botApi.js.map +1 -0
  57. package/dist/internal/botApiMethods.gen.d.ts +19 -19
  58. package/dist/internal/botApiMethods.gen.d.ts.map +1 -1
  59. package/dist/internal/botApiMethods.gen.js +1 -0
  60. package/dist/internal/botApiMethods.gen.js.map +1 -0
  61. package/dist/internal/botApiShape.gen.d.ts +159 -159
  62. package/dist/internal/botApiShape.gen.d.ts.map +1 -1
  63. package/dist/internal/botApiShape.gen.js +1 -0
  64. package/dist/internal/botApiShape.gen.js.map +1 -0
  65. package/dist/internal/botApiTransport.d.ts +4 -6
  66. package/dist/internal/botApiTransport.d.ts.map +1 -1
  67. package/dist/internal/botApiTransport.js +89 -17
  68. package/dist/internal/botApiTransport.js.map +1 -0
  69. package/dist/internal/botApiTypes.gen.js +1 -0
  70. package/dist/internal/botApiTypes.gen.js.map +1 -0
  71. package/dist/internal/dialog.d.ts +12 -0
  72. package/dist/internal/dialog.d.ts.map +1 -0
  73. package/dist/internal/dialog.js +19 -0
  74. package/dist/internal/dialog.js.map +1 -0
  75. package/dist/internal/runner.d.ts +1 -1
  76. package/dist/internal/runner.d.ts.map +1 -1
  77. package/dist/internal/runner.js +8 -4
  78. package/dist/internal/runner.js.map +1 -0
  79. package/dist/internal/send.d.ts +13 -0
  80. package/dist/internal/send.d.ts.map +1 -0
  81. package/dist/internal/send.js +220 -0
  82. package/dist/internal/send.js.map +1 -0
  83. package/package.json +20 -14
  84. package/src/Bot.ts +16 -0
  85. package/src/BotApi.ts +68 -0
  86. package/src/BotApiTransport.ts +55 -0
  87. package/src/BotApiUrl.ts +28 -0
  88. package/src/Content.ts +410 -0
  89. package/src/Dialog.ts +54 -0
  90. package/src/File.ts +45 -0
  91. package/src/LinkPreview.ts +26 -0
  92. package/src/Markup.ts +33 -0
  93. package/src/Runner.ts +22 -0
  94. package/src/Send.ts +330 -0
  95. package/src/Text.ts +42 -0
  96. package/src/index.ts +12 -0
  97. package/src/internal/botApi.ts +31 -0
  98. package/src/internal/botApiMethods.gen.ts +2027 -0
  99. package/src/internal/botApiShape.gen.ts +398 -0
  100. package/src/internal/botApiTransport.ts +118 -0
  101. package/src/internal/botApiTypes.gen.ts +4178 -0
  102. package/src/internal/dialog.ts +33 -0
  103. package/src/internal/runner.ts +57 -0
  104. package/src/internal/send.ts +318 -0
  105. package/dist/BotApiWebhook.d.ts +0 -41
  106. package/dist/BotApiWebhook.d.ts.map +0 -1
  107. package/dist/BotApiWebhook.js +0 -43
  108. package/dist/Chat.d.ts +0 -96
  109. package/dist/Chat.d.ts.map +0 -1
  110. package/dist/Chat.js +0 -48
  111. package/dist/InputFile.d.ts +0 -4
  112. package/dist/InputFile.d.ts.map +0 -1
  113. package/dist/InputFile.js +0 -3
  114. package/dist/Middleware.d.ts +0 -6
  115. package/dist/Middleware.d.ts.map +0 -1
  116. package/dist/Middleware.js +0 -1
  117. package/dist/internal/botApiMethod.d.ts +0 -8
  118. package/dist/internal/botApiMethod.d.ts.map +0 -1
  119. package/dist/internal/botApiMethod.js +0 -1
  120. package/dist/internal/chat.d.ts +0 -14
  121. package/dist/internal/chat.d.ts.map +0 -1
  122. package/dist/internal/chat.js +0 -20
@@ -0,0 +1,2027 @@
1
+ import type * as File from '../File.ts'
2
+ import type * as Types from './botApiTypes.gen.ts'
3
+
4
+ export interface MethodParams {
5
+ getUpdates: void | {
6
+ /** Identifier of the first update to be returned. Must be greater by one than the highest among the identifiers of previously received updates. By default, updates starting with the earliest unconfirmed update are returned. An update is considered confirmed as soon as [getUpdates](https://core.telegram.org/bots/api#getupdates) is called with an _offset_ higher than its _update\_id_. The negative offset can be specified to retrieve updates starting from _\-offset_ update from the end of the updates queue. All previous updates will be forgotten. */
7
+ offset?: number
8
+ /** Limits the number of updates to be retrieved. Values between 1-100 are accepted. Defaults to 100. */
9
+ limit?: number
10
+ /** Timeout in seconds for long polling. Defaults to 0, i.e. usual short polling. Should be positive, short polling should be used for testing purposes only. */
11
+ timeout?: number
12
+ /**
13
+ * An array of the update types you want your bot to receive. For example, specify `["message", "edited_channel_post", "callback_query"]` to only receive updates of these types. See [Update](https://core.telegram.org/bots/api#update) for a complete list of available update types. Specify an empty list to receive all update types except _chat\_member_, _message\_reaction_, and _message\_reaction\_count_ (default). If not specified, the previous setting will be used.
14
+ *
15
+ * Please note that this parameter doesn't affect updates created before the call to getUpdates, so unwanted updates may be received for a short period of time.
16
+ */
17
+ allowed_updates?: Array<string>
18
+ }
19
+ setWebhook: {
20
+ /** HTTPS URL to send updates to. Use an empty string to remove webhook integration */
21
+ url: string
22
+ /** Upload your public key certificate so that the root certificate in use can be checked. See our [self-signed guide](https://core.telegram.org/bots/self-signed) for details. */
23
+ certificate?: File.InputFile
24
+ /** The fixed IP address which will be used to send webhook requests instead of the IP address resolved through DNS */
25
+ ip_address?: string
26
+ /** The maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery, 1-100. Defaults to _40_. Use lower values to limit the load on your bot's server, and higher values to increase your bot's throughput. */
27
+ max_connections?: number
28
+ /**
29
+ * An array of the update types you want your bot to receive. For example, specify `["message", "edited_channel_post", "callback_query"]` to only receive updates of these types. See [Update](https://core.telegram.org/bots/api#update) for a complete list of available update types. Specify an empty list to receive all update types except _chat\_member_, _message\_reaction_, and _message\_reaction\_count_ (default). If not specified, the previous setting will be used.
30
+ *
31
+ * 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.
32
+ */
33
+ allowed_updates?: Array<string>
34
+ /** Pass _True_ to drop all pending updates */
35
+ drop_pending_updates?: boolean
36
+ /** A secret token to be sent in a header “X-Telegram-Bot-Api-Secret-Token” in every webhook request, 1-256 characters. Only characters `A-Z`, `a-z`, `0-9`, `_` and `-` are allowed. The header is useful to ensure that the request comes from a webhook set by you. */
37
+ secret_token?: string
38
+ }
39
+ deleteWebhook: void | {
40
+ /** Pass _True_ to drop all pending updates */
41
+ drop_pending_updates?: boolean
42
+ }
43
+ getWebhookInfo: void | Record<string, never>
44
+ getMe: void | Record<string, never>
45
+ logOut: void | Record<string, never>
46
+ close: void | Record<string, never>
47
+ sendMessage: {
48
+ /** Unique identifier of the business connection on behalf of which the message will be sent */
49
+ business_connection_id?: string
50
+ /** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
51
+ chat_id: number | string
52
+ /** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
53
+ message_thread_id?: number
54
+ /** Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat */
55
+ direct_messages_topic_id?: number
56
+ /** Text of the message to be sent, 1-4096 characters after entities parsing */
57
+ text: string
58
+ /** Mode for parsing entities in the message text. See [formatting options](https://core.telegram.org/bots/api#formatting-options) for more details. */
59
+ parse_mode?: string
60
+ /** An array of special entities that appear in message text, which can be specified instead of _parse\_mode_ */
61
+ entities?: Array<Types.MessageEntity>
62
+ /** Link preview generation options for the message */
63
+ link_preview_options?: Types.LinkPreviewOptions
64
+ /** Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound. */
65
+ disable_notification?: boolean
66
+ /** Protects the contents of the sent message from forwarding and saving */
67
+ protect_content?: boolean
68
+ /** Pass _True_ to allow up to 1000 messages per second, ignoring [broadcasting limits](https://core.telegram.org/bots/faq#how-can-i-message-all-of-my-bot-39s-subscribers-at-once) for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance */
69
+ allow_paid_broadcast?: boolean
70
+ /** Unique identifier of the message effect to be added to the message; for private chats only */
71
+ message_effect_id?: string
72
+ /** An object containing the parameters of the suggested post to send; for direct messages chats only. If the message is sent as a reply to another suggested post, then that suggested post is automatically declined. */
73
+ suggested_post_parameters?: Types.SuggestedPostParameters
74
+ /** Description of the message to reply to */
75
+ reply_parameters?: Types.ReplyParameters
76
+ /** Additional interface options. An object for an [inline keyboard](https://core.telegram.org/bots/features#inline-keyboards), [custom reply keyboard](https://core.telegram.org/bots/features#keyboards), instructions to remove a reply keyboard or to force a reply from the user */
77
+ reply_markup?: Types.InlineKeyboardMarkup | Types.ReplyKeyboardMarkup | Types.ReplyKeyboardRemove | Types.ForceReply
78
+ }
79
+ forwardMessage: {
80
+ /** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
81
+ chat_id: number | string
82
+ /** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
83
+ message_thread_id?: number
84
+ /** Identifier of the direct messages topic to which the message will be forwarded; required if the message is forwarded to a direct messages chat */
85
+ direct_messages_topic_id?: number
86
+ /** Unique identifier for the chat where the original message was sent (or channel username in the format `@channelusername`) */
87
+ from_chat_id: number | string
88
+ /** New start timestamp for the forwarded video in the message */
89
+ video_start_timestamp?: number
90
+ /** Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound. */
91
+ disable_notification?: boolean
92
+ /** Protects the contents of the forwarded message from forwarding and saving */
93
+ protect_content?: boolean
94
+ /** An object containing the parameters of the suggested post to send; for direct messages chats only */
95
+ suggested_post_parameters?: Types.SuggestedPostParameters
96
+ /** Message identifier in the chat specified in _from\_chat\_id_ */
97
+ message_id: number
98
+ }
99
+ forwardMessages: {
100
+ /** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
101
+ chat_id: number | string
102
+ /** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
103
+ message_thread_id?: number
104
+ /** Identifier of the direct messages topic to which the messages will be forwarded; required if the messages are forwarded to a direct messages chat */
105
+ direct_messages_topic_id?: number
106
+ /** Unique identifier for the chat where the original messages were sent (or channel username in the format `@channelusername`) */
107
+ from_chat_id: number | string
108
+ /** An array of 1-100 identifiers of messages in the chat _from\_chat\_id_ to forward. The identifiers must be specified in a strictly increasing order. */
109
+ message_ids: Array<number>
110
+ /** Sends the messages [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound. */
111
+ disable_notification?: boolean
112
+ /** Protects the contents of the forwarded messages from forwarding and saving */
113
+ protect_content?: boolean
114
+ }
115
+ copyMessage: {
116
+ /** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
117
+ chat_id: number | string
118
+ /** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
119
+ message_thread_id?: number
120
+ /** Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat */
121
+ direct_messages_topic_id?: number
122
+ /** Unique identifier for the chat where the original message was sent (or channel username in the format `@channelusername`) */
123
+ from_chat_id: number | string
124
+ /** Message identifier in the chat specified in _from\_chat\_id_ */
125
+ message_id: number
126
+ /** New start timestamp for the copied video in the message */
127
+ video_start_timestamp?: number
128
+ /** New caption for media, 0-1024 characters after entities parsing. If not specified, the original caption is kept */
129
+ caption?: string
130
+ /** Mode for parsing entities in the new caption. See [formatting options](https://core.telegram.org/bots/api#formatting-options) for more details. */
131
+ parse_mode?: string
132
+ /** An array of special entities that appear in the new caption, which can be specified instead of _parse\_mode_ */
133
+ caption_entities?: Array<Types.MessageEntity>
134
+ /** Pass _True_, if the caption must be shown above the message media. Ignored if a new caption isn't specified. */
135
+ show_caption_above_media?: boolean
136
+ /** Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound. */
137
+ disable_notification?: boolean
138
+ /** Protects the contents of the sent message from forwarding and saving */
139
+ protect_content?: boolean
140
+ /** Pass _True_ to allow up to 1000 messages per second, ignoring [broadcasting limits](https://core.telegram.org/bots/faq#how-can-i-message-all-of-my-bot-39s-subscribers-at-once) for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance */
141
+ allow_paid_broadcast?: boolean
142
+ /** An object containing the parameters of the suggested post to send; for direct messages chats only. If the message is sent as a reply to another suggested post, then that suggested post is automatically declined. */
143
+ suggested_post_parameters?: Types.SuggestedPostParameters
144
+ /** Description of the message to reply to */
145
+ reply_parameters?: Types.ReplyParameters
146
+ /** Additional interface options. An object for an [inline keyboard](https://core.telegram.org/bots/features#inline-keyboards), [custom reply keyboard](https://core.telegram.org/bots/features#keyboards), instructions to remove a reply keyboard or to force a reply from the user */
147
+ reply_markup?: Types.InlineKeyboardMarkup | Types.ReplyKeyboardMarkup | Types.ReplyKeyboardRemove | Types.ForceReply
148
+ }
149
+ copyMessages: {
150
+ /** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
151
+ chat_id: number | string
152
+ /** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
153
+ message_thread_id?: number
154
+ /** Identifier of the direct messages topic to which the messages will be sent; required if the messages are sent to a direct messages chat */
155
+ direct_messages_topic_id?: number
156
+ /** Unique identifier for the chat where the original messages were sent (or channel username in the format `@channelusername`) */
157
+ from_chat_id: number | string
158
+ /** An array of 1-100 identifiers of messages in the chat _from\_chat\_id_ to copy. The identifiers must be specified in a strictly increasing order. */
159
+ message_ids: Array<number>
160
+ /** Sends the messages [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound. */
161
+ disable_notification?: boolean
162
+ /** Protects the contents of the sent messages from forwarding and saving */
163
+ protect_content?: boolean
164
+ /** Pass _True_ to copy the messages without their captions */
165
+ remove_caption?: boolean
166
+ }
167
+ sendPhoto: {
168
+ /** Unique identifier of the business connection on behalf of which the message will be sent */
169
+ business_connection_id?: string
170
+ /** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
171
+ chat_id: number | string
172
+ /** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
173
+ message_thread_id?: number
174
+ /** Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat */
175
+ direct_messages_topic_id?: number
176
+ /** Photo to send. 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. The photo must be at most 10 MB in size. The photo's width and height must not exceed 10000 in total. Width and height ratio must be at most 20. [More information on Sending Files »](https://core.telegram.org/bots/api#sending-files) */
177
+ photo: File.InputFile | string
178
+ /** Photo caption (may also be used when resending photos by _file\_id_), 0-1024 characters after entities parsing */
179
+ caption?: string
180
+ /** Mode for parsing entities in the photo caption. See [formatting options](https://core.telegram.org/bots/api#formatting-options) for more details. */
181
+ parse_mode?: string
182
+ /** An array of special entities that appear in the caption, which can be specified instead of _parse\_mode_ */
183
+ caption_entities?: Array<Types.MessageEntity>
184
+ /** Pass _True_, if the caption must be shown above the message media */
185
+ show_caption_above_media?: boolean
186
+ /** Pass _True_ if the photo needs to be covered with a spoiler animation */
187
+ has_spoiler?: boolean
188
+ /** Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound. */
189
+ disable_notification?: boolean
190
+ /** Protects the contents of the sent message from forwarding and saving */
191
+ protect_content?: boolean
192
+ /** Pass _True_ to allow up to 1000 messages per second, ignoring [broadcasting limits](https://core.telegram.org/bots/faq#how-can-i-message-all-of-my-bot-39s-subscribers-at-once) for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance */
193
+ allow_paid_broadcast?: boolean
194
+ /** Unique identifier of the message effect to be added to the message; for private chats only */
195
+ message_effect_id?: string
196
+ /** An object containing the parameters of the suggested post to send; for direct messages chats only. If the message is sent as a reply to another suggested post, then that suggested post is automatically declined. */
197
+ suggested_post_parameters?: Types.SuggestedPostParameters
198
+ /** Description of the message to reply to */
199
+ reply_parameters?: Types.ReplyParameters
200
+ /** Additional interface options. An object for an [inline keyboard](https://core.telegram.org/bots/features#inline-keyboards), [custom reply keyboard](https://core.telegram.org/bots/features#keyboards), instructions to remove a reply keyboard or to force a reply from the user */
201
+ reply_markup?: Types.InlineKeyboardMarkup | Types.ReplyKeyboardMarkup | Types.ReplyKeyboardRemove | Types.ForceReply
202
+ }
203
+ sendAudio: {
204
+ /** Unique identifier of the business connection on behalf of which the message will be sent */
205
+ business_connection_id?: string
206
+ /** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
207
+ chat_id: number | string
208
+ /** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
209
+ message_thread_id?: number
210
+ /** Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat */
211
+ direct_messages_topic_id?: number
212
+ /** Audio file to send. 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. [More information on Sending Files »](https://core.telegram.org/bots/api#sending-files) */
213
+ audio: File.InputFile | string
214
+ /** Audio caption, 0-1024 characters after entities parsing */
215
+ caption?: string
216
+ /** Mode for parsing entities in the audio caption. See [formatting options](https://core.telegram.org/bots/api#formatting-options) for more details. */
217
+ parse_mode?: string
218
+ /** An array of special entities that appear in the caption, which can be specified instead of _parse\_mode_ */
219
+ caption_entities?: Array<Types.MessageEntity>
220
+ /** Duration of the audio in seconds */
221
+ duration?: number
222
+ /** Performer */
223
+ performer?: string
224
+ /** Track name */
225
+ title?: string
226
+ /** Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass “attach://<file\_attach\_name>” if the thumbnail was uploaded using multipart/form-data under <file\_attach\_name>. [More information on Sending Files »](https://core.telegram.org/bots/api#sending-files) */
227
+ thumbnail?: File.InputFile | string
228
+ /** Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound. */
229
+ disable_notification?: boolean
230
+ /** Protects the contents of the sent message from forwarding and saving */
231
+ protect_content?: boolean
232
+ /** Pass _True_ to allow up to 1000 messages per second, ignoring [broadcasting limits](https://core.telegram.org/bots/faq#how-can-i-message-all-of-my-bot-39s-subscribers-at-once) for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance */
233
+ allow_paid_broadcast?: boolean
234
+ /** Unique identifier of the message effect to be added to the message; for private chats only */
235
+ message_effect_id?: string
236
+ /** An object containing the parameters of the suggested post to send; for direct messages chats only. If the message is sent as a reply to another suggested post, then that suggested post is automatically declined. */
237
+ suggested_post_parameters?: Types.SuggestedPostParameters
238
+ /** Description of the message to reply to */
239
+ reply_parameters?: Types.ReplyParameters
240
+ /** Additional interface options. An object for an [inline keyboard](https://core.telegram.org/bots/features#inline-keyboards), [custom reply keyboard](https://core.telegram.org/bots/features#keyboards), instructions to remove a reply keyboard or to force a reply from the user */
241
+ reply_markup?: Types.InlineKeyboardMarkup | Types.ReplyKeyboardMarkup | Types.ReplyKeyboardRemove | Types.ForceReply
242
+ }
243
+ sendDocument: {
244
+ /** Unique identifier of the business connection on behalf of which the message will be sent */
245
+ business_connection_id?: string
246
+ /** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
247
+ chat_id: number | string
248
+ /** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
249
+ message_thread_id?: number
250
+ /** Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat */
251
+ direct_messages_topic_id?: number
252
+ /** File to send. 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. [More information on Sending Files »](https://core.telegram.org/bots/api#sending-files) */
253
+ document: File.InputFile | string
254
+ /** Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass “attach://<file\_attach\_name>” if the thumbnail was uploaded using multipart/form-data under <file\_attach\_name>. [More information on Sending Files »](https://core.telegram.org/bots/api#sending-files) */
255
+ thumbnail?: File.InputFile | string
256
+ /** Document caption (may also be used when resending documents by _file\_id_), 0-1024 characters after entities parsing */
257
+ caption?: string
258
+ /** Mode for parsing entities in the document caption. See [formatting options](https://core.telegram.org/bots/api#formatting-options) for more details. */
259
+ parse_mode?: string
260
+ /** An array of special entities that appear in the caption, which can be specified instead of _parse\_mode_ */
261
+ caption_entities?: Array<Types.MessageEntity>
262
+ /** Disables automatic server-side content type detection for files uploaded using multipart/form-data */
263
+ disable_content_type_detection?: boolean
264
+ /** Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound. */
265
+ disable_notification?: boolean
266
+ /** Protects the contents of the sent message from forwarding and saving */
267
+ protect_content?: boolean
268
+ /** Pass _True_ to allow up to 1000 messages per second, ignoring [broadcasting limits](https://core.telegram.org/bots/faq#how-can-i-message-all-of-my-bot-39s-subscribers-at-once) for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance */
269
+ allow_paid_broadcast?: boolean
270
+ /** Unique identifier of the message effect to be added to the message; for private chats only */
271
+ message_effect_id?: string
272
+ /** An object containing the parameters of the suggested post to send; for direct messages chats only. If the message is sent as a reply to another suggested post, then that suggested post is automatically declined. */
273
+ suggested_post_parameters?: Types.SuggestedPostParameters
274
+ /** Description of the message to reply to */
275
+ reply_parameters?: Types.ReplyParameters
276
+ /** Additional interface options. An object for an [inline keyboard](https://core.telegram.org/bots/features#inline-keyboards), [custom reply keyboard](https://core.telegram.org/bots/features#keyboards), instructions to remove a reply keyboard or to force a reply from the user */
277
+ reply_markup?: Types.InlineKeyboardMarkup | Types.ReplyKeyboardMarkup | Types.ReplyKeyboardRemove | Types.ForceReply
278
+ }
279
+ sendVideo: {
280
+ /** Unique identifier of the business connection on behalf of which the message will be sent */
281
+ business_connection_id?: string
282
+ /** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
283
+ chat_id: number | string
284
+ /** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
285
+ message_thread_id?: number
286
+ /** Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat */
287
+ direct_messages_topic_id?: number
288
+ /** Video to send. 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. [More information on Sending Files »](https://core.telegram.org/bots/api#sending-files) */
289
+ video: File.InputFile | string
290
+ /** Duration of sent video in seconds */
291
+ duration?: number
292
+ /** Video width */
293
+ width?: number
294
+ /** Video height */
295
+ height?: number
296
+ /** Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass “attach://<file\_attach\_name>” if the thumbnail was uploaded using multipart/form-data under <file\_attach\_name>. [More information on Sending Files »](https://core.telegram.org/bots/api#sending-files) */
297
+ thumbnail?: File.InputFile | string
298
+ /** Cover for the video in the message. Pass a file\_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://<file\_attach\_name>” to upload a new one using multipart/form-data under <file\_attach\_name> name. [More information on Sending Files »](https://core.telegram.org/bots/api#sending-files) */
299
+ cover?: File.InputFile | string
300
+ /** Start timestamp for the video in the message */
301
+ start_timestamp?: number
302
+ /** Video caption (may also be used when resending videos by _file\_id_), 0-1024 characters after entities parsing */
303
+ caption?: string
304
+ /** Mode for parsing entities in the video caption. See [formatting options](https://core.telegram.org/bots/api#formatting-options) for more details. */
305
+ parse_mode?: string
306
+ /** An array of special entities that appear in the caption, which can be specified instead of _parse\_mode_ */
307
+ caption_entities?: Array<Types.MessageEntity>
308
+ /** Pass _True_, if the caption must be shown above the message media */
309
+ show_caption_above_media?: boolean
310
+ /** Pass _True_ if the video needs to be covered with a spoiler animation */
311
+ has_spoiler?: boolean
312
+ /** Pass _True_ if the uploaded video is suitable for streaming */
313
+ supports_streaming?: boolean
314
+ /** Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound. */
315
+ disable_notification?: boolean
316
+ /** Protects the contents of the sent message from forwarding and saving */
317
+ protect_content?: boolean
318
+ /** Pass _True_ to allow up to 1000 messages per second, ignoring [broadcasting limits](https://core.telegram.org/bots/faq#how-can-i-message-all-of-my-bot-39s-subscribers-at-once) for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance */
319
+ allow_paid_broadcast?: boolean
320
+ /** Unique identifier of the message effect to be added to the message; for private chats only */
321
+ message_effect_id?: string
322
+ /** An object containing the parameters of the suggested post to send; for direct messages chats only. If the message is sent as a reply to another suggested post, then that suggested post is automatically declined. */
323
+ suggested_post_parameters?: Types.SuggestedPostParameters
324
+ /** Description of the message to reply to */
325
+ reply_parameters?: Types.ReplyParameters
326
+ /** Additional interface options. An object for an [inline keyboard](https://core.telegram.org/bots/features#inline-keyboards), [custom reply keyboard](https://core.telegram.org/bots/features#keyboards), instructions to remove a reply keyboard or to force a reply from the user */
327
+ reply_markup?: Types.InlineKeyboardMarkup | Types.ReplyKeyboardMarkup | Types.ReplyKeyboardRemove | Types.ForceReply
328
+ }
329
+ sendAnimation: {
330
+ /** Unique identifier of the business connection on behalf of which the message will be sent */
331
+ business_connection_id?: string
332
+ /** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
333
+ chat_id: number | string
334
+ /** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
335
+ message_thread_id?: number
336
+ /** Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat */
337
+ direct_messages_topic_id?: number
338
+ /** Animation to send. 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. [More information on Sending Files »](https://core.telegram.org/bots/api#sending-files) */
339
+ animation: File.InputFile | string
340
+ /** Duration of sent animation in seconds */
341
+ duration?: number
342
+ /** Animation width */
343
+ width?: number
344
+ /** Animation height */
345
+ height?: number
346
+ /** Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass “attach://<file\_attach\_name>” if the thumbnail was uploaded using multipart/form-data under <file\_attach\_name>. [More information on Sending Files »](https://core.telegram.org/bots/api#sending-files) */
347
+ thumbnail?: File.InputFile | string
348
+ /** Animation caption (may also be used when resending animation by _file\_id_), 0-1024 characters after entities parsing */
349
+ caption?: string
350
+ /** Mode for parsing entities in the animation caption. See [formatting options](https://core.telegram.org/bots/api#formatting-options) for more details. */
351
+ parse_mode?: string
352
+ /** An array of special entities that appear in the caption, which can be specified instead of _parse\_mode_ */
353
+ caption_entities?: Array<Types.MessageEntity>
354
+ /** Pass _True_, if the caption must be shown above the message media */
355
+ show_caption_above_media?: boolean
356
+ /** Pass _True_ if the animation needs to be covered with a spoiler animation */
357
+ has_spoiler?: boolean
358
+ /** Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound. */
359
+ disable_notification?: boolean
360
+ /** Protects the contents of the sent message from forwarding and saving */
361
+ protect_content?: boolean
362
+ /** Pass _True_ to allow up to 1000 messages per second, ignoring [broadcasting limits](https://core.telegram.org/bots/faq#how-can-i-message-all-of-my-bot-39s-subscribers-at-once) for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance */
363
+ allow_paid_broadcast?: boolean
364
+ /** Unique identifier of the message effect to be added to the message; for private chats only */
365
+ message_effect_id?: string
366
+ /** An object containing the parameters of the suggested post to send; for direct messages chats only. If the message is sent as a reply to another suggested post, then that suggested post is automatically declined. */
367
+ suggested_post_parameters?: Types.SuggestedPostParameters
368
+ /** Description of the message to reply to */
369
+ reply_parameters?: Types.ReplyParameters
370
+ /** Additional interface options. An object for an [inline keyboard](https://core.telegram.org/bots/features#inline-keyboards), [custom reply keyboard](https://core.telegram.org/bots/features#keyboards), instructions to remove a reply keyboard or to force a reply from the user */
371
+ reply_markup?: Types.InlineKeyboardMarkup | Types.ReplyKeyboardMarkup | Types.ReplyKeyboardRemove | Types.ForceReply
372
+ }
373
+ sendVoice: {
374
+ /** Unique identifier of the business connection on behalf of which the message will be sent */
375
+ business_connection_id?: string
376
+ /** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
377
+ chat_id: number | string
378
+ /** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
379
+ message_thread_id?: number
380
+ /** Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat */
381
+ direct_messages_topic_id?: number
382
+ /** Audio file to send. 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. [More information on Sending Files »](https://core.telegram.org/bots/api#sending-files) */
383
+ voice: File.InputFile | string
384
+ /** Voice message caption, 0-1024 characters after entities parsing */
385
+ caption?: string
386
+ /** Mode for parsing entities in the voice message caption. See [formatting options](https://core.telegram.org/bots/api#formatting-options) for more details. */
387
+ parse_mode?: string
388
+ /** An array of special entities that appear in the caption, which can be specified instead of _parse\_mode_ */
389
+ caption_entities?: Array<Types.MessageEntity>
390
+ /** Duration of the voice message in seconds */
391
+ duration?: number
392
+ /** Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound. */
393
+ disable_notification?: boolean
394
+ /** Protects the contents of the sent message from forwarding and saving */
395
+ protect_content?: boolean
396
+ /** Pass _True_ to allow up to 1000 messages per second, ignoring [broadcasting limits](https://core.telegram.org/bots/faq#how-can-i-message-all-of-my-bot-39s-subscribers-at-once) for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance */
397
+ allow_paid_broadcast?: boolean
398
+ /** Unique identifier of the message effect to be added to the message; for private chats only */
399
+ message_effect_id?: string
400
+ /** An object containing the parameters of the suggested post to send; for direct messages chats only. If the message is sent as a reply to another suggested post, then that suggested post is automatically declined. */
401
+ suggested_post_parameters?: Types.SuggestedPostParameters
402
+ /** Description of the message to reply to */
403
+ reply_parameters?: Types.ReplyParameters
404
+ /** Additional interface options. An object for an [inline keyboard](https://core.telegram.org/bots/features#inline-keyboards), [custom reply keyboard](https://core.telegram.org/bots/features#keyboards), instructions to remove a reply keyboard or to force a reply from the user */
405
+ reply_markup?: Types.InlineKeyboardMarkup | Types.ReplyKeyboardMarkup | Types.ReplyKeyboardRemove | Types.ForceReply
406
+ }
407
+ sendVideoNote: {
408
+ /** Unique identifier of the business connection on behalf of which the message will be sent */
409
+ business_connection_id?: string
410
+ /** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
411
+ chat_id: number | string
412
+ /** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
413
+ message_thread_id?: number
414
+ /** Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat */
415
+ direct_messages_topic_id?: number
416
+ /** Video note to send. 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. [More information on Sending Files »](https://core.telegram.org/bots/api#sending-files). Sending video notes by a URL is currently unsupported */
417
+ video_note: File.InputFile | string
418
+ /** Duration of sent video in seconds */
419
+ duration?: number
420
+ /** Video width and height, i.e. diameter of the video message */
421
+ length?: number
422
+ /** Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass “attach://<file\_attach\_name>” if the thumbnail was uploaded using multipart/form-data under <file\_attach\_name>. [More information on Sending Files »](https://core.telegram.org/bots/api#sending-files) */
423
+ thumbnail?: File.InputFile | string
424
+ /** Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound. */
425
+ disable_notification?: boolean
426
+ /** Protects the contents of the sent message from forwarding and saving */
427
+ protect_content?: boolean
428
+ /** Pass _True_ to allow up to 1000 messages per second, ignoring [broadcasting limits](https://core.telegram.org/bots/faq#how-can-i-message-all-of-my-bot-39s-subscribers-at-once) for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance */
429
+ allow_paid_broadcast?: boolean
430
+ /** Unique identifier of the message effect to be added to the message; for private chats only */
431
+ message_effect_id?: string
432
+ /** An object containing the parameters of the suggested post to send; for direct messages chats only. If the message is sent as a reply to another suggested post, then that suggested post is automatically declined. */
433
+ suggested_post_parameters?: Types.SuggestedPostParameters
434
+ /** Description of the message to reply to */
435
+ reply_parameters?: Types.ReplyParameters
436
+ /** Additional interface options. An object for an [inline keyboard](https://core.telegram.org/bots/features#inline-keyboards), [custom reply keyboard](https://core.telegram.org/bots/features#keyboards), instructions to remove a reply keyboard or to force a reply from the user */
437
+ reply_markup?: Types.InlineKeyboardMarkup | Types.ReplyKeyboardMarkup | Types.ReplyKeyboardRemove | Types.ForceReply
438
+ }
439
+ sendPaidMedia: {
440
+ /** Unique identifier of the business connection on behalf of which the message will be sent */
441
+ business_connection_id?: string
442
+ /** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`). If the chat is a channel, all Telegram Star proceeds from this media will be credited to the chat's balance. Otherwise, they will be credited to the bot's balance. */
443
+ chat_id: number | string
444
+ /** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
445
+ message_thread_id?: number
446
+ /** Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat */
447
+ direct_messages_topic_id?: number
448
+ /** The number of Telegram Stars that must be paid to buy access to the media; 1-10000 */
449
+ star_count: number
450
+ /** An array describing the media to be sent; up to 10 items */
451
+ media: Array<Types.InputPaidMedia>
452
+ /** Bot-defined paid media payload, 0-128 bytes. This will not be displayed to the user, use it for your internal processes. */
453
+ payload?: string
454
+ /** Media caption, 0-1024 characters after entities parsing */
455
+ caption?: string
456
+ /** Mode for parsing entities in the media caption. See [formatting options](https://core.telegram.org/bots/api#formatting-options) for more details. */
457
+ parse_mode?: string
458
+ /** An array of special entities that appear in the caption, which can be specified instead of _parse\_mode_ */
459
+ caption_entities?: Array<Types.MessageEntity>
460
+ /** Pass _True_, if the caption must be shown above the message media */
461
+ show_caption_above_media?: boolean
462
+ /** Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound. */
463
+ disable_notification?: boolean
464
+ /** Protects the contents of the sent message from forwarding and saving */
465
+ protect_content?: boolean
466
+ /** Pass _True_ to allow up to 1000 messages per second, ignoring [broadcasting limits](https://core.telegram.org/bots/faq#how-can-i-message-all-of-my-bot-39s-subscribers-at-once) for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance */
467
+ allow_paid_broadcast?: boolean
468
+ /** An object containing the parameters of the suggested post to send; for direct messages chats only. If the message is sent as a reply to another suggested post, then that suggested post is automatically declined. */
469
+ suggested_post_parameters?: Types.SuggestedPostParameters
470
+ /** Description of the message to reply to */
471
+ reply_parameters?: Types.ReplyParameters
472
+ /** Additional interface options. An object for an [inline keyboard](https://core.telegram.org/bots/features#inline-keyboards), [custom reply keyboard](https://core.telegram.org/bots/features#keyboards), instructions to remove a reply keyboard or to force a reply from the user */
473
+ reply_markup?: Types.InlineKeyboardMarkup | Types.ReplyKeyboardMarkup | Types.ReplyKeyboardRemove | Types.ForceReply
474
+ }
475
+ sendMediaGroup: {
476
+ /** Unique identifier of the business connection on behalf of which the message will be sent */
477
+ business_connection_id?: string
478
+ /** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
479
+ chat_id: number | string
480
+ /** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
481
+ message_thread_id?: number
482
+ /** Identifier of the direct messages topic to which the messages will be sent; required if the messages are sent to a direct messages chat */
483
+ direct_messages_topic_id?: number
484
+ /** An array describing messages to be sent, must include 2-10 items */
485
+ media: Array<Types.InputMediaAudio | Types.InputMediaDocument | Types.InputMediaPhoto | Types.InputMediaVideo>
486
+ /** Sends messages [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound. */
487
+ disable_notification?: boolean
488
+ /** Protects the contents of the sent messages from forwarding and saving */
489
+ protect_content?: boolean
490
+ /** Pass _True_ to allow up to 1000 messages per second, ignoring [broadcasting limits](https://core.telegram.org/bots/faq#how-can-i-message-all-of-my-bot-39s-subscribers-at-once) for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance */
491
+ allow_paid_broadcast?: boolean
492
+ /** Unique identifier of the message effect to be added to the message; for private chats only */
493
+ message_effect_id?: string
494
+ /** Description of the message to reply to */
495
+ reply_parameters?: Types.ReplyParameters
496
+ }
497
+ sendLocation: {
498
+ /** Unique identifier of the business connection on behalf of which the message will be sent */
499
+ business_connection_id?: string
500
+ /** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
501
+ chat_id: number | string
502
+ /** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
503
+ message_thread_id?: number
504
+ /** Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat */
505
+ direct_messages_topic_id?: number
506
+ /** Latitude of the location */
507
+ latitude: number
508
+ /** Longitude of the location */
509
+ longitude: number
510
+ /** The radius of uncertainty for the location, measured in meters; 0-1500 */
511
+ horizontal_accuracy?: number
512
+ /** Period in seconds during which the location will be updated (see [Live Locations](https://telegram.org/blog/live-locations), should be between 60 and 86400, or 0x7FFFFFFF for live locations that can be edited indefinitely. */
513
+ live_period?: number
514
+ /** For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified. */
515
+ heading?: number
516
+ /** For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified. */
517
+ proximity_alert_radius?: number
518
+ /** Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound. */
519
+ disable_notification?: boolean
520
+ /** Protects the contents of the sent message from forwarding and saving */
521
+ protect_content?: boolean
522
+ /** Pass _True_ to allow up to 1000 messages per second, ignoring [broadcasting limits](https://core.telegram.org/bots/faq#how-can-i-message-all-of-my-bot-39s-subscribers-at-once) for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance */
523
+ allow_paid_broadcast?: boolean
524
+ /** Unique identifier of the message effect to be added to the message; for private chats only */
525
+ message_effect_id?: string
526
+ /** An object containing the parameters of the suggested post to send; for direct messages chats only. If the message is sent as a reply to another suggested post, then that suggested post is automatically declined. */
527
+ suggested_post_parameters?: Types.SuggestedPostParameters
528
+ /** Description of the message to reply to */
529
+ reply_parameters?: Types.ReplyParameters
530
+ /** Additional interface options. An object for an [inline keyboard](https://core.telegram.org/bots/features#inline-keyboards), [custom reply keyboard](https://core.telegram.org/bots/features#keyboards), instructions to remove a reply keyboard or to force a reply from the user */
531
+ reply_markup?: Types.InlineKeyboardMarkup | Types.ReplyKeyboardMarkup | Types.ReplyKeyboardRemove | Types.ForceReply
532
+ }
533
+ sendVenue: {
534
+ /** Unique identifier of the business connection on behalf of which the message will be sent */
535
+ business_connection_id?: string
536
+ /** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
537
+ chat_id: number | string
538
+ /** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
539
+ message_thread_id?: number
540
+ /** Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat */
541
+ direct_messages_topic_id?: number
542
+ /** Latitude of the venue */
543
+ latitude: number
544
+ /** Longitude of the venue */
545
+ longitude: number
546
+ /** Name of the venue */
547
+ title: string
548
+ /** Address of the venue */
549
+ address: string
550
+ /** Foursquare identifier of the venue */
551
+ foursquare_id?: string
552
+ /** Foursquare type of the venue, if known. (For example, “arts\_entertainment/default”, “arts\_entertainment/aquarium” or “food/icecream”.) */
553
+ foursquare_type?: string
554
+ /** Google Places identifier of the venue */
555
+ google_place_id?: string
556
+ /** Google Places type of the venue. (See [supported types](https://developers.google.com/places/web-service/supported_types).) */
557
+ google_place_type?: string
558
+ /** Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound. */
559
+ disable_notification?: boolean
560
+ /** Protects the contents of the sent message from forwarding and saving */
561
+ protect_content?: boolean
562
+ /** Pass _True_ to allow up to 1000 messages per second, ignoring [broadcasting limits](https://core.telegram.org/bots/faq#how-can-i-message-all-of-my-bot-39s-subscribers-at-once) for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance */
563
+ allow_paid_broadcast?: boolean
564
+ /** Unique identifier of the message effect to be added to the message; for private chats only */
565
+ message_effect_id?: string
566
+ /** An object containing the parameters of the suggested post to send; for direct messages chats only. If the message is sent as a reply to another suggested post, then that suggested post is automatically declined. */
567
+ suggested_post_parameters?: Types.SuggestedPostParameters
568
+ /** Description of the message to reply to */
569
+ reply_parameters?: Types.ReplyParameters
570
+ /** Additional interface options. An object for an [inline keyboard](https://core.telegram.org/bots/features#inline-keyboards), [custom reply keyboard](https://core.telegram.org/bots/features#keyboards), instructions to remove a reply keyboard or to force a reply from the user */
571
+ reply_markup?: Types.InlineKeyboardMarkup | Types.ReplyKeyboardMarkup | Types.ReplyKeyboardRemove | Types.ForceReply
572
+ }
573
+ sendContact: {
574
+ /** Unique identifier of the business connection on behalf of which the message will be sent */
575
+ business_connection_id?: string
576
+ /** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
577
+ chat_id: number | string
578
+ /** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
579
+ message_thread_id?: number
580
+ /** Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat */
581
+ direct_messages_topic_id?: number
582
+ /** Contact's phone number */
583
+ phone_number: string
584
+ /** Contact's first name */
585
+ first_name: string
586
+ /** Contact's last name */
587
+ last_name?: string
588
+ /** Additional data about the contact in the form of a [vCard](https://en.wikipedia.org/wiki/VCard), 0-2048 bytes */
589
+ vcard?: string
590
+ /** Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound. */
591
+ disable_notification?: boolean
592
+ /** Protects the contents of the sent message from forwarding and saving */
593
+ protect_content?: boolean
594
+ /** Pass _True_ to allow up to 1000 messages per second, ignoring [broadcasting limits](https://core.telegram.org/bots/faq#how-can-i-message-all-of-my-bot-39s-subscribers-at-once) for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance */
595
+ allow_paid_broadcast?: boolean
596
+ /** Unique identifier of the message effect to be added to the message; for private chats only */
597
+ message_effect_id?: string
598
+ /** An object containing the parameters of the suggested post to send; for direct messages chats only. If the message is sent as a reply to another suggested post, then that suggested post is automatically declined. */
599
+ suggested_post_parameters?: Types.SuggestedPostParameters
600
+ /** Description of the message to reply to */
601
+ reply_parameters?: Types.ReplyParameters
602
+ /** Additional interface options. An object for an [inline keyboard](https://core.telegram.org/bots/features#inline-keyboards), [custom reply keyboard](https://core.telegram.org/bots/features#keyboards), instructions to remove a reply keyboard or to force a reply from the user */
603
+ reply_markup?: Types.InlineKeyboardMarkup | Types.ReplyKeyboardMarkup | Types.ReplyKeyboardRemove | Types.ForceReply
604
+ }
605
+ sendPoll: {
606
+ /** Unique identifier of the business connection on behalf of which the message will be sent */
607
+ business_connection_id?: string
608
+ /** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`). Polls can't be sent to channel direct messages chats. */
609
+ chat_id: number | string
610
+ /** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
611
+ message_thread_id?: number
612
+ /** Poll question, 1-300 characters */
613
+ question: string
614
+ /** Mode for parsing entities in the question. See [formatting options](https://core.telegram.org/bots/api#formatting-options) for more details. Currently, only custom emoji entities are allowed */
615
+ question_parse_mode?: string
616
+ /** An array of special entities that appear in the poll question. It can be specified instead of _question\_parse\_mode_ */
617
+ question_entities?: Array<Types.MessageEntity>
618
+ /** An array of 2-12 answer options */
619
+ options: Array<Types.InputPollOption>
620
+ /** _True_, if the poll needs to be anonymous, defaults to _True_ */
621
+ is_anonymous?: boolean
622
+ /** Poll type, “quiz” or “regular”, defaults to “regular” */
623
+ type?: string
624
+ /** _True_, if the poll allows multiple answers, ignored for polls in quiz mode, defaults to _False_ */
625
+ allows_multiple_answers?: boolean
626
+ /** 0-based identifier of the correct answer option, required for polls in quiz mode */
627
+ correct_option_id?: number
628
+ /** 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 */
629
+ explanation?: string
630
+ /** Mode for parsing entities in the explanation. See [formatting options](https://core.telegram.org/bots/api#formatting-options) for more details. */
631
+ explanation_parse_mode?: string
632
+ /** An array of special entities that appear in the poll explanation. It can be specified instead of _explanation\_parse\_mode_ */
633
+ explanation_entities?: Array<Types.MessageEntity>
634
+ /** Amount of time in seconds the poll will be active after creation, 5-600. Can't be used together with _close\_date_. */
635
+ open_period?: number
636
+ /** Point in time (Unix timestamp) when the poll will be automatically closed. Must be at least 5 and no more than 600 seconds in the future. Can't be used together with _open\_period_. */
637
+ close_date?: number
638
+ /** Pass _True_ if the poll needs to be immediately closed. This can be useful for poll preview. */
639
+ is_closed?: boolean
640
+ /** Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound. */
641
+ disable_notification?: boolean
642
+ /** Protects the contents of the sent message from forwarding and saving */
643
+ protect_content?: boolean
644
+ /** Pass _True_ to allow up to 1000 messages per second, ignoring [broadcasting limits](https://core.telegram.org/bots/faq#how-can-i-message-all-of-my-bot-39s-subscribers-at-once) for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance */
645
+ allow_paid_broadcast?: boolean
646
+ /** Unique identifier of the message effect to be added to the message; for private chats only */
647
+ message_effect_id?: string
648
+ /** Description of the message to reply to */
649
+ reply_parameters?: Types.ReplyParameters
650
+ /** Additional interface options. An object for an [inline keyboard](https://core.telegram.org/bots/features#inline-keyboards), [custom reply keyboard](https://core.telegram.org/bots/features#keyboards), instructions to remove a reply keyboard or to force a reply from the user */
651
+ reply_markup?: Types.InlineKeyboardMarkup | Types.ReplyKeyboardMarkup | Types.ReplyKeyboardRemove | Types.ForceReply
652
+ }
653
+ sendChecklist: {
654
+ /** Unique identifier of the business connection on behalf of which the message will be sent */
655
+ business_connection_id: string
656
+ /** Unique identifier for the target chat */
657
+ chat_id: number
658
+ /** An object for the checklist to send */
659
+ checklist: Types.InputChecklist
660
+ /** Sends the message silently. Users will receive a notification with no sound. */
661
+ disable_notification?: boolean
662
+ /** Protects the contents of the sent message from forwarding and saving */
663
+ protect_content?: boolean
664
+ /** Unique identifier of the message effect to be added to the message */
665
+ message_effect_id?: string
666
+ /** An object for description of the message to reply to */
667
+ reply_parameters?: Types.ReplyParameters
668
+ /** An object for an inline keyboard */
669
+ reply_markup?: Types.InlineKeyboardMarkup
670
+ }
671
+ sendDice: {
672
+ /** Unique identifier of the business connection on behalf of which the message will be sent */
673
+ business_connection_id?: string
674
+ /** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
675
+ chat_id: number | string
676
+ /** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
677
+ message_thread_id?: number
678
+ /** Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat */
679
+ direct_messages_topic_id?: number
680
+ /** Emoji on which the dice throw animation is based. Currently, must be one of “![🎲](//telegram.org/img/emoji/40/F09F8EB2.png)”, “![🎯](//telegram.org/img/emoji/40/F09F8EAF.png)”, “![🏀](//telegram.org/img/emoji/40/F09F8F80.png)”, “![⚽](//telegram.org/img/emoji/40/E29ABD.png)”, “![🎳](//telegram.org/img/emoji/40/F09F8EB3.png)”, or “![🎰](//telegram.org/img/emoji/40/F09F8EB0.png)”. Dice can have values 1-6 for “![🎲](//telegram.org/img/emoji/40/F09F8EB2.png)”, “![🎯](//telegram.org/img/emoji/40/F09F8EAF.png)” and “![🎳](//telegram.org/img/emoji/40/F09F8EB3.png)”, values 1-5 for “![🏀](//telegram.org/img/emoji/40/F09F8F80.png)” and “![⚽](//telegram.org/img/emoji/40/E29ABD.png)”, and values 1-64 for “![🎰](//telegram.org/img/emoji/40/F09F8EB0.png)”. Defaults to “![🎲](//telegram.org/img/emoji/40/F09F8EB2.png)” */
681
+ emoji?: string
682
+ /** Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound. */
683
+ disable_notification?: boolean
684
+ /** Protects the contents of the sent message from forwarding */
685
+ protect_content?: boolean
686
+ /** Pass _True_ to allow up to 1000 messages per second, ignoring [broadcasting limits](https://core.telegram.org/bots/faq#how-can-i-message-all-of-my-bot-39s-subscribers-at-once) for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance */
687
+ allow_paid_broadcast?: boolean
688
+ /** Unique identifier of the message effect to be added to the message; for private chats only */
689
+ message_effect_id?: string
690
+ /** An object containing the parameters of the suggested post to send; for direct messages chats only. If the message is sent as a reply to another suggested post, then that suggested post is automatically declined. */
691
+ suggested_post_parameters?: Types.SuggestedPostParameters
692
+ /** Description of the message to reply to */
693
+ reply_parameters?: Types.ReplyParameters
694
+ /** Additional interface options. An object for an [inline keyboard](https://core.telegram.org/bots/features#inline-keyboards), [custom reply keyboard](https://core.telegram.org/bots/features#keyboards), instructions to remove a reply keyboard or to force a reply from the user */
695
+ reply_markup?: Types.InlineKeyboardMarkup | Types.ReplyKeyboardMarkup | Types.ReplyKeyboardRemove | Types.ForceReply
696
+ }
697
+ sendChatAction: {
698
+ /** Unique identifier of the business connection on behalf of which the action will be sent */
699
+ business_connection_id?: string
700
+ /** Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`). Channel chats and channel direct messages chats aren't supported. */
701
+ chat_id: number | string
702
+ /** Unique identifier for the target message thread; for supergroups only */
703
+ message_thread_id?: number
704
+ /** Type of action to broadcast. Choose one, depending on what the user is about to receive: _typing_ for [text messages](https://core.telegram.org/bots/api#sendmessage), _upload\_photo_ for [photos](https://core.telegram.org/bots/api#sendphoto), _record\_video_ or _upload\_video_ for [videos](https://core.telegram.org/bots/api#sendvideo), _record\_voice_ or _upload\_voice_ for [voice notes](https://core.telegram.org/bots/api#sendvoice), _upload\_document_ for [general files](https://core.telegram.org/bots/api#senddocument), _choose\_sticker_ for [stickers](https://core.telegram.org/bots/api#sendsticker), _find\_location_ for [location data](https://core.telegram.org/bots/api#sendlocation), _record\_video\_note_ or _upload\_video\_note_ for [video notes](https://core.telegram.org/bots/api#sendvideonote). */
705
+ action: string
706
+ }
707
+ setMessageReaction: {
708
+ /** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
709
+ chat_id: number | string
710
+ /** Identifier of the target message. If the message belongs to a media group, the reaction is set to the first non-deleted message in the group instead. */
711
+ message_id: number
712
+ /** An array of reaction types to set on the message. Currently, as non-premium users, bots can set up to one reaction per message. A custom emoji reaction can be used if it is either already present on the message or explicitly allowed by chat administrators. Paid reactions can't be used by bots. */
713
+ reaction?: Array<Types.ReactionType>
714
+ /** Pass _True_ to set the reaction with a big animation */
715
+ is_big?: boolean
716
+ }
717
+ getUserProfilePhotos: {
718
+ /** Unique identifier of the target user */
719
+ user_id: number
720
+ /** Sequential number of the first photo to be returned. By default, all photos are returned. */
721
+ offset?: number
722
+ /** Limits the number of photos to be retrieved. Values between 1-100 are accepted. Defaults to 100. */
723
+ limit?: number
724
+ }
725
+ setUserEmojiStatus: {
726
+ /** Unique identifier of the target user */
727
+ user_id: number
728
+ /** Custom emoji identifier of the emoji status to set. Pass an empty string to remove the status. */
729
+ emoji_status_custom_emoji_id?: string
730
+ /** Expiration date of the emoji status, if any */
731
+ emoji_status_expiration_date?: number
732
+ }
733
+ getFile: {
734
+ /** File identifier to get information about */
735
+ file_id: string
736
+ }
737
+ banChatMember: {
738
+ /** Unique identifier for the target group or username of the target supergroup or channel (in the format `@channelusername`) */
739
+ chat_id: number | string
740
+ /** Unique identifier of the target user */
741
+ user_id: number
742
+ /** Date when the user will be unbanned; Unix time. 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. Applied for supergroups and channels only. */
743
+ until_date?: number
744
+ /** Pass _True_ to delete all messages from the chat for the user that is being removed. If _False_, the user will be able to see messages in the group that were sent before the user was removed. Always _True_ for supergroups and channels. */
745
+ revoke_messages?: boolean
746
+ }
747
+ unbanChatMember: {
748
+ /** Unique identifier for the target group or username of the target supergroup or channel (in the format `@channelusername`) */
749
+ chat_id: number | string
750
+ /** Unique identifier of the target user */
751
+ user_id: number
752
+ /** Do nothing if the user is not banned */
753
+ only_if_banned?: boolean
754
+ }
755
+ restrictChatMember: {
756
+ /** Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`) */
757
+ chat_id: number | string
758
+ /** Unique identifier of the target user */
759
+ user_id: number
760
+ /** An object for new user permissions */
761
+ permissions: Types.ChatPermissions
762
+ /** Pass _True_ if chat permissions are set independently. 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. */
763
+ use_independent_chat_permissions?: boolean
764
+ /** Date when restrictions will be lifted for the user; Unix time. 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 */
765
+ until_date?: number
766
+ }
767
+ promoteChatMember: {
768
+ /** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
769
+ chat_id: number | string
770
+ /** Unique identifier of the target user */
771
+ user_id: number
772
+ /** Pass _True_ if the administrator's presence in the chat is hidden */
773
+ is_anonymous?: boolean
774
+ /** Pass _True_ if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege. */
775
+ can_manage_chat?: boolean
776
+ /** Pass _True_ if the administrator can delete messages of other users */
777
+ can_delete_messages?: boolean
778
+ /** Pass _True_ if the administrator can manage video chats */
779
+ can_manage_video_chats?: boolean
780
+ /** Pass _True_ if the administrator can restrict, ban or unban chat members, or access supergroup statistics */
781
+ can_restrict_members?: boolean
782
+ /** 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) */
783
+ can_promote_members?: boolean
784
+ /** Pass _True_ if the administrator can change chat title, photo and other settings */
785
+ can_change_info?: boolean
786
+ /** Pass _True_ if the administrator can invite new users to the chat */
787
+ can_invite_users?: boolean
788
+ /** Pass _True_ if the administrator can post stories to the chat */
789
+ can_post_stories?: boolean
790
+ /** 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 */
791
+ can_edit_stories?: boolean
792
+ /** Pass _True_ if the administrator can delete stories posted by other users */
793
+ can_delete_stories?: boolean
794
+ /** Pass _True_ if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only */
795
+ can_post_messages?: boolean
796
+ /** Pass _True_ if the administrator can edit messages of other users and can pin messages; for channels only */
797
+ can_edit_messages?: boolean
798
+ /** Pass _True_ if the administrator can pin messages; for supergroups only */
799
+ can_pin_messages?: boolean
800
+ /** Pass _True_ if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only */
801
+ can_manage_topics?: boolean
802
+ /** Pass _True_ if the administrator can manage direct messages within the channel and decline suggested posts; for channels only */
803
+ can_manage_direct_messages?: boolean
804
+ }
805
+ setChatAdministratorCustomTitle: {
806
+ /** Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`) */
807
+ chat_id: number | string
808
+ /** Unique identifier of the target user */
809
+ user_id: number
810
+ /** New custom title for the administrator; 0-16 characters, emoji are not allowed */
811
+ custom_title: string
812
+ }
813
+ banChatSenderChat: {
814
+ /** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
815
+ chat_id: number | string
816
+ /** Unique identifier of the target sender chat */
817
+ sender_chat_id: number
818
+ }
819
+ unbanChatSenderChat: {
820
+ /** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
821
+ chat_id: number | string
822
+ /** Unique identifier of the target sender chat */
823
+ sender_chat_id: number
824
+ }
825
+ setChatPermissions: {
826
+ /** Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`) */
827
+ chat_id: number | string
828
+ /** An object for new default chat permissions */
829
+ permissions: Types.ChatPermissions
830
+ /** Pass _True_ if chat permissions are set independently. 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. */
831
+ use_independent_chat_permissions?: boolean
832
+ }
833
+ exportChatInviteLink: {
834
+ /** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
835
+ chat_id: number | string
836
+ }
837
+ createChatInviteLink: {
838
+ /** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
839
+ chat_id: number | string
840
+ /** Invite link name; 0-32 characters */
841
+ name?: string
842
+ /** Point in time (Unix timestamp) when the link will expire */
843
+ expire_date?: number
844
+ /** The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999 */
845
+ member_limit?: number
846
+ /** _True_, if users joining the chat via the link need to be approved by chat administrators. If _True_, _member\_limit_ can't be specified */
847
+ creates_join_request?: boolean
848
+ }
849
+ editChatInviteLink: {
850
+ /** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
851
+ chat_id: number | string
852
+ /** The invite link to edit */
853
+ invite_link: string
854
+ /** Invite link name; 0-32 characters */
855
+ name?: string
856
+ /** Point in time (Unix timestamp) when the link will expire */
857
+ expire_date?: number
858
+ /** The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999 */
859
+ member_limit?: number
860
+ /** _True_, if users joining the chat via the link need to be approved by chat administrators. If _True_, _member\_limit_ can't be specified */
861
+ creates_join_request?: boolean
862
+ }
863
+ createChatSubscriptionInviteLink: {
864
+ /** Unique identifier for the target channel chat or username of the target channel (in the format `@channelusername`) */
865
+ chat_id: number | string
866
+ /** Invite link name; 0-32 characters */
867
+ name?: string
868
+ /** The number of seconds the subscription will be active for before the next payment. Currently, it must always be 2592000 (30 days). */
869
+ subscription_period: number
870
+ /** The amount of Telegram Stars a user must pay initially and after each subsequent subscription period to be a member of the chat; 1-10000 */
871
+ subscription_price: number
872
+ }
873
+ editChatSubscriptionInviteLink: {
874
+ /** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
875
+ chat_id: number | string
876
+ /** The invite link to edit */
877
+ invite_link: string
878
+ /** Invite link name; 0-32 characters */
879
+ name?: string
880
+ }
881
+ revokeChatInviteLink: {
882
+ /** Unique identifier of the target chat or username of the target channel (in the format `@channelusername`) */
883
+ chat_id: number | string
884
+ /** The invite link to revoke */
885
+ invite_link: string
886
+ }
887
+ approveChatJoinRequest: {
888
+ /** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
889
+ chat_id: number | string
890
+ /** Unique identifier of the target user */
891
+ user_id: number
892
+ }
893
+ declineChatJoinRequest: {
894
+ /** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
895
+ chat_id: number | string
896
+ /** Unique identifier of the target user */
897
+ user_id: number
898
+ }
899
+ setChatPhoto: {
900
+ /** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
901
+ chat_id: number | string
902
+ /** New chat photo, uploaded using multipart/form-data */
903
+ photo: File.InputFile
904
+ }
905
+ deleteChatPhoto: {
906
+ /** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
907
+ chat_id: number | string
908
+ }
909
+ setChatTitle: {
910
+ /** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
911
+ chat_id: number | string
912
+ /** New chat title, 1-128 characters */
913
+ title: string
914
+ }
915
+ setChatDescription: {
916
+ /** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
917
+ chat_id: number | string
918
+ /** New chat description, 0-255 characters */
919
+ description?: string
920
+ }
921
+ pinChatMessage: {
922
+ /** Unique identifier of the business connection on behalf of which the message will be pinned */
923
+ business_connection_id?: string
924
+ /** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
925
+ chat_id: number | string
926
+ /** Identifier of a message to pin */
927
+ message_id: number
928
+ /** Pass _True_ if it is not necessary to send a notification to all chat members about the new pinned message. Notifications are always disabled in channels and private chats. */
929
+ disable_notification?: boolean
930
+ }
931
+ unpinChatMessage: {
932
+ /** Unique identifier of the business connection on behalf of which the message will be unpinned */
933
+ business_connection_id?: string
934
+ /** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
935
+ chat_id: number | string
936
+ /** Identifier of the message to unpin. Required if _business\_connection\_id_ is specified. If not specified, the most recent pinned message (by sending date) will be unpinned. */
937
+ message_id?: number
938
+ }
939
+ unpinAllChatMessages: {
940
+ /** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
941
+ chat_id: number | string
942
+ }
943
+ leaveChat: {
944
+ /** Unique identifier for the target chat or username of the target supergroup or channel (in the format `@channelusername`). Channel direct messages chats aren't supported; leave the corresponding channel instead. */
945
+ chat_id: number | string
946
+ }
947
+ getChat: {
948
+ /** Unique identifier for the target chat or username of the target supergroup or channel (in the format `@channelusername`) */
949
+ chat_id: number | string
950
+ }
951
+ getChatAdministrators: {
952
+ /** Unique identifier for the target chat or username of the target supergroup or channel (in the format `@channelusername`) */
953
+ chat_id: number | string
954
+ }
955
+ getChatMemberCount: {
956
+ /** Unique identifier for the target chat or username of the target supergroup or channel (in the format `@channelusername`) */
957
+ chat_id: number | string
958
+ }
959
+ getChatMember: {
960
+ /** Unique identifier for the target chat or username of the target supergroup or channel (in the format `@channelusername`) */
961
+ chat_id: number | string
962
+ /** Unique identifier of the target user */
963
+ user_id: number
964
+ }
965
+ setChatStickerSet: {
966
+ /** Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`) */
967
+ chat_id: number | string
968
+ /** Name of the sticker set to be set as the group sticker set */
969
+ sticker_set_name: string
970
+ }
971
+ deleteChatStickerSet: {
972
+ /** Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`) */
973
+ chat_id: number | string
974
+ }
975
+ getForumTopicIconStickers: void | Record<string, never>
976
+ createForumTopic: {
977
+ /** Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`) */
978
+ chat_id: number | string
979
+ /** Topic name, 1-128 characters */
980
+ name: string
981
+ /** Color of the topic icon in RGB format. Currently, must be one of 7322096 (0x6FB9F0), 16766590 (0xFFD67E), 13338331 (0xCB86DB), 9367192 (0x8EEE98), 16749490 (0xFF93B2), or 16478047 (0xFB6F5F) */
982
+ icon_color?: number
983
+ /** Unique identifier of the custom emoji shown as the topic icon. Use [getForumTopicIconStickers](https://core.telegram.org/bots/api#getforumtopiciconstickers) to get all allowed custom emoji identifiers. */
984
+ icon_custom_emoji_id?: string
985
+ }
986
+ editForumTopic: {
987
+ /** Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`) */
988
+ chat_id: number | string
989
+ /** Unique identifier for the target message thread of the forum topic */
990
+ message_thread_id: number
991
+ /** New topic name, 0-128 characters. If not specified or empty, the current name of the topic will be kept */
992
+ name?: string
993
+ /** New unique identifier of the custom emoji shown as the topic icon. Use [getForumTopicIconStickers](https://core.telegram.org/bots/api#getforumtopiciconstickers) to get all allowed custom emoji identifiers. Pass an empty string to remove the icon. If not specified, the current icon will be kept */
994
+ icon_custom_emoji_id?: string
995
+ }
996
+ closeForumTopic: {
997
+ /** Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`) */
998
+ chat_id: number | string
999
+ /** Unique identifier for the target message thread of the forum topic */
1000
+ message_thread_id: number
1001
+ }
1002
+ reopenForumTopic: {
1003
+ /** Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`) */
1004
+ chat_id: number | string
1005
+ /** Unique identifier for the target message thread of the forum topic */
1006
+ message_thread_id: number
1007
+ }
1008
+ deleteForumTopic: {
1009
+ /** Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`) */
1010
+ chat_id: number | string
1011
+ /** Unique identifier for the target message thread of the forum topic */
1012
+ message_thread_id: number
1013
+ }
1014
+ unpinAllForumTopicMessages: {
1015
+ /** Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`) */
1016
+ chat_id: number | string
1017
+ /** Unique identifier for the target message thread of the forum topic */
1018
+ message_thread_id: number
1019
+ }
1020
+ editGeneralForumTopic: {
1021
+ /** Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`) */
1022
+ chat_id: number | string
1023
+ /** New topic name, 1-128 characters */
1024
+ name: string
1025
+ }
1026
+ closeGeneralForumTopic: {
1027
+ /** Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`) */
1028
+ chat_id: number | string
1029
+ }
1030
+ reopenGeneralForumTopic: {
1031
+ /** Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`) */
1032
+ chat_id: number | string
1033
+ }
1034
+ hideGeneralForumTopic: {
1035
+ /** Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`) */
1036
+ chat_id: number | string
1037
+ }
1038
+ unhideGeneralForumTopic: {
1039
+ /** Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`) */
1040
+ chat_id: number | string
1041
+ }
1042
+ unpinAllGeneralForumTopicMessages: {
1043
+ /** Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`) */
1044
+ chat_id: number | string
1045
+ }
1046
+ answerCallbackQuery: {
1047
+ /** Unique identifier for the query to be answered */
1048
+ callback_query_id: string
1049
+ /** Text of the notification. If not specified, nothing will be shown to the user, 0-200 characters */
1050
+ text?: string
1051
+ /** If _True_, an alert will be shown by the client instead of a notification at the top of the chat screen. Defaults to _false_. */
1052
+ show_alert?: boolean
1053
+ /**
1054
+ * URL that will be opened by the user's client. If you have created a [Game](https://core.telegram.org/bots/api#game) and accepted the conditions via [@BotFather](https://t.me/botfather), specify the URL that opens your game - note that this will only work if the query comes from a [_callback\_game_](https://core.telegram.org/bots/api#inlinekeyboardbutton) button.
1055
+ *
1056
+ * Otherwise, you may use links like `t.me/your_bot?start=XXXX` that open your bot with a parameter.
1057
+ */
1058
+ url?: string
1059
+ /** The maximum amount of time in seconds that the result of the callback query may be cached client-side. Telegram apps will support caching starting in version 3.14. Defaults to 0. */
1060
+ cache_time?: number
1061
+ }
1062
+ getUserChatBoosts: {
1063
+ /** Unique identifier for the chat or username of the channel (in the format `@channelusername`) */
1064
+ chat_id: number | string
1065
+ /** Unique identifier of the target user */
1066
+ user_id: number
1067
+ }
1068
+ getBusinessConnection: {
1069
+ /** Unique identifier of the business connection */
1070
+ business_connection_id: string
1071
+ }
1072
+ setMyCommands: {
1073
+ /** An array of bot commands to be set as the list of the bot's commands. At most 100 commands can be specified. */
1074
+ commands: Array<Types.BotCommand>
1075
+ /** An object, describing scope of users for which the commands are relevant. Defaults to [BotCommandScopeDefault](https://core.telegram.org/bots/api#botcommandscopedefault). */
1076
+ scope?: Types.BotCommandScope
1077
+ /** A two-letter ISO 639-1 language code. If empty, commands will be applied to all users from the given scope, for whose language there are no dedicated commands */
1078
+ language_code?: string
1079
+ }
1080
+ deleteMyCommands: void | {
1081
+ /** An object, describing scope of users for which the commands are relevant. Defaults to [BotCommandScopeDefault](https://core.telegram.org/bots/api#botcommandscopedefault). */
1082
+ scope?: Types.BotCommandScope
1083
+ /** A two-letter ISO 639-1 language code. If empty, commands will be applied to all users from the given scope, for whose language there are no dedicated commands */
1084
+ language_code?: string
1085
+ }
1086
+ getMyCommands: void | {
1087
+ /** An object, describing scope of users. Defaults to [BotCommandScopeDefault](https://core.telegram.org/bots/api#botcommandscopedefault). */
1088
+ scope?: Types.BotCommandScope
1089
+ /** A two-letter ISO 639-1 language code or an empty string */
1090
+ language_code?: string
1091
+ }
1092
+ setMyName: void | {
1093
+ /** New bot name; 0-64 characters. Pass an empty string to remove the dedicated name for the given language. */
1094
+ name?: string
1095
+ /** A two-letter ISO 639-1 language code. If empty, the name will be shown to all users for whose language there is no dedicated name. */
1096
+ language_code?: string
1097
+ }
1098
+ getMyName: void | {
1099
+ /** A two-letter ISO 639-1 language code or an empty string */
1100
+ language_code?: string
1101
+ }
1102
+ setMyDescription: void | {
1103
+ /** New bot description; 0-512 characters. Pass an empty string to remove the dedicated description for the given language. */
1104
+ description?: string
1105
+ /** A two-letter ISO 639-1 language code. If empty, the description will be applied to all users for whose language there is no dedicated description. */
1106
+ language_code?: string
1107
+ }
1108
+ getMyDescription: void | {
1109
+ /** A two-letter ISO 639-1 language code or an empty string */
1110
+ language_code?: string
1111
+ }
1112
+ setMyShortDescription: void | {
1113
+ /** New short description for the bot; 0-120 characters. Pass an empty string to remove the dedicated short description for the given language. */
1114
+ short_description?: string
1115
+ /** A two-letter ISO 639-1 language code. If empty, the short description will be applied to all users for whose language there is no dedicated short description. */
1116
+ language_code?: string
1117
+ }
1118
+ getMyShortDescription: void | {
1119
+ /** A two-letter ISO 639-1 language code or an empty string */
1120
+ language_code?: string
1121
+ }
1122
+ setChatMenuButton: void | {
1123
+ /** Unique identifier for the target private chat. If not specified, default bot's menu button will be changed */
1124
+ chat_id?: number
1125
+ /** An object for the bot's new menu button. Defaults to [MenuButtonDefault](https://core.telegram.org/bots/api#menubuttondefault) */
1126
+ menu_button?: Types.MenuButton
1127
+ }
1128
+ getChatMenuButton: void | {
1129
+ /** Unique identifier for the target private chat. If not specified, default bot's menu button will be returned */
1130
+ chat_id?: number
1131
+ }
1132
+ setMyDefaultAdministratorRights: void | {
1133
+ /** An object describing new default administrator rights. If not specified, the default administrator rights will be cleared. */
1134
+ rights?: Types.ChatAdministratorRights
1135
+ /** Pass _True_ to change the default administrator rights of the bot in channels. Otherwise, the default administrator rights of the bot for groups and supergroups will be changed. */
1136
+ for_channels?: boolean
1137
+ }
1138
+ getMyDefaultAdministratorRights: void | {
1139
+ /** Pass _True_ to get default administrator rights of the bot in channels. Otherwise, default administrator rights of the bot for groups and supergroups will be returned. */
1140
+ for_channels?: boolean
1141
+ }
1142
+ getAvailableGifts: void | Record<string, never>
1143
+ sendGift: {
1144
+ /** Required if _chat\_id_ is not specified. Unique identifier of the target user who will receive the gift. */
1145
+ user_id?: number
1146
+ /** Required if _user\_id_ is not specified. Unique identifier for the chat or username of the channel (in the format `@channelusername`) that will receive the gift. */
1147
+ chat_id?: number | string
1148
+ /** Identifier of the gift */
1149
+ gift_id: string
1150
+ /** Pass _True_ to pay for the gift upgrade from the bot's balance, thereby making the upgrade free for the receiver */
1151
+ pay_for_upgrade?: boolean
1152
+ /** Text that will be shown along with the gift; 0-128 characters */
1153
+ text?: string
1154
+ /** Mode for parsing entities in the text. See [formatting options](https://core.telegram.org/bots/api#formatting-options) for more details. Entities other than “bold”, “italic”, “underline”, “strikethrough”, “spoiler”, and “custom\_emoji” are ignored. */
1155
+ text_parse_mode?: string
1156
+ /** An array of special entities that appear in the gift text. It can be specified instead of _text\_parse\_mode_. Entities other than “bold”, “italic”, “underline”, “strikethrough”, “spoiler”, and “custom\_emoji” are ignored. */
1157
+ text_entities?: Array<Types.MessageEntity>
1158
+ }
1159
+ giftPremiumSubscription: {
1160
+ /** Unique identifier of the target user who will receive a Telegram Premium subscription */
1161
+ user_id: number
1162
+ /** Number of months the Telegram Premium subscription will be active for the user; must be one of 3, 6, or 12 */
1163
+ month_count: number
1164
+ /** Number of Telegram Stars to pay for the Telegram Premium subscription; must be 1000 for 3 months, 1500 for 6 months, and 2500 for 12 months */
1165
+ star_count: number
1166
+ /** Text that will be shown along with the service message about the subscription; 0-128 characters */
1167
+ text?: string
1168
+ /** Mode for parsing entities in the text. See [formatting options](https://core.telegram.org/bots/api#formatting-options) for more details. Entities other than “bold”, “italic”, “underline”, “strikethrough”, “spoiler”, and “custom\_emoji” are ignored. */
1169
+ text_parse_mode?: string
1170
+ /** An array of special entities that appear in the gift text. It can be specified instead of _text\_parse\_mode_. Entities other than “bold”, “italic”, “underline”, “strikethrough”, “spoiler”, and “custom\_emoji” are ignored. */
1171
+ text_entities?: Array<Types.MessageEntity>
1172
+ }
1173
+ verifyUser: {
1174
+ /** Unique identifier of the target user */
1175
+ user_id: number
1176
+ /** Custom description for the verification; 0-70 characters. Must be empty if the organization isn't allowed to provide a custom verification description. */
1177
+ custom_description?: string
1178
+ }
1179
+ verifyChat: {
1180
+ /** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`). Channel direct messages chats can't be verified. */
1181
+ chat_id: number | string
1182
+ /** Custom description for the verification; 0-70 characters. Must be empty if the organization isn't allowed to provide a custom verification description. */
1183
+ custom_description?: string
1184
+ }
1185
+ removeUserVerification: {
1186
+ /** Unique identifier of the target user */
1187
+ user_id: number
1188
+ }
1189
+ removeChatVerification: {
1190
+ /** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
1191
+ chat_id: number | string
1192
+ }
1193
+ readBusinessMessage: {
1194
+ /** Unique identifier of the business connection on behalf of which to read the message */
1195
+ business_connection_id: string
1196
+ /** Unique identifier of the chat in which the message was received. The chat must have been active in the last 24 hours. */
1197
+ chat_id: number
1198
+ /** Unique identifier of the message to mark as read */
1199
+ message_id: number
1200
+ }
1201
+ deleteBusinessMessages: {
1202
+ /** Unique identifier of the business connection on behalf of which to delete the messages */
1203
+ business_connection_id: string
1204
+ /** An array of 1-100 identifiers of messages to delete. All messages must be from the same chat. See [deleteMessage](https://core.telegram.org/bots/api#deletemessage) for limitations on which messages can be deleted */
1205
+ message_ids: Array<number>
1206
+ }
1207
+ setBusinessAccountName: {
1208
+ /** Unique identifier of the business connection */
1209
+ business_connection_id: string
1210
+ /** The new value of the first name for the business account; 1-64 characters */
1211
+ first_name: string
1212
+ /** The new value of the last name for the business account; 0-64 characters */
1213
+ last_name?: string
1214
+ }
1215
+ setBusinessAccountUsername: {
1216
+ /** Unique identifier of the business connection */
1217
+ business_connection_id: string
1218
+ /** The new value of the username for the business account; 0-32 characters */
1219
+ username?: string
1220
+ }
1221
+ setBusinessAccountBio: {
1222
+ /** Unique identifier of the business connection */
1223
+ business_connection_id: string
1224
+ /** The new value of the bio for the business account; 0-140 characters */
1225
+ bio?: string
1226
+ }
1227
+ setBusinessAccountProfilePhoto: {
1228
+ /** Unique identifier of the business connection */
1229
+ business_connection_id: string
1230
+ /** The new profile photo to set */
1231
+ photo: Types.InputProfilePhoto
1232
+ /** Pass _True_ to set the public photo, which will be visible even if the main photo is hidden by the business account's privacy settings. An account can have only one public photo. */
1233
+ is_public?: boolean
1234
+ }
1235
+ removeBusinessAccountProfilePhoto: {
1236
+ /** Unique identifier of the business connection */
1237
+ business_connection_id: string
1238
+ /** Pass _True_ to remove the public photo, which is visible even if the main photo is hidden by the business account's privacy settings. After the main photo is removed, the previous profile photo (if present) becomes the main photo. */
1239
+ is_public?: boolean
1240
+ }
1241
+ setBusinessAccountGiftSettings: {
1242
+ /** Unique identifier of the business connection */
1243
+ business_connection_id: string
1244
+ /** Pass _True_, if a button for sending a gift to the user or by the business account must always be shown in the input field */
1245
+ show_gift_button: boolean
1246
+ /** Types of gifts accepted by the business account */
1247
+ accepted_gift_types: Types.AcceptedGiftTypes
1248
+ }
1249
+ getBusinessAccountStarBalance: {
1250
+ /** Unique identifier of the business connection */
1251
+ business_connection_id: string
1252
+ }
1253
+ transferBusinessAccountStars: {
1254
+ /** Unique identifier of the business connection */
1255
+ business_connection_id: string
1256
+ /** Number of Telegram Stars to transfer; 1-10000 */
1257
+ star_count: number
1258
+ }
1259
+ getBusinessAccountGifts: {
1260
+ /** Unique identifier of the business connection */
1261
+ business_connection_id: string
1262
+ /** Pass _True_ to exclude gifts that aren't saved to the account's profile page */
1263
+ exclude_unsaved?: boolean
1264
+ /** Pass _True_ to exclude gifts that are saved to the account's profile page */
1265
+ exclude_saved?: boolean
1266
+ /** Pass _True_ to exclude gifts that can be purchased an unlimited number of times */
1267
+ exclude_unlimited?: boolean
1268
+ /** Pass _True_ to exclude gifts that can be purchased a limited number of times */
1269
+ exclude_limited?: boolean
1270
+ /** Pass _True_ to exclude unique gifts */
1271
+ exclude_unique?: boolean
1272
+ /** Pass _True_ to sort results by gift price instead of send date. Sorting is applied before pagination. */
1273
+ sort_by_price?: boolean
1274
+ /** Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results */
1275
+ offset?: string
1276
+ /** The maximum number of gifts to be returned; 1-100. Defaults to 100 */
1277
+ limit?: number
1278
+ }
1279
+ convertGiftToStars: {
1280
+ /** Unique identifier of the business connection */
1281
+ business_connection_id: string
1282
+ /** Unique identifier of the regular gift that should be converted to Telegram Stars */
1283
+ owned_gift_id: string
1284
+ }
1285
+ upgradeGift: {
1286
+ /** Unique identifier of the business connection */
1287
+ business_connection_id: string
1288
+ /** Unique identifier of the regular gift that should be upgraded to a unique one */
1289
+ owned_gift_id: string
1290
+ /** Pass _True_ to keep the original gift text, sender and receiver in the upgraded gift */
1291
+ keep_original_details?: boolean
1292
+ /** The amount of Telegram Stars that will be paid for the upgrade from the business account balance. If `gift.prepaid_upgrade_star_count > 0`, then pass 0, otherwise, the _can\_transfer\_stars_ business bot right is required and `gift.upgrade_star_count` must be passed. */
1293
+ star_count?: number
1294
+ }
1295
+ transferGift: {
1296
+ /** Unique identifier of the business connection */
1297
+ business_connection_id: string
1298
+ /** Unique identifier of the regular gift that should be transferred */
1299
+ owned_gift_id: string
1300
+ /** Unique identifier of the chat which will own the gift. The chat must be active in the last 24 hours. */
1301
+ new_owner_chat_id: number
1302
+ /** The amount of Telegram Stars that will be paid for the transfer from the business account balance. If positive, then the _can\_transfer\_stars_ business bot right is required. */
1303
+ star_count?: number
1304
+ }
1305
+ postStory: {
1306
+ /** Unique identifier of the business connection */
1307
+ business_connection_id: string
1308
+ /** Content of the story */
1309
+ content: Types.InputStoryContent
1310
+ /** Period after which the story is moved to the archive, in seconds; must be one of `6 * 3600`, `12 * 3600`, `86400`, or `2 * 86400` */
1311
+ active_period: number
1312
+ /** Caption of the story, 0-2048 characters after entities parsing */
1313
+ caption?: string
1314
+ /** Mode for parsing entities in the story caption. See [formatting options](https://core.telegram.org/bots/api#formatting-options) for more details. */
1315
+ parse_mode?: string
1316
+ /** An array of special entities that appear in the caption, which can be specified instead of _parse\_mode_ */
1317
+ caption_entities?: Array<Types.MessageEntity>
1318
+ /** An array of clickable areas to be shown on the story */
1319
+ areas?: Array<Types.StoryArea>
1320
+ /** Pass _True_ to keep the story accessible after it expires */
1321
+ post_to_chat_page?: boolean
1322
+ /** Pass _True_ if the content of the story must be protected from forwarding and screenshotting */
1323
+ protect_content?: boolean
1324
+ }
1325
+ editStory: {
1326
+ /** Unique identifier of the business connection */
1327
+ business_connection_id: string
1328
+ /** Unique identifier of the story to edit */
1329
+ story_id: number
1330
+ /** Content of the story */
1331
+ content: Types.InputStoryContent
1332
+ /** Caption of the story, 0-2048 characters after entities parsing */
1333
+ caption?: string
1334
+ /** Mode for parsing entities in the story caption. See [formatting options](https://core.telegram.org/bots/api#formatting-options) for more details. */
1335
+ parse_mode?: string
1336
+ /** An array of special entities that appear in the caption, which can be specified instead of _parse\_mode_ */
1337
+ caption_entities?: Array<Types.MessageEntity>
1338
+ /** An array of clickable areas to be shown on the story */
1339
+ areas?: Array<Types.StoryArea>
1340
+ }
1341
+ deleteStory: {
1342
+ /** Unique identifier of the business connection */
1343
+ business_connection_id: string
1344
+ /** Unique identifier of the story to delete */
1345
+ story_id: number
1346
+ }
1347
+ editMessageText: {
1348
+ /** Unique identifier of the business connection on behalf of which the message to be edited was sent */
1349
+ business_connection_id?: string
1350
+ /** Required if _inline\_message\_id_ is not specified. Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
1351
+ chat_id?: number | string
1352
+ /** Required if _inline\_message\_id_ is not specified. Identifier of the message to edit */
1353
+ message_id?: number
1354
+ /** Required if _chat\_id_ and _message\_id_ are not specified. Identifier of the inline message */
1355
+ inline_message_id?: string
1356
+ /** New text of the message, 1-4096 characters after entities parsing */
1357
+ text: string
1358
+ /** Mode for parsing entities in the message text. See [formatting options](https://core.telegram.org/bots/api#formatting-options) for more details. */
1359
+ parse_mode?: string
1360
+ /** An array of special entities that appear in message text, which can be specified instead of _parse\_mode_ */
1361
+ entities?: Array<Types.MessageEntity>
1362
+ /** Link preview generation options for the message */
1363
+ link_preview_options?: Types.LinkPreviewOptions
1364
+ /** An object for an [inline keyboard](https://core.telegram.org/bots/features#inline-keyboards). */
1365
+ reply_markup?: Types.InlineKeyboardMarkup
1366
+ }
1367
+ editMessageCaption: void | {
1368
+ /** Unique identifier of the business connection on behalf of which the message to be edited was sent */
1369
+ business_connection_id?: string
1370
+ /** Required if _inline\_message\_id_ is not specified. Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
1371
+ chat_id?: number | string
1372
+ /** Required if _inline\_message\_id_ is not specified. Identifier of the message to edit */
1373
+ message_id?: number
1374
+ /** Required if _chat\_id_ and _message\_id_ are not specified. Identifier of the inline message */
1375
+ inline_message_id?: string
1376
+ /** New caption of the message, 0-1024 characters after entities parsing */
1377
+ caption?: string
1378
+ /** Mode for parsing entities in the message caption. See [formatting options](https://core.telegram.org/bots/api#formatting-options) for more details. */
1379
+ parse_mode?: string
1380
+ /** An array of special entities that appear in the caption, which can be specified instead of _parse\_mode_ */
1381
+ caption_entities?: Array<Types.MessageEntity>
1382
+ /** Pass _True_, if the caption must be shown above the message media. Supported only for animation, photo and video messages. */
1383
+ show_caption_above_media?: boolean
1384
+ /** An object for an [inline keyboard](https://core.telegram.org/bots/features#inline-keyboards). */
1385
+ reply_markup?: Types.InlineKeyboardMarkup
1386
+ }
1387
+ editMessageMedia: {
1388
+ /** Unique identifier of the business connection on behalf of which the message to be edited was sent */
1389
+ business_connection_id?: string
1390
+ /** Required if _inline\_message\_id_ is not specified. Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
1391
+ chat_id?: number | string
1392
+ /** Required if _inline\_message\_id_ is not specified. Identifier of the message to edit */
1393
+ message_id?: number
1394
+ /** Required if _chat\_id_ and _message\_id_ are not specified. Identifier of the inline message */
1395
+ inline_message_id?: string
1396
+ /** An object for a new media content of the message */
1397
+ media: Types.InputMedia
1398
+ /** An object for a new [inline keyboard](https://core.telegram.org/bots/features#inline-keyboards). */
1399
+ reply_markup?: Types.InlineKeyboardMarkup
1400
+ }
1401
+ editMessageLiveLocation: {
1402
+ /** Unique identifier of the business connection on behalf of which the message to be edited was sent */
1403
+ business_connection_id?: string
1404
+ /** Required if _inline\_message\_id_ is not specified. Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
1405
+ chat_id?: number | string
1406
+ /** Required if _inline\_message\_id_ is not specified. Identifier of the message to edit */
1407
+ message_id?: number
1408
+ /** Required if _chat\_id_ and _message\_id_ are not specified. Identifier of the inline message */
1409
+ inline_message_id?: string
1410
+ /** Latitude of new location */
1411
+ latitude: number
1412
+ /** Longitude of new location */
1413
+ longitude: number
1414
+ /** New period in seconds during which the location can be updated, starting from the message send date. If 0x7FFFFFFF is specified, then the location can be updated forever. Otherwise, the new value must not exceed the current _live\_period_ by more than a day, and the live location expiration date must remain within the next 90 days. If not specified, then _live\_period_ remains unchanged */
1415
+ live_period?: number
1416
+ /** The radius of uncertainty for the location, measured in meters; 0-1500 */
1417
+ horizontal_accuracy?: number
1418
+ /** Direction in which the user is moving, in degrees. Must be between 1 and 360 if specified. */
1419
+ heading?: number
1420
+ /** The maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified. */
1421
+ proximity_alert_radius?: number
1422
+ /** An object for a new [inline keyboard](https://core.telegram.org/bots/features#inline-keyboards). */
1423
+ reply_markup?: Types.InlineKeyboardMarkup
1424
+ }
1425
+ stopMessageLiveLocation: void | {
1426
+ /** Unique identifier of the business connection on behalf of which the message to be edited was sent */
1427
+ business_connection_id?: string
1428
+ /** Required if _inline\_message\_id_ is not specified. Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
1429
+ chat_id?: number | string
1430
+ /** Required if _inline\_message\_id_ is not specified. Identifier of the message with live location to stop */
1431
+ message_id?: number
1432
+ /** Required if _chat\_id_ and _message\_id_ are not specified. Identifier of the inline message */
1433
+ inline_message_id?: string
1434
+ /** An object for a new [inline keyboard](https://core.telegram.org/bots/features#inline-keyboards). */
1435
+ reply_markup?: Types.InlineKeyboardMarkup
1436
+ }
1437
+ editMessageChecklist: {
1438
+ /** Unique identifier of the business connection on behalf of which the message will be sent */
1439
+ business_connection_id: string
1440
+ /** Unique identifier for the target chat */
1441
+ chat_id: number
1442
+ /** Unique identifier for the target message */
1443
+ message_id: number
1444
+ /** An object for the new checklist */
1445
+ checklist: Types.InputChecklist
1446
+ /** An object for the new inline keyboard for the message */
1447
+ reply_markup?: Types.InlineKeyboardMarkup
1448
+ }
1449
+ editMessageReplyMarkup: void | {
1450
+ /** Unique identifier of the business connection on behalf of which the message to be edited was sent */
1451
+ business_connection_id?: string
1452
+ /** Required if _inline\_message\_id_ is not specified. Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
1453
+ chat_id?: number | string
1454
+ /** Required if _inline\_message\_id_ is not specified. Identifier of the message to edit */
1455
+ message_id?: number
1456
+ /** Required if _chat\_id_ and _message\_id_ are not specified. Identifier of the inline message */
1457
+ inline_message_id?: string
1458
+ /** An object for an [inline keyboard](https://core.telegram.org/bots/features#inline-keyboards). */
1459
+ reply_markup?: Types.InlineKeyboardMarkup
1460
+ }
1461
+ stopPoll: {
1462
+ /** Unique identifier of the business connection on behalf of which the message to be edited was sent */
1463
+ business_connection_id?: string
1464
+ /** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
1465
+ chat_id: number | string
1466
+ /** Identifier of the original message with the poll */
1467
+ message_id: number
1468
+ /** An object for a new message [inline keyboard](https://core.telegram.org/bots/features#inline-keyboards). */
1469
+ reply_markup?: Types.InlineKeyboardMarkup
1470
+ }
1471
+ approveSuggestedPost: {
1472
+ /** Unique identifier for the target direct messages chat */
1473
+ chat_id: number
1474
+ /** Identifier of a suggested post message to approve */
1475
+ message_id: number
1476
+ /** Point in time (Unix timestamp) when the post is expected to be published; omit if the date has already been specified when the suggested post was created. If specified, then the date must be not more than 2678400 seconds (30 days) in the future */
1477
+ send_date?: number
1478
+ }
1479
+ declineSuggestedPost: {
1480
+ /** Unique identifier for the target direct messages chat */
1481
+ chat_id: number
1482
+ /** Identifier of a suggested post message to decline */
1483
+ message_id: number
1484
+ /** Comment for the creator of the suggested post; 0-128 characters */
1485
+ comment?: string
1486
+ }
1487
+ deleteMessage: {
1488
+ /** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
1489
+ chat_id: number | string
1490
+ /** Identifier of the message to delete */
1491
+ message_id: number
1492
+ }
1493
+ deleteMessages: {
1494
+ /** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
1495
+ chat_id: number | string
1496
+ /** An array of 1-100 identifiers of messages to delete. See [deleteMessage](https://core.telegram.org/bots/api#deletemessage) for limitations on which messages can be deleted */
1497
+ message_ids: Array<number>
1498
+ }
1499
+ sendSticker: {
1500
+ /** Unique identifier of the business connection on behalf of which the message will be sent */
1501
+ business_connection_id?: string
1502
+ /** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
1503
+ chat_id: number | string
1504
+ /** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
1505
+ message_thread_id?: number
1506
+ /** Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat */
1507
+ direct_messages_topic_id?: number
1508
+ /** Sticker to send. 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 .WEBP sticker from the Internet, or upload a new .WEBP, .TGS, or .WEBM sticker using multipart/form-data. [More information on Sending Files »](https://core.telegram.org/bots/api#sending-files). Video and animated stickers can't be sent via an HTTP URL. */
1509
+ sticker: File.InputFile | string
1510
+ /** Emoji associated with the sticker; only for just uploaded stickers */
1511
+ emoji?: string
1512
+ /** Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound. */
1513
+ disable_notification?: boolean
1514
+ /** Protects the contents of the sent message from forwarding and saving */
1515
+ protect_content?: boolean
1516
+ /** Pass _True_ to allow up to 1000 messages per second, ignoring [broadcasting limits](https://core.telegram.org/bots/faq#how-can-i-message-all-of-my-bot-39s-subscribers-at-once) for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance */
1517
+ allow_paid_broadcast?: boolean
1518
+ /** Unique identifier of the message effect to be added to the message; for private chats only */
1519
+ message_effect_id?: string
1520
+ /** An object containing the parameters of the suggested post to send; for direct messages chats only. If the message is sent as a reply to another suggested post, then that suggested post is automatically declined. */
1521
+ suggested_post_parameters?: Types.SuggestedPostParameters
1522
+ /** Description of the message to reply to */
1523
+ reply_parameters?: Types.ReplyParameters
1524
+ /** Additional interface options. An object for an [inline keyboard](https://core.telegram.org/bots/features#inline-keyboards), [custom reply keyboard](https://core.telegram.org/bots/features#keyboards), instructions to remove a reply keyboard or to force a reply from the user */
1525
+ reply_markup?: Types.InlineKeyboardMarkup | Types.ReplyKeyboardMarkup | Types.ReplyKeyboardRemove | Types.ForceReply
1526
+ }
1527
+ getStickerSet: {
1528
+ /** Name of the sticker set */
1529
+ name: string
1530
+ }
1531
+ getCustomEmojiStickers: {
1532
+ /** An array of custom emoji identifiers. At most 200 custom emoji identifiers can be specified. */
1533
+ custom_emoji_ids: Array<string>
1534
+ }
1535
+ uploadStickerFile: {
1536
+ /** User identifier of sticker file owner */
1537
+ user_id: number
1538
+ /** A file with the sticker in .WEBP, .PNG, .TGS, or .WEBM format. See [](https://core.telegram.org/stickers)[https://core.telegram.org/stickers](https://core.telegram.org/stickers) for technical requirements. [More information on Sending Files »](https://core.telegram.org/bots/api#sending-files) */
1539
+ sticker: File.InputFile
1540
+ /** Format of the sticker, must be one of “static”, “animated”, “video” */
1541
+ sticker_format: string
1542
+ }
1543
+ createNewStickerSet: {
1544
+ /** User identifier of created sticker set owner */
1545
+ user_id: number
1546
+ /** Short name of sticker set, to be used in `t.me/addstickers/` URLs (e.g., _animals_). Can contain only English letters, digits and underscores. Must begin with a letter, can't contain consecutive underscores and must end in `"_by_<bot_username>"`. `<bot_username>` is case insensitive. 1-64 characters. */
1547
+ name: string
1548
+ /** Sticker set title, 1-64 characters */
1549
+ title: string
1550
+ /** An array of 1-50 initial stickers to be added to the sticker set */
1551
+ stickers: Array<Types.InputSticker>
1552
+ /** Type of stickers in the set, pass “regular”, “mask”, or “custom\_emoji”. By default, a regular sticker set is created. */
1553
+ sticker_type?: string
1554
+ /** 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 */
1555
+ needs_repainting?: boolean
1556
+ }
1557
+ addStickerToSet: {
1558
+ /** User identifier of sticker set owner */
1559
+ user_id: number
1560
+ /** Sticker set name */
1561
+ name: string
1562
+ /** An object with information about the added sticker. If exactly the same sticker had already been added to the set, then the set isn't changed. */
1563
+ sticker: Types.InputSticker
1564
+ }
1565
+ setStickerPositionInSet: {
1566
+ /** File identifier of the sticker */
1567
+ sticker: string
1568
+ /** New sticker position in the set, zero-based */
1569
+ position: number
1570
+ }
1571
+ deleteStickerFromSet: {
1572
+ /** File identifier of the sticker */
1573
+ sticker: string
1574
+ }
1575
+ replaceStickerInSet: {
1576
+ /** User identifier of the sticker set owner */
1577
+ user_id: number
1578
+ /** Sticker set name */
1579
+ name: string
1580
+ /** File identifier of the replaced sticker */
1581
+ old_sticker: string
1582
+ /** An object with information about the added sticker. If exactly the same sticker had already been added to the set, then the set remains unchanged. */
1583
+ sticker: Types.InputSticker
1584
+ }
1585
+ setStickerEmojiList: {
1586
+ /** File identifier of the sticker */
1587
+ sticker: string
1588
+ /** An array of 1-20 emoji associated with the sticker */
1589
+ emoji_list: Array<string>
1590
+ }
1591
+ setStickerKeywords: {
1592
+ /** File identifier of the sticker */
1593
+ sticker: string
1594
+ /** An array of 0-20 search keywords for the sticker with total length of up to 64 characters */
1595
+ keywords?: Array<string>
1596
+ }
1597
+ setStickerMaskPosition: {
1598
+ /** File identifier of the sticker */
1599
+ sticker: string
1600
+ /** An object with the position where the mask should be placed on faces. Omit the parameter to remove the mask position. */
1601
+ mask_position?: Types.MaskPosition
1602
+ }
1603
+ setStickerSetTitle: {
1604
+ /** Sticker set name */
1605
+ name: string
1606
+ /** Sticker set title, 1-64 characters */
1607
+ title: string
1608
+ }
1609
+ setStickerSetThumbnail: {
1610
+ /** Sticker set name */
1611
+ name: string
1612
+ /** User identifier of the sticker set owner */
1613
+ user_id: number
1614
+ /** A **.WEBP** or **.PNG** image with the thumbnail, must be up to 128 kilobytes in size and have a width and height of exactly 100px, or a **.TGS** animation with a thumbnail up to 32 kilobytes in size (see [](https://core.telegram.org/stickers#animation-requirements)[https://core.telegram.org/stickers#animation-requirements](https://core.telegram.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.telegram.org/stickers#video-requirements)[https://core.telegram.org/stickers#video-requirements](https://core.telegram.org/stickers#video-requirements) for video sticker technical requirements. 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. [More information on Sending Files »](https://core.telegram.org/bots/api#sending-files). Animated and video sticker set thumbnails can't be uploaded via HTTP URL. If omitted, then the thumbnail is dropped and the first sticker is used as the thumbnail. */
1615
+ thumbnail?: File.InputFile | string
1616
+ /** Format of the thumbnail, must be one of “static” for a **.WEBP** or **.PNG** image, “animated” for a **.TGS** animation, or “video” for a **.WEBM** video */
1617
+ format: string
1618
+ }
1619
+ setCustomEmojiStickerSetThumbnail: {
1620
+ /** Sticker set name */
1621
+ name: string
1622
+ /** 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. */
1623
+ custom_emoji_id?: string
1624
+ }
1625
+ deleteStickerSet: {
1626
+ /** Sticker set name */
1627
+ name: string
1628
+ }
1629
+ answerInlineQuery: {
1630
+ /** Unique identifier for the answered query */
1631
+ inline_query_id: string
1632
+ /** An array of results for the inline query */
1633
+ results: Array<Types.InlineQueryResult>
1634
+ /** The maximum amount of time in seconds that the result of the inline query may be cached on the server. Defaults to 300. */
1635
+ cache_time?: number
1636
+ /** Pass _True_ if results may be cached on the server side only for the user that sent the query. By default, results may be returned to any user who sends the same query. */
1637
+ is_personal?: boolean
1638
+ /** Pass the offset that a client should send in the next query with the same text to receive more results. Pass an empty string if there are no more results or if you don't support pagination. Offset length can't exceed 64 bytes. */
1639
+ next_offset?: string
1640
+ /** An object describing a button to be shown above inline query results */
1641
+ button?: Types.InlineQueryResultsButton
1642
+ }
1643
+ answerWebAppQuery: {
1644
+ /** Unique identifier for the query to be answered */
1645
+ web_app_query_id: string
1646
+ /** An object describing the message to be sent */
1647
+ result: Types.InlineQueryResult
1648
+ }
1649
+ savePreparedInlineMessage: {
1650
+ /** Unique identifier of the target user that can use the prepared message */
1651
+ user_id: number
1652
+ /** An object describing the message to be sent */
1653
+ result: Types.InlineQueryResult
1654
+ /** Pass _True_ if the message can be sent to private chats with users */
1655
+ allow_user_chats?: boolean
1656
+ /** Pass _True_ if the message can be sent to private chats with bots */
1657
+ allow_bot_chats?: boolean
1658
+ /** Pass _True_ if the message can be sent to group and supergroup chats */
1659
+ allow_group_chats?: boolean
1660
+ /** Pass _True_ if the message can be sent to channel chats */
1661
+ allow_channel_chats?: boolean
1662
+ }
1663
+ sendInvoice: {
1664
+ /** Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) */
1665
+ chat_id: number | string
1666
+ /** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
1667
+ message_thread_id?: number
1668
+ /** Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat */
1669
+ direct_messages_topic_id?: number
1670
+ /** Product name, 1-32 characters */
1671
+ title: string
1672
+ /** Product description, 1-255 characters */
1673
+ description: string
1674
+ /** Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use it for your internal processes. */
1675
+ payload: string
1676
+ /** Payment provider token, obtained via [@BotFather](https://t.me/botfather). Pass an empty string for payments in [Telegram Stars](https://t.me/BotNews/90). */
1677
+ provider_token?: string
1678
+ /** Three-letter ISO 4217 currency code, see [more on currencies](https://core.telegram.org/bots/payments#supported-currencies). Pass “XTR” for payments in [Telegram Stars](https://t.me/BotNews/90). */
1679
+ currency: string
1680
+ /** Price breakdown, an array of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.). Must contain exactly one item for payments in [Telegram Stars](https://t.me/BotNews/90). */
1681
+ prices: Array<Types.LabeledPrice>
1682
+ /** The maximum accepted amount for tips in the _smallest units_ of the currency (integer, **not** float/double). For example, for a maximum tip of `US$ 1.45` pass `max_tip_amount = 145`. See the _exp_ parameter in [currencies.json](https://core.telegram.org/bots/payments/currencies.json), it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0. Not supported for payments in [Telegram Stars](https://t.me/BotNews/90). */
1683
+ max_tip_amount?: number
1684
+ /** An array of suggested amounts of tips in the _smallest units_ of the currency (integer, **not** float/double). At most 4 suggested tip amounts can be specified. The suggested tip amounts must be positive, passed in a strictly increased order and must not exceed _max\_tip\_amount_. */
1685
+ suggested_tip_amounts?: Array<number>
1686
+ /** Unique deep-linking parameter. 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. 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 */
1687
+ start_parameter?: string
1688
+ /** JSON-serialized data about the invoice, which will be shared with the payment provider. A detailed description of required fields should be provided by the payment provider. */
1689
+ provider_data?: string
1690
+ /** URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service. People like it better when they see what they are paying for. */
1691
+ photo_url?: string
1692
+ /** Photo size in bytes */
1693
+ photo_size?: number
1694
+ /** Photo width */
1695
+ photo_width?: number
1696
+ /** Photo height */
1697
+ photo_height?: number
1698
+ /** Pass _True_ if you require the user's full name to complete the order. Ignored for payments in [Telegram Stars](https://t.me/BotNews/90). */
1699
+ need_name?: boolean
1700
+ /** Pass _True_ if you require the user's phone number to complete the order. Ignored for payments in [Telegram Stars](https://t.me/BotNews/90). */
1701
+ need_phone_number?: boolean
1702
+ /** Pass _True_ if you require the user's email address to complete the order. Ignored for payments in [Telegram Stars](https://t.me/BotNews/90). */
1703
+ need_email?: boolean
1704
+ /** Pass _True_ if you require the user's shipping address to complete the order. Ignored for payments in [Telegram Stars](https://t.me/BotNews/90). */
1705
+ need_shipping_address?: boolean
1706
+ /** Pass _True_ if the user's phone number should be sent to the provider. Ignored for payments in [Telegram Stars](https://t.me/BotNews/90). */
1707
+ send_phone_number_to_provider?: boolean
1708
+ /** Pass _True_ if the user's email address should be sent to the provider. Ignored for payments in [Telegram Stars](https://t.me/BotNews/90). */
1709
+ send_email_to_provider?: boolean
1710
+ /** Pass _True_ if the final price depends on the shipping method. Ignored for payments in [Telegram Stars](https://t.me/BotNews/90). */
1711
+ is_flexible?: boolean
1712
+ /** Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound. */
1713
+ disable_notification?: boolean
1714
+ /** Protects the contents of the sent message from forwarding and saving */
1715
+ protect_content?: boolean
1716
+ /** Pass _True_ to allow up to 1000 messages per second, ignoring [broadcasting limits](https://core.telegram.org/bots/faq#how-can-i-message-all-of-my-bot-39s-subscribers-at-once) for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance */
1717
+ allow_paid_broadcast?: boolean
1718
+ /** Unique identifier of the message effect to be added to the message; for private chats only */
1719
+ message_effect_id?: string
1720
+ /** An object containing the parameters of the suggested post to send; for direct messages chats only. If the message is sent as a reply to another suggested post, then that suggested post is automatically declined. */
1721
+ suggested_post_parameters?: Types.SuggestedPostParameters
1722
+ /** Description of the message to reply to */
1723
+ reply_parameters?: Types.ReplyParameters
1724
+ /** An object for an [inline keyboard](https://core.telegram.org/bots/features#inline-keyboards). If empty, one 'Pay `total price`' button will be shown. If not empty, the first button must be a Pay button. */
1725
+ reply_markup?: Types.InlineKeyboardMarkup
1726
+ }
1727
+ createInvoiceLink: {
1728
+ /** Unique identifier of the business connection on behalf of which the link will be created. For payments in [Telegram Stars](https://t.me/BotNews/90) only. */
1729
+ business_connection_id?: string
1730
+ /** Product name, 1-32 characters */
1731
+ title: string
1732
+ /** Product description, 1-255 characters */
1733
+ description: string
1734
+ /** Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use it for your internal processes. */
1735
+ payload: string
1736
+ /** Payment provider token, obtained via [@BotFather](https://t.me/botfather). Pass an empty string for payments in [Telegram Stars](https://t.me/BotNews/90). */
1737
+ provider_token?: string
1738
+ /** Three-letter ISO 4217 currency code, see [more on currencies](https://core.telegram.org/bots/payments#supported-currencies). Pass “XTR” for payments in [Telegram Stars](https://t.me/BotNews/90). */
1739
+ currency: string
1740
+ /** Price breakdown, an array of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.). Must contain exactly one item for payments in [Telegram Stars](https://t.me/BotNews/90). */
1741
+ prices: Array<Types.LabeledPrice>
1742
+ /** The number of seconds the subscription will be active for before the next payment. The currency must be set to “XTR” (Telegram Stars) if the parameter is used. Currently, it must always be 2592000 (30 days) if specified. Any number of subscriptions can be active for a given bot at the same time, including multiple concurrent subscriptions from the same user. Subscription price must no exceed 10000 Telegram Stars. */
1743
+ subscription_period?: number
1744
+ /** The maximum accepted amount for tips in the _smallest units_ of the currency (integer, **not** float/double). For example, for a maximum tip of `US$ 1.45` pass `max_tip_amount = 145`. See the _exp_ parameter in [currencies.json](https://core.telegram.org/bots/payments/currencies.json), it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0. Not supported for payments in [Telegram Stars](https://t.me/BotNews/90). */
1745
+ max_tip_amount?: number
1746
+ /** An array of suggested amounts of tips in the _smallest units_ of the currency (integer, **not** float/double). At most 4 suggested tip amounts can be specified. The suggested tip amounts must be positive, passed in a strictly increased order and must not exceed _max\_tip\_amount_. */
1747
+ suggested_tip_amounts?: Array<number>
1748
+ /** JSON-serialized data about the invoice, which will be shared with the payment provider. A detailed description of required fields should be provided by the payment provider. */
1749
+ provider_data?: string
1750
+ /** URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service. */
1751
+ photo_url?: string
1752
+ /** Photo size in bytes */
1753
+ photo_size?: number
1754
+ /** Photo width */
1755
+ photo_width?: number
1756
+ /** Photo height */
1757
+ photo_height?: number
1758
+ /** Pass _True_ if you require the user's full name to complete the order. Ignored for payments in [Telegram Stars](https://t.me/BotNews/90). */
1759
+ need_name?: boolean
1760
+ /** Pass _True_ if you require the user's phone number to complete the order. Ignored for payments in [Telegram Stars](https://t.me/BotNews/90). */
1761
+ need_phone_number?: boolean
1762
+ /** Pass _True_ if you require the user's email address to complete the order. Ignored for payments in [Telegram Stars](https://t.me/BotNews/90). */
1763
+ need_email?: boolean
1764
+ /** Pass _True_ if you require the user's shipping address to complete the order. Ignored for payments in [Telegram Stars](https://t.me/BotNews/90). */
1765
+ need_shipping_address?: boolean
1766
+ /** Pass _True_ if the user's phone number should be sent to the provider. Ignored for payments in [Telegram Stars](https://t.me/BotNews/90). */
1767
+ send_phone_number_to_provider?: boolean
1768
+ /** Pass _True_ if the user's email address should be sent to the provider. Ignored for payments in [Telegram Stars](https://t.me/BotNews/90). */
1769
+ send_email_to_provider?: boolean
1770
+ /** Pass _True_ if the final price depends on the shipping method. Ignored for payments in [Telegram Stars](https://t.me/BotNews/90). */
1771
+ is_flexible?: boolean
1772
+ }
1773
+ answerShippingQuery: {
1774
+ /** Unique identifier for the query to be answered */
1775
+ shipping_query_id: string
1776
+ /** 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) */
1777
+ ok: boolean
1778
+ /** Required if _ok_ is _True_. An array of available shipping options. */
1779
+ shipping_options?: Array<Types.ShippingOption>
1780
+ /** Required if _ok_ is _False_. Error message in human readable form that explains why it is impossible to complete the order (e.g. “Sorry, delivery to your desired address is unavailable”). Telegram will display this message to the user. */
1781
+ error_message?: string
1782
+ }
1783
+ answerPreCheckoutQuery: {
1784
+ /** Unique identifier for the query to be answered */
1785
+ pre_checkout_query_id: string
1786
+ /** Specify _True_ if everything is alright (goods are available, etc.) and the bot is ready to proceed with the order. Use _False_ if there are any problems. */
1787
+ ok: boolean
1788
+ /** Required if _ok_ is _False_. Error message in human readable form that explains the reason for failure to proceed with the checkout (e.g. "Sorry, somebody just bought the last of our amazing black T-shirts while you were busy filling out your payment details. Please choose a different color or garment!"). Telegram will display this message to the user. */
1789
+ error_message?: string
1790
+ }
1791
+ getMyStarBalance: void | Record<string, never>
1792
+ getStarTransactions: void | {
1793
+ /** Number of transactions to skip in the response */
1794
+ offset?: number
1795
+ /** The maximum number of transactions to be retrieved. Values between 1-100 are accepted. Defaults to 100. */
1796
+ limit?: number
1797
+ }
1798
+ refundStarPayment: {
1799
+ /** Identifier of the user whose payment will be refunded */
1800
+ user_id: number
1801
+ /** Telegram payment identifier */
1802
+ telegram_payment_charge_id: string
1803
+ }
1804
+ editUserStarSubscription: {
1805
+ /** Identifier of the user whose subscription will be edited */
1806
+ user_id: number
1807
+ /** Telegram payment identifier for the subscription */
1808
+ telegram_payment_charge_id: string
1809
+ /** Pass _True_ to cancel extension of the user subscription; the subscription must be active up to the end of the current subscription period. Pass _False_ to allow the user to re-enable a subscription that was previously canceled by the bot. */
1810
+ is_canceled: boolean
1811
+ }
1812
+ setPassportDataErrors: {
1813
+ /** User identifier */
1814
+ user_id: number
1815
+ /** An array describing the errors */
1816
+ errors: Array<Types.PassportElementError>
1817
+ }
1818
+ sendGame: {
1819
+ /** Unique identifier of the business connection on behalf of which the message will be sent */
1820
+ business_connection_id?: string
1821
+ /** Unique identifier for the target chat. Games can't be sent to channel direct messages chats and channel chats. */
1822
+ chat_id: number
1823
+ /** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
1824
+ message_thread_id?: number
1825
+ /** Short name of the game, serves as the unique identifier for the game. Set up your games via [@BotFather](https://t.me/botfather). */
1826
+ game_short_name: string
1827
+ /** Sends the message [silently](https://telegram.org/blog/channels-2-0#silent-messages). Users will receive a notification with no sound. */
1828
+ disable_notification?: boolean
1829
+ /** Protects the contents of the sent message from forwarding and saving */
1830
+ protect_content?: boolean
1831
+ /** Pass _True_ to allow up to 1000 messages per second, ignoring [broadcasting limits](https://core.telegram.org/bots/faq#how-can-i-message-all-of-my-bot-39s-subscribers-at-once) for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance */
1832
+ allow_paid_broadcast?: boolean
1833
+ /** Unique identifier of the message effect to be added to the message; for private chats only */
1834
+ message_effect_id?: string
1835
+ /** Description of the message to reply to */
1836
+ reply_parameters?: Types.ReplyParameters
1837
+ /** An object for an [inline keyboard](https://core.telegram.org/bots/features#inline-keyboards). If empty, one 'Play game\_title' button will be shown. If not empty, the first button must launch the game. */
1838
+ reply_markup?: Types.InlineKeyboardMarkup
1839
+ }
1840
+ setGameScore: {
1841
+ /** User identifier */
1842
+ user_id: number
1843
+ /** New score, must be non-negative */
1844
+ score: number
1845
+ /** Pass _True_ if the high score is allowed to decrease. This can be useful when fixing mistakes or banning cheaters */
1846
+ force?: boolean
1847
+ /** Pass _True_ if the game message should not be automatically edited to include the current scoreboard */
1848
+ disable_edit_message?: boolean
1849
+ /** Required if _inline\_message\_id_ is not specified. Unique identifier for the target chat */
1850
+ chat_id?: number
1851
+ /** Required if _inline\_message\_id_ is not specified. Identifier of the sent message */
1852
+ message_id?: number
1853
+ /** Required if _chat\_id_ and _message\_id_ are not specified. Identifier of the inline message */
1854
+ inline_message_id?: string
1855
+ }
1856
+ getGameHighScores: {
1857
+ /** Target user id */
1858
+ user_id: number
1859
+ /** Required if _inline\_message\_id_ is not specified. Unique identifier for the target chat */
1860
+ chat_id?: number
1861
+ /** Required if _inline\_message\_id_ is not specified. Identifier of the sent message */
1862
+ message_id?: number
1863
+ /** Required if _chat\_id_ and _message\_id_ are not specified. Identifier of the inline message */
1864
+ inline_message_id?: string
1865
+ }
1866
+ }
1867
+
1868
+ export interface MethodResults {
1869
+ getUpdates: Array<Types.Update>
1870
+ setWebhook: true
1871
+ deleteWebhook: true
1872
+ getWebhookInfo: Types.WebhookInfo
1873
+ getMe: Types.User
1874
+ logOut: true
1875
+ close: true
1876
+ sendMessage: Types.Message
1877
+ forwardMessage: Types.Message
1878
+ forwardMessages: Array<Types.MessageId>
1879
+ copyMessage: Types.MessageId
1880
+ copyMessages: Array<Types.MessageId>
1881
+ sendPhoto: Types.Message
1882
+ sendAudio: Types.Message
1883
+ sendDocument: Types.Message
1884
+ sendVideo: Types.Message
1885
+ sendAnimation: Types.Message
1886
+ sendVoice: Types.Message
1887
+ sendVideoNote: Types.Message
1888
+ sendPaidMedia: Types.Message
1889
+ sendMediaGroup: Array<Types.Message>
1890
+ sendLocation: Types.Message
1891
+ sendVenue: Types.Message
1892
+ sendContact: Types.Message
1893
+ sendPoll: Types.Message
1894
+ sendChecklist: Types.Message
1895
+ sendDice: Types.Message
1896
+ sendChatAction: true
1897
+ setMessageReaction: true
1898
+ getUserProfilePhotos: Types.UserProfilePhotos
1899
+ setUserEmojiStatus: true
1900
+ getFile: Types.File
1901
+ banChatMember: true
1902
+ unbanChatMember: true
1903
+ restrictChatMember: true
1904
+ promoteChatMember: true
1905
+ setChatAdministratorCustomTitle: true
1906
+ banChatSenderChat: true
1907
+ unbanChatSenderChat: true
1908
+ setChatPermissions: true
1909
+ exportChatInviteLink: string
1910
+ createChatInviteLink: Types.ChatInviteLink
1911
+ editChatInviteLink: Types.ChatInviteLink
1912
+ createChatSubscriptionInviteLink: Types.ChatInviteLink
1913
+ editChatSubscriptionInviteLink: Types.ChatInviteLink
1914
+ revokeChatInviteLink: Types.ChatInviteLink
1915
+ approveChatJoinRequest: true
1916
+ declineChatJoinRequest: true
1917
+ setChatPhoto: true
1918
+ deleteChatPhoto: true
1919
+ setChatTitle: true
1920
+ setChatDescription: true
1921
+ pinChatMessage: true
1922
+ unpinChatMessage: true
1923
+ unpinAllChatMessages: true
1924
+ leaveChat: true
1925
+ getChat: Types.ChatFullInfo
1926
+ getChatAdministrators: Array<Types.ChatMember>
1927
+ getChatMemberCount: number
1928
+ getChatMember: Types.ChatMember
1929
+ setChatStickerSet: true
1930
+ deleteChatStickerSet: true
1931
+ getForumTopicIconStickers: Array<Types.Sticker>
1932
+ createForumTopic: Types.ForumTopic
1933
+ editForumTopic: true
1934
+ closeForumTopic: true
1935
+ reopenForumTopic: true
1936
+ deleteForumTopic: true
1937
+ unpinAllForumTopicMessages: true
1938
+ editGeneralForumTopic: true
1939
+ closeGeneralForumTopic: true
1940
+ reopenGeneralForumTopic: true
1941
+ hideGeneralForumTopic: true
1942
+ unhideGeneralForumTopic: true
1943
+ unpinAllGeneralForumTopicMessages: true
1944
+ answerCallbackQuery: true
1945
+ getUserChatBoosts: Types.UserChatBoosts
1946
+ getBusinessConnection: Types.BusinessConnection
1947
+ setMyCommands: true
1948
+ deleteMyCommands: true
1949
+ getMyCommands: Array<Types.BotCommand>
1950
+ setMyName: true
1951
+ getMyName: Types.BotName
1952
+ setMyDescription: true
1953
+ getMyDescription: Types.BotDescription
1954
+ setMyShortDescription: true
1955
+ getMyShortDescription: Types.BotShortDescription
1956
+ setChatMenuButton: true
1957
+ getChatMenuButton: Types.MenuButton
1958
+ setMyDefaultAdministratorRights: true
1959
+ getMyDefaultAdministratorRights: Types.ChatAdministratorRights
1960
+ getAvailableGifts: Types.Gifts
1961
+ sendGift: true
1962
+ giftPremiumSubscription: true
1963
+ verifyUser: true
1964
+ verifyChat: true
1965
+ removeUserVerification: true
1966
+ removeChatVerification: true
1967
+ readBusinessMessage: true
1968
+ deleteBusinessMessages: true
1969
+ setBusinessAccountName: true
1970
+ setBusinessAccountUsername: true
1971
+ setBusinessAccountBio: true
1972
+ setBusinessAccountProfilePhoto: true
1973
+ removeBusinessAccountProfilePhoto: true
1974
+ setBusinessAccountGiftSettings: true
1975
+ getBusinessAccountStarBalance: Types.StarAmount
1976
+ transferBusinessAccountStars: true
1977
+ getBusinessAccountGifts: Types.OwnedGifts
1978
+ convertGiftToStars: true
1979
+ upgradeGift: true
1980
+ transferGift: true
1981
+ postStory: Types.Story
1982
+ editStory: Types.Story
1983
+ deleteStory: true
1984
+ editMessageText: Types.Message | true
1985
+ editMessageCaption: Types.Message | true
1986
+ editMessageMedia: Types.Message | true
1987
+ editMessageLiveLocation: Types.Message | true
1988
+ stopMessageLiveLocation: Types.Message | true
1989
+ editMessageChecklist: Types.Message
1990
+ editMessageReplyMarkup: Types.Message | true
1991
+ stopPoll: Types.Poll
1992
+ approveSuggestedPost: true
1993
+ declineSuggestedPost: true
1994
+ deleteMessage: true
1995
+ deleteMessages: true
1996
+ sendSticker: Types.Message
1997
+ getStickerSet: Types.StickerSet
1998
+ getCustomEmojiStickers: Array<Types.Sticker>
1999
+ uploadStickerFile: Types.File
2000
+ createNewStickerSet: true
2001
+ addStickerToSet: true
2002
+ setStickerPositionInSet: true
2003
+ deleteStickerFromSet: true
2004
+ replaceStickerInSet: true
2005
+ setStickerEmojiList: true
2006
+ setStickerKeywords: true
2007
+ setStickerMaskPosition: true
2008
+ setStickerSetTitle: true
2009
+ setStickerSetThumbnail: true
2010
+ setCustomEmojiStickerSetThumbnail: true
2011
+ deleteStickerSet: true
2012
+ answerInlineQuery: true
2013
+ answerWebAppQuery: Types.SentWebAppMessage
2014
+ savePreparedInlineMessage: Types.PreparedInlineMessage
2015
+ sendInvoice: Types.Message
2016
+ createInvoiceLink: string
2017
+ answerShippingQuery: true
2018
+ answerPreCheckoutQuery: true
2019
+ getMyStarBalance: Types.StarAmount
2020
+ getStarTransactions: Types.StarTransactions
2021
+ refundStarPayment: true
2022
+ editUserStarSubscription: true
2023
+ setPassportDataErrors: true
2024
+ sendGame: Types.Message
2025
+ setGameScore: Types.Message | true
2026
+ getGameHighScores: Array<Types.GameHighScore>
2027
+ }