@grom.js/effect-tg 0.8.0 → 0.9.0

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