grammy-tools 1.36.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +339 -0
  3. package/out/bot.d.ts +314 -0
  4. package/out/bot.js +669 -0
  5. package/out/composer.d.ts +764 -0
  6. package/out/composer.js +704 -0
  7. package/out/context.d.ts +1618 -0
  8. package/out/context.js +1976 -0
  9. package/out/convenience/constants.d.ts +98 -0
  10. package/out/convenience/constants.js +37 -0
  11. package/out/convenience/frameworks.d.ts +216 -0
  12. package/out/convenience/frameworks.js +370 -0
  13. package/out/convenience/inline_query.d.ts +401 -0
  14. package/out/convenience/inline_query.js +461 -0
  15. package/out/convenience/input_media.d.ts +72 -0
  16. package/out/convenience/input_media.js +82 -0
  17. package/out/convenience/keyboard.d.ts +763 -0
  18. package/out/convenience/keyboard.js +935 -0
  19. package/out/convenience/session.d.ts +345 -0
  20. package/out/convenience/session.js +455 -0
  21. package/out/convenience/webhook.d.ts +59 -0
  22. package/out/convenience/webhook.js +80 -0
  23. package/out/core/api.d.ts +1628 -0
  24. package/out/core/api.js +1907 -0
  25. package/out/core/client.d.ts +180 -0
  26. package/out/core/client.js +226 -0
  27. package/out/core/error.d.ts +53 -0
  28. package/out/core/error.js +87 -0
  29. package/out/core/payload.d.ts +39 -0
  30. package/out/core/payload.js +199 -0
  31. package/out/filter.d.ts +959 -0
  32. package/out/filter.js +378 -0
  33. package/out/mod.d.ts +14 -0
  34. package/out/mod.js +43 -0
  35. package/out/platform.node.d.ts +16 -0
  36. package/out/platform.node.js +43 -0
  37. package/out/shim.node.d.ts +2 -0
  38. package/out/shim.node.js +7 -0
  39. package/out/types.d.ts +1 -0
  40. package/out/types.js +17 -0
  41. package/out/types.node.d.ts +78 -0
  42. package/out/types.node.js +107 -0
  43. package/out/web.d.ts +1 -0
  44. package/out/web.mjs +5172 -0
  45. package/package.json +71 -0
@@ -0,0 +1,1907 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Api = void 0;
4
+ const client_js_1 = require("./client.js");
5
+ /**
6
+ * This class provides access to the full Telegram Bot API. All methods of the
7
+ * API have an equivalent on this class, with the most important parameters
8
+ * pulled up into the function signature, and the other parameters captured by
9
+ * an object.
10
+ *
11
+ * In addition, this class has a property `raw` that provides raw access to the
12
+ * complete Telegram API, with the method signatures 1:1 represented as
13
+ * documented on the website (https://core.telegram.org/bots/api).
14
+ *
15
+ * Every method takes an optional `AbortSignal` object that allows you to cancel
16
+ * the request if desired.
17
+ *
18
+ * In advanced use cases, this class allows to install transformers that can
19
+ * modify the method and payload on the fly before sending it to the Telegram
20
+ * servers. Confer the `config` property for this.
21
+ */
22
+ class Api {
23
+ /**
24
+ * Constructs a new instance of `Api`. It is independent from all other
25
+ * instances of this class. For example, this lets you install a custom set
26
+ * if transformers.
27
+ *
28
+ * @param token Bot API token obtained from [@BotFather](https://t.me/BotFather)
29
+ * @param options Optional API client options for the underlying client instance
30
+ * @param webhookReplyEnvelope Optional envelope to handle webhook replies
31
+ */
32
+ constructor(token, options, webhookReplyEnvelope) {
33
+ this.token = token;
34
+ this.options = options;
35
+ const { raw, use, installedTransformers } = (0, client_js_1.createRawApi)(token, options, webhookReplyEnvelope);
36
+ this.raw = raw;
37
+ this.config = {
38
+ use,
39
+ installedTransformers: () => installedTransformers.slice(),
40
+ };
41
+ }
42
+ /**
43
+ * Use this method to receive incoming updates using long polling (wiki). Returns an Array of Update objects.
44
+ *
45
+ * Notes
46
+ * 1. This method will not work if an outgoing webhook is set up.
47
+ * 2. In order to avoid getting duplicate updates, recalculate offset after each server response.
48
+ *
49
+ * @param other Optional remaining parameters, confer the official reference below
50
+ * @param signal Optional `AbortSignal` to cancel the request
51
+ *
52
+ * **Official reference:** https://core.telegram.org/bots/api#getupdates
53
+ */
54
+ getUpdates(other, signal) {
55
+ return this.raw.getUpdates({ ...other }, signal);
56
+ }
57
+ /**
58
+ * Use this method to specify a URL and receive incoming updates via an outgoing webhook. Whenever there is an update for the bot, we will send an HTTPS POST request to the specified URL, containing a JSON-serialized Update. In case of an unsuccessful request, we will give up after a reasonable amount of attempts. Returns True on success.
59
+ *
60
+ * If you'd like to make sure that the webhook was set by you, you can specify secret data in the parameter secret_token. If specified, the request will contain a header “X-Telegram-Bot-Api-Secret-Token” with the secret token as content.
61
+ *
62
+ * Notes
63
+ * 1. You will not be able to receive updates using getUpdates for as long as an outgoing webhook is set up.
64
+ * 2. To use a self-signed certificate, you need to upload your public key certificate using certificate parameter. Please upload as InputFile, sending a String will not work.
65
+ * 3. Ports currently supported for Webhooks: 443, 80, 88, 8443.
66
+ *
67
+ * If you're having any trouble setting up webhooks, please check out this amazing guide to webhooks.
68
+ *
69
+ * @param url HTTPS url to send updates to. Use an empty string to remove webhook integration
70
+ * @param other Optional remaining parameters, confer the official reference below
71
+ * @param signal Optional `AbortSignal` to cancel the request
72
+ *
73
+ * **Official reference:** https://core.telegram.org/bots/api#setwebhook
74
+ */
75
+ setWebhook(url, other, signal) {
76
+ return this.raw.setWebhook({ url, ...other }, signal);
77
+ }
78
+ /**
79
+ * Use this method to remove webhook integration if you decide to switch back to getUpdates. Returns True on success.
80
+ *
81
+ * @param other Optional remaining parameters, confer the official reference below
82
+ * @param signal Optional `AbortSignal` to cancel the request
83
+ *
84
+ * **Official reference:** https://core.telegram.org/bots/api#deletewebhook
85
+ */
86
+ deleteWebhook(other, signal) {
87
+ return this.raw.deleteWebhook({ ...other }, signal);
88
+ }
89
+ /**
90
+ * Use this method to get current webhook status. Requires no parameters. On success, returns a WebhookInfo object. If the bot is using getUpdates, will return an object with the url field empty.
91
+ *
92
+ * @param signal Optional `AbortSignal` to cancel the request
93
+ *
94
+ * **Official reference:** https://core.telegram.org/bots/api#getwebhookinfo
95
+ */
96
+ getWebhookInfo(signal) {
97
+ return this.raw.getWebhookInfo(signal);
98
+ }
99
+ /**
100
+ * A simple method for testing your bot's authentication token. Requires no parameters. Returns basic information about the bot in form of a User object.
101
+ *
102
+ * @param signal Optional `AbortSignal` to cancel the request
103
+ *
104
+ * **Official reference:** https://core.telegram.org/bots/api#getme
105
+ */
106
+ getMe(signal) {
107
+ return this.raw.getMe(signal);
108
+ }
109
+ /**
110
+ * Use this method to log out from the cloud Bot API server before launching the bot locally. You must log out the bot before running it locally, otherwise there is no guarantee that the bot will receive updates. After a successful call, you can immediately log in on a local server, but will not be able to log in back to the cloud Bot API server for 10 minutes. Returns True on success. Requires no parameters.
111
+ *
112
+ * @param signal Optional `AbortSignal` to cancel the request
113
+ *
114
+ * **Official reference:** https://core.telegram.org/bots/api#logout
115
+ */
116
+ logOut(signal) {
117
+ return this.raw.logOut(signal);
118
+ }
119
+ /**
120
+ * Use this method to close the bot instance before moving it from one local server to another. You need to delete the webhook before calling this method to ensure that the bot isn't launched again after server restart. The method will return error 429 in the first 10 minutes after the bot is launched. Returns True on success. Requires no parameters.
121
+ *
122
+ * @param signal Optional `AbortSignal` to cancel the request
123
+ *
124
+ * **Official reference:** https://core.telegram.org/bots/api#close
125
+ */
126
+ close(signal) {
127
+ return this.raw.close(signal);
128
+ }
129
+ /**
130
+ * Use this method to send text messages. On success, the sent Message is returned.
131
+ *
132
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
133
+ * @param text Text of the message to be sent, 1-4096 characters after entities parsing
134
+ * @param other Optional remaining parameters, confer the official reference below
135
+ * @param signal Optional `AbortSignal` to cancel the request
136
+ *
137
+ * **Official reference:** https://core.telegram.org/bots/api#sendmessage
138
+ */
139
+ sendMessage(chat_id, text, other, signal) {
140
+ return this.raw.sendMessage({ chat_id, text, ...other }, signal);
141
+ }
142
+ /**
143
+ * Use this method to forward messages of any kind. Service messages and messages with protected content can't be forwarded. On success, the sent Message is returned.
144
+ *
145
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
146
+ * @param from_chat_id Unique identifier for the chat where the original message was sent (or channel username in the format @channelusername)
147
+ * @param message_id Message identifier in the chat specified in from_chat_id
148
+ * @param other Optional remaining parameters, confer the official reference below
149
+ * @param signal Optional `AbortSignal` to cancel the request
150
+ *
151
+ * **Official reference:** https://core.telegram.org/bots/api#forwardmessage
152
+ */
153
+ forwardMessage(chat_id, from_chat_id, message_id, other, signal) {
154
+ return this.raw.forwardMessage({ chat_id, from_chat_id, message_id, ...other }, signal);
155
+ }
156
+ /**
157
+ * Use this method to forward multiple messages of any kind. If some of the specified messages can't be found or forwarded, they are skipped. Service messages and messages with protected content can't be forwarded. Album grouping is kept for forwarded messages. On success, an array of MessageId of the sent messages is returned.
158
+ *
159
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
160
+ * @param from_chat_id Unique identifier for the chat where the original messages were sent (or channel username in the format @channelusername)
161
+ * @param message_ids A list of 1-100 identifiers of messages in the chat from_chat_id to forward. The identifiers must be specified in a strictly increasing order.
162
+ * @param other Optional remaining parameters, confer the official reference below
163
+ * @param signal Optional `AbortSignal` to cancel the request
164
+ *
165
+ * **Official reference:** https://core.telegram.org/bots/api#forwardmessages
166
+ */
167
+ forwardMessages(chat_id, from_chat_id, message_ids, other, signal) {
168
+ return this.raw.forwardMessages({
169
+ chat_id,
170
+ from_chat_id,
171
+ message_ids,
172
+ ...other,
173
+ }, signal);
174
+ }
175
+ /**
176
+ * Use this method to copy messages of any kind. Service messages, paid media messages, giveaway messages, giveaway winners messages, and invoice messages can't be copied. A quiz poll can be copied only if the value of the field correct_option_id is known to the bot. The method is analogous to the method forwardMessage, but the copied message doesn't have a link to the original message. Returns the MessageId of the sent message on success.
177
+ *
178
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
179
+ * @param from_chat_id Unique identifier for the chat where the original message was sent (or channel username in the format @channelusername)
180
+ * @param message_id Message identifier in the chat specified in from_chat_id
181
+ * @param other Optional remaining parameters, confer the official reference below
182
+ * @param signal Optional `AbortSignal` to cancel the request
183
+ *
184
+ * **Official reference:** https://core.telegram.org/bots/api#copymessage
185
+ */
186
+ copyMessage(chat_id, from_chat_id, message_id, other, signal) {
187
+ return this.raw.copyMessage({ chat_id, from_chat_id, message_id, ...other }, signal);
188
+ }
189
+ /**
190
+ * Use this method to copy messages of any kind. If some of the specified messages can't be found or copied, they are skipped. Service messages, paid media messages, giveaway messages, giveaway winners messages, and invoice messages can't be copied. A quiz poll can be copied only if the value of the field correct_option_id is known to the bot. The method is analogous to the method forwardMessages, but the copied messages don't have a link to the original message. Album grouping is kept for copied messages. On success, an array of MessageId of the sent messages is returned.
191
+ *
192
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
193
+ * @param from_chat_id Unique identifier for the chat where the original messages were sent (or channel username in the format @channelusername)
194
+ * @param message_ids A list of 1-100 identifiers of messages in the chat from_chat_id to copy. The identifiers must be specified in a strictly increasing order.
195
+ * @param other Optional remaining parameters, confer the official reference below
196
+ * @param signal Optional `AbortSignal` to cancel the request
197
+ *
198
+ * **Official reference:** https://core.telegram.org/bots/api#copymessages
199
+ */
200
+ copyMessages(chat_id, from_chat_id, message_ids, other, signal) {
201
+ return this.raw.copyMessages({
202
+ chat_id,
203
+ from_chat_id,
204
+ message_ids,
205
+ ...other,
206
+ }, signal);
207
+ }
208
+ /**
209
+ * Use this method to send photos. On success, the sent Message is returned.
210
+ *
211
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
212
+ * @param photo 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.
213
+ * @param other Optional remaining parameters, confer the official reference below
214
+ * @param signal Optional `AbortSignal` to cancel the request
215
+ *
216
+ * **Official reference:** https://core.telegram.org/bots/api#sendphoto
217
+ */
218
+ sendPhoto(chat_id, photo, other, signal) {
219
+ return this.raw.sendPhoto({ chat_id, photo, ...other }, signal);
220
+ }
221
+ /**
222
+ * Use this method to send audio files, if you want Telegram clients to display them in the music player. Your audio must be in the .MP3 or .M4A format. On success, the sent Message is returned. Bots can currently send audio files of up to 50 MB in size, this limit may be changed in the future.
223
+ *
224
+ * For sending voice messages, use the sendVoice method instead.
225
+ *
226
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
227
+ * @param audio 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.
228
+ * @param other Optional remaining parameters, confer the official reference below
229
+ * @param signal Optional `AbortSignal` to cancel the request
230
+ *
231
+ * **Official reference:** https://core.telegram.org/bots/api#sendaudio
232
+ */
233
+ sendAudio(chat_id, audio, other, signal) {
234
+ return this.raw.sendAudio({ chat_id, audio, ...other }, signal);
235
+ }
236
+ /**
237
+ * Use this method to send general files. On success, the sent Message is returned. Bots can currently send files of any type of up to 50 MB in size, this limit may be changed in the future.
238
+ *
239
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
240
+ * @param document 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.
241
+ * @param other Optional remaining parameters, confer the official reference below
242
+ * @param signal Optional `AbortSignal` to cancel the request
243
+ *
244
+ * **Official reference:** https://core.telegram.org/bots/api#senddocument
245
+ */
246
+ sendDocument(chat_id, document, other, signal) {
247
+ return this.raw.sendDocument({ chat_id, document, ...other }, signal);
248
+ }
249
+ /**
250
+ * Use this method to send video files, Telegram clients support mp4 videos (other formats may be sent as Document). On success, the sent Message is returned. Bots can currently send video files of up to 50 MB in size, this limit may be changed in the future.
251
+ *
252
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
253
+ * @param video 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.
254
+ * @param other Optional remaining parameters, confer the official reference below
255
+ * @param signal Optional `AbortSignal` to cancel the request
256
+ *
257
+ * **Official reference:** https://core.telegram.org/bots/api#sendvideo
258
+ */
259
+ sendVideo(chat_id, video, other, signal) {
260
+ return this.raw.sendVideo({ chat_id, video, ...other }, signal);
261
+ }
262
+ /**
263
+ * Use this method to send animation files (GIF or H.264/MPEG-4 AVC video without sound). On success, the sent Message is returned. Bots can currently send animation files of up to 50 MB in size, this limit may be changed in the future.
264
+ *
265
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
266
+ * @param animation 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.
267
+ * @param other Optional remaining parameters, confer the official reference below
268
+ * @param signal Optional `AbortSignal` to cancel the request
269
+ *
270
+ * **Official reference:** https://core.telegram.org/bots/api#sendanimation
271
+ */
272
+ sendAnimation(chat_id, animation, other, signal) {
273
+ return this.raw.sendAnimation({ chat_id, animation, ...other }, signal);
274
+ }
275
+ /**
276
+ * Use this method to send audio files, if you want Telegram clients to display the file as a playable voice message. For this to work, your audio must be in an .OGG file encoded with OPUS (other formats may be sent as Audio or Document). On success, the sent Message is returned. Bots can currently send voice messages of up to 50 MB in size, this limit may be changed in the future.
277
+ *
278
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
279
+ * @param voice 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.
280
+ * @param other Optional remaining parameters, confer the official reference below
281
+ * @param signal Optional `AbortSignal` to cancel the request
282
+ *
283
+ * **Official reference:** https://core.telegram.org/bots/api#sendvoice
284
+ */
285
+ sendVoice(chat_id, voice, other, signal) {
286
+ return this.raw.sendVoice({ chat_id, voice, ...other }, signal);
287
+ }
288
+ /**
289
+ * Use this method to send video messages. On success, the sent Message is returned.
290
+ * As of v.4.0, Telegram clients support rounded square mp4 videos of up to 1 minute long.
291
+ *
292
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
293
+ * @param video_note 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.. Sending video notes by a URL is currently unsupported
294
+ * @param other Optional remaining parameters, confer the official reference below
295
+ * @param signal Optional `AbortSignal` to cancel the request
296
+ *
297
+ * **Official reference:** https://core.telegram.org/bots/api#sendvideonote
298
+ */
299
+ sendVideoNote(chat_id, video_note, other, signal) {
300
+ return this.raw.sendVideoNote({ chat_id, video_note, ...other }, signal);
301
+ }
302
+ /**
303
+ * Use this method to send a group of photos, videos, documents or audios as an album. Documents and audio files can be only grouped in an album with messages of the same type. On success, an array of Messages that were sent is returned.
304
+ *
305
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
306
+ * @param media An array describing messages to be sent, must include 2-10 items
307
+ * @param other Optional remaining parameters, confer the official reference below
308
+ * @param signal Optional `AbortSignal` to cancel the request
309
+ *
310
+ * **Official reference:** https://core.telegram.org/bots/api#sendmediagroup
311
+ */
312
+ sendMediaGroup(chat_id, media, other, signal) {
313
+ return this.raw.sendMediaGroup({ chat_id, media, ...other }, signal);
314
+ }
315
+ /**
316
+ * Use this method to send point on the map. On success, the sent Message is returned.
317
+ *
318
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
319
+ * @param latitude Latitude of the location
320
+ * @param longitude Longitude of the location
321
+ * @param other Optional remaining parameters, confer the official reference below
322
+ * @param signal Optional `AbortSignal` to cancel the request
323
+ *
324
+ * **Official reference:** https://core.telegram.org/bots/api#sendlocation
325
+ */
326
+ sendLocation(chat_id, latitude, longitude, other, signal) {
327
+ return this.raw.sendLocation({ chat_id, latitude, longitude, ...other }, signal);
328
+ }
329
+ /**
330
+ * Use this method to edit live location messages. A location can be edited until its live_period expires or editing is explicitly disabled by a call to stopMessageLiveLocation. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned.
331
+ *
332
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
333
+ * @param message_id Identifier of the message to edit
334
+ * @param latitude Latitude of new location
335
+ * @param longitude Longitude of new location
336
+ * @param other Optional remaining parameters, confer the official reference below
337
+ * @param signal Optional `AbortSignal` to cancel the request
338
+ *
339
+ * **Official reference:** https://core.telegram.org/bots/api#editmessagelivelocation
340
+ */
341
+ editMessageLiveLocation(chat_id, message_id, latitude, longitude, other, signal) {
342
+ return this.raw.editMessageLiveLocation({ chat_id, message_id, latitude, longitude, ...other }, signal);
343
+ }
344
+ /**
345
+ * Use this method to edit live location inline messages. A location can be edited until its live_period expires or editing is explicitly disabled by a call to stopMessageLiveLocation. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned.
346
+ *
347
+ * @param inline_message_id Identifier of the inline message
348
+ * @param latitude Latitude of new location
349
+ * @param longitude Longitude of new location
350
+ * @param other Optional remaining parameters, confer the official reference below
351
+ * @param signal Optional `AbortSignal` to cancel the request
352
+ *
353
+ * **Official reference:** https://core.telegram.org/bots/api#editmessagelivelocation
354
+ */
355
+ editMessageLiveLocationInline(inline_message_id, latitude, longitude, other, signal) {
356
+ return this.raw.editMessageLiveLocation({ inline_message_id, latitude, longitude, ...other }, signal);
357
+ }
358
+ /**
359
+ * Use this method to stop updating a live location message before live_period expires. On success, if the message is not an inline message, the edited Message is returned, otherwise True is returned.
360
+ *
361
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
362
+ * @param message_id Identifier of the message with live location to stop
363
+ * @param other Optional remaining parameters, confer the official reference below
364
+ * @param signal Optional `AbortSignal` to cancel the request
365
+ *
366
+ * **Official reference:** https://core.telegram.org/bots/api#stopmessagelivelocation
367
+ */
368
+ stopMessageLiveLocation(chat_id, message_id, other, signal) {
369
+ return this.raw.stopMessageLiveLocation({ chat_id, message_id, ...other }, signal);
370
+ }
371
+ /**
372
+ * Use this method to stop updating a live location message before live_period expires. On success, if the message is not an inline message, the edited Message is returned, otherwise True is returned.
373
+ *
374
+ * @param inline_message_id Identifier of the inline message
375
+ * @param other Optional remaining parameters, confer the official reference below
376
+ * @param signal Optional `AbortSignal` to cancel the request
377
+ *
378
+ * **Official reference:** https://core.telegram.org/bots/api#stopmessagelivelocation
379
+ */
380
+ stopMessageLiveLocationInline(inline_message_id, other, signal) {
381
+ return this.raw.stopMessageLiveLocation({ inline_message_id, ...other }, signal);
382
+ }
383
+ /**
384
+ * Use this method to send paid media. On success, the sent Message is returned.
385
+ *
386
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
387
+ * @param star_count The number of Telegram Stars that must be paid to buy access to the media
388
+ * @param media An array describing the media to be sent; up to 10 items
389
+ * @param other Optional remaining parameters, confer the official reference below
390
+ * @param signal Optional `AbortSignal` to cancel the request
391
+ *
392
+ * **Official reference:** https://core.telegram.org/bots/api#sendpaidmedia
393
+ */
394
+ sendPaidMedia(chat_id, star_count, media, other, signal) {
395
+ return this.raw.sendPaidMedia({ chat_id, star_count, media, ...other }, signal);
396
+ }
397
+ /**
398
+ * Use this method to send information about a venue. On success, the sent Message is returned.
399
+ *
400
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
401
+ * @param latitude Latitude of the venue
402
+ * @param longitude Longitude of the venue
403
+ * @param title Name of the venue
404
+ * @param address Address of the venue
405
+ * @param other Optional remaining parameters, confer the official reference below
406
+ * @param signal Optional `AbortSignal` to cancel the request
407
+ *
408
+ * **Official reference:** https://core.telegram.org/bots/api#sendvenue
409
+ */
410
+ sendVenue(chat_id, latitude, longitude, title, address, other, signal) {
411
+ return this.raw.sendVenue({ chat_id, latitude, longitude, title, address, ...other }, signal);
412
+ }
413
+ /**
414
+ * Use this method to send phone contacts. On success, the sent Message is returned.
415
+ *
416
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
417
+ * @param phone_number Contact's phone number
418
+ * @param first_name Contact's first name
419
+ * @param other Optional remaining parameters, confer the official reference below
420
+ * @param signal Optional `AbortSignal` to cancel the request
421
+ *
422
+ * **Official reference:** https://core.telegram.org/bots/api#sendcontact
423
+ */
424
+ sendContact(chat_id, phone_number, first_name, other, signal) {
425
+ return this.raw.sendContact({ chat_id, phone_number, first_name, ...other }, signal);
426
+ }
427
+ /**
428
+ * Use this method to send a native poll. On success, the sent Message is returned.
429
+ *
430
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
431
+ * @param question Poll question, 1-300 characters
432
+ * @param options A list of answer options, 2-10 strings 1-100 characters each
433
+ * @param other Optional remaining parameters, confer the official reference below
434
+ * @param signal Optional `AbortSignal` to cancel the request
435
+ *
436
+ * **Official reference:** https://core.telegram.org/bots/api#sendpoll
437
+ */
438
+ sendPoll(chat_id, question, options, other, signal) {
439
+ return this.raw.sendPoll({ chat_id, question, options, ...other }, signal);
440
+ }
441
+ /**
442
+ * Use this method to send an animated emoji that will display a random value. On success, the sent Message is returned.
443
+ *
444
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
445
+ * @param emoji Emoji on which the dice throw animation is based. Currently, must be one of “🎲”, “🎯”, “🏀”, “⚽”, “🎳”, or “🎰”. Dice can have values 1-6 for “🎲”, “🎯” and “🎳”, values 1-5 for “🏀” and “⚽”, and values 1-64 for “🎰”. Defaults to “🎲”
446
+ * @param other Optional remaining parameters, confer the official reference below
447
+ * @param signal Optional `AbortSignal` to cancel the request
448
+ *
449
+ * **Official reference:** https://core.telegram.org/bots/api#senddice
450
+ */
451
+ sendDice(chat_id, emoji, other, signal) {
452
+ return this.raw.sendDice({ chat_id, emoji, ...other }, signal);
453
+ }
454
+ /**
455
+ * Use this method to change the chosen reactions on a message. Service messages of some types can't be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. Bots can't use paid reactions. Returns True on success.
456
+ *
457
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
458
+ * @param message_id Identifier of the target message
459
+ * @param reaction A list 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.
460
+ * @param other Optional remaining parameters, confer the official reference below
461
+ * @param signal Optional `AbortSignal` to cancel the request
462
+ *
463
+ * **Official reference:** https://core.telegram.org/bots/api#setmessagereaction
464
+ */
465
+ setMessageReaction(chat_id, message_id, reaction, other, signal) {
466
+ return this.raw.setMessageReaction({
467
+ chat_id,
468
+ message_id,
469
+ reaction,
470
+ ...other,
471
+ }, signal);
472
+ }
473
+ /**
474
+ * Use this method when you need to tell the user that something is happening on the bot's side. The status is set for 5 seconds or less (when a message arrives from your bot, Telegram clients clear its typing status). Returns True on success.
475
+ *
476
+ * Example: The ImageBot needs some time to process a request and upload the image. Instead of sending a text message along the lines of “Retrieving image, please wait…”, the bot may use sendChatAction with action = upload_photo. The user will see a “sending photo” status for the bot.
477
+ *
478
+ * We only recommend using this method when a response from the bot will take a noticeable amount of time to arrive.
479
+ *
480
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
481
+ * @param action Type of action to broadcast. Choose one, depending on what the user is about to receive: typing for text messages, upload_photo for photos, record_video or upload_video for videos, record_voice or upload_voice for voice notes, upload_document for general files, choose_sticker for stickers, find_location for location data, record_video_note or upload_video_note for video notes.
482
+ * @param other Optional remaining parameters, confer the official reference below
483
+ * @param signal Optional `AbortSignal` to cancel the request
484
+ *
485
+ * **Official reference:** https://core.telegram.org/bots/api#sendchataction
486
+ */
487
+ sendChatAction(chat_id, action, other, signal) {
488
+ return this.raw.sendChatAction({ chat_id, action, ...other }, signal);
489
+ }
490
+ /**
491
+ * Use this method to get a list of profile pictures for a user. Returns a UserProfilePhotos object.
492
+ *
493
+ * @param user_id Unique identifier of the target user
494
+ * @param other Optional remaining parameters, confer the official reference below
495
+ * @param signal Optional `AbortSignal` to cancel the request
496
+ *
497
+ * **Official reference:** https://core.telegram.org/bots/api#getuserprofilephotos
498
+ */
499
+ getUserProfilePhotos(user_id, other, signal) {
500
+ return this.raw.getUserProfilePhotos({ user_id, ...other }, signal);
501
+ }
502
+ /**
503
+ * Changes the emoji status for a given user that previously allowed the bot to manage their emoji status via the Mini App method requestEmojiStatusAccess. Returns True on success.
504
+ *
505
+ * @param user_id Unique identifier of the target user
506
+ * @param other Optional remaining parameters, confer the official reference below
507
+ * @param signal Optional `AbortSignal` to cancel the request
508
+ *
509
+ * **Official reference:** https://core.telegram.org/bots/api#setuseremojistatus
510
+ */
511
+ setUserEmojiStatus(user_id, other, signal) {
512
+ return this.raw.setUserEmojiStatus({ user_id, ...other }, signal);
513
+ }
514
+ /**
515
+ * Use this method to get the list of boosts added to a chat by a user. Requires administrator rights in the chat. Returns a UserChatBoosts object.
516
+ *
517
+ * @param chat_id Unique identifier for the chat or username of the channel (in the format @channelusername)
518
+ * @param user_id Unique identifier of the target user
519
+ * @param signal Optional `AbortSignal` to cancel the request
520
+ *
521
+ * **Official reference:** https://core.telegram.org/bots/api#getuserchatboosts
522
+ */
523
+ getUserChatBoosts(chat_id, user_id, signal) {
524
+ return this.raw.getUserChatBoosts({ chat_id, user_id }, signal);
525
+ }
526
+ /**
527
+ * Use this method to get information about the connection of the bot with a business account. Returns a BusinessConnection object on success.
528
+ *
529
+ * @param business_connection_id Unique identifier of the business connection
530
+ * @param signal Optional `AbortSignal` to cancel the request
531
+ *
532
+ * **Official reference:** https://core.telegram.org/bots/api#getbusinessconnection
533
+ */
534
+ getBusinessConnection(business_connection_id, signal) {
535
+ return this.raw.getBusinessConnection({ business_connection_id }, signal);
536
+ }
537
+ /**
538
+ * Use this method to get basic info about a file and prepare it for downloading. For the moment, bots can download files of up to 20MB in size. On success, a File object is returned. The file can then be downloaded via the link `https://api.telegram.org/file/bot<token>/<file_path>`, where `<file_path>` is taken from the response. It is guaranteed that the link will be valid for at least 1 hour. When the link expires, a new one can be requested by calling getFile again.
539
+ *
540
+ * Note: This function may not preserve the original file name and MIME type. You should save the file's MIME type and name (if available) when the File object is received.
541
+ *
542
+ * @param file_id File identifier to get info about
543
+ * @param signal Optional `AbortSignal` to cancel the request
544
+ *
545
+ * **Official reference:** https://core.telegram.org/bots/api#getfile
546
+ */
547
+ getFile(file_id, signal) {
548
+ return this.raw.getFile({ file_id }, signal);
549
+ }
550
+ /** @deprecated Use `banChatMember` instead. */
551
+ kickChatMember(...args) {
552
+ return this.banChatMember(...args);
553
+ }
554
+ /**
555
+ * Use this method to ban a user in a group, a supergroup or a channel. In the case of supergroups and channels, the user will not be able to return to the chat on their own using invite links, etc., unless unbanned first. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns True on success.
556
+ *
557
+ * @param chat_id Unique identifier for the target group or username of the target supergroup or channel (in the format @channelusername)
558
+ * @param user_id Unique identifier of the target user
559
+ * @param other Optional remaining parameters, confer the official reference below
560
+ * @param signal Optional `AbortSignal` to cancel the request
561
+ *
562
+ * **Official reference:** https://core.telegram.org/bots/api#banchatmember
563
+ */
564
+ banChatMember(chat_id, user_id, other, signal) {
565
+ return this.raw.banChatMember({ chat_id, user_id, ...other }, signal);
566
+ }
567
+ /**
568
+ * Use this method to unban a previously banned user in a supergroup or channel. The user will not return to the group or channel automatically, but will be able to join via link, etc. The bot must be an administrator for this to work. By default, this method guarantees that after the call the user is not a member of the chat, but will be able to join it. So if the user is a member of the chat they will also be removed from the chat. If you don't want this, use the parameter only_if_banned. Returns True on success.
569
+ *
570
+ * @param chat_id Unique identifier for the target group or username of the target supergroup or channel (in the format @username)
571
+ * @param user_id Unique identifier of the target user
572
+ * @param other Optional remaining parameters, confer the official reference below
573
+ * @param signal Optional `AbortSignal` to cancel the request
574
+ *
575
+ * **Official reference:** https://core.telegram.org/bots/api#unbanchatmember
576
+ */
577
+ unbanChatMember(chat_id, user_id, other, signal) {
578
+ return this.raw.unbanChatMember({ chat_id, user_id, ...other }, signal);
579
+ }
580
+ /**
581
+ * Use this method to restrict a user in a supergroup. The bot must be an administrator in the supergroup for this to work and must have the appropriate administrator rights. Pass True for all permissions to lift restrictions from a user. Returns True on success.
582
+ *
583
+ * @param chat_id Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)
584
+ * @param user_id Unique identifier of the target user
585
+ * @param permissions An object for new user permissions
586
+ * @param other Optional remaining parameters, confer the official reference below
587
+ * @param signal Optional `AbortSignal` to cancel the request
588
+ *
589
+ * **Official reference:** https://core.telegram.org/bots/api#restrictchatmember
590
+ */
591
+ restrictChatMember(chat_id, user_id, permissions, other, signal) {
592
+ return this.raw.restrictChatMember({ chat_id, user_id, permissions, ...other }, signal);
593
+ }
594
+ /**
595
+ * Use this method to promote or demote a user in a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Pass False for all boolean parameters to demote a user. Returns True on success.
596
+ *
597
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
598
+ * @param user_id Unique identifier of the target user
599
+ * @param other Optional remaining parameters, confer the official reference below
600
+ * @param signal Optional `AbortSignal` to cancel the request
601
+ *
602
+ * **Official reference:** https://core.telegram.org/bots/api#promotechatmember
603
+ */
604
+ promoteChatMember(chat_id, user_id, other, signal) {
605
+ return this.raw.promoteChatMember({ chat_id, user_id, ...other }, signal);
606
+ }
607
+ /**
608
+ * Use this method to set a custom title for an administrator in a supergroup promoted by the bot. Returns True on success.
609
+ *
610
+ * @param chat_id Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)
611
+ * @param user_id Unique identifier of the target user
612
+ * @param custom_title New custom title for the administrator; 0-16 characters, emoji are not allowed
613
+ * @param signal Optional `AbortSignal` to cancel the request
614
+ *
615
+ * **Official reference:** https://core.telegram.org/bots/api#setchatadministratorcustomtitle
616
+ */
617
+ setChatAdministratorCustomTitle(chat_id, user_id, custom_title, signal) {
618
+ return this.raw.setChatAdministratorCustomTitle({ chat_id, user_id, custom_title }, signal);
619
+ }
620
+ /**
621
+ * Use this method to ban a channel chat in a supergroup or a channel. Until the chat is unbanned, the owner of the banned chat won't be able to send messages on behalf of any of their channels. The bot must be an administrator in the supergroup or channel for this to work and must have the appropriate administrator rights. Returns True on success.
622
+ *
623
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
624
+ * @param sender_chat_id Unique identifier of the target sender chat
625
+ * @param signal Optional `AbortSignal` to cancel the request
626
+ *
627
+ * **Official reference:** https://core.telegram.org/bots/api#banchatsenderchat
628
+ */
629
+ banChatSenderChat(chat_id, sender_chat_id, signal) {
630
+ return this.raw.banChatSenderChat({ chat_id, sender_chat_id }, signal);
631
+ }
632
+ /**
633
+ * Use this method to unban a previously banned channel chat in a supergroup or channel. The bot must be an administrator for this to work and must have the appropriate administrator rights. Returns True on success.
634
+ *
635
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
636
+ * @param sender_chat_id Unique identifier of the target sender chat
637
+ * @param signal Optional `AbortSignal` to cancel the request
638
+ *
639
+ * **Official reference:** https://core.telegram.org/bots/api#unbanchatsenderchat
640
+ */
641
+ unbanChatSenderChat(chat_id, sender_chat_id, signal) {
642
+ return this.raw.unbanChatSenderChat({ chat_id, sender_chat_id }, signal);
643
+ }
644
+ /**
645
+ * Use this method to set default chat permissions for all members. The bot must be an administrator in the group or a supergroup for this to work and must have the can_restrict_members administrator rights. Returns True on success.
646
+ *
647
+ * @param chat_id Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)
648
+ * @param permissions New default chat permissions
649
+ * @param other Optional remaining parameters, confer the official reference below
650
+ * @param signal Optional `AbortSignal` to cancel the request
651
+ *
652
+ * **Official reference:** https://core.telegram.org/bots/api#setchatpermissions
653
+ */
654
+ setChatPermissions(chat_id, permissions, other, signal) {
655
+ return this.raw.setChatPermissions({ chat_id, permissions, ...other }, signal);
656
+ }
657
+ /**
658
+ * Use this method to generate a new primary invite link for a chat; any previously generated primary link is revoked. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the new invite link as String on success.
659
+ *
660
+ * Note: Each administrator in a chat generates their own invite links. Bots can't use invite links generated by other administrators. If you want your bot to work with invite links, it will need to generate its own link using exportChatInviteLink or by calling the getChat method. If your bot needs to generate a new primary invite link replacing its previous one, use exportChatInviteLink again.
661
+ *
662
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
663
+ * @param signal Optional `AbortSignal` to cancel the request
664
+ *
665
+ * **Official reference:** https://core.telegram.org/bots/api#exportchatinvitelink
666
+ */
667
+ exportChatInviteLink(chat_id, signal) {
668
+ return this.raw.exportChatInviteLink({ chat_id }, signal);
669
+ }
670
+ /**
671
+ * Use this method to create an additional invite link for a chat. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. The link can be revoked using the method revokeChatInviteLink. Returns the new invite link as ChatInviteLink object.
672
+ *
673
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
674
+ * @param other Optional remaining parameters, confer the official reference below
675
+ * @param signal Optional `AbortSignal` to cancel the request
676
+ *
677
+ * **Official reference:** https://core.telegram.org/bots/api#createchatinvitelink
678
+ */
679
+ createChatInviteLink(chat_id, other, signal) {
680
+ return this.raw.createChatInviteLink({ chat_id, ...other }, signal);
681
+ }
682
+ /**
683
+ * Use this method to edit a non-primary invite link created by the bot. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the edited invite link as a ChatInviteLink object.
684
+ *
685
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
686
+ * @param invite_link The invite link to edit
687
+ * @param other Optional remaining parameters, confer the official reference below
688
+ * @param signal Optional `AbortSignal` to cancel the request
689
+ *
690
+ * **Official reference:** https://core.telegram.org/bots/api#editchatinvitelink
691
+ */
692
+ editChatInviteLink(chat_id, invite_link, other, signal) {
693
+ return this.raw.editChatInviteLink({ chat_id, invite_link, ...other }, signal);
694
+ }
695
+ /**
696
+ * Use this method to create a subscription invite link for a channel chat. The bot must have the can_invite_users administrator rights. The link can be edited using the method editChatSubscriptionInviteLink or revoked using the method revokeChatInviteLink. Returns the new invite link as a ChatInviteLink object.
697
+ *
698
+ * @param chat_id Unique identifier for the target channel chat or username of the target channel (in the format @channelusername)
699
+ * @param subscription_period The number of seconds the subscription will be active for before the next payment. Currently, it must always be 2592000 (30 days).
700
+ * @param subscription_price The amount of Telegram Stars a user must pay initially and after each subsequent subscription period to be a member of the chat; 1-2500
701
+ * @param other Optional remaining parameters, confer the official reference below
702
+ * @param signal Optional `AbortSignal` to cancel the request
703
+ *
704
+ * **Official reference:** https://core.telegram.org/bots/api#createchatsubscriptioninvitelink
705
+ */
706
+ createChatSubscriptionInviteLink(chat_id, subscription_period, subscription_price, other, signal) {
707
+ return this.raw.createChatSubscriptionInviteLink({ chat_id, subscription_period, subscription_price, ...other }, signal);
708
+ }
709
+ /**
710
+ * Use this method to edit a subscription invite link created by the bot. The bot must have the can_invite_users administrator rights. Returns the edited invite link as a ChatInviteLink object.
711
+ *
712
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
713
+ * @param invite_link The invite link to edit
714
+ * @param other Optional remaining parameters, confer the official reference below
715
+ * @param signal Optional `AbortSignal` to cancel the request
716
+ *
717
+ * **Official reference:** https://core.telegram.org/bots/api#editchatsubscriptioninvitelink
718
+ */
719
+ editChatSubscriptionInviteLink(chat_id, invite_link, other, signal) {
720
+ return this.raw.editChatSubscriptionInviteLink({ chat_id, invite_link, ...other }, signal);
721
+ }
722
+ /**
723
+ * Use this method to revoke an invite link created by the bot. If the primary link is revoked, a new link is automatically generated. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the revoked invite link as ChatInviteLink object.
724
+ *
725
+ * @param chat_id Unique identifier of the target chat or username of the target channel (in the format @channelusername)
726
+ * @param invite_link The invite link to revoke
727
+ * @param signal Optional `AbortSignal` to cancel the request
728
+ *
729
+ * **Official reference:** https://core.telegram.org/bots/api#revokechatinvitelink
730
+ */
731
+ revokeChatInviteLink(chat_id, invite_link, signal) {
732
+ return this.raw.revokeChatInviteLink({ chat_id, invite_link }, signal);
733
+ }
734
+ /**
735
+ * Use this method to approve a chat join request. The bot must be an administrator in the chat for this to work and must have the can_invite_users administrator right. Returns True on success.
736
+ *
737
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
738
+ * @param user_id Unique identifier of the target user
739
+ * @param signal Optional `AbortSignal` to cancel the request
740
+ *
741
+ * **Official reference:** https://core.telegram.org/bots/api#approvechatjoinrequest
742
+ */
743
+ approveChatJoinRequest(chat_id, user_id, signal) {
744
+ return this.raw.approveChatJoinRequest({ chat_id, user_id }, signal);
745
+ }
746
+ /**
747
+ * Use this method to decline a chat join request. The bot must be an administrator in the chat for this to work and must have the can_invite_users administrator right. Returns True on success.
748
+ *
749
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
750
+ * @param user_id Unique identifier of the target user
751
+ * @param signal Optional `AbortSignal` to cancel the request
752
+ *
753
+ * **Official reference:** https://core.telegram.org/bots/api#declinechatjoinrequest
754
+ */
755
+ declineChatJoinRequest(chat_id, user_id, signal) {
756
+ return this.raw.declineChatJoinRequest({ chat_id, user_id }, signal);
757
+ }
758
+ /**
759
+ * Use this method to set a new profile photo for the chat. Photos can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns True on success.
760
+ *
761
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
762
+ * @param photo New chat photo, uploaded using multipart/form-data
763
+ * @param signal Optional `AbortSignal` to cancel the request
764
+ *
765
+ * **Official reference:** https://core.telegram.org/bots/api#setchatphoto
766
+ */
767
+ setChatPhoto(chat_id, photo, signal) {
768
+ return this.raw.setChatPhoto({ chat_id, photo }, signal);
769
+ }
770
+ /**
771
+ * Use this method to delete a chat photo. Photos can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns True on success.
772
+ *
773
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
774
+ * @param signal Optional `AbortSignal` to cancel the request
775
+ *
776
+ * **Official reference:** https://core.telegram.org/bots/api#deletechatphoto
777
+ */
778
+ deleteChatPhoto(chat_id, signal) {
779
+ return this.raw.deleteChatPhoto({ chat_id }, signal);
780
+ }
781
+ /**
782
+ * Use this method to change the title of a chat. Titles can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns True on success.
783
+ *
784
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
785
+ * @param title New chat title, 1-255 characters
786
+ * @param signal Optional `AbortSignal` to cancel the request
787
+ *
788
+ * **Official reference:** https://core.telegram.org/bots/api#setchattitle
789
+ */
790
+ setChatTitle(chat_id, title, signal) {
791
+ return this.raw.setChatTitle({ chat_id, title }, signal);
792
+ }
793
+ /**
794
+ * Use this method to change the description of a group, a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns True on success.
795
+ *
796
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
797
+ * @param description New chat description, 0-255 characters
798
+ * @param signal Optional `AbortSignal` to cancel the request
799
+ *
800
+ * **Official reference:** https://core.telegram.org/bots/api#setchatdescription
801
+ */
802
+ setChatDescription(chat_id, description, signal) {
803
+ return this.raw.setChatDescription({ chat_id, description }, signal);
804
+ }
805
+ /**
806
+ * Use this method to add a message to the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns True on success.
807
+ *
808
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
809
+ * @param message_id Identifier of a message to pin
810
+ * @param other Optional remaining parameters, confer the official reference below
811
+ * @param signal Optional `AbortSignal` to cancel the request
812
+ *
813
+ * **Official reference:** https://core.telegram.org/bots/api#pinchatmessage
814
+ */
815
+ pinChatMessage(chat_id, message_id, other, signal) {
816
+ return this.raw.pinChatMessage({ chat_id, message_id, ...other }, signal);
817
+ }
818
+ /**
819
+ * Use this method to remove a message from the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns True on success.
820
+ *
821
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
822
+ * @param message_id Identifier of a message to unpin. If not specified, the most recent pinned message (by sending date) will be unpinned.
823
+ * @param other Optional remaining parameters, confer the official reference below
824
+ * @param signal Optional `AbortSignal` to cancel the request
825
+ *
826
+ * **Official reference:** https://core.telegram.org/bots/api#unpinchatmessage
827
+ */
828
+ unpinChatMessage(chat_id, message_id, other, signal) {
829
+ return this.raw.unpinChatMessage({ chat_id, message_id, ...other }, signal);
830
+ }
831
+ /**
832
+ * Use this method to clear the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns True on success.
833
+ *
834
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
835
+ * @param signal Optional `AbortSignal` to cancel the request
836
+ *
837
+ * **Official reference:** https://core.telegram.org/bots/api#unpinallchatmessages
838
+ */
839
+ unpinAllChatMessages(chat_id, signal) {
840
+ return this.raw.unpinAllChatMessages({ chat_id }, signal);
841
+ }
842
+ /**
843
+ * Use this method for your bot to leave a group, supergroup or channel. Returns True on success.
844
+ *
845
+ * @param chat_id Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername)
846
+ * @param signal Optional `AbortSignal` to cancel the request
847
+ *
848
+ * **Official reference:** https://core.telegram.org/bots/api#leavechat
849
+ */
850
+ leaveChat(chat_id, signal) {
851
+ return this.raw.leaveChat({ chat_id }, signal);
852
+ }
853
+ /**
854
+ * Use this method to get up to date information about the chat (current name of the user for one-on-one conversations, current username of a user, group or channel, etc.). Returns a Chat object on success.
855
+ *
856
+ * @param chat_id Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername)
857
+ * @param signal Optional `AbortSignal` to cancel the request
858
+ *
859
+ * **Official reference:** https://core.telegram.org/bots/api#getchat
860
+ */
861
+ getChat(chat_id, signal) {
862
+ return this.raw.getChat({ chat_id }, signal);
863
+ }
864
+ /**
865
+ * Use this method to get a list of administrators in a chat, which aren't bots. Returns an Array of ChatMember objects.
866
+ *
867
+ * @param chat_id Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername)
868
+ * @param signal Optional `AbortSignal` to cancel the request
869
+ *
870
+ * **Official reference:** https://core.telegram.org/bots/api#getchatadministrators
871
+ */
872
+ getChatAdministrators(chat_id, signal) {
873
+ return this.raw.getChatAdministrators({ chat_id }, signal);
874
+ }
875
+ /** @deprecated Use `getChatMemberCount` instead. */
876
+ getChatMembersCount(...args) {
877
+ return this.getChatMemberCount(...args);
878
+ }
879
+ /**
880
+ * Use this method to get the number of members in a chat. Returns Int on success.
881
+ *
882
+ * @param chat_id Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername)
883
+ * @param signal Optional `AbortSignal` to cancel the request
884
+ *
885
+ * **Official reference:** https://core.telegram.org/bots/api#getchatmembercount
886
+ */
887
+ getChatMemberCount(chat_id, signal) {
888
+ return this.raw.getChatMemberCount({ chat_id }, signal);
889
+ }
890
+ /**
891
+ * Use this method to get information about a member of a chat. The method is guaranteed to work only if the bot is an administrator in the chat. Returns a ChatMember object on success.
892
+ *
893
+ * @param chat_id Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername)
894
+ * @param user_id Unique identifier of the target user
895
+ * @param signal Optional `AbortSignal` to cancel the request
896
+ *
897
+ * **Official reference:** https://core.telegram.org/bots/api#getchatmember
898
+ */
899
+ getChatMember(chat_id, user_id, signal) {
900
+ return this.raw.getChatMember({ chat_id, user_id }, signal);
901
+ }
902
+ /**
903
+ * Use this method to set a new group sticker set for a supergroup. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Use the field can_set_sticker_set ly returned in getChat requests to check if the bot can use this method. Returns True on success.
904
+ *
905
+ * @param chat_id Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)
906
+ * @param sticker_set_name Name of the sticker set to be set as the group sticker set
907
+ * @param signal Optional `AbortSignal` to cancel the request
908
+ *
909
+ * **Official reference:** https://core.telegram.org/bots/api#setchatstickerset
910
+ */
911
+ setChatStickerSet(chat_id, sticker_set_name, signal) {
912
+ return this.raw.setChatStickerSet({ chat_id, sticker_set_name }, signal);
913
+ }
914
+ /**
915
+ * Use this method to delete a group sticker set from a supergroup. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Use the field can_set_sticker_set ly returned in getChat requests to check if the bot can use this method. Returns True on success.
916
+ *
917
+ * @param chat_id Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)
918
+ * @param signal Optional `AbortSignal` to cancel the request
919
+ *
920
+ * **Official reference:** https://core.telegram.org/bots/api#deletechatstickerset
921
+ */
922
+ deleteChatStickerSet(chat_id, signal) {
923
+ return this.raw.deleteChatStickerSet({ chat_id }, signal);
924
+ }
925
+ /**
926
+ * Use this method to get custom emoji stickers, which can be used as a forum topic icon by any user. Requires no parameters. Returns an Array of Sticker objects.
927
+ *
928
+ * @param signal Optional `AbortSignal` to cancel the request
929
+ *
930
+ * **Official reference:** https://core.telegram.org/bots/api#getforumtopiciconstickers
931
+ */
932
+ getForumTopicIconStickers(signal) {
933
+ return this.raw.getForumTopicIconStickers(signal);
934
+ }
935
+ /**
936
+ * Use this method to create a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. Returns information about the created topic as a ForumTopic object.
937
+ *
938
+ * @param chat_id Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)
939
+ * @param name Topic name, 1-128 characters
940
+ * @param other Optional remaining parameters, confer the official reference below
941
+ * @param signal Optional `AbortSignal` to cancel the request
942
+ *
943
+ * **Official reference:** https://core.telegram.org/bots/api#createforumtopic
944
+ */
945
+ createForumTopic(chat_id, name, other, signal) {
946
+ return this.raw.createForumTopic({ chat_id, name, ...other }, signal);
947
+ }
948
+ /**
949
+ * Use this method to edit name and icon of a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights, unless it is the creator of the topic. Returns True on success.
950
+ *
951
+ * @param chat_id Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)
952
+ * @param message_thread_id Unique identifier for the target message thread of the forum topic
953
+ * @param other Optional remaining parameters, confer the official reference below
954
+ * @param signal Optional `AbortSignal` to cancel the request
955
+ *
956
+ * **Official reference:** https://core.telegram.org/bots/api#editforumtopic
957
+ */
958
+ editForumTopic(chat_id, message_thread_id, other, signal) {
959
+ return this.raw.editForumTopic({ chat_id, message_thread_id, ...other }, signal);
960
+ }
961
+ /**
962
+ * Use this method to close an open topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights, unless it is the creator of the topic. Returns True on success.
963
+ *
964
+ * @param chat_id Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)
965
+ * @param message_thread_id Unique identifier for the target message thread of the forum topic
966
+ * @param signal Optional `AbortSignal` to cancel the request
967
+ *
968
+ * **Official reference:** https://core.telegram.org/bots/api#closeforumtopic
969
+ */
970
+ closeForumTopic(chat_id, message_thread_id, signal) {
971
+ return this.raw.closeForumTopic({ chat_id, message_thread_id }, signal);
972
+ }
973
+ /**
974
+ * Use this method to reopen a closed topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights, unless it is the creator of the topic. Returns True on success.
975
+ *
976
+ * @param chat_id Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)
977
+ * @param message_thread_id Unique identifier for the target message thread of the forum topic
978
+ * @param signal Optional `AbortSignal` to cancel the request
979
+ *
980
+ * **Official reference:** https://core.telegram.org/bots/api#reopenforumtopic
981
+ */
982
+ reopenForumTopic(chat_id, message_thread_id, signal) {
983
+ return this.raw.reopenForumTopic({ chat_id, message_thread_id }, signal);
984
+ }
985
+ /**
986
+ * Use this method to delete a forum topic along with all its messages in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_delete_messages administrator rights. Returns True on success.
987
+ *
988
+ * @param chat_id Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)
989
+ * @param message_thread_id Unique identifier for the target message thread of the forum topic
990
+ * @param signal Optional `AbortSignal` to cancel the request
991
+ *
992
+ * **Official reference:** https://core.telegram.org/bots/api#deleteforumtopic
993
+ */
994
+ deleteForumTopic(chat_id, message_thread_id, signal) {
995
+ return this.raw.deleteForumTopic({ chat_id, message_thread_id }, signal);
996
+ }
997
+ /**
998
+ * Use this method to clear the list of pinned messages in a forum topic. The bot must be an administrator in the chat for this to work and must have the can_pin_messages administrator right in the supergroup. Returns True on success.
999
+ *
1000
+ * @param chat_id Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)
1001
+ * @param message_thread_id Unique identifier for the target message thread of the forum topic
1002
+ * @param signal Optional `AbortSignal` to cancel the request
1003
+ *
1004
+ * **Official reference:** https://core.telegram.org/bots/api#unpinallforumtopicmessages
1005
+ */
1006
+ unpinAllForumTopicMessages(chat_id, message_thread_id, signal) {
1007
+ return this.raw.unpinAllForumTopicMessages({ chat_id, message_thread_id }, signal);
1008
+ }
1009
+ /**
1010
+ * Use this method to edit the name of the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. Returns True on success.
1011
+ *
1012
+ * @param chat_id Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)
1013
+ * @param name New topic name, 1-128 characters
1014
+ * @param signal Optional `AbortSignal` to cancel the request
1015
+ *
1016
+ * **Official reference:** https://core.telegram.org/bots/api#editgeneralforumtopic
1017
+ */
1018
+ editGeneralForumTopic(chat_id, name, signal) {
1019
+ return this.raw.editGeneralForumTopic({ chat_id, name }, signal);
1020
+ }
1021
+ /**
1022
+ * Use this method to close an open 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. Returns True on success.
1023
+ *
1024
+ * @param chat_id Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)
1025
+ * @param signal Optional `AbortSignal` to cancel the request
1026
+ *
1027
+ * **Official reference:** https://core.telegram.org/bots/api#closegeneralforumtopic
1028
+ */
1029
+ closeGeneralForumTopic(chat_id, signal) {
1030
+ return this.raw.closeGeneralForumTopic({ chat_id }, signal);
1031
+ }
1032
+ /**
1033
+ * Use this method to reopen a closed 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. The topic will be automatically unhidden if it was hidden. Returns True on success. *
1034
+ *
1035
+ * @param chat_id Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)
1036
+ * @param signal Optional `AbortSignal` to cancel the request
1037
+ *
1038
+ * **Official reference:** https://core.telegram.org/bots/api#reopengeneralforumtopic
1039
+ */
1040
+ reopenGeneralForumTopic(chat_id, signal) {
1041
+ return this.raw.reopenGeneralForumTopic({ chat_id }, signal);
1042
+ }
1043
+ /**
1044
+ * Use this method to hide the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. The topic will be automatically closed if it was open. Returns True on success.
1045
+ *
1046
+ * @param chat_id Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)
1047
+ * @param signal Optional `AbortSignal` to cancel the request
1048
+ *
1049
+ * **Official reference:** https://core.telegram.org/bots/api#hidegeneralforumtopic
1050
+ */
1051
+ hideGeneralForumTopic(chat_id, signal) {
1052
+ return this.raw.hideGeneralForumTopic({ chat_id }, signal);
1053
+ }
1054
+ /**
1055
+ * Use this method to unhide the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. Returns True on success.
1056
+ *
1057
+ * @param chat_id Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)
1058
+ * @param signal Optional `AbortSignal` to cancel the request
1059
+ *
1060
+ * **Official reference:** https://core.telegram.org/bots/api#unhidegeneralforumtopic
1061
+ */
1062
+ unhideGeneralForumTopic(chat_id, signal) {
1063
+ return this.raw.unhideGeneralForumTopic({ chat_id }, signal);
1064
+ }
1065
+ /**
1066
+ * Use this method to clear the list of pinned messages in a General forum topic. The bot must be an administrator in the chat for this to work and must have the can_pin_messages administrator right in the supergroup. Returns True on success.
1067
+ *
1068
+ * @param chat_id Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)
1069
+ * @param signal Optional `AbortSignal` to cancel the request
1070
+ *
1071
+ * **Official reference:** https://core.telegram.org/bots/api#unpinallgeneralforumtopicmessages
1072
+ */
1073
+ unpinAllGeneralForumTopicMessages(chat_id, signal) {
1074
+ return this.raw.unpinAllGeneralForumTopicMessages({ chat_id }, signal);
1075
+ }
1076
+ /**
1077
+ * Use this method to send answers to callback queries sent from inline keyboards. The answer will be displayed to the user as a notification at the top of the chat screen or as an alert. On success, True is returned.
1078
+ *
1079
+ * Alternatively, the user can be redirected to the specified Game URL. For this option to work, you must first create a game for your bot via @BotFather and accept the terms. Otherwise, you may use links like t.me/your_bot?start=XXXX that open your bot with a parameter.
1080
+ *
1081
+ * @param callback_query_id Unique identifier for the query to be answered
1082
+ * @param other Optional remaining parameters, confer the official reference below
1083
+ * @param signal Optional `AbortSignal` to cancel the request
1084
+ *
1085
+ * **Official reference:** https://core.telegram.org/bots/api#answercallbackquery
1086
+ */
1087
+ answerCallbackQuery(callback_query_id, other, signal) {
1088
+ return this.raw.answerCallbackQuery({ callback_query_id, ...other }, signal);
1089
+ }
1090
+ /**
1091
+ * Use this method to change the bot's name. Returns True on success.
1092
+ *
1093
+ * @param name New bot name; 0-64 characters. Pass an empty string to remove the dedicated name for the given language.
1094
+ * @param other Optional remaining parameters, confer the official reference below
1095
+ * @param signal Optional `AbortSignal` to cancel the request
1096
+ *
1097
+ * **Official reference:** https://core.telegram.org/bots/api#setmyname
1098
+ */
1099
+ setMyName(name, other, signal) {
1100
+ return this.raw.setMyName({ name, ...other }, signal);
1101
+ }
1102
+ /**
1103
+ * Use this method to get the current bot name for the given user language. Returns BotName on success.
1104
+ *
1105
+ * @param other Optional remaining parameters, confer the official reference below
1106
+ * @param signal Optional `AbortSignal` to cancel the request
1107
+ *
1108
+ * **Official reference:** https://core.telegram.org/bots/api#getmyname
1109
+ */
1110
+ getMyName(other, signal) {
1111
+ return this.raw.getMyName(other !== null && other !== void 0 ? other : {}, signal);
1112
+ }
1113
+ /**
1114
+ * Use this method to change the list of the bot's commands. See https://core.telegram.org/bots/features#commands for more details about bot commands. Returns True on success.
1115
+ *
1116
+ * @param commands A list of bot commands to be set as the list of the bot's commands. At most 100 commands can be specified.
1117
+ * @param other Optional remaining parameters, confer the official reference below
1118
+ * @param signal Optional `AbortSignal` to cancel the request
1119
+ *
1120
+ * **Official reference:** https://core.telegram.org/bots/api#setmycommands
1121
+ */
1122
+ setMyCommands(commands, other, signal) {
1123
+ return this.raw.setMyCommands({ commands, ...other }, signal);
1124
+ }
1125
+ /**
1126
+ * Use this method to delete the list of the bot's commands for the given scope and user language. After deletion, higher level commands will be shown to affected users. Returns True on success.
1127
+ *
1128
+ * @param other Optional remaining parameters, confer the official reference below
1129
+ * @param signal Optional `AbortSignal` to cancel the request
1130
+ *
1131
+ * **Official reference:** https://core.telegram.org/bots/api#deletemycommands
1132
+ */
1133
+ deleteMyCommands(other, signal) {
1134
+ return this.raw.deleteMyCommands({ ...other }, signal);
1135
+ }
1136
+ /**
1137
+ * Use this method to get the current list of the bot's commands for the given scope and user language. Returns an Array of BotCommand objects. If commands aren't set, an empty list is returned.
1138
+ *
1139
+ * @param other Optional remaining parameters, confer the official reference below
1140
+ * @param signal Optional `AbortSignal` to cancel the request
1141
+ *
1142
+ * **Official reference:** https://core.telegram.org/bots/api#getmycommands
1143
+ */
1144
+ getMyCommands(other, signal) {
1145
+ return this.raw.getMyCommands({ ...other }, signal);
1146
+ }
1147
+ /**
1148
+ * Use this method to change the bot's description, which is shown in the chat with the bot if the chat is empty. Returns True on success.
1149
+ *
1150
+ * @param description New bot description; 0-512 characters. Pass an empty string to remove the dedicated description for the given language.
1151
+ * @param other Optional remaining paramters, confer the official reference below
1152
+ * @param signal Optional `AbortSignal` to cancel the request
1153
+ *
1154
+ * **Official reference:** https://core.telegram.org/bots/api#setmydescription
1155
+ */
1156
+ setMyDescription(description, other, signal) {
1157
+ return this.raw.setMyDescription({ description, ...other }, signal);
1158
+ }
1159
+ /**
1160
+ * Use this method to get the current bot description for the given user language. Returns BotDescription on success.
1161
+ *
1162
+ * @param other Optional remaining paramters, confer the official reference below
1163
+ * @param signal Optional `AbortSignal` to cancel the request
1164
+ *
1165
+ * **Official reference:** https://core.telegram.org/bots/api#getmydescription
1166
+ */
1167
+ getMyDescription(other, signal) {
1168
+ return this.raw.getMyDescription({ ...other }, signal);
1169
+ }
1170
+ /**
1171
+ * Use this method to change the bot's short description, which is shown on the bot's profile page and is sent together with the link when users share the bot. Returns True on success.
1172
+ *
1173
+ * @param short_description New short description for the bot; 0-120 characters. Pass an empty string to remove the dedicated short description for the given language.
1174
+ * @param other Optional remaining paramters, confer the official reference below
1175
+ * @param signal Optional `AbortSignal` to cancel the request
1176
+ *
1177
+ * **Official reference:** https://core.telegram.org/bots/api#setmyshortdescription
1178
+ */
1179
+ setMyShortDescription(short_description, other, signal) {
1180
+ return this.raw.setMyShortDescription({ short_description, ...other }, signal);
1181
+ }
1182
+ /**
1183
+ * Use this method to get the current bot short description for the given user language. Returns BotShortDescription on success.
1184
+ *
1185
+ * @param other Optional remaining paramters, confer the official reference below
1186
+ * @param signal Optional `AbortSignal` to cancel the request
1187
+ *
1188
+ * **Official reference:** https://core.telegram.org/bots/api#getmyshortdescription
1189
+ */
1190
+ getMyShortDescription(other, signal) {
1191
+ return this.raw.getMyShortDescription({ ...other }, signal);
1192
+ }
1193
+ /**
1194
+ * Use this method to change the bot's menu button in a private chat, or the default menu button. Returns True on success.
1195
+ *
1196
+ * @param other Optional remaining parameters, confer the official reference below
1197
+ * @param signal Optional `AbortSignal` to cancel the request
1198
+ *
1199
+ * **Official reference:** https://core.telegram.org/bots/api#setchatmenubutton
1200
+ */
1201
+ setChatMenuButton(other, signal) {
1202
+ return this.raw.setChatMenuButton({ ...other }, signal);
1203
+ }
1204
+ /**
1205
+ * Use this method to get the current value of the bot's menu button in a private chat, or the default menu button. Returns MenuButton on success.
1206
+ *
1207
+ * @param other Optional remaining parameters, confer the official reference below
1208
+ * @param signal Optional `AbortSignal` to cancel the request
1209
+ *
1210
+ * **Official reference:** https://core.telegram.org/bots/api#getchatmenubutton
1211
+ */
1212
+ getChatMenuButton(other, signal) {
1213
+ return this.raw.getChatMenuButton({ ...other }, signal);
1214
+ }
1215
+ /**
1216
+ * Use this method to the change the default administrator rights requested by the bot when it's added as an administrator to groups or channels. These rights will be suggested to users, but they are are free to modify the list before adding the bot. Returns True on success.
1217
+ *
1218
+ * @param other Optional remaining parameters, confer the official reference below
1219
+ * @param signal Optional `AbortSignal` to cancel the request
1220
+ *
1221
+ * **Official reference:** https://core.telegram.org/bots/api#setmydefaultadministratorrights
1222
+ */
1223
+ setMyDefaultAdministratorRights(other, signal) {
1224
+ return this.raw.setMyDefaultAdministratorRights({ ...other }, signal);
1225
+ }
1226
+ /**
1227
+ * Use this method to get the current default administrator rights of the bot. Returns ChatAdministratorRights on success.
1228
+ *
1229
+ * @param other Optional remaining parameters, confer the official reference below
1230
+ * @param signal Optional `AbortSignal` to cancel the request
1231
+ *
1232
+ * **Official reference:** https://core.telegram.org/bots/api#getmydefaultadministratorrights
1233
+ */
1234
+ getMyDefaultAdministratorRights(other, signal) {
1235
+ return this.raw.getMyDefaultAdministratorRights({ ...other }, signal);
1236
+ }
1237
+ /**
1238
+ * Use this method to edit text and game messages. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within 48 hours from the time they were sent.
1239
+ *
1240
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
1241
+ * @param message_id Identifier of the message to edit
1242
+ * @param text New text of the message, 1-4096 characters after entities parsing
1243
+ * @param other Optional remaining parameters, confer the official reference below
1244
+ * @param signal Optional `AbortSignal` to cancel the request
1245
+ *
1246
+ * **Official reference:** https://core.telegram.org/bots/api#editmessagetext
1247
+ */
1248
+ editMessageText(chat_id, message_id, text, other, signal) {
1249
+ return this.raw.editMessageText({ chat_id, message_id, text, ...other }, signal);
1250
+ }
1251
+ /**
1252
+ * Use this method to edit text and game inline messages. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within 48 hours from the time they were sent.
1253
+ *
1254
+ * @param inline_message_id Identifier of the inline message
1255
+ * @param other Optional remaining parameters, confer the official reference below
1256
+ * @param signal Optional `AbortSignal` to cancel the request
1257
+ *
1258
+ * **Official reference:** https://core.telegram.org/bots/api#editmessagetext
1259
+ */
1260
+ editMessageTextInline(inline_message_id, text, other, signal) {
1261
+ return this.raw.editMessageText({ inline_message_id, text, ...other }, signal);
1262
+ }
1263
+ /**
1264
+ * Use this method to edit captions of messages. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within 48 hours from the time they were sent.
1265
+ *
1266
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
1267
+ * @param message_id Identifier of the message to edit
1268
+ * @param other Optional remaining parameters, confer the official reference below
1269
+ * @param signal Optional `AbortSignal` to cancel the request
1270
+ *
1271
+ * **Official reference:** https://core.telegram.org/bots/api#editmessagecaption
1272
+ */
1273
+ editMessageCaption(chat_id, message_id, other, signal) {
1274
+ return this.raw.editMessageCaption({ chat_id, message_id, ...other }, signal);
1275
+ }
1276
+ /**
1277
+ * Use this method to edit captions of inline messages. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within 48 hours from the time they were sent.
1278
+ *
1279
+ * @param inline_message_id Identifier of the inline message
1280
+ * @param other Optional remaining parameters, confer the official reference below
1281
+ * @param signal Optional `AbortSignal` to cancel the request
1282
+ *
1283
+ * **Official reference:** https://core.telegram.org/bots/api#editmessagecaption
1284
+ */
1285
+ editMessageCaptionInline(inline_message_id, other, signal) {
1286
+ return this.raw.editMessageCaption({ inline_message_id, ...other }, signal);
1287
+ }
1288
+ /**
1289
+ * Use this method to edit animation, audio, document, photo, or video messages, or to add media to text messages. If a message is part of a message album, then it can be edited only to an audio for audio albums, only to a document for document albums and to a photo or a video otherwise. When an inline message is edited, a new file can't be uploaded; use a previously uploaded file via its file_id or specify a URL. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within 48 hours from the time they were sent.
1290
+ *
1291
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
1292
+ * @param message_id Identifier of the message to edit
1293
+ * @param media An object for a new media content of the message
1294
+ * @param other Optional remaining parameters, confer the official reference below
1295
+ * @param signal Optional `AbortSignal` to cancel the request
1296
+ *
1297
+ * **Official reference:** https://core.telegram.org/bots/api#editmessagemedia
1298
+ */
1299
+ editMessageMedia(chat_id, message_id, media, other, signal) {
1300
+ return this.raw.editMessageMedia({ chat_id, message_id, media, ...other }, signal);
1301
+ }
1302
+ /**
1303
+ * Use this method to edit animation, audio, document, photo, or video inline messages, or to add media to text inline messages. If a message is part of a message album, then it can be edited only to an audio for audio albums, only to a document for document albums and to a photo or a video otherwise. When an inline message is edited, a new file can't be uploaded; use a previously uploaded file via its file_id or specify a URL. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within 48 hours from the time they were sent.
1304
+ *
1305
+ * @param inline_message_id Identifier of the inline message
1306
+ * @param media An object for a new media content of the message
1307
+ * @param other Optional remaining parameters, confer the official reference below
1308
+ * @param signal Optional `AbortSignal` to cancel the request
1309
+ *
1310
+ * **Official reference:** https://core.telegram.org/bots/api#editmessagemedia
1311
+ */
1312
+ editMessageMediaInline(inline_message_id, media, other, signal) {
1313
+ return this.raw.editMessageMedia({ inline_message_id, media, ...other }, signal);
1314
+ }
1315
+ /**
1316
+ * Use this method to edit only the reply markup of messages. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within 48 hours from the time they were sent.
1317
+ *
1318
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
1319
+ * @param message_id Identifier of the message to edit
1320
+ * @param other Optional remaining parameters, confer the official reference below
1321
+ * @param signal Optional `AbortSignal` to cancel the request
1322
+ *
1323
+ * **Official reference:** https://core.telegram.org/bots/api#editmessagereplymarkup
1324
+ */
1325
+ editMessageReplyMarkup(chat_id, message_id, other, signal) {
1326
+ return this.raw.editMessageReplyMarkup({ chat_id, message_id, ...other }, signal);
1327
+ }
1328
+ /**
1329
+ * Use this method to edit only the reply markup of inline messages. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within 48 hours from the time they were sent.
1330
+ *
1331
+ * @param inline_message_id Identifier of the inline message
1332
+ * @param other Optional remaining parameters, confer the official reference below
1333
+ * @param signal Optional `AbortSignal` to cancel the request
1334
+ *
1335
+ * **Official reference:** https://core.telegram.org/bots/api#editmessagereplymarkup
1336
+ */
1337
+ editMessageReplyMarkupInline(inline_message_id, other, signal) {
1338
+ return this.raw.editMessageReplyMarkup({ inline_message_id, ...other }, signal);
1339
+ }
1340
+ /**
1341
+ * Use this method to stop a poll which was sent by the bot. On success, the stopped Poll is returned.
1342
+ *
1343
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
1344
+ * @param message_id Identifier of the original message with the poll
1345
+ * @param other Optional remaining parameters, confer the official reference below
1346
+ * @param signal Optional `AbortSignal` to cancel the request
1347
+ *
1348
+ * **Official reference:** https://core.telegram.org/bots/api#stoppoll
1349
+ */
1350
+ stopPoll(chat_id, message_id, other, signal) {
1351
+ return this.raw.stopPoll({ chat_id, message_id, ...other }, signal);
1352
+ }
1353
+ /**
1354
+ * Use this method to delete a message, including service messages, with the following limitations:
1355
+ * - A message can only be deleted if it was sent less than 48 hours ago.
1356
+ * - A dice message in a private chat can only be deleted if it was sent more than 24 hours ago.
1357
+ * - Bots can delete outgoing messages in private chats, groups, and supergroups.
1358
+ * - Bots can delete incoming messages in private chats.
1359
+ * - Bots granted can_post_messages permissions can delete outgoing messages in channels.
1360
+ * - If the bot is an administrator of a group, it can delete any message there.
1361
+ * - If the bot has can_delete_messages permission in a supergroup or a channel, it can delete any message there.
1362
+ * Returns True on success.
1363
+ *
1364
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
1365
+ * @param message_id Identifier of the message to delete
1366
+ * @param signal Optional `AbortSignal` to cancel the request
1367
+ *
1368
+ * **Official reference:** https://core.telegram.org/bots/api#deletemessage
1369
+ */
1370
+ deleteMessage(chat_id, message_id, signal) {
1371
+ return this.raw.deleteMessage({ chat_id, message_id }, signal);
1372
+ }
1373
+ /**
1374
+ * Use this method to delete multiple messages simultaneously. Returns True on success.
1375
+ *
1376
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
1377
+ * @param message_ids A list of 1-100 identifiers of messages to delete. See deleteMessage for limitations on which messages can be deleted
1378
+ * @param signal Optional `AbortSignal` to cancel the request
1379
+ *
1380
+ * **Official reference:** https://core.telegram.org/bots/api#deletemessages
1381
+ */
1382
+ deleteMessages(chat_id, message_ids, signal) {
1383
+ return this.raw.deleteMessages({ chat_id, message_ids }, signal);
1384
+ }
1385
+ /**
1386
+ * Use this method to send static .WEBP, animated .TGS, or video .WEBM stickers. On success, the sent Message is returned.
1387
+ *
1388
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
1389
+ * @param sticker 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. Video and animated stickers can't be sent via an HTTP URL.
1390
+ * @param other Optional remaining parameters, confer the official reference below
1391
+ * @param signal Optional `AbortSignal` to cancel the request
1392
+ *
1393
+ * **Official reference:** https://core.telegram.org/bots/api#sendsticker
1394
+ */
1395
+ sendSticker(chat_id, sticker, other, signal) {
1396
+ return this.raw.sendSticker({ chat_id, sticker, ...other }, signal);
1397
+ }
1398
+ /**
1399
+ * Use this method to get a sticker set. On success, a StickerSet object is returned.
1400
+ *
1401
+ * @param name Name of the sticker set
1402
+ * @param signal Optional `AbortSignal` to cancel the request
1403
+ *
1404
+ * **Official reference:** https://core.telegram.org/bots/api#getstickerset
1405
+ */
1406
+ getStickerSet(name, signal) {
1407
+ return this.raw.getStickerSet({ name }, signal);
1408
+ }
1409
+ /**
1410
+ * Use this method to get information about custom emoji stickers by their identifiers. Returns an Array of Sticker objects.
1411
+ *
1412
+ * @param custom_emoji_ids A list of custom emoji identifiers
1413
+ * @param signal Optional `AbortSignal` to cancel the request
1414
+ *
1415
+ * **Official reference:** https://core.telegram.org/bots/api#getcustomemojistickers
1416
+ */
1417
+ getCustomEmojiStickers(custom_emoji_ids, signal) {
1418
+ return this.raw.getCustomEmojiStickers({ custom_emoji_ids }, signal);
1419
+ }
1420
+ /**
1421
+ * Use this method to upload a file with a sticker for later use in the createNewStickerSet, addStickerToSet, or replaceStickerInSet methods (the file can be used multiple times). Returns the uploaded File on success.
1422
+ *
1423
+ * @param user_id User identifier of sticker file owner
1424
+ * @param sticker_format Format of the sticker, must be one of “static”, “animated”, “video”
1425
+ * @param sticker A file with the sticker in .WEBP, .PNG, .TGS, or .WEBM format. See https://core.telegram.org/stickers for technical requirements.
1426
+ * @param signal Optional `AbortSignal` to cancel the request
1427
+ *
1428
+ * **Official reference:** https://core.telegram.org/bots/api#uploadstickerfile
1429
+ */
1430
+ uploadStickerFile(user_id, sticker_format, sticker, signal) {
1431
+ return this.raw.uploadStickerFile({ user_id, sticker_format, sticker }, signal);
1432
+ }
1433
+ /**
1434
+ * Use this method to create a new sticker set owned by a user. The bot will be able to edit the sticker set thus created. Returns True on success.
1435
+ *
1436
+ * @param user_id User identifier of created sticker set owner
1437
+ * @param name 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.
1438
+ * @param title Sticker set title, 1-64 characters
1439
+ * @param stickers A list of 1-50 initial stickers to be added to the sticker set
1440
+ * @param other Optional remaining parameters, confer the official reference below
1441
+ * @param signal Optional `AbortSignal` to cancel the request
1442
+ *
1443
+ * **Official reference:** https://core.telegram.org/bots/api#createnewstickerset
1444
+ */
1445
+ createNewStickerSet(user_id, name, title, stickers, other, signal) {
1446
+ return this.raw.createNewStickerSet({ user_id, name, title, stickers, ...other }, signal);
1447
+ }
1448
+ /**
1449
+ * Use this method to add a new sticker to a set created by the bot. The format of the added sticker must match the format of the other stickers in the set. Emoji sticker sets can have up to 200 stickers. Animated and video sticker sets can have up to 50 stickers. Static sticker sets can have up to 120 stickers. Returns True on success.
1450
+ *
1451
+ * @param user_id User identifier of sticker set owner
1452
+ * @param name Sticker set name
1453
+ * @param sticker 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.
1454
+ * @param signal Optional `AbortSignal` to cancel the request
1455
+ *
1456
+ * **Official reference:** https://core.telegram.org/bots/api#addstickertoset
1457
+ */
1458
+ addStickerToSet(user_id, name, sticker, signal) {
1459
+ return this.raw.addStickerToSet({ user_id, name, sticker }, signal);
1460
+ }
1461
+ /**
1462
+ * Use this method to move a sticker in a set created by the bot to a specific position. Returns True on success.
1463
+ *
1464
+ * @param sticker File identifier of the sticker
1465
+ * @param position New sticker position in the set, zero-based
1466
+ * @param signal Optional `AbortSignal` to cancel the request
1467
+ *
1468
+ * **Official reference:** https://core.telegram.org/bots/api#setstickerpositioninset
1469
+ */
1470
+ setStickerPositionInSet(sticker, position, signal) {
1471
+ return this.raw.setStickerPositionInSet({ sticker, position }, signal);
1472
+ }
1473
+ /**
1474
+ * Use this method to delete a sticker from a set created by the bot. Returns True on success.
1475
+ *
1476
+ * @param sticker File identifier of the sticker
1477
+ * @param signal Optional `AbortSignal` to cancel the request
1478
+ *
1479
+ * **Official reference:** https://core.telegram.org/bots/api#deletestickerfromset
1480
+ */
1481
+ deleteStickerFromSet(sticker, signal) {
1482
+ return this.raw.deleteStickerFromSet({ sticker }, signal);
1483
+ }
1484
+ /**
1485
+ * Use this method to replace an existing sticker in a sticker set with a new one. The method is equivalent to calling deleteStickerFromSet, then addStickerToSet, then setStickerPositionInSet. Returns True on success.
1486
+ *
1487
+ * @param user_id User identifier of the sticker set owner
1488
+ * @param name Sticker set name
1489
+ * @param old_sticker File identifier of the replaced sticker
1490
+ * @param sticker 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.:x
1491
+ * @param signal Optional `AbortSignal` to cancel the request
1492
+ *
1493
+ * **Official reference:** https://core.telegram.org/bots/api#replacestickerinset
1494
+ */
1495
+ replaceStickerInSet(user_id, name, old_sticker, sticker, signal) {
1496
+ return this.raw.replaceStickerInSet({ user_id, name, old_sticker, sticker }, signal);
1497
+ }
1498
+ /**
1499
+ * Use this method to change the list of emoji assigned to a regular or custom emoji sticker. The sticker must belong to a sticker set created by the bot. Returns True on success.
1500
+ *
1501
+ * @param sticker File identifier of the sticker
1502
+ * @param emoji_list A list of 1-20 emoji associated with the sticker
1503
+ * @param signal Optional `AbortSignal` to cancel the request
1504
+ *
1505
+ * **Official reference:** https://core.telegram.org/bots/api#setstickeremojilist
1506
+ */
1507
+ setStickerEmojiList(sticker, emoji_list, signal) {
1508
+ return this.raw.setStickerEmojiList({ sticker, emoji_list }, signal);
1509
+ }
1510
+ /**
1511
+ * Use this method to change search keywords assigned to a regular or custom emoji sticker. The sticker must belong to a sticker set created by the bot. Returns True on success.
1512
+ *
1513
+ * @param sticker File identifier of the sticker
1514
+ * @param keywords A list of 0-20 search keywords for the sticker with total length of up to 64 characters
1515
+ * @param signal Optional `AbortSignal` to cancel the request
1516
+ *
1517
+ * **Official reference:** https://core.telegram.org/bots/api#setstickerkeywords
1518
+ */
1519
+ setStickerKeywords(sticker, keywords, signal) {
1520
+ return this.raw.setStickerKeywords({ sticker, keywords }, signal);
1521
+ }
1522
+ /**
1523
+ * Use this method to change the mask position of a mask sticker. The sticker must belong to a sticker set that was created by the bot. Returns True on success.
1524
+ *
1525
+ * @param sticker File identifier of the sticker
1526
+ * @param mask_position An object with the position where the mask should be placed on faces. Omit the parameter to remove the mask position.
1527
+ * @param signal Optional `AbortSignal` to cancel the request
1528
+ *
1529
+ * **Official reference:** https://core.telegram.org/bots/api#setstickermaskposition
1530
+ */
1531
+ setStickerMaskPosition(sticker, mask_position, signal) {
1532
+ return this.raw.setStickerMaskPosition({ sticker, mask_position }, signal);
1533
+ }
1534
+ /**
1535
+ * Use this method to set the title of a created sticker set. Returns True on success.
1536
+ *
1537
+ * @param name Sticker set name
1538
+ * @param title Sticker set title, 1-64 characters
1539
+ * @param signal Optional `AbortSignal` to cancel the request
1540
+ *
1541
+ * **Official reference:** https://core.telegram.org/bots/api#setstickersettitle
1542
+ */
1543
+ setStickerSetTitle(name, title, signal) {
1544
+ return this.raw.setStickerSetTitle({ name, title }, signal);
1545
+ }
1546
+ /**
1547
+ * Use this method to delete a sticker set that was created by the bot. Returns True on success.
1548
+ *
1549
+ * @param name Sticker set name
1550
+ * @param signal Optional `AbortSignal` to cancel the request
1551
+ *
1552
+ * **Official reference:** https://core.telegram.org/bots/api#deletestickerset
1553
+ */
1554
+ deleteStickerSet(name, signal) {
1555
+ return this.raw.deleteStickerSet({ name }, signal);
1556
+ }
1557
+ /**
1558
+ * Use this method to set the thumbnail of a regular or mask sticker set. The format of the thumbnail file must match the format of the stickers in the set. Returns True on success.
1559
+ *
1560
+ * @param name Sticker set name
1561
+ * @param user_id User identifier of the sticker set owner
1562
+ * @param thumbnail 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#animated-sticker-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-sticker-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 ». 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.
1563
+ * @param format 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
1564
+ * @param signal Optional `AbortSignal` to cancel the request
1565
+ *
1566
+ * **Official reference:** https://core.telegram.org/bots/api#setstickersetthumbnail
1567
+ */
1568
+ setStickerSetThumbnail(name, user_id, thumbnail, format, signal) {
1569
+ return this.raw.setStickerSetThumbnail({ name, user_id, thumbnail, format }, signal);
1570
+ }
1571
+ /**
1572
+ * Use this method to set the thumbnail of a custom emoji sticker set. Returns True on success.
1573
+ *
1574
+ * @param name Sticker set name
1575
+ * @param custom_emoji_id 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.
1576
+ * @param signal Optional `AbortSignal` to cancel the request
1577
+ *
1578
+ * **Official reference:** https://core.telegram.org/bots/api#setcustomemojistickersetthumbnail
1579
+ */
1580
+ setCustomEmojiStickerSetThumbnail(name, custom_emoji_id, signal) {
1581
+ return this.raw.setCustomEmojiStickerSetThumbnail({
1582
+ name,
1583
+ custom_emoji_id,
1584
+ }, signal);
1585
+ }
1586
+ /**
1587
+ * Returns the list of gifts that can be sent by the bot to users and channel chats. Requires no parameters. Returns a Gifts object.
1588
+ *
1589
+ * @param signal Optional `AbortSignal` to cancel the request
1590
+ *
1591
+ * **Official reference:** https://core.telegram.org/bots/api#getavailablegifts
1592
+ */
1593
+ getAvailableGifts(signal) {
1594
+ return this.raw.getAvailableGifts(signal);
1595
+ }
1596
+ /**
1597
+ * Sends a gift to the given user. The gift can't be converted to Telegram Stars by the receiver. Returns True on success.
1598
+ *
1599
+ * @param user_id Unique identifier of the target user who will receive the gift
1600
+ * @param gift_id Identifier of the gift
1601
+ * @param other Optional remaining parameters, confer the official reference below
1602
+ * @param signal Optional `AbortSignal` to cancel the request
1603
+ *
1604
+ * **Official reference:** https://core.telegram.org/bots/api#sendgift
1605
+ */
1606
+ sendGift(user_id, gift_id, other, signal) {
1607
+ return this.raw.sendGift({ user_id, gift_id, ...other }, signal);
1608
+ }
1609
+ /**
1610
+ * Sends a gift to the given channel chat. The gift can't be converted to Telegram Stars by the receiver. Returns True on success.
1611
+ *
1612
+ * @param chat_id Unique identifier for the chat or username of the channel (in the format @channelusername) that will receive the gift
1613
+ * @param gift_id Identifier of the gift
1614
+ * @param other Optional remaining parameters, confer the official reference below
1615
+ * @param signal Optional `AbortSignal` to cancel the request
1616
+ *
1617
+ * **Official reference:** https://core.telegram.org/bots/api#sendgift
1618
+ */
1619
+ sendGiftToChannel(chat_id, gift_id, other, signal) {
1620
+ return this.raw.sendGift({ chat_id, gift_id, ...other }, signal);
1621
+ }
1622
+ /**
1623
+ * Use this method to send answers to an inline query. On success, True is returned.
1624
+ * No more than 50 results per query are allowed.
1625
+ *
1626
+ * Example: An inline bot that sends YouTube videos can ask the user to connect the bot to their YouTube account to adapt search results accordingly. To do this, it displays a 'Connect your YouTube account' button above the results, or even before showing any. The user presses the button, switches to a private chat with the bot and, in doing so, passes a start parameter that instructs the bot to return an OAuth link. Once done, the bot can offer a switch_inline button so that the user can easily return to the chat where they wanted to use the bot's inline capabilities.
1627
+ *
1628
+ * @param inline_query_id Unique identifier for the answered query
1629
+ * @param results An array of results for the inline query
1630
+ * @param other Optional remaining parameters, confer the official reference below
1631
+ * @param signal Optional `AbortSignal` to cancel the request
1632
+ *
1633
+ * **Official reference:** https://core.telegram.org/bots/api#answerinlinequery
1634
+ */
1635
+ answerInlineQuery(inline_query_id, results, other, signal) {
1636
+ return this.raw.answerInlineQuery({ inline_query_id, results, ...other }, signal);
1637
+ }
1638
+ /**
1639
+ * Use this method to set the result of an interaction with a Web App and send a corresponding message on behalf of the user to the chat from which the query originated. On success, a SentWebAppMessage object is returned.
1640
+ *
1641
+ * @param web_app_query_id Unique identifier for the query to be answered
1642
+ * @param result An object describing the message to be sent
1643
+ * @param signal Optional `AbortSignal` to cancel the request
1644
+ *
1645
+ * **Official reference:** https://core.telegram.org/bots/api#answerwebappquery
1646
+ */
1647
+ answerWebAppQuery(web_app_query_id, result, signal) {
1648
+ return this.raw.answerWebAppQuery({ web_app_query_id, result }, signal);
1649
+ }
1650
+ /**
1651
+ * Stores a message that can be sent by a user of a Mini App. Returns a PreparedInlineMessage object.
1652
+ *
1653
+ * @param user_id Unique identifier of the target user that can use the prepared message
1654
+ * @param result An object describing the message to be sent
1655
+ * @param other Optional remaining parameters, confer the official reference below
1656
+ * @param signal Optional `AbortSignal` to cancel the request
1657
+ *
1658
+ * **Official reference:** https://core.telegram.org/bots/api#savepreparedinlinemessage
1659
+ */
1660
+ savePreparedInlineMessage(user_id, result, other, signal) {
1661
+ return this.raw.savePreparedInlineMessage({ user_id, result, ...other }, signal);
1662
+ }
1663
+ /**
1664
+ * Use this method to send invoices. On success, the sent Message is returned.
1665
+ *
1666
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
1667
+ * @param title Product name, 1-32 characters
1668
+ * @param description Product description, 1-255 characters
1669
+ * @param payload Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes.
1670
+ * @param currency Three-letter ISO 4217 currency code, see more on currencies
1671
+ * @param prices Price breakdown, a list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.)
1672
+ * @param other Optional remaining parameters, confer the official reference below
1673
+ * @param signal Optional `AbortSignal` to cancel the request
1674
+ *
1675
+ * **Official reference:** https://core.telegram.org/bots/api#sendinvoice
1676
+ */
1677
+ sendInvoice(chat_id, title, description, payload, currency, prices, other, signal) {
1678
+ return this.raw.sendInvoice({
1679
+ chat_id,
1680
+ title,
1681
+ description,
1682
+ payload,
1683
+ currency,
1684
+ prices,
1685
+ ...other,
1686
+ }, signal);
1687
+ }
1688
+ /**
1689
+ * Use this method to create a link for an invoice. Returns the created invoice link as String on success.
1690
+ *
1691
+ * @param title Product name, 1-32 characters
1692
+ * @param description Product description, 1-255 characters
1693
+ * @param payload Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes.
1694
+ * @param provider_token Payment provider token, obtained via BotFather
1695
+ * @param currency Three-letter ISO 4217 currency code, see more on currencies
1696
+ * @param prices Price breakdown, a list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.)
1697
+ * @param other Optional remaining parameters, confer the official reference below
1698
+ * @param signal Optional `AbortSignal` to cancel the request
1699
+ *
1700
+ * **Official reference:** https://core.telegram.org/bots/api#createinvoicelink
1701
+ */
1702
+ createInvoiceLink(title, description, payload, provider_token, currency, prices, other, signal) {
1703
+ return this.raw.createInvoiceLink({
1704
+ title,
1705
+ description,
1706
+ payload,
1707
+ provider_token,
1708
+ currency,
1709
+ prices,
1710
+ ...other,
1711
+ }, signal);
1712
+ }
1713
+ /**
1714
+ * If you sent an invoice requesting a shipping address and the parameter is_flexible was specified, the Bot API will send an Update with a shipping_query field to the bot. Use this method to reply to shipping queries. On success, True is returned.
1715
+ *
1716
+ * @param shipping_query_id Unique identifier for the query to be answered
1717
+ * @param ok 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)
1718
+ * @param other Optional remaining parameters, confer the official reference below
1719
+ * @param signal Optional `AbortSignal` to cancel the request
1720
+ *
1721
+ * **Official reference:** https://core.telegram.org/bots/api#answershippingquery
1722
+ */
1723
+ answerShippingQuery(shipping_query_id, ok, other, signal) {
1724
+ return this.raw.answerShippingQuery({ shipping_query_id, ok, ...other }, signal);
1725
+ }
1726
+ /**
1727
+ * Once the user has confirmed their payment and shipping details, the Bot API sends the final confirmation in the form of an Update with the field pre_checkout_query. Use this method to respond to such pre-checkout queries. On success, True is returned. Note: The Bot API must receive an answer within 10 seconds after the pre-checkout query was sent.
1728
+ *
1729
+ * @param pre_checkout_query_id Unique identifier for the query to be answered
1730
+ * @param ok 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.
1731
+ * @param other Optional remaining parameters, confer the official reference below
1732
+ * @param signal Optional `AbortSignal` to cancel the request
1733
+ *
1734
+ * **Official reference:** https://core.telegram.org/bots/api#answerprecheckoutquery
1735
+ */
1736
+ answerPreCheckoutQuery(pre_checkout_query_id, ok, other, signal) {
1737
+ return this.raw.answerPreCheckoutQuery({ pre_checkout_query_id, ok, ...other }, signal);
1738
+ }
1739
+ /**
1740
+ * Returns the bot's Telegram Star transactions in chronological order. On success, returns a StarTransactions object.
1741
+ *
1742
+ * @param other Optional remaining parameters, confer the official reference below
1743
+ * @param signal Optional `AbortSignal` to cancel the request
1744
+ *
1745
+ * **Official reference:** https://core.telegram.org/bots/api#getstartransactions
1746
+ */
1747
+ getStarTransactions(other, signal) {
1748
+ return this.raw.getStarTransactions({ ...other }, signal);
1749
+ }
1750
+ /**
1751
+ * Refunds a successful payment in Telegram Stars.
1752
+ *
1753
+ * @param user_id Identifier of the user whose payment will be refunded
1754
+ * @param telegram_payment_charge_id Telegram payment identifier
1755
+ * @param signal Optional `AbortSignal` to cancel the request
1756
+ *
1757
+ * **Official reference:** https://core.telegram.org/bots/api#refundstarpayment
1758
+ */
1759
+ refundStarPayment(user_id, telegram_payment_charge_id, signal) {
1760
+ return this.raw.refundStarPayment({ user_id, telegram_payment_charge_id }, signal);
1761
+ }
1762
+ /**
1763
+ * Allows the bot to cancel or re-enable extension of a subscription paid in Telegram Stars. Returns True on success.
1764
+ *
1765
+ * @param user_id Identifier of the user whose subscription will be edited
1766
+ * @param telegram_payment_charge_id Telegram payment identifier for the subscription
1767
+ * @param is_canceled 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.
1768
+ * @param signal Optional `AbortSignal` to cancel the request
1769
+ *
1770
+ * **Official reference:** https://core.telegram.org/bots/api#edituserstarsubscription
1771
+ */
1772
+ editUserStarSubscription(user_id, telegram_payment_charge_id, is_canceled, signal) {
1773
+ return this.raw.editUserStarSubscription({ user_id, telegram_payment_charge_id, is_canceled }, signal);
1774
+ }
1775
+ /**
1776
+ * Verifies a user on behalf of the organization which is represented by the bot. Returns True on success.
1777
+ *
1778
+ * @param user_id Unique identifier of the target user
1779
+ * @param other Optional remaining parameters, confer the official reference below
1780
+ * @param signal Optional `AbortSignal` to cancel the request
1781
+ *
1782
+ * **Official reference:** https://core.telegram.org/bots/api#verifyuser
1783
+ */
1784
+ verifyUser(user_id, other, signal) {
1785
+ return this.raw.verifyUser({ user_id, ...other }, signal);
1786
+ }
1787
+ /**
1788
+ * Verifies a chat on behalf of the organization which is represented by the bot. Returns True on success.
1789
+ *
1790
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
1791
+ * @param other Optional remaining parameters, confer the official reference below
1792
+ * @param signal Optional `AbortSignal` to cancel the request
1793
+ *
1794
+ * **Official reference:** https://core.telegram.org/bots/api#verifychat
1795
+ */
1796
+ verifyChat(chat_id, other, signal) {
1797
+ return this.raw.verifyChat({ chat_id, ...other }, signal);
1798
+ }
1799
+ /**
1800
+ * Removes verification from a user who is currently verified on behalf of the organization represented by the bot. Returns True on success.
1801
+ *
1802
+ * @param user_id Unique identifier of the target user
1803
+ * @param signal Optional `AbortSignal` to cancel the request
1804
+ *
1805
+ * **Official reference:** https://core.telegram.org/bots/api#removeuserverification
1806
+ */
1807
+ removeUserVerification(user_id, signal) {
1808
+ return this.raw.removeUserVerification({ user_id }, signal);
1809
+ }
1810
+ /**
1811
+ * Removes verification from a chat that is currently verified on behalf of the organization represented by the bot. Returns True on success.
1812
+ *
1813
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
1814
+ * @param signal Optional `AbortSignal` to cancel the request
1815
+ *
1816
+ * **Official reference:** https://core.telegram.org/bots/api#removechatverification
1817
+ */
1818
+ removeChatVerification(chat_id, signal) {
1819
+ return this.raw.removeChatVerification({ chat_id }, signal);
1820
+ }
1821
+ /**
1822
+ * Informs a user that some of the Telegram Passport elements they provided contains errors. The user will not be able to re-submit their Passport to you until the errors are fixed (the contents of the field for which you returned the error must change). Returns True on success.
1823
+ *
1824
+ * Use this if the data submitted by the user doesn't satisfy the standards your service requires for any reason. For example, if a birthday date seems invalid, a submitted document is blurry, a scan shows evidence of tampering, etc. Supply some details in the error message to make sure the user knows how to correct the issues.
1825
+ *
1826
+ * @param user_id User identifier
1827
+ * @param errors An array describing the errors
1828
+ * @param signal Optional `AbortSignal` to cancel the request
1829
+ *
1830
+ * **Official reference:** https://core.telegram.org/bots/api#setpassportdataerrors
1831
+ */
1832
+ setPassportDataErrors(user_id, errors, signal) {
1833
+ return this.raw.setPassportDataErrors({ user_id, errors }, signal);
1834
+ }
1835
+ /**
1836
+ * Use this method to send a game. On success, the sent Message is returned.
1837
+ *
1838
+ * @param chat_id Unique identifier for the target chat
1839
+ * @param game_short_name Short name of the game, serves as the unique identifier for the game. Set up your games via BotFather.
1840
+ * @param other Optional remaining parameters, confer the official reference below
1841
+ * @param signal Optional `AbortSignal` to cancel the request
1842
+ *
1843
+ * **Official reference:** https://core.telegram.org/bots/api#sendgame
1844
+ */
1845
+ sendGame(chat_id, game_short_name, other, signal) {
1846
+ return this.raw.sendGame({ chat_id, game_short_name, ...other }, signal);
1847
+ }
1848
+ /**
1849
+ * Use this method to set the score of the specified user in a game message. On success, if the message is not an inline message, the Message is returned, otherwise True is returned. Returns an error, if the new score is not greater than the user's current score in the chat and force is False.
1850
+ *
1851
+ * @param chat_id Unique identifier for the target chat
1852
+ * @param message_id Identifier of the sent message
1853
+ * @param user_id User identifier
1854
+ * @param score New score, must be non-negative
1855
+ * @param other Optional remaining parameters, confer the official reference below
1856
+ * @param signal Optional `AbortSignal` to cancel the request
1857
+ *
1858
+ * **Official reference:** https://core.telegram.org/bots/api#setgamescore
1859
+ */
1860
+ setGameScore(chat_id, message_id, user_id, score, other, signal) {
1861
+ return this.raw.setGameScore({ chat_id, message_id, user_id, score, ...other }, signal);
1862
+ }
1863
+ /**
1864
+ * Use this method to set the score of the specified user in a game message. On success, if the message is not an inline message, the Message is returned, otherwise True is returned. Returns an error, if the new score is not greater than the user's current score in the chat and force is False.
1865
+ *
1866
+ * @param inline_message_id Identifier of the inline message
1867
+ * @param user_id User identifier
1868
+ * @param score New score, must be non-negative
1869
+ * @param other Optional remaining parameters, confer the official reference below
1870
+ * @param signal Optional `AbortSignal` to cancel the request
1871
+ *
1872
+ * **Official reference:** https://core.telegram.org/bots/api#setgamescore
1873
+ */
1874
+ setGameScoreInline(inline_message_id, user_id, score, other, signal) {
1875
+ return this.raw.setGameScore({ inline_message_id, user_id, score, ...other }, signal);
1876
+ }
1877
+ /**
1878
+ * Use this method to get data for high score tables. Will return the score of the specified user and several of their neighbors in a game. Returns an Array of GameHighScore objects.
1879
+ *
1880
+ * This method will currently return scores for the target user, plus two of their closest neighbors on each side. Will also return the top three users if the user and his neighbors are not among them. Please note that this behavior is subject to change.
1881
+ *
1882
+ * @param chat_id Unique identifier for the target chat
1883
+ * @param message_id Identifier of the sent message
1884
+ * @param user_id Target user id
1885
+ * @param signal Optional `AbortSignal` to cancel the request
1886
+ *
1887
+ * **Official reference:** https://core.telegram.org/bots/api#getgamehighscores
1888
+ */
1889
+ getGameHighScores(chat_id, message_id, user_id, signal) {
1890
+ return this.raw.getGameHighScores({ chat_id, message_id, user_id }, signal);
1891
+ }
1892
+ /**
1893
+ * Use this method to get data for high score tables. Will return the score of the specified user and several of their neighbors in an inline game. On success, returns an Array of GameHighScore objects.
1894
+ *
1895
+ * This method will currently return scores for the target user, plus two of their closest neighbors on each side. Will also return the top three users if the user and his neighbors are not among them. Please note that this behavior is subject to change.
1896
+ *
1897
+ * @param inline_message_id Identifier of the inline message
1898
+ * @param user_id Target user id
1899
+ * @param signal Optional `AbortSignal` to cancel the request
1900
+ *
1901
+ * **Official reference:** https://core.telegram.org/bots/api#getgamehighscores
1902
+ */
1903
+ getGameHighScoresInline(inline_message_id, user_id, signal) {
1904
+ return this.raw.getGameHighScores({ inline_message_id, user_id }, signal);
1905
+ }
1906
+ }
1907
+ exports.Api = Api;