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,1628 @@
1
+ import { type BotCommand, type ChatPermissions, type InlineQueryResult, type InputFile, type InputMedia, type InputMediaAudio, type InputMediaDocument, type InputMediaPhoto, type InputMediaVideo, type InputPaidMedia, type InputPollOption, type InputSticker, type LabeledPrice, type MaskPosition, type PassportElementError, type ReactionType } from "../types.js";
2
+ import { type ApiClientOptions, type Methods, type Payload, type RawApi, type Transformer, type TransformerConsumer, type WebhookReplyEnvelope } from "./client.js";
3
+ /**
4
+ * Helper type to derive remaining properties of a given API method call M,
5
+ * given that some properties X have already been specified.
6
+ */
7
+ export type Other<R extends RawApi, M extends Methods<R>, X extends string = never> = Omit<Payload<M, R>, X>;
8
+ /**
9
+ * This class provides access to the full Telegram Bot API. All methods of the
10
+ * API have an equivalent on this class, with the most important parameters
11
+ * pulled up into the function signature, and the other parameters captured by
12
+ * an object.
13
+ *
14
+ * In addition, this class has a property `raw` that provides raw access to the
15
+ * complete Telegram API, with the method signatures 1:1 represented as
16
+ * documented on the website (https://core.telegram.org/bots/api).
17
+ *
18
+ * Every method takes an optional `AbortSignal` object that allows you to cancel
19
+ * the request if desired.
20
+ *
21
+ * In advanced use cases, this class allows to install transformers that can
22
+ * modify the method and payload on the fly before sending it to the Telegram
23
+ * servers. Confer the `config` property for this.
24
+ */
25
+ export declare class Api<R extends RawApi = RawApi> {
26
+ readonly token: string;
27
+ readonly options?: ApiClientOptions | undefined;
28
+ /**
29
+ * Provides access to all methods of the Telegram Bot API exactly as
30
+ * documented on the website (https://core.telegram.org/bots/api). No
31
+ * arguments are pulled up in the function signature for convenience.
32
+ *
33
+ * If you suppress compiler warnings, this also allows for raw api calls to
34
+ * undocumented methods with arbitrary parameters—use only if you know what
35
+ * you are doing.
36
+ */
37
+ readonly raw: R;
38
+ /**
39
+ * Configuration object for the API instance, used as a namespace to
40
+ * separate those API operations that are related to grammY from methods of
41
+ * the Telegram Bot API. Contains advanced options!
42
+ */
43
+ readonly config: {
44
+ /**
45
+ * Allows to install an API request transformer function. A transformer
46
+ * function has access to every API call before it is being performed.
47
+ * This includes the method as string, the payload as object and the
48
+ * upstream transformer function.
49
+ *
50
+ * _Note that using transformer functions is an advanced feature of
51
+ * grammY that most bots will not need to make use of._
52
+ */
53
+ readonly use: TransformerConsumer<R>;
54
+ /**
55
+ * Provides read access to all currently installed transformers (those
56
+ * that have previously been passed to `config.use`).
57
+ *
58
+ * _Note that using transformer functions is an advanced feature of
59
+ * grammY that most bots will not need to make use of._
60
+ */
61
+ readonly installedTransformers: () => Transformer<R>[];
62
+ };
63
+ /**
64
+ * Constructs a new instance of `Api`. It is independent from all other
65
+ * instances of this class. For example, this lets you install a custom set
66
+ * if transformers.
67
+ *
68
+ * @param token Bot API token obtained from [@BotFather](https://t.me/BotFather)
69
+ * @param options Optional API client options for the underlying client instance
70
+ * @param webhookReplyEnvelope Optional envelope to handle webhook replies
71
+ */
72
+ constructor(token: string, options?: ApiClientOptions | undefined, webhookReplyEnvelope?: WebhookReplyEnvelope);
73
+ /**
74
+ * Use this method to receive incoming updates using long polling (wiki). Returns an Array of Update objects.
75
+ *
76
+ * Notes
77
+ * 1. This method will not work if an outgoing webhook is set up.
78
+ * 2. In order to avoid getting duplicate updates, recalculate offset after each server response.
79
+ *
80
+ * @param other Optional remaining parameters, confer the official reference below
81
+ * @param signal Optional `AbortSignal` to cancel the request
82
+ *
83
+ * **Official reference:** https://core.telegram.org/bots/api#getupdates
84
+ */
85
+ getUpdates(other?: Other<R, "getUpdates">, signal?: AbortSignal): Promise<import("@grammyjs/types/update.js").Update[]>;
86
+ /**
87
+ * 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.
88
+ *
89
+ * 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.
90
+ *
91
+ * Notes
92
+ * 1. You will not be able to receive updates using getUpdates for as long as an outgoing webhook is set up.
93
+ * 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.
94
+ * 3. Ports currently supported for Webhooks: 443, 80, 88, 8443.
95
+ *
96
+ * If you're having any trouble setting up webhooks, please check out this amazing guide to webhooks.
97
+ *
98
+ * @param url HTTPS url to send updates to. Use an empty string to remove webhook integration
99
+ * @param other Optional remaining parameters, confer the official reference below
100
+ * @param signal Optional `AbortSignal` to cancel the request
101
+ *
102
+ * **Official reference:** https://core.telegram.org/bots/api#setwebhook
103
+ */
104
+ setWebhook(url: string, other?: Other<R, "setWebhook", "url">, signal?: AbortSignal): Promise<true>;
105
+ /**
106
+ * Use this method to remove webhook integration if you decide to switch back to getUpdates. Returns True on success.
107
+ *
108
+ * @param other Optional remaining parameters, confer the official reference below
109
+ * @param signal Optional `AbortSignal` to cancel the request
110
+ *
111
+ * **Official reference:** https://core.telegram.org/bots/api#deletewebhook
112
+ */
113
+ deleteWebhook(other?: Other<R, "deleteWebhook">, signal?: AbortSignal): Promise<true>;
114
+ /**
115
+ * 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.
116
+ *
117
+ * @param signal Optional `AbortSignal` to cancel the request
118
+ *
119
+ * **Official reference:** https://core.telegram.org/bots/api#getwebhookinfo
120
+ */
121
+ getWebhookInfo(signal?: AbortSignal): Promise<import("@grammyjs/types/manage.js").WebhookInfo>;
122
+ /**
123
+ * 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.
124
+ *
125
+ * @param signal Optional `AbortSignal` to cancel the request
126
+ *
127
+ * **Official reference:** https://core.telegram.org/bots/api#getme
128
+ */
129
+ getMe(signal?: AbortSignal): Promise<import("@grammyjs/types/manage.js").UserFromGetMe>;
130
+ /**
131
+ * 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.
132
+ *
133
+ * @param signal Optional `AbortSignal` to cancel the request
134
+ *
135
+ * **Official reference:** https://core.telegram.org/bots/api#logout
136
+ */
137
+ logOut(signal?: AbortSignal): Promise<true>;
138
+ /**
139
+ * 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.
140
+ *
141
+ * @param signal Optional `AbortSignal` to cancel the request
142
+ *
143
+ * **Official reference:** https://core.telegram.org/bots/api#close
144
+ */
145
+ close(signal?: AbortSignal): Promise<true>;
146
+ /**
147
+ * Use this method to send text messages. On success, the sent Message is returned.
148
+ *
149
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
150
+ * @param text Text of the message to be sent, 1-4096 characters after entities parsing
151
+ * @param other Optional remaining parameters, confer the official reference below
152
+ * @param signal Optional `AbortSignal` to cancel the request
153
+ *
154
+ * **Official reference:** https://core.telegram.org/bots/api#sendmessage
155
+ */
156
+ sendMessage(chat_id: number | string, text: string, other?: Other<R, "sendMessage", "chat_id" | "text">, signal?: AbortSignal): Promise<import("@grammyjs/types/message.js").Message.TextMessage>;
157
+ /**
158
+ * 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.
159
+ *
160
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
161
+ * @param from_chat_id Unique identifier for the chat where the original message was sent (or channel username in the format @channelusername)
162
+ * @param message_id Message identifier in the chat specified in from_chat_id
163
+ * @param other Optional remaining parameters, confer the official reference below
164
+ * @param signal Optional `AbortSignal` to cancel the request
165
+ *
166
+ * **Official reference:** https://core.telegram.org/bots/api#forwardmessage
167
+ */
168
+ forwardMessage(chat_id: number | string, from_chat_id: number | string, message_id: number, other?: Other<R, "forwardMessage", "chat_id" | "from_chat_id" | "message_id">, signal?: AbortSignal): Promise<import("@grammyjs/types/message.js").Message>;
169
+ /**
170
+ * 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.
171
+ *
172
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
173
+ * @param from_chat_id Unique identifier for the chat where the original messages were sent (or channel username in the format @channelusername)
174
+ * @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.
175
+ * @param other Optional remaining parameters, confer the official reference below
176
+ * @param signal Optional `AbortSignal` to cancel the request
177
+ *
178
+ * **Official reference:** https://core.telegram.org/bots/api#forwardmessages
179
+ */
180
+ forwardMessages(chat_id: number | string, from_chat_id: number | string, message_ids: number[], other?: Other<R, "forwardMessages", "chat_id" | "from_chat_id" | "message_ids">, signal?: AbortSignal): Promise<import("@grammyjs/types/message.js").MessageId[]>;
181
+ /**
182
+ * 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.
183
+ *
184
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
185
+ * @param from_chat_id Unique identifier for the chat where the original message was sent (or channel username in the format @channelusername)
186
+ * @param message_id Message identifier in the chat specified in from_chat_id
187
+ * @param other Optional remaining parameters, confer the official reference below
188
+ * @param signal Optional `AbortSignal` to cancel the request
189
+ *
190
+ * **Official reference:** https://core.telegram.org/bots/api#copymessage
191
+ */
192
+ copyMessage(chat_id: number | string, from_chat_id: number | string, message_id: number, other?: Other<R, "copyMessage", "chat_id" | "from_chat_id" | "message_id">, signal?: AbortSignal): Promise<import("@grammyjs/types/message.js").MessageId>;
193
+ /**
194
+ * 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.
195
+ *
196
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
197
+ * @param from_chat_id Unique identifier for the chat where the original messages were sent (or channel username in the format @channelusername)
198
+ * @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.
199
+ * @param other Optional remaining parameters, confer the official reference below
200
+ * @param signal Optional `AbortSignal` to cancel the request
201
+ *
202
+ * **Official reference:** https://core.telegram.org/bots/api#copymessages
203
+ */
204
+ copyMessages(chat_id: number | string, from_chat_id: number | string, message_ids: number[], other?: Other<R, "copyMessages", "chat_id" | "from_chat_id" | "message_id">, signal?: AbortSignal): Promise<import("@grammyjs/types/message.js").MessageId[]>;
205
+ /**
206
+ * Use this method to send photos. On success, the sent Message is returned.
207
+ *
208
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
209
+ * @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.
210
+ * @param other Optional remaining parameters, confer the official reference below
211
+ * @param signal Optional `AbortSignal` to cancel the request
212
+ *
213
+ * **Official reference:** https://core.telegram.org/bots/api#sendphoto
214
+ */
215
+ sendPhoto(chat_id: number | string, photo: InputFile | string, other?: Other<R, "sendPhoto", "chat_id" | "photo">, signal?: AbortSignal): Promise<import("@grammyjs/types/message.js").Message.PhotoMessage>;
216
+ /**
217
+ * 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.
218
+ *
219
+ * For sending voice messages, use the sendVoice method instead.
220
+ *
221
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
222
+ * @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.
223
+ * @param other Optional remaining parameters, confer the official reference below
224
+ * @param signal Optional `AbortSignal` to cancel the request
225
+ *
226
+ * **Official reference:** https://core.telegram.org/bots/api#sendaudio
227
+ */
228
+ sendAudio(chat_id: number | string, audio: InputFile | string, other?: Other<R, "sendAudio", "chat_id" | "audio">, signal?: AbortSignal): Promise<import("@grammyjs/types/message.js").Message.AudioMessage>;
229
+ /**
230
+ * 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.
231
+ *
232
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
233
+ * @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.
234
+ * @param other Optional remaining parameters, confer the official reference below
235
+ * @param signal Optional `AbortSignal` to cancel the request
236
+ *
237
+ * **Official reference:** https://core.telegram.org/bots/api#senddocument
238
+ */
239
+ sendDocument(chat_id: number | string, document: InputFile | string, other?: Other<R, "sendDocument", "chat_id" | "document">, signal?: AbortSignal): Promise<import("@grammyjs/types/message.js").Message.DocumentMessage>;
240
+ /**
241
+ * 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.
242
+ *
243
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
244
+ * @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.
245
+ * @param other Optional remaining parameters, confer the official reference below
246
+ * @param signal Optional `AbortSignal` to cancel the request
247
+ *
248
+ * **Official reference:** https://core.telegram.org/bots/api#sendvideo
249
+ */
250
+ sendVideo(chat_id: number | string, video: InputFile | string, other?: Other<R, "sendVideo", "chat_id" | "video">, signal?: AbortSignal): Promise<import("@grammyjs/types/message.js").Message.VideoMessage>;
251
+ /**
252
+ * 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.
253
+ *
254
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
255
+ * @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.
256
+ * @param other Optional remaining parameters, confer the official reference below
257
+ * @param signal Optional `AbortSignal` to cancel the request
258
+ *
259
+ * **Official reference:** https://core.telegram.org/bots/api#sendanimation
260
+ */
261
+ sendAnimation(chat_id: number | string, animation: InputFile | string, other?: Other<R, "sendAnimation", "chat_id" | "animation">, signal?: AbortSignal): Promise<import("@grammyjs/types/message.js").Message.AnimationMessage>;
262
+ /**
263
+ * 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.
264
+ *
265
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
266
+ * @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.
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#sendvoice
271
+ */
272
+ sendVoice(chat_id: number | string, voice: InputFile | string, other?: Other<R, "sendVoice", "chat_id" | "voice">, signal?: AbortSignal): Promise<import("@grammyjs/types/message.js").Message.VoiceMessage>;
273
+ /**
274
+ * Use this method to send video messages. On success, the sent Message is returned.
275
+ * As of v.4.0, Telegram clients support rounded square mp4 videos of up to 1 minute long.
276
+ *
277
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
278
+ * @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
279
+ * @param other Optional remaining parameters, confer the official reference below
280
+ * @param signal Optional `AbortSignal` to cancel the request
281
+ *
282
+ * **Official reference:** https://core.telegram.org/bots/api#sendvideonote
283
+ */
284
+ sendVideoNote(chat_id: number | string, video_note: InputFile | string, other?: Other<R, "sendVideoNote", "chat_id" | "video_note">, signal?: AbortSignal): Promise<import("@grammyjs/types/message.js").Message.VideoNoteMessage>;
285
+ /**
286
+ * 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.
287
+ *
288
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
289
+ * @param media An array describing messages to be sent, must include 2-10 items
290
+ * @param other Optional remaining parameters, confer the official reference below
291
+ * @param signal Optional `AbortSignal` to cancel the request
292
+ *
293
+ * **Official reference:** https://core.telegram.org/bots/api#sendmediagroup
294
+ */
295
+ sendMediaGroup(chat_id: number | string, media: ReadonlyArray<InputMediaAudio | InputMediaDocument | InputMediaPhoto | InputMediaVideo>, other?: Other<R, "sendMediaGroup", "chat_id" | "media">, signal?: AbortSignal): Promise<(import("@grammyjs/types/message.js").Message.PhotoMessage | import("@grammyjs/types/message.js").Message.AudioMessage | import("@grammyjs/types/message.js").Message.DocumentMessage | import("@grammyjs/types/message.js").Message.VideoMessage)[]>;
296
+ /**
297
+ * Use this method to send point on the map. On success, the sent Message is returned.
298
+ *
299
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
300
+ * @param latitude Latitude of the location
301
+ * @param longitude Longitude of the location
302
+ * @param other Optional remaining parameters, confer the official reference below
303
+ * @param signal Optional `AbortSignal` to cancel the request
304
+ *
305
+ * **Official reference:** https://core.telegram.org/bots/api#sendlocation
306
+ */
307
+ sendLocation(chat_id: number | string, latitude: number, longitude: number, other?: Other<R, "sendLocation", "chat_id" | "latitude" | "longitude">, signal?: AbortSignal): Promise<import("@grammyjs/types/message.js").Message.LocationMessage>;
308
+ /**
309
+ * 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.
310
+ *
311
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
312
+ * @param message_id Identifier of the message to edit
313
+ * @param latitude Latitude of new location
314
+ * @param longitude Longitude of new location
315
+ * @param other Optional remaining parameters, confer the official reference below
316
+ * @param signal Optional `AbortSignal` to cancel the request
317
+ *
318
+ * **Official reference:** https://core.telegram.org/bots/api#editmessagelivelocation
319
+ */
320
+ editMessageLiveLocation(chat_id: number | string, message_id: number, latitude: number, longitude: number, other?: Other<R, "editMessageLiveLocation", "chat_id" | "message_id" | "inline_message_id" | "latitude" | "longitude">, signal?: AbortSignal): Promise<true | (import("@grammyjs/types/update.js").Update.Edited & import("@grammyjs/types/message.js").Message.CommonMessage & {
321
+ location: import("@grammyjs/types/message.js").Location;
322
+ })>;
323
+ /**
324
+ * 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.
325
+ *
326
+ * @param inline_message_id Identifier of the inline message
327
+ * @param latitude Latitude of new location
328
+ * @param longitude Longitude of new location
329
+ * @param other Optional remaining parameters, confer the official reference below
330
+ * @param signal Optional `AbortSignal` to cancel the request
331
+ *
332
+ * **Official reference:** https://core.telegram.org/bots/api#editmessagelivelocation
333
+ */
334
+ editMessageLiveLocationInline(inline_message_id: string, latitude: number, longitude: number, other?: Other<R, "editMessageLiveLocation", "chat_id" | "message_id" | "inline_message_id" | "latitude" | "longitude">, signal?: AbortSignal): Promise<true | (import("@grammyjs/types/update.js").Update.Edited & import("@grammyjs/types/message.js").Message.CommonMessage & {
335
+ location: import("@grammyjs/types/message.js").Location;
336
+ })>;
337
+ /**
338
+ * 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.
339
+ *
340
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
341
+ * @param message_id Identifier of the message with live location to stop
342
+ * @param other Optional remaining parameters, confer the official reference below
343
+ * @param signal Optional `AbortSignal` to cancel the request
344
+ *
345
+ * **Official reference:** https://core.telegram.org/bots/api#stopmessagelivelocation
346
+ */
347
+ stopMessageLiveLocation(chat_id: number | string, message_id: number, other?: Other<R, "stopMessageLiveLocation", "chat_id" | "message_id" | "inline_message_id">, signal?: AbortSignal): Promise<true | (import("@grammyjs/types/update.js").Update.Edited & import("@grammyjs/types/message.js").Message.CommonMessage & {
348
+ location: import("@grammyjs/types/message.js").Location;
349
+ })>;
350
+ /**
351
+ * 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.
352
+ *
353
+ * @param inline_message_id Identifier of the inline message
354
+ * @param other Optional remaining parameters, confer the official reference below
355
+ * @param signal Optional `AbortSignal` to cancel the request
356
+ *
357
+ * **Official reference:** https://core.telegram.org/bots/api#stopmessagelivelocation
358
+ */
359
+ stopMessageLiveLocationInline(inline_message_id: string, other?: Other<R, "stopMessageLiveLocation", "chat_id" | "message_id" | "inline_message_id">, signal?: AbortSignal): Promise<true | (import("@grammyjs/types/update.js").Update.Edited & import("@grammyjs/types/message.js").Message.CommonMessage & {
360
+ location: import("@grammyjs/types/message.js").Location;
361
+ })>;
362
+ /**
363
+ * Use this method to send paid media. On success, the sent Message is returned.
364
+ *
365
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
366
+ * @param star_count The number of Telegram Stars that must be paid to buy access to the media
367
+ * @param media An array describing the media to be sent; up to 10 items
368
+ * @param other Optional remaining parameters, confer the official reference below
369
+ * @param signal Optional `AbortSignal` to cancel the request
370
+ *
371
+ * **Official reference:** https://core.telegram.org/bots/api#sendpaidmedia
372
+ */
373
+ sendPaidMedia(chat_id: number | string, star_count: number, media: InputPaidMedia[], other?: Other<R, "sendPaidMedia", "chat_id" | "star_count" | "media">, signal?: AbortSignal): Promise<import("@grammyjs/types/message.js").Message.PaidMediaMessage>;
374
+ /**
375
+ * Use this method to send information about a venue. On success, the sent Message is returned.
376
+ *
377
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
378
+ * @param latitude Latitude of the venue
379
+ * @param longitude Longitude of the venue
380
+ * @param title Name of the venue
381
+ * @param address Address of the venue
382
+ * @param other Optional remaining parameters, confer the official reference below
383
+ * @param signal Optional `AbortSignal` to cancel the request
384
+ *
385
+ * **Official reference:** https://core.telegram.org/bots/api#sendvenue
386
+ */
387
+ sendVenue(chat_id: number | string, latitude: number, longitude: number, title: string, address: string, other?: Other<R, "sendVenue", "chat_id" | "latitude" | "longitude" | "title" | "address">, signal?: AbortSignal): Promise<import("@grammyjs/types/message.js").Message.VenueMessage>;
388
+ /**
389
+ * Use this method to send phone contacts. On success, the sent Message is returned.
390
+ *
391
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
392
+ * @param phone_number Contact's phone number
393
+ * @param first_name Contact's first name
394
+ * @param other Optional remaining parameters, confer the official reference below
395
+ * @param signal Optional `AbortSignal` to cancel the request
396
+ *
397
+ * **Official reference:** https://core.telegram.org/bots/api#sendcontact
398
+ */
399
+ sendContact(chat_id: number | string, phone_number: string, first_name: string, other?: Other<R, "sendContact", "chat_id" | "phone_number" | "first_name">, signal?: AbortSignal): Promise<import("@grammyjs/types/message.js").Message.ContactMessage>;
400
+ /**
401
+ * Use this method to send a native poll. On success, the sent Message is returned.
402
+ *
403
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
404
+ * @param question Poll question, 1-300 characters
405
+ * @param options A list of answer options, 2-10 strings 1-100 characters each
406
+ * @param other Optional remaining parameters, confer the official reference below
407
+ * @param signal Optional `AbortSignal` to cancel the request
408
+ *
409
+ * **Official reference:** https://core.telegram.org/bots/api#sendpoll
410
+ */
411
+ sendPoll(chat_id: number | string, question: string, options: InputPollOption[], other?: Other<R, "sendPoll", "chat_id" | "question" | "options">, signal?: AbortSignal): Promise<import("@grammyjs/types/message.js").Message.PollMessage>;
412
+ /**
413
+ * Use this method to send an animated emoji that will display a random value. On success, the sent Message is returned.
414
+ *
415
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
416
+ * @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 “🎲”
417
+ * @param other Optional remaining parameters, confer the official reference below
418
+ * @param signal Optional `AbortSignal` to cancel the request
419
+ *
420
+ * **Official reference:** https://core.telegram.org/bots/api#senddice
421
+ */
422
+ sendDice(chat_id: number | string, emoji: (string & Record<never, never>) | "🎲" | "🎯" | "🏀" | "⚽" | "🎳" | "🎰", other?: Other<R, "sendDice", "chat_id" | "emoji">, signal?: AbortSignal): Promise<import("@grammyjs/types/message.js").Message.DiceMessage>;
423
+ /**
424
+ * 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.
425
+ *
426
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
427
+ * @param message_id Identifier of the target message
428
+ * @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.
429
+ * @param other Optional remaining parameters, confer the official reference below
430
+ * @param signal Optional `AbortSignal` to cancel the request
431
+ *
432
+ * **Official reference:** https://core.telegram.org/bots/api#setmessagereaction
433
+ */
434
+ setMessageReaction(chat_id: number | string, message_id: number, reaction: ReactionType[], other?: Other<R, "setMessageReaction", "chat_id" | "message_id" | "reaction">, signal?: AbortSignal): Promise<true>;
435
+ /**
436
+ * 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.
437
+ *
438
+ * 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.
439
+ *
440
+ * We only recommend using this method when a response from the bot will take a noticeable amount of time to arrive.
441
+ *
442
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
443
+ * @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.
444
+ * @param other Optional remaining parameters, confer the official reference below
445
+ * @param signal Optional `AbortSignal` to cancel the request
446
+ *
447
+ * **Official reference:** https://core.telegram.org/bots/api#sendchataction
448
+ */
449
+ sendChatAction(chat_id: number | string, action: "typing" | "upload_photo" | "record_video" | "upload_video" | "record_voice" | "upload_voice" | "upload_document" | "choose_sticker" | "find_location" | "record_video_note" | "upload_video_note", other?: Other<R, "sendChatAction", "chat_id" | "action">, signal?: AbortSignal): Promise<true>;
450
+ /**
451
+ * Use this method to get a list of profile pictures for a user. Returns a UserProfilePhotos object.
452
+ *
453
+ * @param user_id Unique identifier of the target user
454
+ * @param other Optional remaining parameters, confer the official reference below
455
+ * @param signal Optional `AbortSignal` to cancel the request
456
+ *
457
+ * **Official reference:** https://core.telegram.org/bots/api#getuserprofilephotos
458
+ */
459
+ getUserProfilePhotos(user_id: number, other?: Other<R, "getUserProfilePhotos", "user_id">, signal?: AbortSignal): Promise<import("@grammyjs/types/manage.js").UserProfilePhotos>;
460
+ /**
461
+ * 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.
462
+ *
463
+ * @param user_id Unique identifier of the target user
464
+ * @param other Optional remaining parameters, confer the official reference below
465
+ * @param signal Optional `AbortSignal` to cancel the request
466
+ *
467
+ * **Official reference:** https://core.telegram.org/bots/api#setuseremojistatus
468
+ */
469
+ setUserEmojiStatus(user_id: number, other?: Other<R, "setUserEmojiStatus", "user_id">, signal?: AbortSignal): Promise<true>;
470
+ /**
471
+ * 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.
472
+ *
473
+ * @param chat_id Unique identifier for the chat or username of the channel (in the format @channelusername)
474
+ * @param user_id Unique identifier of the target user
475
+ * @param signal Optional `AbortSignal` to cancel the request
476
+ *
477
+ * **Official reference:** https://core.telegram.org/bots/api#getuserchatboosts
478
+ */
479
+ getUserChatBoosts(chat_id: number | string, user_id: number, signal?: AbortSignal): Promise<import("@grammyjs/types/manage.js").UserChatBoosts>;
480
+ /**
481
+ * Use this method to get information about the connection of the bot with a business account. Returns a BusinessConnection object on success.
482
+ *
483
+ * @param business_connection_id Unique identifier of the business connection
484
+ * @param signal Optional `AbortSignal` to cancel the request
485
+ *
486
+ * **Official reference:** https://core.telegram.org/bots/api#getbusinessconnection
487
+ */
488
+ getBusinessConnection(business_connection_id: string, signal?: AbortSignal): Promise<import("@grammyjs/types/manage.js").BusinessConnection>;
489
+ /**
490
+ * 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.
491
+ *
492
+ * 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.
493
+ *
494
+ * @param file_id File identifier to get info about
495
+ * @param signal Optional `AbortSignal` to cancel the request
496
+ *
497
+ * **Official reference:** https://core.telegram.org/bots/api#getfile
498
+ */
499
+ getFile(file_id: string, signal?: AbortSignal): Promise<import("@grammyjs/types/message.js").File>;
500
+ /** @deprecated Use `banChatMember` instead. */
501
+ kickChatMember(...args: Parameters<Api["banChatMember"]>): Promise<true>;
502
+ /**
503
+ * 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.
504
+ *
505
+ * @param chat_id Unique identifier for the target group or username of the target supergroup or channel (in the format @channelusername)
506
+ * @param user_id Unique identifier of the target user
507
+ * @param other Optional remaining parameters, confer the official reference below
508
+ * @param signal Optional `AbortSignal` to cancel the request
509
+ *
510
+ * **Official reference:** https://core.telegram.org/bots/api#banchatmember
511
+ */
512
+ banChatMember(chat_id: number | string, user_id: number, other?: Other<R, "banChatMember", "chat_id" | "user_id">, signal?: AbortSignal): Promise<true>;
513
+ /**
514
+ * 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.
515
+ *
516
+ * @param chat_id Unique identifier for the target group or username of the target supergroup or channel (in the format @username)
517
+ * @param user_id Unique identifier of the target user
518
+ * @param other Optional remaining parameters, confer the official reference below
519
+ * @param signal Optional `AbortSignal` to cancel the request
520
+ *
521
+ * **Official reference:** https://core.telegram.org/bots/api#unbanchatmember
522
+ */
523
+ unbanChatMember(chat_id: number | string, user_id: number, other?: Other<R, "unbanChatMember", "chat_id" | "user_id">, signal?: AbortSignal): Promise<true>;
524
+ /**
525
+ * 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.
526
+ *
527
+ * @param chat_id Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)
528
+ * @param user_id Unique identifier of the target user
529
+ * @param permissions An object for new user permissions
530
+ * @param other Optional remaining parameters, confer the official reference below
531
+ * @param signal Optional `AbortSignal` to cancel the request
532
+ *
533
+ * **Official reference:** https://core.telegram.org/bots/api#restrictchatmember
534
+ */
535
+ restrictChatMember(chat_id: number | string, user_id: number, permissions: ChatPermissions, other?: Other<R, "restrictChatMember", "chat_id" | "user_id" | "permissions">, signal?: AbortSignal): Promise<true>;
536
+ /**
537
+ * 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.
538
+ *
539
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
540
+ * @param user_id Unique identifier of the target user
541
+ * @param other Optional remaining parameters, confer the official reference below
542
+ * @param signal Optional `AbortSignal` to cancel the request
543
+ *
544
+ * **Official reference:** https://core.telegram.org/bots/api#promotechatmember
545
+ */
546
+ promoteChatMember(chat_id: number | string, user_id: number, other?: Other<R, "promoteChatMember", "chat_id" | "user_id">, signal?: AbortSignal): Promise<true>;
547
+ /**
548
+ * Use this method to set a custom title for an administrator in a supergroup promoted by the bot. Returns True on success.
549
+ *
550
+ * @param chat_id Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)
551
+ * @param user_id Unique identifier of the target user
552
+ * @param custom_title New custom title for the administrator; 0-16 characters, emoji are not allowed
553
+ * @param signal Optional `AbortSignal` to cancel the request
554
+ *
555
+ * **Official reference:** https://core.telegram.org/bots/api#setchatadministratorcustomtitle
556
+ */
557
+ setChatAdministratorCustomTitle(chat_id: number | string, user_id: number, custom_title: string, signal?: AbortSignal): Promise<true>;
558
+ /**
559
+ * 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.
560
+ *
561
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
562
+ * @param sender_chat_id Unique identifier of the target sender chat
563
+ * @param signal Optional `AbortSignal` to cancel the request
564
+ *
565
+ * **Official reference:** https://core.telegram.org/bots/api#banchatsenderchat
566
+ */
567
+ banChatSenderChat(chat_id: number | string, sender_chat_id: number, signal?: AbortSignal): Promise<true>;
568
+ /**
569
+ * 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.
570
+ *
571
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
572
+ * @param sender_chat_id Unique identifier of the target sender chat
573
+ * @param signal Optional `AbortSignal` to cancel the request
574
+ *
575
+ * **Official reference:** https://core.telegram.org/bots/api#unbanchatsenderchat
576
+ */
577
+ unbanChatSenderChat(chat_id: number | string, sender_chat_id: number, signal?: AbortSignal): Promise<true>;
578
+ /**
579
+ * 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.
580
+ *
581
+ * @param chat_id Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)
582
+ * @param permissions New default chat permissions
583
+ * @param other Optional remaining parameters, confer the official reference below
584
+ * @param signal Optional `AbortSignal` to cancel the request
585
+ *
586
+ * **Official reference:** https://core.telegram.org/bots/api#setchatpermissions
587
+ */
588
+ setChatPermissions(chat_id: number | string, permissions: ChatPermissions, other?: Other<R, "setChatPermissions", "chat_id" | "permissions">, signal?: AbortSignal): Promise<true>;
589
+ /**
590
+ * 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.
591
+ *
592
+ * 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.
593
+ *
594
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
595
+ * @param signal Optional `AbortSignal` to cancel the request
596
+ *
597
+ * **Official reference:** https://core.telegram.org/bots/api#exportchatinvitelink
598
+ */
599
+ exportChatInviteLink(chat_id: number | string, signal?: AbortSignal): Promise<string>;
600
+ /**
601
+ * 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.
602
+ *
603
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
604
+ * @param other Optional remaining parameters, confer the official reference below
605
+ * @param signal Optional `AbortSignal` to cancel the request
606
+ *
607
+ * **Official reference:** https://core.telegram.org/bots/api#createchatinvitelink
608
+ */
609
+ createChatInviteLink(chat_id: number | string, other?: Other<R, "createChatInviteLink", "chat_id">, signal?: AbortSignal): Promise<import("@grammyjs/types/manage.js").ChatInviteLink>;
610
+ /**
611
+ * 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.
612
+ *
613
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
614
+ * @param invite_link The invite link to edit
615
+ * @param other Optional remaining parameters, confer the official reference below
616
+ * @param signal Optional `AbortSignal` to cancel the request
617
+ *
618
+ * **Official reference:** https://core.telegram.org/bots/api#editchatinvitelink
619
+ */
620
+ editChatInviteLink(chat_id: number | string, invite_link: string, other?: Other<R, "editChatInviteLink", "chat_id" | "invite_link">, signal?: AbortSignal): Promise<import("@grammyjs/types/manage.js").ChatInviteLink>;
621
+ /**
622
+ * 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.
623
+ *
624
+ * @param chat_id Unique identifier for the target channel chat or username of the target channel (in the format @channelusername)
625
+ * @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).
626
+ * @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
627
+ * @param other Optional remaining parameters, confer the official reference below
628
+ * @param signal Optional `AbortSignal` to cancel the request
629
+ *
630
+ * **Official reference:** https://core.telegram.org/bots/api#createchatsubscriptioninvitelink
631
+ */
632
+ createChatSubscriptionInviteLink(chat_id: number | string, subscription_period: number, subscription_price: number, other?: Other<R, "createChatSubscriptionInviteLink", "chat_id" | "subscription_period" | "subscription_price">, signal?: AbortSignal): Promise<import("@grammyjs/types/manage.js").ChatInviteLink>;
633
+ /**
634
+ * 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.
635
+ *
636
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
637
+ * @param invite_link The invite link to edit
638
+ * @param other Optional remaining parameters, confer the official reference below
639
+ * @param signal Optional `AbortSignal` to cancel the request
640
+ *
641
+ * **Official reference:** https://core.telegram.org/bots/api#editchatsubscriptioninvitelink
642
+ */
643
+ editChatSubscriptionInviteLink(chat_id: number | string, invite_link: string, other?: Other<R, "editChatSubscriptionInviteLink", "chat_id" | "invite_link">, signal?: AbortSignal): Promise<import("@grammyjs/types/manage.js").ChatInviteLink>;
644
+ /**
645
+ * 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.
646
+ *
647
+ * @param chat_id Unique identifier of the target chat or username of the target channel (in the format @channelusername)
648
+ * @param invite_link The invite link to revoke
649
+ * @param signal Optional `AbortSignal` to cancel the request
650
+ *
651
+ * **Official reference:** https://core.telegram.org/bots/api#revokechatinvitelink
652
+ */
653
+ revokeChatInviteLink(chat_id: number | string, invite_link: string, signal?: AbortSignal): Promise<import("@grammyjs/types/manage.js").ChatInviteLink>;
654
+ /**
655
+ * 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.
656
+ *
657
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
658
+ * @param user_id Unique identifier of the target user
659
+ * @param signal Optional `AbortSignal` to cancel the request
660
+ *
661
+ * **Official reference:** https://core.telegram.org/bots/api#approvechatjoinrequest
662
+ */
663
+ approveChatJoinRequest(chat_id: number | string, user_id: number, signal?: AbortSignal): Promise<true>;
664
+ /**
665
+ * 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.
666
+ *
667
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
668
+ * @param user_id Unique identifier of the target user
669
+ * @param signal Optional `AbortSignal` to cancel the request
670
+ *
671
+ * **Official reference:** https://core.telegram.org/bots/api#declinechatjoinrequest
672
+ */
673
+ declineChatJoinRequest(chat_id: number | string, user_id: number, signal?: AbortSignal): Promise<true>;
674
+ /**
675
+ * 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.
676
+ *
677
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
678
+ * @param photo New chat photo, uploaded using multipart/form-data
679
+ * @param signal Optional `AbortSignal` to cancel the request
680
+ *
681
+ * **Official reference:** https://core.telegram.org/bots/api#setchatphoto
682
+ */
683
+ setChatPhoto(chat_id: number | string, photo: InputFile, signal?: AbortSignal): Promise<true>;
684
+ /**
685
+ * 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.
686
+ *
687
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
688
+ * @param signal Optional `AbortSignal` to cancel the request
689
+ *
690
+ * **Official reference:** https://core.telegram.org/bots/api#deletechatphoto
691
+ */
692
+ deleteChatPhoto(chat_id: number | string, signal?: AbortSignal): Promise<true>;
693
+ /**
694
+ * 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.
695
+ *
696
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
697
+ * @param title New chat title, 1-255 characters
698
+ * @param signal Optional `AbortSignal` to cancel the request
699
+ *
700
+ * **Official reference:** https://core.telegram.org/bots/api#setchattitle
701
+ */
702
+ setChatTitle(chat_id: number | string, title: string, signal?: AbortSignal): Promise<true>;
703
+ /**
704
+ * 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.
705
+ *
706
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
707
+ * @param description New chat description, 0-255 characters
708
+ * @param signal Optional `AbortSignal` to cancel the request
709
+ *
710
+ * **Official reference:** https://core.telegram.org/bots/api#setchatdescription
711
+ */
712
+ setChatDescription(chat_id: number | string, description?: string, signal?: AbortSignal): Promise<true>;
713
+ /**
714
+ * 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.
715
+ *
716
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
717
+ * @param message_id Identifier of a message to pin
718
+ * @param other Optional remaining parameters, confer the official reference below
719
+ * @param signal Optional `AbortSignal` to cancel the request
720
+ *
721
+ * **Official reference:** https://core.telegram.org/bots/api#pinchatmessage
722
+ */
723
+ pinChatMessage(chat_id: number | string, message_id: number, other?: Other<R, "pinChatMessage", "chat_id" | "message_id">, signal?: AbortSignal): Promise<true>;
724
+ /**
725
+ * 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.
726
+ *
727
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
728
+ * @param message_id Identifier of a message to unpin. If not specified, the most recent pinned message (by sending date) will be unpinned.
729
+ * @param other Optional remaining parameters, confer the official reference below
730
+ * @param signal Optional `AbortSignal` to cancel the request
731
+ *
732
+ * **Official reference:** https://core.telegram.org/bots/api#unpinchatmessage
733
+ */
734
+ unpinChatMessage(chat_id: number | string, message_id?: number, other?: Other<R, "unpinChatMessage", "chat_id" | "message_id">, signal?: AbortSignal): Promise<true>;
735
+ /**
736
+ * 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.
737
+ *
738
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
739
+ * @param signal Optional `AbortSignal` to cancel the request
740
+ *
741
+ * **Official reference:** https://core.telegram.org/bots/api#unpinallchatmessages
742
+ */
743
+ unpinAllChatMessages(chat_id: number | string, signal?: AbortSignal): Promise<true>;
744
+ /**
745
+ * Use this method for your bot to leave a group, supergroup or channel. Returns True on success.
746
+ *
747
+ * @param chat_id Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername)
748
+ * @param signal Optional `AbortSignal` to cancel the request
749
+ *
750
+ * **Official reference:** https://core.telegram.org/bots/api#leavechat
751
+ */
752
+ leaveChat(chat_id: number | string, signal?: AbortSignal): Promise<true>;
753
+ /**
754
+ * 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.
755
+ *
756
+ * @param chat_id Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername)
757
+ * @param signal Optional `AbortSignal` to cancel the request
758
+ *
759
+ * **Official reference:** https://core.telegram.org/bots/api#getchat
760
+ */
761
+ getChat(chat_id: number | string, signal?: AbortSignal): Promise<import("@grammyjs/types/manage.js").ChatFullInfo>;
762
+ /**
763
+ * Use this method to get a list of administrators in a chat, which aren't bots. Returns an Array of ChatMember objects.
764
+ *
765
+ * @param chat_id Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername)
766
+ * @param signal Optional `AbortSignal` to cancel the request
767
+ *
768
+ * **Official reference:** https://core.telegram.org/bots/api#getchatadministrators
769
+ */
770
+ getChatAdministrators(chat_id: number | string, signal?: AbortSignal): Promise<(import("@grammyjs/types/manage.js").ChatMemberOwner | import("@grammyjs/types/manage.js").ChatMemberAdministrator)[]>;
771
+ /** @deprecated Use `getChatMemberCount` instead. */
772
+ getChatMembersCount(...args: Parameters<Api["getChatMemberCount"]>): Promise<number>;
773
+ /**
774
+ * Use this method to get the number of members in a chat. Returns Int on success.
775
+ *
776
+ * @param chat_id Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername)
777
+ * @param signal Optional `AbortSignal` to cancel the request
778
+ *
779
+ * **Official reference:** https://core.telegram.org/bots/api#getchatmembercount
780
+ */
781
+ getChatMemberCount(chat_id: number | string, signal?: AbortSignal): Promise<number>;
782
+ /**
783
+ * 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.
784
+ *
785
+ * @param chat_id Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername)
786
+ * @param user_id Unique identifier of the target user
787
+ * @param signal Optional `AbortSignal` to cancel the request
788
+ *
789
+ * **Official reference:** https://core.telegram.org/bots/api#getchatmember
790
+ */
791
+ getChatMember(chat_id: number | string, user_id: number, signal?: AbortSignal): Promise<import("@grammyjs/types/manage.js").ChatMember>;
792
+ /**
793
+ * 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.
794
+ *
795
+ * @param chat_id Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)
796
+ * @param sticker_set_name Name of the sticker set to be set as the group sticker set
797
+ * @param signal Optional `AbortSignal` to cancel the request
798
+ *
799
+ * **Official reference:** https://core.telegram.org/bots/api#setchatstickerset
800
+ */
801
+ setChatStickerSet(chat_id: number | string, sticker_set_name: string, signal?: AbortSignal): Promise<true>;
802
+ /**
803
+ * 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.
804
+ *
805
+ * @param chat_id Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)
806
+ * @param signal Optional `AbortSignal` to cancel the request
807
+ *
808
+ * **Official reference:** https://core.telegram.org/bots/api#deletechatstickerset
809
+ */
810
+ deleteChatStickerSet(chat_id: number | string, signal?: AbortSignal): Promise<true>;
811
+ /**
812
+ * 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.
813
+ *
814
+ * @param signal Optional `AbortSignal` to cancel the request
815
+ *
816
+ * **Official reference:** https://core.telegram.org/bots/api#getforumtopiciconstickers
817
+ */
818
+ getForumTopicIconStickers(signal?: AbortSignal): Promise<import("@grammyjs/types/message.js").Sticker[]>;
819
+ /**
820
+ * 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.
821
+ *
822
+ * @param chat_id Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)
823
+ * @param name Topic name, 1-128 characters
824
+ * @param other Optional remaining parameters, confer the official reference below
825
+ * @param signal Optional `AbortSignal` to cancel the request
826
+ *
827
+ * **Official reference:** https://core.telegram.org/bots/api#createforumtopic
828
+ */
829
+ createForumTopic(chat_id: number | string, name: string, other?: Other<R, "createForumTopic", "chat_id" | "name">, signal?: AbortSignal): Promise<import("@grammyjs/types/manage.js").ForumTopic>;
830
+ /**
831
+ * 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.
832
+ *
833
+ * @param chat_id Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)
834
+ * @param message_thread_id Unique identifier for the target message thread of the forum topic
835
+ * @param other Optional remaining parameters, confer the official reference below
836
+ * @param signal Optional `AbortSignal` to cancel the request
837
+ *
838
+ * **Official reference:** https://core.telegram.org/bots/api#editforumtopic
839
+ */
840
+ editForumTopic(chat_id: number | string, message_thread_id: number, other?: Other<R, "editForumTopic", "chat_id" | "message_thread_id">, signal?: AbortSignal): Promise<true>;
841
+ /**
842
+ * 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.
843
+ *
844
+ * @param chat_id Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)
845
+ * @param message_thread_id Unique identifier for the target message thread of the forum topic
846
+ * @param signal Optional `AbortSignal` to cancel the request
847
+ *
848
+ * **Official reference:** https://core.telegram.org/bots/api#closeforumtopic
849
+ */
850
+ closeForumTopic(chat_id: number | string, message_thread_id: number, signal?: AbortSignal): Promise<true>;
851
+ /**
852
+ * 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.
853
+ *
854
+ * @param chat_id Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)
855
+ * @param message_thread_id Unique identifier for the target message thread of the forum topic
856
+ * @param signal Optional `AbortSignal` to cancel the request
857
+ *
858
+ * **Official reference:** https://core.telegram.org/bots/api#reopenforumtopic
859
+ */
860
+ reopenForumTopic(chat_id: number | string, message_thread_id: number, signal?: AbortSignal): Promise<true>;
861
+ /**
862
+ * 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.
863
+ *
864
+ * @param chat_id Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)
865
+ * @param message_thread_id Unique identifier for the target message thread of the forum topic
866
+ * @param signal Optional `AbortSignal` to cancel the request
867
+ *
868
+ * **Official reference:** https://core.telegram.org/bots/api#deleteforumtopic
869
+ */
870
+ deleteForumTopic(chat_id: number | string, message_thread_id: number, signal?: AbortSignal): Promise<true>;
871
+ /**
872
+ * 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.
873
+ *
874
+ * @param chat_id Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)
875
+ * @param message_thread_id Unique identifier for the target message thread of the forum topic
876
+ * @param signal Optional `AbortSignal` to cancel the request
877
+ *
878
+ * **Official reference:** https://core.telegram.org/bots/api#unpinallforumtopicmessages
879
+ */
880
+ unpinAllForumTopicMessages(chat_id: number | string, message_thread_id: number, signal?: AbortSignal): Promise<true>;
881
+ /**
882
+ * 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.
883
+ *
884
+ * @param chat_id Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)
885
+ * @param name New topic name, 1-128 characters
886
+ * @param signal Optional `AbortSignal` to cancel the request
887
+ *
888
+ * **Official reference:** https://core.telegram.org/bots/api#editgeneralforumtopic
889
+ */
890
+ editGeneralForumTopic(chat_id: number | string, name: string, signal?: AbortSignal): Promise<true>;
891
+ /**
892
+ * 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.
893
+ *
894
+ * @param chat_id Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)
895
+ * @param signal Optional `AbortSignal` to cancel the request
896
+ *
897
+ * **Official reference:** https://core.telegram.org/bots/api#closegeneralforumtopic
898
+ */
899
+ closeGeneralForumTopic(chat_id: number | string, signal?: AbortSignal): Promise<true>;
900
+ /**
901
+ * 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. *
902
+ *
903
+ * @param chat_id Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)
904
+ * @param signal Optional `AbortSignal` to cancel the request
905
+ *
906
+ * **Official reference:** https://core.telegram.org/bots/api#reopengeneralforumtopic
907
+ */
908
+ reopenGeneralForumTopic(chat_id: number | string, signal?: AbortSignal): Promise<true>;
909
+ /**
910
+ * 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.
911
+ *
912
+ * @param chat_id Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)
913
+ * @param signal Optional `AbortSignal` to cancel the request
914
+ *
915
+ * **Official reference:** https://core.telegram.org/bots/api#hidegeneralforumtopic
916
+ */
917
+ hideGeneralForumTopic(chat_id: number | string, signal?: AbortSignal): Promise<true>;
918
+ /**
919
+ * 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.
920
+ *
921
+ * @param chat_id Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)
922
+ * @param signal Optional `AbortSignal` to cancel the request
923
+ *
924
+ * **Official reference:** https://core.telegram.org/bots/api#unhidegeneralforumtopic
925
+ */
926
+ unhideGeneralForumTopic(chat_id: number | string, signal?: AbortSignal): Promise<true>;
927
+ /**
928
+ * 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.
929
+ *
930
+ * @param chat_id Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)
931
+ * @param signal Optional `AbortSignal` to cancel the request
932
+ *
933
+ * **Official reference:** https://core.telegram.org/bots/api#unpinallgeneralforumtopicmessages
934
+ */
935
+ unpinAllGeneralForumTopicMessages(chat_id: number | string, signal?: AbortSignal): Promise<true>;
936
+ /**
937
+ * 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.
938
+ *
939
+ * 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.
940
+ *
941
+ * @param callback_query_id Unique identifier for the query to be answered
942
+ * @param other Optional remaining parameters, confer the official reference below
943
+ * @param signal Optional `AbortSignal` to cancel the request
944
+ *
945
+ * **Official reference:** https://core.telegram.org/bots/api#answercallbackquery
946
+ */
947
+ answerCallbackQuery(callback_query_id: string, other?: Other<R, "answerCallbackQuery", "callback_query_id">, signal?: AbortSignal): Promise<true>;
948
+ /**
949
+ * Use this method to change the bot's name. Returns True on success.
950
+ *
951
+ * @param name New bot name; 0-64 characters. Pass an empty string to remove the dedicated name for the given language.
952
+ * @param other Optional remaining parameters, confer the official reference below
953
+ * @param signal Optional `AbortSignal` to cancel the request
954
+ *
955
+ * **Official reference:** https://core.telegram.org/bots/api#setmyname
956
+ */
957
+ setMyName(name: string, other?: Other<R, "setMyName", "name">, signal?: AbortSignal): Promise<true>;
958
+ /**
959
+ * Use this method to get the current bot name for the given user language. Returns BotName on success.
960
+ *
961
+ * @param other Optional remaining parameters, confer the official reference below
962
+ * @param signal Optional `AbortSignal` to cancel the request
963
+ *
964
+ * **Official reference:** https://core.telegram.org/bots/api#getmyname
965
+ */
966
+ getMyName(other?: Other<R, "getMyName">, signal?: AbortSignal): Promise<import("@grammyjs/types/settings.js").BotName>;
967
+ /**
968
+ * 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.
969
+ *
970
+ * @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.
971
+ * @param other Optional remaining parameters, confer the official reference below
972
+ * @param signal Optional `AbortSignal` to cancel the request
973
+ *
974
+ * **Official reference:** https://core.telegram.org/bots/api#setmycommands
975
+ */
976
+ setMyCommands(commands: readonly BotCommand[], other?: Other<R, "setMyCommands", "commands">, signal?: AbortSignal): Promise<true>;
977
+ /**
978
+ * 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.
979
+ *
980
+ * @param other Optional remaining parameters, confer the official reference below
981
+ * @param signal Optional `AbortSignal` to cancel the request
982
+ *
983
+ * **Official reference:** https://core.telegram.org/bots/api#deletemycommands
984
+ */
985
+ deleteMyCommands(other?: Other<R, "deleteMyCommands">, signal?: AbortSignal): Promise<true>;
986
+ /**
987
+ * 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.
988
+ *
989
+ * @param other Optional remaining parameters, confer the official reference below
990
+ * @param signal Optional `AbortSignal` to cancel the request
991
+ *
992
+ * **Official reference:** https://core.telegram.org/bots/api#getmycommands
993
+ */
994
+ getMyCommands(other?: Other<R, "getMyCommands">, signal?: AbortSignal): Promise<BotCommand[]>;
995
+ /**
996
+ * 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.
997
+ *
998
+ * @param description New bot description; 0-512 characters. Pass an empty string to remove the dedicated description for the given language.
999
+ * @param other Optional remaining paramters, confer the official reference below
1000
+ * @param signal Optional `AbortSignal` to cancel the request
1001
+ *
1002
+ * **Official reference:** https://core.telegram.org/bots/api#setmydescription
1003
+ */
1004
+ setMyDescription(description: string, other?: Other<R, "setMyDescription", "description">, signal?: AbortSignal): Promise<true>;
1005
+ /**
1006
+ * Use this method to get the current bot description for the given user language. Returns BotDescription on success.
1007
+ *
1008
+ * @param other Optional remaining paramters, confer the official reference below
1009
+ * @param signal Optional `AbortSignal` to cancel the request
1010
+ *
1011
+ * **Official reference:** https://core.telegram.org/bots/api#getmydescription
1012
+ */
1013
+ getMyDescription(other?: Other<R, "getMyDescription">, signal?: AbortSignal): Promise<import("@grammyjs/types/settings.js").BotDescription>;
1014
+ /**
1015
+ * 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.
1016
+ *
1017
+ * @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.
1018
+ * @param other Optional remaining paramters, confer the official reference below
1019
+ * @param signal Optional `AbortSignal` to cancel the request
1020
+ *
1021
+ * **Official reference:** https://core.telegram.org/bots/api#setmyshortdescription
1022
+ */
1023
+ setMyShortDescription(short_description: string, other?: Other<R, "setMyShortDescription", "short_description">, signal?: AbortSignal): Promise<true>;
1024
+ /**
1025
+ * Use this method to get the current bot short description for the given user language. Returns BotShortDescription on success.
1026
+ *
1027
+ * @param other Optional remaining paramters, confer the official reference below
1028
+ * @param signal Optional `AbortSignal` to cancel the request
1029
+ *
1030
+ * **Official reference:** https://core.telegram.org/bots/api#getmyshortdescription
1031
+ */
1032
+ getMyShortDescription(other?: Other<R, "getMyShortDescription">, signal?: AbortSignal): Promise<import("@grammyjs/types/settings.js").BotShortDescription>;
1033
+ /**
1034
+ * Use this method to change the bot's menu button in a private chat, or the default menu button. Returns True on success.
1035
+ *
1036
+ * @param other Optional remaining parameters, confer the official reference below
1037
+ * @param signal Optional `AbortSignal` to cancel the request
1038
+ *
1039
+ * **Official reference:** https://core.telegram.org/bots/api#setchatmenubutton
1040
+ */
1041
+ setChatMenuButton(other?: Other<R, "setChatMenuButton">, signal?: AbortSignal): Promise<true>;
1042
+ /**
1043
+ * 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.
1044
+ *
1045
+ * @param other Optional remaining parameters, confer the official reference below
1046
+ * @param signal Optional `AbortSignal` to cancel the request
1047
+ *
1048
+ * **Official reference:** https://core.telegram.org/bots/api#getchatmenubutton
1049
+ */
1050
+ getChatMenuButton(other?: Other<R, "getChatMenuButton">, signal?: AbortSignal): Promise<import("@grammyjs/types/settings.js").MenuButton>;
1051
+ /**
1052
+ * 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.
1053
+ *
1054
+ * @param other Optional remaining parameters, confer the official reference below
1055
+ * @param signal Optional `AbortSignal` to cancel the request
1056
+ *
1057
+ * **Official reference:** https://core.telegram.org/bots/api#setmydefaultadministratorrights
1058
+ */
1059
+ setMyDefaultAdministratorRights(other?: Other<R, "setMyDefaultAdministratorRights">, signal?: AbortSignal): Promise<true>;
1060
+ /**
1061
+ * Use this method to get the current default administrator rights of the bot. Returns ChatAdministratorRights on success.
1062
+ *
1063
+ * @param other Optional remaining parameters, confer the official reference below
1064
+ * @param signal Optional `AbortSignal` to cancel the request
1065
+ *
1066
+ * **Official reference:** https://core.telegram.org/bots/api#getmydefaultadministratorrights
1067
+ */
1068
+ getMyDefaultAdministratorRights(other?: Other<R, "getMyDefaultAdministratorRights">, signal?: AbortSignal): Promise<import("@grammyjs/types/manage.js").ChatAdministratorRights>;
1069
+ /**
1070
+ * 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.
1071
+ *
1072
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
1073
+ * @param message_id Identifier of the message to edit
1074
+ * @param text New text of the message, 1-4096 characters after entities parsing
1075
+ * @param other Optional remaining parameters, confer the official reference below
1076
+ * @param signal Optional `AbortSignal` to cancel the request
1077
+ *
1078
+ * **Official reference:** https://core.telegram.org/bots/api#editmessagetext
1079
+ */
1080
+ editMessageText(chat_id: number | string, message_id: number, text: string, other?: Other<R, "editMessageText", "chat_id" | "message_id" | "inline_message_id" | "text">, signal?: AbortSignal): Promise<true | (import("@grammyjs/types/update.js").Update.Edited & import("@grammyjs/types/message.js").Message.CommonMessage & {
1081
+ text: string;
1082
+ })>;
1083
+ /**
1084
+ * 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.
1085
+ *
1086
+ * @param inline_message_id Identifier of the inline message
1087
+ * @param other Optional remaining parameters, confer the official reference below
1088
+ * @param signal Optional `AbortSignal` to cancel the request
1089
+ *
1090
+ * **Official reference:** https://core.telegram.org/bots/api#editmessagetext
1091
+ */
1092
+ editMessageTextInline(inline_message_id: string, text: string, other?: Other<R, "editMessageText", "chat_id" | "message_id" | "inline_message_id" | "text">, signal?: AbortSignal): Promise<true | (import("@grammyjs/types/update.js").Update.Edited & import("@grammyjs/types/message.js").Message.CommonMessage & {
1093
+ text: string;
1094
+ })>;
1095
+ /**
1096
+ * 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.
1097
+ *
1098
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
1099
+ * @param message_id Identifier of the message to edit
1100
+ * @param other Optional remaining parameters, confer the official reference below
1101
+ * @param signal Optional `AbortSignal` to cancel the request
1102
+ *
1103
+ * **Official reference:** https://core.telegram.org/bots/api#editmessagecaption
1104
+ */
1105
+ editMessageCaption(chat_id: number | string, message_id: number, other?: Other<R, "editMessageCaption", "chat_id" | "message_id" | "inline_message_id">, signal?: AbortSignal): Promise<true | (import("@grammyjs/types/update.js").Update.Edited & import("@grammyjs/types/message.js").Message.CaptionableMessage)>;
1106
+ /**
1107
+ * 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.
1108
+ *
1109
+ * @param inline_message_id Identifier of the inline message
1110
+ * @param other Optional remaining parameters, confer the official reference below
1111
+ * @param signal Optional `AbortSignal` to cancel the request
1112
+ *
1113
+ * **Official reference:** https://core.telegram.org/bots/api#editmessagecaption
1114
+ */
1115
+ editMessageCaptionInline(inline_message_id: string, other?: Other<R, "editMessageCaption", "chat_id" | "message_id" | "inline_message_id">, signal?: AbortSignal): Promise<true | (import("@grammyjs/types/update.js").Update.Edited & import("@grammyjs/types/message.js").Message.CaptionableMessage)>;
1116
+ /**
1117
+ * 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.
1118
+ *
1119
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
1120
+ * @param message_id Identifier of the message to edit
1121
+ * @param media An object for a new media content of the message
1122
+ * @param other Optional remaining parameters, confer the official reference below
1123
+ * @param signal Optional `AbortSignal` to cancel the request
1124
+ *
1125
+ * **Official reference:** https://core.telegram.org/bots/api#editmessagemedia
1126
+ */
1127
+ editMessageMedia(chat_id: number | string, message_id: number, media: InputMedia, other?: Other<R, "editMessageMedia", "chat_id" | "message_id" | "inline_message_id" | "media">, signal?: AbortSignal): Promise<true | (import("@grammyjs/types/update.js").Update.Edited & import("@grammyjs/types/message.js").Message)>;
1128
+ /**
1129
+ * 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.
1130
+ *
1131
+ * @param inline_message_id Identifier of the inline message
1132
+ * @param media An object for a new media content of the message
1133
+ * @param other Optional remaining parameters, confer the official reference below
1134
+ * @param signal Optional `AbortSignal` to cancel the request
1135
+ *
1136
+ * **Official reference:** https://core.telegram.org/bots/api#editmessagemedia
1137
+ */
1138
+ editMessageMediaInline(inline_message_id: string, media: InputMedia, other?: Other<R, "editMessageMedia", "chat_id" | "message_id" | "inline_message_id" | "media">, signal?: AbortSignal): Promise<true | (import("@grammyjs/types/update.js").Update.Edited & import("@grammyjs/types/message.js").Message)>;
1139
+ /**
1140
+ * 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.
1141
+ *
1142
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
1143
+ * @param message_id Identifier of the message to edit
1144
+ * @param other Optional remaining parameters, confer the official reference below
1145
+ * @param signal Optional `AbortSignal` to cancel the request
1146
+ *
1147
+ * **Official reference:** https://core.telegram.org/bots/api#editmessagereplymarkup
1148
+ */
1149
+ editMessageReplyMarkup(chat_id: number | string, message_id: number, other?: Other<R, "editMessageReplyMarkup", "chat_id" | "message_id" | "inline_message_id">, signal?: AbortSignal): Promise<true | (import("@grammyjs/types/update.js").Update.Edited & import("@grammyjs/types/message.js").Message)>;
1150
+ /**
1151
+ * 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.
1152
+ *
1153
+ * @param inline_message_id Identifier of the inline message
1154
+ * @param other Optional remaining parameters, confer the official reference below
1155
+ * @param signal Optional `AbortSignal` to cancel the request
1156
+ *
1157
+ * **Official reference:** https://core.telegram.org/bots/api#editmessagereplymarkup
1158
+ */
1159
+ editMessageReplyMarkupInline(inline_message_id: string, other?: Other<R, "editMessageReplyMarkup", "chat_id" | "message_id" | "inline_message_id">, signal?: AbortSignal): Promise<true | (import("@grammyjs/types/update.js").Update.Edited & import("@grammyjs/types/message.js").Message)>;
1160
+ /**
1161
+ * Use this method to stop a poll which was sent by the bot. On success, the stopped Poll is returned.
1162
+ *
1163
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
1164
+ * @param message_id Identifier of the original message with the poll
1165
+ * @param other Optional remaining parameters, confer the official reference below
1166
+ * @param signal Optional `AbortSignal` to cancel the request
1167
+ *
1168
+ * **Official reference:** https://core.telegram.org/bots/api#stoppoll
1169
+ */
1170
+ stopPoll(chat_id: number | string, message_id: number, other?: Other<R, "stopPoll", "chat_id" | "message_id">, signal?: AbortSignal): Promise<import("@grammyjs/types/message.js").Poll>;
1171
+ /**
1172
+ * Use this method to delete a message, including service messages, with the following limitations:
1173
+ * - A message can only be deleted if it was sent less than 48 hours ago.
1174
+ * - A dice message in a private chat can only be deleted if it was sent more than 24 hours ago.
1175
+ * - Bots can delete outgoing messages in private chats, groups, and supergroups.
1176
+ * - Bots can delete incoming messages in private chats.
1177
+ * - Bots granted can_post_messages permissions can delete outgoing messages in channels.
1178
+ * - If the bot is an administrator of a group, it can delete any message there.
1179
+ * - If the bot has can_delete_messages permission in a supergroup or a channel, it can delete any message there.
1180
+ * Returns True on success.
1181
+ *
1182
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
1183
+ * @param message_id Identifier of the message to delete
1184
+ * @param signal Optional `AbortSignal` to cancel the request
1185
+ *
1186
+ * **Official reference:** https://core.telegram.org/bots/api#deletemessage
1187
+ */
1188
+ deleteMessage(chat_id: number | string, message_id: number, signal?: AbortSignal): Promise<true>;
1189
+ /**
1190
+ * Use this method to delete multiple messages simultaneously. Returns True on success.
1191
+ *
1192
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
1193
+ * @param message_ids A list of 1-100 identifiers of messages to delete. See deleteMessage for limitations on which messages can be deleted
1194
+ * @param signal Optional `AbortSignal` to cancel the request
1195
+ *
1196
+ * **Official reference:** https://core.telegram.org/bots/api#deletemessages
1197
+ */
1198
+ deleteMessages(chat_id: number | string, message_ids: number[], signal?: AbortSignal): Promise<true>;
1199
+ /**
1200
+ * Use this method to send static .WEBP, animated .TGS, or video .WEBM stickers. On success, the sent Message is returned.
1201
+ *
1202
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
1203
+ * @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.
1204
+ * @param other Optional remaining parameters, confer the official reference below
1205
+ * @param signal Optional `AbortSignal` to cancel the request
1206
+ *
1207
+ * **Official reference:** https://core.telegram.org/bots/api#sendsticker
1208
+ */
1209
+ sendSticker(chat_id: number | string, sticker: InputFile | string, other?: Other<R, "sendSticker", "chat_id" | "sticker">, signal?: AbortSignal): Promise<import("@grammyjs/types/message.js").Message.StickerMessage>;
1210
+ /**
1211
+ * Use this method to get a sticker set. On success, a StickerSet object is returned.
1212
+ *
1213
+ * @param name Name of the sticker set
1214
+ * @param signal Optional `AbortSignal` to cancel the request
1215
+ *
1216
+ * **Official reference:** https://core.telegram.org/bots/api#getstickerset
1217
+ */
1218
+ getStickerSet(name: string, signal?: AbortSignal): Promise<import("@grammyjs/types/message.js").StickerSet>;
1219
+ /**
1220
+ * Use this method to get information about custom emoji stickers by their identifiers. Returns an Array of Sticker objects.
1221
+ *
1222
+ * @param custom_emoji_ids A list of custom emoji identifiers
1223
+ * @param signal Optional `AbortSignal` to cancel the request
1224
+ *
1225
+ * **Official reference:** https://core.telegram.org/bots/api#getcustomemojistickers
1226
+ */
1227
+ getCustomEmojiStickers(custom_emoji_ids: string[], signal?: AbortSignal): Promise<import("@grammyjs/types/message.js").Sticker[]>;
1228
+ /**
1229
+ * 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.
1230
+ *
1231
+ * @param user_id User identifier of sticker file owner
1232
+ * @param sticker_format Format of the sticker, must be one of “static”, “animated”, “video”
1233
+ * @param sticker A file with the sticker in .WEBP, .PNG, .TGS, or .WEBM format. See https://core.telegram.org/stickers for technical requirements.
1234
+ * @param signal Optional `AbortSignal` to cancel the request
1235
+ *
1236
+ * **Official reference:** https://core.telegram.org/bots/api#uploadstickerfile
1237
+ */
1238
+ uploadStickerFile(user_id: number, sticker_format: "static" | "animated" | "video", sticker: InputFile, signal?: AbortSignal): Promise<import("@grammyjs/types/message.js").File>;
1239
+ /**
1240
+ * 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.
1241
+ *
1242
+ * @param user_id User identifier of created sticker set owner
1243
+ * @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.
1244
+ * @param title Sticker set title, 1-64 characters
1245
+ * @param stickers A list of 1-50 initial stickers to be added to the sticker set
1246
+ * @param other Optional remaining parameters, confer the official reference below
1247
+ * @param signal Optional `AbortSignal` to cancel the request
1248
+ *
1249
+ * **Official reference:** https://core.telegram.org/bots/api#createnewstickerset
1250
+ */
1251
+ createNewStickerSet(user_id: number, name: string, title: string, stickers: InputSticker[], other?: Other<R, "createNewStickerSet", "user_id" | "name" | "title" | "sticker_format" | "stickers">, signal?: AbortSignal): Promise<true>;
1252
+ /**
1253
+ * 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.
1254
+ *
1255
+ * @param user_id User identifier of sticker set owner
1256
+ * @param name Sticker set name
1257
+ * @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.
1258
+ * @param signal Optional `AbortSignal` to cancel the request
1259
+ *
1260
+ * **Official reference:** https://core.telegram.org/bots/api#addstickertoset
1261
+ */
1262
+ addStickerToSet(user_id: number, name: string, sticker: InputSticker, signal?: AbortSignal): Promise<true>;
1263
+ /**
1264
+ * Use this method to move a sticker in a set created by the bot to a specific position. Returns True on success.
1265
+ *
1266
+ * @param sticker File identifier of the sticker
1267
+ * @param position New sticker position in the set, zero-based
1268
+ * @param signal Optional `AbortSignal` to cancel the request
1269
+ *
1270
+ * **Official reference:** https://core.telegram.org/bots/api#setstickerpositioninset
1271
+ */
1272
+ setStickerPositionInSet(sticker: string, position: number, signal?: AbortSignal): Promise<true>;
1273
+ /**
1274
+ * Use this method to delete a sticker from a set created by the bot. Returns True on success.
1275
+ *
1276
+ * @param sticker File identifier of the sticker
1277
+ * @param signal Optional `AbortSignal` to cancel the request
1278
+ *
1279
+ * **Official reference:** https://core.telegram.org/bots/api#deletestickerfromset
1280
+ */
1281
+ deleteStickerFromSet(sticker: string, signal?: AbortSignal): Promise<true>;
1282
+ /**
1283
+ * 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.
1284
+ *
1285
+ * @param user_id User identifier of the sticker set owner
1286
+ * @param name Sticker set name
1287
+ * @param old_sticker File identifier of the replaced sticker
1288
+ * @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
1289
+ * @param signal Optional `AbortSignal` to cancel the request
1290
+ *
1291
+ * **Official reference:** https://core.telegram.org/bots/api#replacestickerinset
1292
+ */
1293
+ replaceStickerInSet(user_id: number, name: string, old_sticker: string, sticker: InputSticker, signal?: AbortSignal): Promise<true>;
1294
+ /**
1295
+ * 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.
1296
+ *
1297
+ * @param sticker File identifier of the sticker
1298
+ * @param emoji_list A list of 1-20 emoji associated with the sticker
1299
+ * @param signal Optional `AbortSignal` to cancel the request
1300
+ *
1301
+ * **Official reference:** https://core.telegram.org/bots/api#setstickeremojilist
1302
+ */
1303
+ setStickerEmojiList(sticker: string, emoji_list: string[], signal?: AbortSignal): Promise<true>;
1304
+ /**
1305
+ * 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.
1306
+ *
1307
+ * @param sticker File identifier of the sticker
1308
+ * @param keywords A list of 0-20 search keywords for the sticker with total length of up to 64 characters
1309
+ * @param signal Optional `AbortSignal` to cancel the request
1310
+ *
1311
+ * **Official reference:** https://core.telegram.org/bots/api#setstickerkeywords
1312
+ */
1313
+ setStickerKeywords(sticker: string, keywords: string[], signal?: AbortSignal): Promise<true>;
1314
+ /**
1315
+ * 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.
1316
+ *
1317
+ * @param sticker File identifier of the sticker
1318
+ * @param mask_position An object with the position where the mask should be placed on faces. Omit the parameter to remove the mask position.
1319
+ * @param signal Optional `AbortSignal` to cancel the request
1320
+ *
1321
+ * **Official reference:** https://core.telegram.org/bots/api#setstickermaskposition
1322
+ */
1323
+ setStickerMaskPosition(sticker: string, mask_position?: MaskPosition, signal?: AbortSignal): Promise<true>;
1324
+ /**
1325
+ * Use this method to set the title of a created sticker set. Returns True on success.
1326
+ *
1327
+ * @param name Sticker set name
1328
+ * @param title Sticker set title, 1-64 characters
1329
+ * @param signal Optional `AbortSignal` to cancel the request
1330
+ *
1331
+ * **Official reference:** https://core.telegram.org/bots/api#setstickersettitle
1332
+ */
1333
+ setStickerSetTitle(name: string, title: string, signal?: AbortSignal): Promise<true>;
1334
+ /**
1335
+ * Use this method to delete a sticker set that was created by the bot. Returns True on success.
1336
+ *
1337
+ * @param name Sticker set name
1338
+ * @param signal Optional `AbortSignal` to cancel the request
1339
+ *
1340
+ * **Official reference:** https://core.telegram.org/bots/api#deletestickerset
1341
+ */
1342
+ deleteStickerSet(name: string, signal?: AbortSignal): Promise<true>;
1343
+ /**
1344
+ * 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.
1345
+ *
1346
+ * @param name Sticker set name
1347
+ * @param user_id User identifier of the sticker set owner
1348
+ * @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.
1349
+ * @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
1350
+ * @param signal Optional `AbortSignal` to cancel the request
1351
+ *
1352
+ * **Official reference:** https://core.telegram.org/bots/api#setstickersetthumbnail
1353
+ */
1354
+ setStickerSetThumbnail(name: string, user_id: number, thumbnail: InputFile | string | undefined, format: "static" | "animated" | "video", signal?: AbortSignal): Promise<true>;
1355
+ /**
1356
+ * Use this method to set the thumbnail of a custom emoji sticker set. Returns True on success.
1357
+ *
1358
+ * @param name Sticker set name
1359
+ * @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.
1360
+ * @param signal Optional `AbortSignal` to cancel the request
1361
+ *
1362
+ * **Official reference:** https://core.telegram.org/bots/api#setcustomemojistickersetthumbnail
1363
+ */
1364
+ setCustomEmojiStickerSetThumbnail(name: string, custom_emoji_id: string, signal?: AbortSignal): Promise<true>;
1365
+ /**
1366
+ * Returns the list of gifts that can be sent by the bot to users and channel chats. Requires no parameters. Returns a Gifts object.
1367
+ *
1368
+ * @param signal Optional `AbortSignal` to cancel the request
1369
+ *
1370
+ * **Official reference:** https://core.telegram.org/bots/api#getavailablegifts
1371
+ */
1372
+ getAvailableGifts(signal?: AbortSignal): Promise<import("@grammyjs/types/payment.js").Gifts>;
1373
+ /**
1374
+ * Sends a gift to the given user. The gift can't be converted to Telegram Stars by the receiver. Returns True on success.
1375
+ *
1376
+ * @param user_id Unique identifier of the target user who will receive the gift
1377
+ * @param gift_id Identifier of the gift
1378
+ * @param other Optional remaining parameters, confer the official reference below
1379
+ * @param signal Optional `AbortSignal` to cancel the request
1380
+ *
1381
+ * **Official reference:** https://core.telegram.org/bots/api#sendgift
1382
+ */
1383
+ sendGift(user_id: number, gift_id: string, other?: Other<R, "sendGift", "user_id" | "chat_id" | "gift_id">, signal?: AbortSignal): Promise<import("@grammyjs/types/payment.js").Gifts>;
1384
+ /**
1385
+ * Sends a gift to the given channel chat. The gift can't be converted to Telegram Stars by the receiver. Returns True on success.
1386
+ *
1387
+ * @param chat_id Unique identifier for the chat or username of the channel (in the format @channelusername) that will receive the gift
1388
+ * @param gift_id Identifier of the gift
1389
+ * @param other Optional remaining parameters, confer the official reference below
1390
+ * @param signal Optional `AbortSignal` to cancel the request
1391
+ *
1392
+ * **Official reference:** https://core.telegram.org/bots/api#sendgift
1393
+ */
1394
+ sendGiftToChannel(chat_id: number | string, gift_id: string, other?: Other<R, "sendGift", "user_id" | "chat_id" | "gift_id">, signal?: AbortSignal): Promise<import("@grammyjs/types/payment.js").Gifts>;
1395
+ /**
1396
+ * Use this method to send answers to an inline query. On success, True is returned.
1397
+ * No more than 50 results per query are allowed.
1398
+ *
1399
+ * 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.
1400
+ *
1401
+ * @param inline_query_id Unique identifier for the answered query
1402
+ * @param results An array of results for the inline query
1403
+ * @param other Optional remaining parameters, confer the official reference below
1404
+ * @param signal Optional `AbortSignal` to cancel the request
1405
+ *
1406
+ * **Official reference:** https://core.telegram.org/bots/api#answerinlinequery
1407
+ */
1408
+ answerInlineQuery(inline_query_id: string, results: readonly InlineQueryResult[], other?: Other<R, "answerInlineQuery", "inline_query_id" | "results">, signal?: AbortSignal): Promise<true>;
1409
+ /**
1410
+ * 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.
1411
+ *
1412
+ * @param web_app_query_id Unique identifier for the query to be answered
1413
+ * @param result An object describing the message to be sent
1414
+ * @param signal Optional `AbortSignal` to cancel the request
1415
+ *
1416
+ * **Official reference:** https://core.telegram.org/bots/api#answerwebappquery
1417
+ */
1418
+ answerWebAppQuery(web_app_query_id: string, result: InlineQueryResult, signal?: AbortSignal): Promise<import("@grammyjs/types/message.js").SentWebAppMessage>;
1419
+ /**
1420
+ * Stores a message that can be sent by a user of a Mini App. Returns a PreparedInlineMessage object.
1421
+ *
1422
+ * @param user_id Unique identifier of the target user that can use the prepared message
1423
+ * @param result An object describing the message to be sent
1424
+ * @param other Optional remaining parameters, confer the official reference below
1425
+ * @param signal Optional `AbortSignal` to cancel the request
1426
+ *
1427
+ * **Official reference:** https://core.telegram.org/bots/api#savepreparedinlinemessage
1428
+ */
1429
+ savePreparedInlineMessage(user_id: number, result: InlineQueryResult, other?: Other<R, "savePreparedInlineMessage", "user_id" | "result">, signal?: AbortSignal): Promise<import("@grammyjs/types/message.js").PreparedInlineMessage>;
1430
+ /**
1431
+ * Use this method to send invoices. On success, the sent Message is returned.
1432
+ *
1433
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
1434
+ * @param title Product name, 1-32 characters
1435
+ * @param description Product description, 1-255 characters
1436
+ * @param payload Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes.
1437
+ * @param currency Three-letter ISO 4217 currency code, see more on currencies
1438
+ * @param prices Price breakdown, a list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.)
1439
+ * @param other Optional remaining parameters, confer the official reference below
1440
+ * @param signal Optional `AbortSignal` to cancel the request
1441
+ *
1442
+ * **Official reference:** https://core.telegram.org/bots/api#sendinvoice
1443
+ */
1444
+ sendInvoice(chat_id: number | string, title: string, description: string, payload: string, currency: string, prices: readonly LabeledPrice[], other?: Other<R, "sendInvoice", "chat_id" | "title" | "description" | "payload" | "currency" | "prices">, signal?: AbortSignal): Promise<import("@grammyjs/types/message.js").Message.InvoiceMessage>;
1445
+ /**
1446
+ * Use this method to create a link for an invoice. Returns the created invoice link as String on success.
1447
+ *
1448
+ * @param title Product name, 1-32 characters
1449
+ * @param description Product description, 1-255 characters
1450
+ * @param payload Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes.
1451
+ * @param provider_token Payment provider token, obtained via BotFather
1452
+ * @param currency Three-letter ISO 4217 currency code, see more on currencies
1453
+ * @param prices Price breakdown, a list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.)
1454
+ * @param other Optional remaining parameters, confer the official reference below
1455
+ * @param signal Optional `AbortSignal` to cancel the request
1456
+ *
1457
+ * **Official reference:** https://core.telegram.org/bots/api#createinvoicelink
1458
+ */
1459
+ createInvoiceLink(title: string, description: string, payload: string, provider_token: string, currency: string, prices: LabeledPrice[], other?: Other<R, "createInvoiceLink", "title" | "description" | "payload" | "provider_token" | "currency" | "prices">, signal?: AbortSignal): Promise<string>;
1460
+ /**
1461
+ * 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.
1462
+ *
1463
+ * @param shipping_query_id Unique identifier for the query to be answered
1464
+ * @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)
1465
+ * @param other Optional remaining parameters, confer the official reference below
1466
+ * @param signal Optional `AbortSignal` to cancel the request
1467
+ *
1468
+ * **Official reference:** https://core.telegram.org/bots/api#answershippingquery
1469
+ */
1470
+ answerShippingQuery(shipping_query_id: string, ok: boolean, other?: Other<R, "answerShippingQuery", "shipping_query_id" | "ok">, signal?: AbortSignal): Promise<true>;
1471
+ /**
1472
+ * 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.
1473
+ *
1474
+ * @param pre_checkout_query_id Unique identifier for the query to be answered
1475
+ * @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.
1476
+ * @param other Optional remaining parameters, confer the official reference below
1477
+ * @param signal Optional `AbortSignal` to cancel the request
1478
+ *
1479
+ * **Official reference:** https://core.telegram.org/bots/api#answerprecheckoutquery
1480
+ */
1481
+ answerPreCheckoutQuery(pre_checkout_query_id: string, ok: boolean, other?: Other<R, "answerPreCheckoutQuery", "pre_checkout_query_id" | "ok">, signal?: AbortSignal): Promise<true>;
1482
+ /**
1483
+ * Returns the bot's Telegram Star transactions in chronological order. On success, returns a StarTransactions object.
1484
+ *
1485
+ * @param other Optional remaining parameters, confer the official reference below
1486
+ * @param signal Optional `AbortSignal` to cancel the request
1487
+ *
1488
+ * **Official reference:** https://core.telegram.org/bots/api#getstartransactions
1489
+ */
1490
+ getStarTransactions(other?: Other<R, "getStarTransactions">, signal?: AbortSignal): Promise<import("@grammyjs/types/payment.js").StarTransactions>;
1491
+ /**
1492
+ * Refunds a successful payment in Telegram Stars.
1493
+ *
1494
+ * @param user_id Identifier of the user whose payment will be refunded
1495
+ * @param telegram_payment_charge_id Telegram payment identifier
1496
+ * @param signal Optional `AbortSignal` to cancel the request
1497
+ *
1498
+ * **Official reference:** https://core.telegram.org/bots/api#refundstarpayment
1499
+ */
1500
+ refundStarPayment(user_id: number, telegram_payment_charge_id: string, signal?: AbortSignal): Promise<true>;
1501
+ /**
1502
+ * Allows the bot to cancel or re-enable extension of a subscription paid in Telegram Stars. Returns True on success.
1503
+ *
1504
+ * @param user_id Identifier of the user whose subscription will be edited
1505
+ * @param telegram_payment_charge_id Telegram payment identifier for the subscription
1506
+ * @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.
1507
+ * @param signal Optional `AbortSignal` to cancel the request
1508
+ *
1509
+ * **Official reference:** https://core.telegram.org/bots/api#edituserstarsubscription
1510
+ */
1511
+ editUserStarSubscription(user_id: number, telegram_payment_charge_id: string, is_canceled: boolean, signal?: AbortSignal): Promise<true>;
1512
+ /**
1513
+ * Verifies a user on behalf of the organization which is represented by the bot. Returns True on success.
1514
+ *
1515
+ * @param user_id Unique identifier of the target user
1516
+ * @param other Optional remaining parameters, confer the official reference below
1517
+ * @param signal Optional `AbortSignal` to cancel the request
1518
+ *
1519
+ * **Official reference:** https://core.telegram.org/bots/api#verifyuser
1520
+ */
1521
+ verifyUser(user_id: number, other?: Other<R, "verifyUser">, signal?: AbortSignal): Promise<true>;
1522
+ /**
1523
+ * Verifies a chat on behalf of the organization which is represented by the bot. Returns True on success.
1524
+ *
1525
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
1526
+ * @param other Optional remaining parameters, confer the official reference below
1527
+ * @param signal Optional `AbortSignal` to cancel the request
1528
+ *
1529
+ * **Official reference:** https://core.telegram.org/bots/api#verifychat
1530
+ */
1531
+ verifyChat(chat_id: number | string, other?: Other<R, "verifyChat">, signal?: AbortSignal): Promise<true>;
1532
+ /**
1533
+ * Removes verification from a user who is currently verified on behalf of the organization represented by the bot. Returns True on success.
1534
+ *
1535
+ * @param user_id Unique identifier of the target user
1536
+ * @param signal Optional `AbortSignal` to cancel the request
1537
+ *
1538
+ * **Official reference:** https://core.telegram.org/bots/api#removeuserverification
1539
+ */
1540
+ removeUserVerification(user_id: number, signal?: AbortSignal): Promise<true>;
1541
+ /**
1542
+ * Removes verification from a chat that is currently verified on behalf of the organization represented by the bot. Returns True on success.
1543
+ *
1544
+ * @param chat_id Unique identifier for the target chat or username of the target channel (in the format @channelusername)
1545
+ * @param signal Optional `AbortSignal` to cancel the request
1546
+ *
1547
+ * **Official reference:** https://core.telegram.org/bots/api#removechatverification
1548
+ */
1549
+ removeChatVerification(chat_id: number | string, signal?: AbortSignal): Promise<true>;
1550
+ /**
1551
+ * 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.
1552
+ *
1553
+ * 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.
1554
+ *
1555
+ * @param user_id User identifier
1556
+ * @param errors An array describing the errors
1557
+ * @param signal Optional `AbortSignal` to cancel the request
1558
+ *
1559
+ * **Official reference:** https://core.telegram.org/bots/api#setpassportdataerrors
1560
+ */
1561
+ setPassportDataErrors(user_id: number, errors: readonly PassportElementError[], signal?: AbortSignal): Promise<true>;
1562
+ /**
1563
+ * Use this method to send a game. On success, the sent Message is returned.
1564
+ *
1565
+ * @param chat_id Unique identifier for the target chat
1566
+ * @param game_short_name Short name of the game, serves as the unique identifier for the game. Set up your games via BotFather.
1567
+ * @param other Optional remaining parameters, confer the official reference below
1568
+ * @param signal Optional `AbortSignal` to cancel the request
1569
+ *
1570
+ * **Official reference:** https://core.telegram.org/bots/api#sendgame
1571
+ */
1572
+ sendGame(chat_id: number, game_short_name: string, other?: Other<R, "sendGame", "chat_id" | "game_short_name">, signal?: AbortSignal): Promise<import("@grammyjs/types/message.js").Message.GameMessage>;
1573
+ /**
1574
+ * 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.
1575
+ *
1576
+ * @param chat_id Unique identifier for the target chat
1577
+ * @param message_id Identifier of the sent message
1578
+ * @param user_id User identifier
1579
+ * @param score New score, must be non-negative
1580
+ * @param other Optional remaining parameters, confer the official reference below
1581
+ * @param signal Optional `AbortSignal` to cancel the request
1582
+ *
1583
+ * **Official reference:** https://core.telegram.org/bots/api#setgamescore
1584
+ */
1585
+ setGameScore(chat_id: number, message_id: number, user_id: number, score: number, other?: Other<R, "setGameScore", "chat_id" | "message_id" | "inline_message_id" | "user_id" | "score">, signal?: AbortSignal): Promise<true | (import("@grammyjs/types/update.js").Update.Edited & import("@grammyjs/types/message.js").Message.CommonMessage & {
1586
+ game: import("@grammyjs/types/message.js").Game;
1587
+ })>;
1588
+ /**
1589
+ * 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.
1590
+ *
1591
+ * @param inline_message_id Identifier of the inline message
1592
+ * @param user_id User identifier
1593
+ * @param score New score, must be non-negative
1594
+ * @param other Optional remaining parameters, confer the official reference below
1595
+ * @param signal Optional `AbortSignal` to cancel the request
1596
+ *
1597
+ * **Official reference:** https://core.telegram.org/bots/api#setgamescore
1598
+ */
1599
+ setGameScoreInline(inline_message_id: string, user_id: number, score: number, other?: Other<R, "setGameScore", "chat_id" | "message_id" | "inline_message_id" | "user_id" | "score">, signal?: AbortSignal): Promise<true | (import("@grammyjs/types/update.js").Update.Edited & import("@grammyjs/types/message.js").Message.CommonMessage & {
1600
+ game: import("@grammyjs/types/message.js").Game;
1601
+ })>;
1602
+ /**
1603
+ * 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.
1604
+ *
1605
+ * 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.
1606
+ *
1607
+ * @param chat_id Unique identifier for the target chat
1608
+ * @param message_id Identifier of the sent message
1609
+ * @param user_id Target user id
1610
+ * @param signal Optional `AbortSignal` to cancel the request
1611
+ *
1612
+ * **Official reference:** https://core.telegram.org/bots/api#getgamehighscores
1613
+ */
1614
+ getGameHighScores(chat_id: number, message_id: number, user_id: number, signal?: AbortSignal): Promise<import("@grammyjs/types/message.js").GameHighScore[]>;
1615
+ /**
1616
+ * 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.
1617
+ *
1618
+ * 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.
1619
+ *
1620
+ * @param inline_message_id Identifier of the inline message
1621
+ * @param user_id Target user id
1622
+ * @param signal Optional `AbortSignal` to cancel the request
1623
+ *
1624
+ * **Official reference:** https://core.telegram.org/bots/api#getgamehighscores
1625
+ */
1626
+ getGameHighScoresInline(inline_message_id: string, user_id: number, signal?: AbortSignal): Promise<import("@grammyjs/types/message.js").GameHighScore[]>;
1627
+ }
1628
+ import { AbortSignal } from "./../shim.node.js";