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