ultra-telegram-framework 1.0.3

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 (47) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +174 -0
  3. package/dist/adapters/gas.d.ts +10 -0
  4. package/dist/adapters/gas.js +90 -0
  5. package/dist/adapters/node.d.ts +52 -0
  6. package/dist/adapters/node.js +150 -0
  7. package/dist/adapters/web.d.ts +4 -0
  8. package/dist/adapters/web.js +90 -0
  9. package/dist/core/base-api.d.ts +40 -0
  10. package/dist/core/base-api.js +26 -0
  11. package/dist/core/bot.d.ts +1828 -0
  12. package/dist/core/bot.js +2753 -0
  13. package/dist/core/composer.d.ts +87 -0
  14. package/dist/core/composer.js +164 -0
  15. package/dist/core/context/base-context.d.ts +24 -0
  16. package/dist/core/context/base-context.js +56 -0
  17. package/dist/core/context/reply-context.d.ts +234 -0
  18. package/dist/core/context/reply-context.js +528 -0
  19. package/dist/core/context.d.ts +8 -0
  20. package/dist/core/context.js +34 -0
  21. package/dist/core/keyboard.d.ts +76 -0
  22. package/dist/core/keyboard.js +182 -0
  23. package/dist/core/menu.d.ts +58 -0
  24. package/dist/core/menu.js +87 -0
  25. package/dist/index.d.ts +18 -0
  26. package/dist/index.js +24 -0
  27. package/dist/scenes/scene-manager.d.ts +39 -0
  28. package/dist/scenes/scene-manager.js +65 -0
  29. package/dist/scenes/stage.d.ts +8 -0
  30. package/dist/scenes/stage.js +34 -0
  31. package/dist/scenes/wizard.d.ts +18 -0
  32. package/dist/scenes/wizard.js +32 -0
  33. package/dist/session/gas-cache-storage.d.ts +34 -0
  34. package/dist/session/gas-cache-storage.js +49 -0
  35. package/dist/session/gas-hybrid-storage.d.ts +27 -0
  36. package/dist/session/gas-hybrid-storage.js +49 -0
  37. package/dist/session/gas-storage.d.ts +24 -0
  38. package/dist/session/gas-storage.js +47 -0
  39. package/dist/session/index.d.ts +28 -0
  40. package/dist/session/index.js +43 -0
  41. package/dist/session/memory-storage.d.ts +28 -0
  42. package/dist/session/memory-storage.js +35 -0
  43. package/dist/session/storage.d.ts +18 -0
  44. package/dist/session/storage.js +2 -0
  45. package/dist/types/telegram.d.ts +7560 -0
  46. package/dist/types/telegram.js +4 -0
  47. package/package.json +42 -0
@@ -0,0 +1,1828 @@
1
+ import { Composer } from './composer';
2
+ import { BaseTelegramClient } from './base-api';
3
+ import { SendMessageParams, Message, Update, GetUpdatesParams, SetWebhookParams, WebhookInfo, DeleteWebhookParams, User, ForwardMessageParams, ForwardMessagesParams, MessageId, CopyMessageParams, CopyMessagesParams, SendPhotoParams, SendAudioParams, SendDocumentParams, SendVideoParams, SendAnimationParams, SendVoiceParams, SendVideoNoteParams, SendPaidMediaParams, InputPaidMedia, SendMediaGroupParams, InputMediaVideo, InputMediaPhoto, InputMediaDocument, InputMediaAudio, SendLocationParams, SendVenueParams, SendContactParams, InputPollOption, SendPollParams, SendChecklistParams, InputChecklist, SendDiceParams, SendMessageDraftParams, SendChatActionParams, ReactionType, UserProfilePhotos, GetUserProfilePhotosParams, UserProfileAudios, GetUserProfileAudiosParams, SetUserEmojiStatusParams, File as TelegramFile, BanChatMemberParams, UnbanChatMemberParams, RestrictChatMemberParams, ChatPermissions, PromoteChatMemberParams, SetChatMemberTagParams, SetChatPermissionsParams, ChatInviteLink, CreateChatInviteLinkParams, EditChatInviteLinkParams, CreateChatSubscriptionInviteLinkParams, EditChatSubscriptionInviteLinkParams, InputFile, PinChatMessageParams, UnpinChatMessageParams, ChatFullInfo, ChatMember, Sticker, CreateForumTopicParams, ForumTopic, EditForumTopicParams, AnswerCallbackQueryParams, UserChatBoosts, BusinessConnection, BotCommand, SetMyCommandsParams, DeleteMyCommandsParams, GetMyCommandsParams, SetMyNameParams, GetMyNameParams, BotName, SetMyDescriptionParams, GetMyDescriptionParams, BotDescription, SetMyShortDescriptionParams, GetMyShortDescriptionParams, BotShortDescription, InputProfilePhoto, SetChatMenuButtonParams, MenuButton, SetMyDefaultAdministratorRightsParams, GetMyDefaultAdministratorRightsParams, ChatAdministratorRights, Gifts, SendGiftParams, VerifyUserParams, VerifyChatParams, SetBusinessAccountNameParams, SetBusinessAccountUsernameParams, SetBusinessAccountBioParams, SetBusinessAccountProfilePhotoParams, RemoveBusinessAccountProfilePhotoParams, AcceptedGiftTypes, StarAmount, GetBusinessAccountGiftsParams, OwnedGifts, GetUserGiftsParams, GetChatGiftsParams, UpgradeGiftParams, TransferGiftParams, Story, InputStoryContent, PostStoryParams, RepostStoryParams, EditStoryParams, InlineQueryResult, SentWebAppMessage, PreparedInlineMessage, KeyboardButton, PreparedKeyboardButton, EditMessageTextParams, EditMessageCaptionParams, EditMessageMediaParams, InputMedia, EditMessageLiveLocationParams, StopMessageLiveLocationParams, EditMessageChecklistParams, EditMessageReplyMarkupParams, StopPollParams, ApproveSuggestedPostParams, DeclineSuggestedPostParams, Poll, SendStickerParams, StickerSet, InputSticker, CreateNewStickerSetParams, SetStickerMaskPositionParams, SetStickerSetThumbnailParams, AnswerInlineQueryParams, LabeledPrice, SendInvoiceParams, CreateInvoiceLinkParams, ShippingOption, AnswerPreCheckoutQueryParams, GetStarTransactionsParams, StarTransactions, SendGameParams, SetGameScoreParams, GetGameHighScoresParams, GameHighScore, GiftPremiumSubscriptionParams, SendLivePhotoParams, SentGuestMessage, GetChatAdministratorsParams, SavePreparedInlineMessageParams, DeleteAllMessageReactionsParams, DeleteMessageReactionParams, InputMediaLivePhoto, BotAccessSettings, SetManagedBotAccessSettingsParams } from '../types/telegram';
4
+ import { Context } from './context';
5
+ /**
6
+ * Bot action status in the chat
7
+ */
8
+ export type ChatAction = "typing" | "upload_photo" | "record_video" | "upload_video" | "record_voice" | "upload_voice" | "upload_document" | "choose_sticker" | "find_location" | "record_video_note" | "upload_video_note";
9
+ export type EditMessageIds = {
10
+ chat_id: number | string;
11
+ message_id: number;
12
+ } | string;
13
+ export declare class TelegramBot<C extends Context = Context> extends Composer<C> {
14
+ private readonly client;
15
+ constructor(client: BaseTelegramClient);
16
+ /**
17
+ * Main method for processing incoming Updates from Telegram.
18
+ * It automatically creates a base `Context` object and starts the middleware chain.
19
+ * * ⚠️ **Architectural note regarding custom context (Generic C):**
20
+ * This library uses the approach of extending context through interfaces and middlewares
21
+ * (so-called hydration), rather than through class inheritance.
22
+ * Under the hood, a base instance of `Context` is always created, which is forcibly cast to your type `C`.
23
+ * * To add your own fields (e.g., sessions, DB connections, etc.), describe them in an interface
24
+ * and initialize them in your first middleware:
25
+ * * @example
26
+ * interface MyContext extends Context {
27
+ * db: CustomDatabase;
28
+ * session: { step: number };
29
+ * }
30
+ * const bot = new TelegramBot<MyContext>(client);
31
+ * * // Context hydration
32
+ * bot.use(async (ctx, next) => {
33
+ * ctx.db = new CustomDatabase();
34
+ * ctx.session = { step: 0 };
35
+ * await next();
36
+ * });
37
+ * @param update Incoming update from Telegram
38
+ * @returns `Promise<void>`
39
+ */
40
+ handleUpdate(update: Update): Promise<void>;
41
+ launch(options?: {
42
+ timeout?: number;
43
+ allowed_updates?: string[];
44
+ drop_pending_updates?: boolean;
45
+ }): Promise<void>;
46
+ /**
47
+ * Use this method to receive incoming updates using long polling.
48
+ * Returns an array of `Update` objects.
49
+ *
50
+ * @param options Additional parameters for receiving updates
51
+ * @returns `Update[]` on success
52
+ */
53
+ getUpdates(options?: GetUpdatesParams): Promise<Update[]>;
54
+ /**
55
+ * Use this method to specify a URL and receive incoming updates via an outgoing webhook.
56
+ * Whenever there is an update for the bot, we will send an HTTPS POST request to the specified URL containing a serialized JSON update.
57
+ * In case of a failed request (a request with an HTTP response status code other than 2XY), we will retry the request and stop its execution after a sufficient number of attempts.
58
+ * Returns `True` on success.
59
+ *
60
+ * If you want to ensure that the webhook was set by you, you can specify secret data in the parameter `secret_token`.
61
+ * If specified, the request will contain an "X-Telegram-Bot-Api-Secret-Token" header with the secret token as its content.
62
+ *
63
+ * **Important:** Ensure that your URL uses a valid SSL certificate. Requests with invalid certificates will be ignored.
64
+ * For testing in a local environment, you can use ngrok or similar services.
65
+ *
66
+ * @param url Webhook URL
67
+ * @param options Additional webhook parameters
68
+ * @returns `boolean` on success
69
+ */
70
+ setWebhook(url: string, options?: Omit<SetWebhookParams, 'url'>): Promise<boolean>;
71
+ /**
72
+ * Use this method to stop using the webhook and start working in long polling mode.
73
+ * Returns `True` on success.
74
+ *
75
+ * @param options Additional parameters for deleting the webhook
76
+ * @returns `boolean` on success
77
+ */
78
+ deleteWebhook(options?: DeleteWebhookParams): Promise<boolean>;
79
+ /**
80
+ * Use this method to get current information about the webhook set for your bot. Returns `WebhookInfo`.
81
+ *
82
+ * @returns `WebhookInfo` on success
83
+ */
84
+ getWebhookInfo(): Promise<WebhookInfo>;
85
+ /**
86
+ * Use this method to get information about the bot.
87
+ * Returns `User`.
88
+ *
89
+ * @returns `User` on success
90
+ */
91
+ getMe(): Promise<User>;
92
+ /**
93
+ * Use this method to log out the bot.
94
+ * Returns `boolean`.
95
+ *
96
+ * @returns `boolean` on success
97
+ */
98
+ logOut(): Promise<boolean>;
99
+ /**
100
+ * Use this method to close the bot instance before moving it from one local server to another.
101
+ * You need to delete the webhook before calling this method so that the bot doesn't start again after a server restart.
102
+ * The method will return a 429 error during the first 10 minutes after the bot starts.
103
+ * Returns `True` on success.
104
+ *
105
+ * @returns `True` on success
106
+ */
107
+ close(): Promise<boolean>;
108
+ /**
109
+ * Use this method to send a text message.
110
+ * Returns `Message`.
111
+ *
112
+ * @param chat_id Unique identifier for the target chat or channel username (in the format @channelusername)
113
+ * @param text Message text to send (1-4096 characters after entity parsing)
114
+ * @param options Additional message parameters
115
+ * @returns `Message` on success
116
+ */
117
+ sendMessage(chat_id: string | number, text: string, options?: Omit<SendMessageParams, 'chat_id' | 'text'>): Promise<Message>;
118
+ /**
119
+ * Use this method to forward messages of any type.
120
+ * Service messages and messages with protected content cannot be forwarded.
121
+ * On success, the sent message is returned.
122
+ *
123
+ * @param chat_id Unique identifier for the target chat
124
+ * @param from_chat_id Unique identifier for the chat from which the message is forwarded
125
+ * @param message_id Identifier of the message in the `from_chat_id` chat
126
+ * @param options Additional forwarding parameters
127
+ * @returns `Message` on success
128
+ */
129
+ forwardMessage(chat_id: string | number, from_chat_id: string | number, message_id: number, options?: Omit<ForwardMessageParams, 'chat_id' | 'from_chat_id' | 'message_id'>): Promise<Message>;
130
+ /**
131
+ * Use this method to forward multiple messages of any type.
132
+ * If some of the specified messages cannot be found or forwarded, they are skipped.
133
+ * Service messages and messages with protected content cannot be forwarded.
134
+ * Grouping by albums is preserved for forwarded messages.
135
+ * On success, an array of `MessageId` of the sent messages is returned.
136
+ *
137
+ * @param chat_id Unique identifier for the target chat
138
+ * @param from_chat_id Unique identifier for the chat from which messages are forwarded
139
+ * @param message_ids Array of message identifiers in the `chat_id` chat
140
+ * @param options Additional forwarding parameters
141
+ * @returns `MessageId[]` on success
142
+ */
143
+ forwardMessages(chat_id: string | number, from_chat_id: string | number, message_ids: number[], options?: Omit<ForwardMessagesParams, 'chat_id' | 'from_chat_id' | 'message_ids'>): Promise<MessageId[]>;
144
+ /**
145
+ * Use this method to copy messages of any type.
146
+ * Service messages and messages with protected content cannot be forwarded.
147
+ * On success, the `MessageId` of the sent message is returned.
148
+ *
149
+ * @param chat_id Unique identifier for the target chat
150
+ * @param from_chat_id Unique identifier for the chat from which messages are forwarded
151
+ * @param message_id Identifier of the message in the `chat_id` chat
152
+ * @param options Additional copying parameters
153
+ * @returns `MessageId` on success
154
+ */
155
+ copyMessage(chat_id: string | number, from_chat_id: string | number, message_id: number, options?: Omit<CopyMessageParams, 'chat_id' | 'from_chat_id' | 'message_id'>): Promise<MessageId>;
156
+ /**
157
+ * Use this method to copy multiple messages of any type.
158
+ * If some of the specified messages cannot be found or copied, they are skipped.
159
+ * Service messages and messages with protected content cannot be copied.
160
+ * Grouping by albums is preserved for copied messages.
161
+ * On success, an array of `MessageId` of the copied messages is returned.
162
+ *
163
+ * @param chat_id Unique identifier for the target chat
164
+ * @param from_chat_id Unique identifier for the chat from which messages are forwarded
165
+ * @param message_ids Message identifiers in the `chat_id` chat
166
+ * @param options Additional copying parameters
167
+ * @returns `MessageId[]` on success
168
+ */
169
+ copyMessages(chat_id: string | number, from_chat_id: string | number, message_ids: number[], options?: Omit<CopyMessagesParams, 'chat_id' | 'from_chat_id' | 'message_ids'>): Promise<MessageId[]>;
170
+ /**
171
+ * Use this method to send photos in real time.
172
+ * On success, the sent `Message` is returned.
173
+ *
174
+ * @param chat_id Unique identifier for the target chat
175
+ * @param live_photo Video part of a live photo (URL or InputFile)
176
+ * @param photo Photo (URL or InputFile)
177
+ * @param options Additional sending parameters
178
+ * @returns `Promise<Message>`
179
+ */
180
+ sendLivePhoto(chat_id: string | number, live_photo: string | InputFile, photo: string | InputFile, options?: Omit<SendLivePhotoParams, 'chat_id' | 'photo' | 'live_photo'>): Promise<Message>;
181
+ /**
182
+ * Use this method to send photos.
183
+ * On success, the sent `Message` is returned.
184
+ *
185
+ * @param chat_id Unique identifier for the target chat
186
+ * @param photo Photo to send (File ID, URL or file object)
187
+ * @param options Additional photo parameters
188
+ * @returns `Message` on success
189
+ */
190
+ sendPhoto(chat_id: string | number, photo: string | InputFile, options?: Omit<SendPhotoParams, 'chat_id' | 'photo'>): Promise<Message>;
191
+ /**
192
+ * Use this method to send audio files, if you want Telegram clients to display them in the music player.
193
+ * Your audio file must be in the .MP3 or .M4A format.
194
+ * On success, the sent message is returned.
195
+ * Bots can currently send audio files up to 50 MB, this limit may be changed in the future.
196
+ * For sending voice messages, use the `sendVoice` method.
197
+ *
198
+ * @param chat_id Unique identifier for the target chat
199
+ * @param audio Audio to send (File ID, URL or file object)
200
+ * @param options Additional audio parameters
201
+ * @returns `Message` on success
202
+ */
203
+ sendAudio(chat_id: string | number, audio: string | InputFile, options?: Omit<SendAudioParams, 'chat_id' | 'audio'>): Promise<Message>;
204
+ /**
205
+ * Use this method to send general files.
206
+ * On success, the sent `Message` is returned.
207
+ * Bots can currently send files of any type up to 50 MB, this limit may be changed in the future.
208
+ *
209
+ * @param chat_id Unique identifier for the target chat
210
+ * @param document File to send (File ID, URL or file object)
211
+ * @param options Additional file parameters
212
+ * @returns `Message` on success
213
+ */
214
+ sendDocument(chat_id: string | number, document: string | InputFile, options?: Omit<SendDocumentParams, 'chat_id' | 'document'>): Promise<Message>;
215
+ /**
216
+ * Use this method to send video files.
217
+ * Telegram clients support MPEG4 video (other formats can be sent as a document).
218
+ * On success, the sent `Message` is returned.
219
+ * Bots can currently send video files up to 50 MB, this limit may be changed in the future.
220
+ *
221
+ * @param chat_id Unique identifier for the target chat
222
+ * @param video Video to send (File ID, URL or file object)
223
+ * @param options Additional video parameters
224
+ * @returns `Message` on success
225
+ */
226
+ sendVideo(chat_id: string | number, video: string | InputFile, options?: Omit<SendVideoParams, 'chat_id' | 'video'>): Promise<Message>;
227
+ /**
228
+ * Use this method to send animation files (GIF or H.264/MPEG-4 AVC video without sound).
229
+ * On success, the sent `Message` is returned.
230
+ * Bots can currently send animation files up to 50 MB, this limit may be changed in the future.
231
+ *
232
+ * @param chat_id Unique identifier for the target chat
233
+ * @param animation Animation to send (File ID, URL or file object)
234
+ * @param options Additional animation parameters
235
+ * @returns `Message` on success
236
+ */
237
+ sendAnimation(chat_id: string | number, animation: string | InputFile, options?: Omit<SendAnimationParams, 'chat_id' | 'animation'>): Promise<Message>;
238
+ /**
239
+ * Use this method to send audio files, if you want Telegram clients to display the file as a playable voice message.
240
+ * For this to work, your audio must be in an .OGG file encoded with OPUS, or in .MP3 or .M4A format (other formats may be sent as audio or document).
241
+ * On success, the sent message is returned.
242
+ * Bots can currently send voice messages up to 50 MB, this limit may be changed in the future.
243
+ *
244
+ * @param chat_id Unique identifier for the target chat
245
+ * @param voice Audio to send (File ID, URL or file object)
246
+ * @param options Additional audio parameters
247
+ * @returns `Message` on success
248
+ */
249
+ sendVoice(chat_id: string | number, voice: string | InputFile, options?: Omit<SendVoiceParams, 'chat_id' | 'voice'>): Promise<Message>;
250
+ /**
251
+ * Use this method to send video messages (videos up to 60 seconds long).
252
+ * Currently, video message duration is limited to 60 seconds, but this limit may be changed in the future.
253
+ * Bots can currently send video messages up to 50 MB, this limit may be changed in the future.
254
+ * On success, the sent `Message` is returned.
255
+ *
256
+ * @param chat_id Unique identifier for the target chat
257
+ * @param video_note Video message to send (File ID, URL or file object)
258
+ * @param options Additional video message parameters
259
+ * @returns `Message` on success
260
+ */
261
+ sendVideoNote(chat_id: string | number, video_note: string | InputFile, options?: Omit<SendVideoNoteParams, 'chat_id' | 'video_note'>): Promise<Message>;
262
+ /**
263
+ * Use this method to send paid media files.
264
+ * On success, the sent `Message` is returned.
265
+ *
266
+ * @param chat_id Unique identifier for the target chat
267
+ * @param star_count Number of stars to send
268
+ * @param media Array of paid media files
269
+ * @param options Additional paid media parameters
270
+ * @returns `Message` on success
271
+ */
272
+ sendPaidMedia(chat_id: string | number, star_count: number, media: InputPaidMedia[], options?: Omit<SendPaidMediaParams, 'chat_id' | 'star_count' | 'media'>): Promise<Message>;
273
+ /**
274
+ * Use this method to send a group of photos, videos, documents, or audio as an album.
275
+ * Documents and audio files can only be grouped in an album with messages of the same type.
276
+ * On success, an array of the sent `Message` objects is returned.
277
+ *
278
+ * @param chat_id Unique identifier for the target chat
279
+ * @param media Array of media files to send
280
+ * @param options Additional media file parameters
281
+ * @returns `Message[]` on success
282
+ */
283
+ sendMediaGroup(chat_id: string | number, media: InputMediaAudio[] | InputMediaDocument[] | Array<InputMediaPhoto | InputMediaVideo | InputMediaLivePhoto>, options?: Omit<SendMediaGroupParams, 'chat_id' | 'media'>): Promise<Message[]>;
284
+ /**
285
+ * Use this method to send a point on the map.
286
+ * On success, the sent `Message` is returned.
287
+ *
288
+ * @param chat_id Unique identifier for the target chat
289
+ * @param latitude Latitude
290
+ * @param longitude Longitude
291
+ * @param options Additional geolocation parameters
292
+ * @returns `Message` on success
293
+ */
294
+ sendLocation(chat_id: string | number, latitude: number, longitude: number, options?: Omit<SendLocationParams, 'chat_id' | 'latitude' | 'longitude'>): Promise<Message>;
295
+ /**
296
+ * Use this method to send venue information.
297
+ * On success, the sent `Message` is returned.
298
+ *
299
+ * @param chat_id Unique identifier for the target chat
300
+ * @param latitude Latitude
301
+ * @param longitude Longitude
302
+ * @param title Venue name
303
+ * @param address Address
304
+ * @param options Additional venue parameters
305
+ * @returns `Message` on success
306
+ */
307
+ sendVenue(chat_id: string | number, latitude: number, longitude: number, title: string, address: string, options?: Omit<SendVenueParams, 'chat_id' | 'latitude' | 'longitude' | 'title' | 'address'>): Promise<Message>;
308
+ /**
309
+ * Use this method to send user contact information.
310
+ * On success, the sent `Message` is returned.
311
+ *
312
+ * @param chat_id Unique identifier for the target chat
313
+ * @param phone_number Phone number
314
+ * @param first_name Contact first name
315
+ * @param options Additional contact parameters
316
+ * @returns `Message` on success
317
+ */
318
+ sendContact(chat_id: string | number, phone_number: string, first_name: string, options?: Omit<SendContactParams, 'chat_id' | 'phone_number' | 'first_name'>): Promise<Message>;
319
+ /**
320
+ * Use this method to send a poll.
321
+ * On success, the sent `Message` is returned.
322
+ *
323
+ * @param chat_id Unique identifier for the target chat
324
+ * @param question Poll text
325
+ * @param poll_options Array of answer options
326
+ * @param options Additional poll parameters
327
+ * @returns `Message` on success
328
+ */
329
+ sendPoll(chat_id: string | number, question: string, poll_options: InputPollOption[], options?: Omit<SendPollParams, 'chat_id' | 'question' | 'options'>): Promise<Message>;
330
+ /**
331
+ * Use this method to send a checklist on behalf of a connected business account.
332
+ * On success, the sent `Message` is returned.
333
+ *
334
+ * @param business_connection_id Business account identifier
335
+ * @param chat_id Unique identifier for the target chat
336
+ * @param checklist Checklist to send
337
+ * @param options Additional checklist parameters
338
+ * @returns `Message` on success
339
+ */
340
+ sendChecklist(business_connection_id: string, chat_id: number, checklist: InputChecklist, options?: Omit<SendChecklistParams, 'business_connection_id' | 'chat_id' | 'checklist'>): Promise<Message>;
341
+ /**
342
+ * Use this method to send an animated emoji that will display a random value.
343
+ * Returns `Message` on success.
344
+ *
345
+ * @param chat_id Unique identifier for the target chat
346
+ * @param options Additional animated emoji parameters (emoji, etc.)
347
+ * @returns `Message` on success
348
+ */
349
+ sendDice(chat_id: string | number, options?: Omit<SendDiceParams, 'chat_id'>): Promise<Message>;
350
+ /**
351
+ * Use this method to stream a part of a message to the user during its generation.
352
+ * Returns `boolean` on success.
353
+ *
354
+ * @param chat_id Unique identifier for the target chat
355
+ * @param draft_id Unique draft identifier
356
+ * @param text Message text
357
+ * @param options Additional draft parameters
358
+ * @returns `boolean` on success
359
+ */
360
+ sendMessageDraft(chat_id: number, draft_id: number, text: string, options?: Omit<SendMessageDraftParams, 'chat_id' | 'draft_id' | 'text'>): Promise<boolean>;
361
+ /**
362
+ * Use this method when you need to inform the user that something is happening on the bot's side.
363
+ * The status is set for 5 seconds or less (when a message arrives from your bot, Telegram clients clear its typing status).
364
+ * Returns `True` on success.
365
+ *
366
+ * **Example:** ImageBot needs some time to process the request and upload the image.
367
+ * Instead of sending a text message like "Getting image, please wait...", the bot can use `sendChatAction` with `action = 'upload_photo'`.
368
+ * The user will see the bot status "uploading photo".
369
+ *
370
+ * @param chat_id Unique identifier for the target chat
371
+ * @param action Type of action to broadcast
372
+ * @param options Additional action parameters
373
+ * @returns `True` on success
374
+ */
375
+ sendChatAction(chat_id: string | number, action: ChatAction, options?: Omit<SendChatActionParams, 'chat_id' | 'action'>): Promise<boolean>;
376
+ /**
377
+ * Use this method to change chosen reactions on a message.
378
+ * Service messages of some types cannot be reacted to.
379
+ * Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel.
380
+ * Bots cannot use paid reactions.
381
+ * Returns `True` on success.
382
+ *
383
+ * @param chat_id Unique identifier for the target chat
384
+ * @param message_id Unique identifier for the message
385
+ * @param reaction Array of reactions to set
386
+ * @returns `True` on success
387
+ */
388
+ setMessageReaction(chat_id: string | number, message_id: number, reaction: ReactionType[]): Promise<boolean>;
389
+ /**
390
+ * Use this method to get a list of user profile photos.
391
+ * Returns a `UserProfilePhotos` object with user photos, starting from the newest.
392
+ *
393
+ * @param user_id Unique identifier for the target user
394
+ * @param options Additional profile photo parameters
395
+ * @returns `UserProfilePhotos` on success
396
+ */
397
+ getUserProfilePhotos(user_id: number, options?: Omit<GetUserProfilePhotosParams, 'user_id'>): Promise<UserProfilePhotos>;
398
+ /**
399
+ * Use this method to get a list of user profile audio.
400
+ * Returns a `UserProfileAudios` object.
401
+ *
402
+ * @param user_id Unique identifier for the target user
403
+ * @param options Additional profile audio parameters
404
+ * @returns `UserProfileAudios` on success
405
+ */
406
+ getUserProfileAudios(user_id: number, options?: Omit<GetUserProfileAudiosParams, 'user_id'>): Promise<UserProfileAudios>;
407
+ /**
408
+ * Use this method to set a user's emoji status.
409
+ * Returns `True` on success.
410
+ *
411
+ * @param user_id Unique identifier for the target user
412
+ * @param options Additional emoji status parameters
413
+ * @returns `True` on success
414
+ */
415
+ setUserEmojiStatus(user_id: number, options?: Omit<SetUserEmojiStatusParams, 'user_id'>): Promise<boolean>;
416
+ /**
417
+ * Use this method to get basic information about a file and prepare it for downloading.
418
+ * Currently, bots can download files of up to 20 MB in size.
419
+ * On success, a `TelegramFile` object is returned.
420
+ * The file can be downloaded via the link `https://api.telegram.org/file/bot<token>/<file_path>`, where `file_path` is taken from the response.
421
+ * It is guaranteed that the link will be valid for at least 1 hour.
422
+ * When the link expires, a new one can be requested by calling `getFile` again.
423
+ *
424
+ * @param file_id Unique file identifier
425
+ * @returns `TelegramFile` with file information
426
+ */
427
+ getFile(file_id: string): Promise<TelegramFile>;
428
+ /**
429
+ * Use this method to ban a user in a group, a supergroup or a channel.
430
+ * 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.
431
+ * For this to work, the bot must be an administrator in the chat and have the appropriate administrator rights.
432
+ * Returns `True` on success.
433
+ *
434
+ * @param chat_id Unique identifier for the target chat
435
+ * @param user_id Unique identifier for the target user
436
+ * @param options Additional ban parameters
437
+ * @returns `true` on success
438
+ */
439
+ banChatMember(chat_id: string | number, user_id: number, options?: Omit<BanChatMemberParams, 'chat_id' | 'user_id'>): Promise<boolean>;
440
+ /**
441
+ * Use this method to unban a previously banned user in a supergroup or channel.
442
+ * The user **will not return** to the group or channel **automatically**, but **will be able** to join via an **invite link**, etc.
443
+ * The bot must be an administrator for this to work.
444
+ * By default, this method guarantees that after the call the **user will not be** a member of the chat, but **will be able** to join it.
445
+ * So, if the user is a member of the chat, they **will also be removed** from the chat.
446
+ * If you don't want this, use the `only_if_banned` parameter.
447
+ * Returns `True` on success.
448
+ *
449
+ * @param chat_id Unique identifier for the target chat
450
+ * @param user_id Unique identifier for the target user
451
+ * @param options Additional unban parameters
452
+ * @returns `True` on success
453
+ */
454
+ unbanChatMember(chat_id: string | number, user_id: number, options?: Omit<UnbanChatMemberParams, 'chat_id' | 'user_id'>): Promise<boolean>;
455
+ /**
456
+ * Use this method to restrict a user in a supergroup.
457
+ * For this to work, the bot must be a supergroup administrator and have the appropriate administrator rights.
458
+ * Pass `True` for all permissions to lift restrictions from a user.
459
+ *
460
+ * @param chat_id Unique identifier for the chat or username of the target bot
461
+ * @param user_id Unique user identifier
462
+ * @param permissions New status of user rights
463
+ * @param options Additional parameters
464
+ * @returns `True` on success
465
+ */
466
+ restrictChatMember(chat_id: string | number, user_id: number, permissions: ChatPermissions, options?: Omit<RestrictChatMemberParams, 'chat_id' | 'user_id' | 'permissions'>): Promise<boolean>;
467
+ /**
468
+ * Use this method to promote or demote a user in a supergroup or a channel.
469
+ * For this to work, the bot must be a chat administrator and have the appropriate administrator rights.
470
+ * Pass `False` for all boolean parameters to demote a user.
471
+ * Returns `True` on success.
472
+ *
473
+ * @param chat_id Unique identifier for the chat or username of the target bot
474
+ * @param user_id Unique user identifier
475
+ * @param options Additional parameters
476
+ * @returns `True` on success
477
+ */
478
+ promoteChatMember(chat_id: string | number, user_id: number, options?: Omit<PromoteChatMemberParams, 'chat_id' | 'user_id'>): Promise<boolean>;
479
+ /**
480
+ * Use this method to set a custom title for an administrator in a supergroup promoted by the bot.
481
+ * For this to work, the bot must be a chat administrator and have appropriate administrator rights.
482
+ * Returns `True` on success.
483
+ *
484
+ * @param chat_id Unique identifier for the target chat
485
+ * @param user_id Unique identifier for the target user
486
+ * @param custom_title Custom title for the chat administrator
487
+ * @returns `True` on success
488
+ */
489
+ setChatAdministratorCustomTitle(chat_id: string | number, user_id: number, custom_title: string): Promise<boolean>;
490
+ /**
491
+ * Use this method to set a tag for a regular group or supergroup member.
492
+ * For this to work, the bot must be a chat administrator and have the `can_manage_tags` administrator right.
493
+ * Returns `True` on success.
494
+ *
495
+ * @param chat_id Unique identifier for the target chat
496
+ * @param user_id Unique identifier for the target user
497
+ * @param options Additional parameters
498
+ * @returns `True` on success
499
+ */
500
+ setChatMemberTag(chat_id: string | number, user_id: number, options?: Omit<SetChatMemberTagParams, 'chat_id' | 'user_id'>): Promise<boolean>;
501
+ /**
502
+ * Use this method to ban a channel chat in a supergroup or channel.
503
+ * Until the chat is unbanned, the owner of the banned chat will not be able to send messages on behalf of any of their channels.
504
+ * For this to work, the bot must be a supergroup or channel administrator and have appropriate administrator rights.
505
+ * Returns `True` on success.
506
+ *
507
+ * @param chat_id Unique identifier for the target chat
508
+ * @param sender_chat_id Unique identifier of the sender
509
+ * @returns `True` on success
510
+ */
511
+ banChatSenderChat(chat_id: string | number, sender_chat_id: number): Promise<boolean>;
512
+ /**
513
+ * Use this method to unban a previously blocked channel chat in a supergroup or channel.
514
+ * For this to work, the bot must be an administrator and have appropriate administrator rights.
515
+ * Returns `True` on success.
516
+ *
517
+ * @param chat_id Unique identifier for the target chat
518
+ * @param sender_chat_id Unique identifier of the sender
519
+ * @returns `True` on success
520
+ */
521
+ unbanChatSenderChat(chat_id: string | number, sender_chat_id: number): Promise<boolean>;
522
+ /**
523
+ * Use this method to set default chat permissions for all participants.
524
+ * For this to work, the bot must be a group or supergroup administrator and have the `can_restrict_members` administrator right.
525
+ * Returns `True` on success.
526
+ *
527
+ * @param chat_id Unique identifier for the target chat
528
+ * @param permissions New status of user rights
529
+ * @returns `True` on success
530
+ */
531
+ setChatPermissions(chat_id: string | number, permissions: ChatPermissions, options?: Omit<SetChatPermissionsParams, 'chat_id' | 'permissions'>): Promise<boolean>;
532
+ /**
533
+ * Use this method to create a new primary invite link for a chat; any previously created primary link will be revoked.
534
+ * For this to work, the bot must be a chat administrator and have appropriate administrator rights.
535
+ * On success, returns the new invite link as a string.
536
+ *
537
+ * @param chat_id Unique identifier for the target chat
538
+ * @returns `string` on success
539
+ */
540
+ exportChatInviteLink(chat_id: string | number): Promise<string>;
541
+ /**
542
+ * Use this method to create an additional invite link for a chat.
543
+ * For this to work, the bot must be a chat administrator and have appropriate administrator rights.
544
+ * The link can be revoked using the `revokeChatInviteLink` method.
545
+ * On success, returns the new invite link as a `ChatInviteLink` object.
546
+ *
547
+ * @param chat_id Unique identifier for the target chat
548
+ * @returns `ChatInviteLink` on success
549
+ */
550
+ createChatInviteLink(chat_id: string | number, options?: Omit<CreateChatInviteLinkParams, 'chat_id'>): Promise<ChatInviteLink>;
551
+ /**
552
+ * Use this method to edit a non-primary invite link created by the bot.
553
+ * For this to work, the bot must be a chat administrator and have appropriate administrator rights.
554
+ * On success, returns the edited invite link as a `ChatInviteLink` object.
555
+ *
556
+ * @param chat_id Unique identifier for the target chat
557
+ * @param invite_link Chat invite link
558
+ * @param options Parameters for changing the invite link
559
+ * @returns `ChatInviteLink` on success
560
+ */
561
+ editChatInviteLink(chat_id: string | number, invite_link: string, options?: Omit<EditChatInviteLinkParams, 'chat_id' | 'invite_link'>): Promise<ChatInviteLink>;
562
+ /**
563
+ * Use this method to create a subscription invite link for a channel chat.
564
+ * The bot must have the `can_invite_users` administrator right.
565
+ * The link can be edited using the `editChatSubscriptionInviteLink` method or revoked using the `revokeChatInviteLink` method.
566
+ * Returns the new invite link as a `ChatInviteLink` object.
567
+ *
568
+ * @param chat_id Unique identifier for the target chat
569
+ * @param options Parameters for creating the invite link
570
+ * @returns `ChatInviteLink` on success
571
+ */
572
+ createChatSubscriptionInviteLink(chat_id: string | number, subscription_period: number, subscription_price: number, options?: Omit<CreateChatSubscriptionInviteLinkParams, 'chat_id' | 'subscription_period' | 'subscription_price'>): Promise<ChatInviteLink>;
573
+ /**
574
+ * Use this method to edit a subscription invite link created by the bot.
575
+ * The bot must have the `can_invite_users` administrator right.
576
+ * On success, returns the edited invite link as a `ChatInviteLink` object.
577
+ *
578
+ * @param chat_id Unique identifier for the target chat
579
+ * @param invite_link Chat invite link
580
+ * @param options Parameters for editing the invite link
581
+ * @returns `ChatInviteLink` on success
582
+ */
583
+ editChatSubscriptionInviteLink(chat_id: string | number, invite_link: string, options?: Omit<EditChatSubscriptionInviteLinkParams, 'chat_id' | 'invite_link'>): Promise<ChatInviteLink>;
584
+ /**
585
+ * Use this method to revoke an invite link created by the bot.
586
+ * If the primary link is revoked, a new link is automatically generated.
587
+ * For this to work, the bot must be a chat administrator and have appropriate administrator rights.
588
+ * On success, returns the revoked invite link as a `ChatInviteLink` object.
589
+ *
590
+ * @param chat_id Unique identifier for the target chat
591
+ * @param invite_link Chat invite link
592
+ * @returns `ChatInviteLink` on success
593
+ */
594
+ revokeChatInviteLink(chat_id: string | number, invite_link: string): Promise<ChatInviteLink>;
595
+ /**
596
+ * Use this method to approve a chat join request.
597
+ * For this to work, the bot must be a chat administrator and have the `can_invite_users` administrator right.
598
+ * Returns `True` on success.
599
+ *
600
+ * @param chat_id Unique identifier for the target chat
601
+ * @param user_id Unique user identifier
602
+ * @returns `boolean` on success
603
+ */
604
+ approveChatJoinRequest(chat_id: string | number, user_id: number): Promise<boolean>;
605
+ /**
606
+ * Use this method to decline a chat join request.
607
+ * For this to work, the bot must be a chat administrator and have the `can_invite_users` administrator right.
608
+ * Returns `True` on success.
609
+ *
610
+ * @param chat_id Unique identifier for the target chat
611
+ * @param user_id Unique user identifier
612
+ * @returns `boolean` on success
613
+ */
614
+ declineChatJoinRequest(chat_id: string | number, user_id: number): Promise<boolean>;
615
+ /**
616
+ * Use this method to upload a new profile photo for a chat.
617
+ * For this to work, the bot must be a chat administrator.
618
+ *
619
+ * @param chat_id Unique identifier for the target chat
620
+ * @param photo Photo to upload.
621
+ * @returns `true` on success
622
+ */
623
+ setChatPhoto(chat_id: string | number, photo: InputFile): Promise<boolean>;
624
+ /**
625
+ * Use this method to delete a chat profile photo.
626
+ * For this to work, the bot must be a chat administrator.
627
+ * Returns `true` on success.
628
+ *
629
+ * @param chat_id Unique identifier for the target chat
630
+ * @returns `boolean` on success
631
+ */
632
+ deleteChatPhoto(chat_id: string | number): Promise<boolean>;
633
+ /**
634
+ * Use this method to change the chat title. Titles cannot be changed for private chats.
635
+ * For this to work, the bot must be a chat administrator and have appropriate administrator rights.
636
+ * Returns `True` on success.
637
+ *
638
+ * @param chat_id Unique identifier for the target chat
639
+ * @param title New chat title
640
+ * @returns `True` on success
641
+ */
642
+ setChatTitle(chat_id: string | number, title: string): Promise<boolean>;
643
+ /**
644
+ * Use this method to change the description of a group, supergroup, or channel.
645
+ * For this to work, the bot must be a chat administrator and have appropriate administrator rights.
646
+ * Returns `true` on success.
647
+ *
648
+ * @param chat_id Unique identifier for the target chat
649
+ * @param description New chat description
650
+ * @returns `True` on success
651
+ */
652
+ setChatDescription(chat_id: string | number, description?: string): Promise<boolean>;
653
+ /**
654
+ * Use this method to add a message to the list of pinned messages in a chat.
655
+ * In private chats and channel direct message chats, all non-service messages can be pinned.
656
+ * Conversely, the bot must be an administrator with the `can_pin_messages` or `can_edit_messages` right to pin messages in groups and channels respectively.
657
+ * Returns `True` on success.
658
+ *
659
+ * @param chat_id Unique identifier for the target chat
660
+ * @param message_id Identifier of the message to pin
661
+ * @returns `True` on success
662
+ */
663
+ pinChatMessage(chat_id: string | number, message_id: number, options?: Omit<PinChatMessageParams, 'chat_id' | 'message_id'>): Promise<boolean>;
664
+ /**
665
+ * Use this method to remove a message from the list of pinned messages in a chat.
666
+ * In private chats and channel direct message chats, all messages can be unpinned.
667
+ * Conversely, the bot must be an administrator with the `can_pin_messages` or `can_edit_messages` right to unpin messages in groups and channels respectively.
668
+ * Returns `True` on success.
669
+ *
670
+ * @param chat_id Unique identifier for the target chat
671
+ * @param options Additional parameters (message_id, etc.)
672
+ * @returns `True` on success
673
+ */
674
+ unpinChatMessage(chat_id: string | number, options?: Omit<UnpinChatMessageParams, 'chat_id'>): Promise<boolean>;
675
+ /**
676
+ * Use this method to clear the list of pinned messages in a chat.
677
+ * In private chats and channel direct message chats, no additional rights are required to unpin all pinned messages.
678
+ * Conversely, the bot must be an administrator with the `can_pin_messages` or `can_edit_messages` right to unpin all pinned messages in groups and channels respectively.
679
+ * Returns `True` on success.
680
+ *
681
+ * @param chat_id Unique identifier for the target chat
682
+ * @returns `True` on success
683
+ */
684
+ unpinAllChatMessages(chat_id: string | number): Promise<boolean>;
685
+ /**
686
+ * Use this method for your bot to leave a group, supergroup, or channel.
687
+ * Returns `True` on success.
688
+ *
689
+ * @param chat_id Unique identifier for the target chat
690
+ * @returns `True` on success
691
+ */
692
+ leaveChat(chat_id: string | number): Promise<boolean>;
693
+ /**
694
+ * Use this method to get up-to-date information about the chat.
695
+ * On success, returns a `ChatFullInfo` object.
696
+ *
697
+ * @param chat_id Unique identifier for the target chat
698
+ * @returns `ChatFullInfo` on success
699
+ */
700
+ getChat(chat_id: string | number): Promise<ChatFullInfo>;
701
+ /**
702
+ * Use this method to get a list of administrators in a chat who are not bots.
703
+ * On success, returns an array of `ChatMember` objects.
704
+ *
705
+ * @param chat_id Unique identifier for the target chat
706
+ * @param options Additional parameters
707
+ * @returns `ChatMember[]` on success
708
+ */
709
+ getChatAdministrators(chat_id: string | number, options?: Omit<GetChatAdministratorsParams, 'chat_id'>): Promise<ChatMember[]>;
710
+ /**
711
+ * Use this method to get the number of members in a chat.
712
+ * Returns `int` on success.
713
+ *
714
+ * @param chat_id Unique identifier for the target chat
715
+ * @returns `number` on success
716
+ */
717
+ getChatMemberCount(chat_id: string | number): Promise<number>;
718
+ /**
719
+ * Use this method to get information about a chat member.
720
+ * The method is guaranteed to work for other users only if the bot is a chat administrator.
721
+ * On success, returns a `ChatMember` object.
722
+ *
723
+ * @param chat_id Unique identifier for the target chat
724
+ * @param user_id User identifier
725
+ * @returns `ChatMember` on success
726
+ */
727
+ getChatMember(chat_id: string | number, user_id: number): Promise<ChatMember>;
728
+ /**
729
+ * Use this method to set a new set of group stickers for a supergroup.
730
+ * For this to work, the bot must be a chat administrator and have appropriate administrator rights.
731
+ * Use the `can_set_sticker_set` field, which is optionally returned in `getChat` requests, to check if the bot can use this method.
732
+ * Returns `True` on success.
733
+ *
734
+ * @param chat_id Unique identifier for the target chat
735
+ * @param sticker_set_name Sticker set name
736
+ * @returns `True` on success
737
+ */
738
+ setChatStickerSet(chat_id: string | number, sticker_set_name: string): Promise<boolean>;
739
+ /**
740
+ * Use this method to delete a set of group stickers from a supergroup.
741
+ * For this to work, the bot must be a chat administrator and have appropriate administrator rights.
742
+ * Use the `can_set_sticker_set` field, which is optionally returned in `getChat` requests, to check if the bot can use this method.
743
+ * Returns `True` on success.
744
+ *
745
+ * @param chat_id Unique identifier for the target chat
746
+ * @returns `True` on success
747
+ */
748
+ deleteChatStickerSet(chat_id: string | number): Promise<boolean>;
749
+ /**
750
+ * Use this method to delete a reaction from a message in a group or supergroup chat.
751
+ * The bot must have the `can_delete_messages` administrator right in the chat.
752
+ * Returns `True` on success.
753
+ *
754
+ * @param chat_id Unique identifier for the target chat
755
+ * @param message_id Message identifier
756
+ * @param options Additional parameters
757
+ * @returns `True` on success
758
+ */
759
+ deleteMessageReaction(chat_id: string | number, message_id: number, options?: Omit<DeleteMessageReactionParams, 'chat_id' | 'message_id'>): Promise<boolean>;
760
+ /**
761
+ * Use this method to delete up to 10000 recent reactions in a group or supergroup chat added by a specific user or chat.
762
+ * The bot must have the `can_delete_messages` administrator right in the chat.
763
+ * Returns `True` on success.
764
+ *
765
+ * @param chat_id Unique identifier for the target chat
766
+ * @param options Additional parameters
767
+ * @returns `True` on success
768
+ */
769
+ deleteAllMessageReactions(chat_id: number | string, options?: Omit<DeleteAllMessageReactionsParams, 'chat_id'>): Promise<boolean>;
770
+ /**
771
+ * Use this method to get custom emoji stickers that any user can use as a forum topic icon.
772
+ * Requires no parameters. Returns an array of `Sticker` objects.
773
+ *
774
+ * @returns `Sticker[]` on success
775
+ */
776
+ getForumTopicIconStickers(): Promise<Sticker[]>;
777
+ /**
778
+ * Use this method to create a topic in a forum supergroup chat or in a private chat with a user.
779
+ * In the case of a supergroup chat, the bot must be a chat administrator for this to work and must have the `can_manage_topics` administrator right.
780
+ * Returns information about the created topic as a `ForumTopic` object.
781
+ *
782
+ * @param chat_id Unique identifier for the target chat
783
+ * @param name Forum topic name
784
+ * @param options Additional parameters (icon_custom_emoji_id, etc.)
785
+ * @returns `ForumTopic` on success
786
+ */
787
+ createForumTopic(chat_id: string | number, name: string, options?: Omit<CreateForumTopicParams, 'chat_id' | 'name'>): Promise<ForumTopic>;
788
+ /**
789
+ * Use this method to edit the name and icon of a topic in a forum supergroup chat or in a private chat with a user.
790
+ * In the case of a supergroup chat, the bot must be a chat administrator for this to work and must have the `can_manage_topics` administrator right, unless it is the topic author.
791
+ * Returns `True` on success.
792
+ *
793
+ * @param chat_id Unique identifier for the target chat
794
+ * @param message_thread_id Forum topic identifier
795
+ * @param options Additional parameters (name, icon_custom_emoji_id)
796
+ * @returns `true` on success
797
+ */
798
+ editForumTopic(chat_id: string | number, message_thread_id: number, options?: Omit<EditForumTopicParams, 'chat_id' | 'message_thread_id'>): Promise<boolean>;
799
+ /**
800
+ * Use this method to close an open topic in a forum supergroup chat.
801
+ * For this to work, the bot must be a chat administrator and have the `can_manage_topics` administrator right, unless it is the topic author.
802
+ * Returns `True` on success.
803
+ *
804
+ * @param chat_id Unique identifier for the target chat
805
+ * @param message_thread_id Forum topic identifier
806
+ * @returns `True` on success
807
+ */
808
+ closeForumTopic(chat_id: string | number, message_thread_id: number): Promise<boolean>;
809
+ /**
810
+ * Use this method to reopen a closed topic in a forum supergroup chat.
811
+ * For this to work, the bot must be a chat administrator and have the `can_manage_topics` administrator right, unless it is the topic author.
812
+ * Returns `True` on success.
813
+ *
814
+ * @param chat_id Unique identifier for the target chat
815
+ * @param message_thread_id Forum topic identifier
816
+ * @returns `True` on success
817
+ */
818
+ reopenForumTopic(chat_id: string | number, message_thread_id: number): Promise<boolean>;
819
+ /**
820
+ * Use this method to delete a forum topic along with all its messages in a forum supergroup chat or in a private chat with a user.
821
+ * In the case of a supergroup chat, the bot must be a chat administrator for this to work and must have the `can_delete_messages` administrator right.
822
+ * Returns `True` on success.
823
+ *
824
+ * @param chat_id Unique identifier for the target chat
825
+ * @param message_thread_id Forum topic identifier
826
+ * @returns `True` on success
827
+ */
828
+ deleteForumTopic(chat_id: string | number, message_thread_id: number): Promise<boolean>;
829
+ /**
830
+ * Use this method to clear the list of pinned messages in a forum topic in a forum supergroup chat or in a private chat with a user.
831
+ * In the case of a supergroup chat, the bot must be a chat administrator for this to work and must have the `can_pin_messages` administrator right in the supergroup.
832
+ * Returns `True` on success.
833
+ *
834
+ * @param chat_id Unique identifier for the target chat
835
+ * @param message_thread_id Forum topic identifier
836
+ * @returns `True` on success
837
+ */
838
+ unpinAllForumTopicMessages(chat_id: string | number, message_thread_id: number): Promise<boolean>;
839
+ /**
840
+ * Use this method to edit the name of the "General" topic in a forum supergroup chat.
841
+ * For this to work, the bot must be a chat administrator and have the `can_manage_topics` administrator right.
842
+ * Returns `True` on success.
843
+ *
844
+ * @param chat_id Unique identifier for the target chat
845
+ * @param name New forum topic name
846
+ * @returns `True` on success
847
+ */
848
+ editGeneralForumTopic(chat_id: string | number, name: string): Promise<boolean>;
849
+ /**
850
+ * Use this method to close an open "General" topic in a forum supergroup chat.
851
+ * For this to work, the bot must be a chat administrator and have the `can_manage_topics` administrator right.
852
+ * Returns `True` on success.
853
+ *
854
+ * @param chat_id Unique identifier for the target chat
855
+ * @returns `True` on success
856
+ */
857
+ closeGeneralForumTopic(chat_id: string | number): Promise<boolean>;
858
+ /**
859
+ * Use this method to reopen a closed "General" topic in a forum supergroup chat.
860
+ * For this to work, the bot must be a chat administrator and have the `can_manage_topics` administrator right.
861
+ * The topic will be automatically shown if it was hidden.
862
+ * Returns `True` on success.
863
+ *
864
+ * @param chat_id Unique identifier for the target chat
865
+ * @returns `True` on success
866
+ */
867
+ reopenGeneralForumTopic(chat_id: string | number): Promise<boolean>;
868
+ /**
869
+ * Use this method to hide the "General" topic in a forum supergroup chat.
870
+ * For this to work, the bot must be a chat administrator and have the `can_manage_topics` administrator right.
871
+ * The topic will be automatically closed if it was open.
872
+ * Returns `True` on success.
873
+ *
874
+ * @param chat_id Unique identifier for the target chat
875
+ * @returns `True` on success
876
+ */
877
+ hideGeneralForumTopic(chat_id: string | number): Promise<boolean>;
878
+ /**
879
+ * Use this method to unhide the "General" topic in a forum supergroup chat.
880
+ * For this to work, the bot must be a chat administrator and have the `can_manage_topics` administrator right.
881
+ * Returns `True` on success.
882
+ *
883
+ * @param chat_id Unique identifier for the target chat
884
+ * @returns `True` on success
885
+ */
886
+ unhideGeneralForumTopic(chat_id: string | number): Promise<boolean>;
887
+ /**
888
+ * Use this method to clear the list of pinned messages in a General forum topic.
889
+ * For this to work, the bot must be a chat administrator and have the `can_pin_messages` administrator right in the supergroup.
890
+ * Returns `True` on success.
891
+ *
892
+ * @param chat_id Unique identifier for the target chat
893
+ * @returns `True` on success
894
+ */
895
+ unpinAllGeneralForumTopicMessages(chat_id: string | number): Promise<boolean>;
896
+ /**
897
+ * Use this method to send answers to callback queries sent from inline keyboards.
898
+ * The answer will be displayed to the user as a notification at the top of the chat screen or as an alert.
899
+ * Returns `True` on success.
900
+ *
901
+ * Alternatively, the user can be redirected to a specified game URL.
902
+ * For this option to work, you must first create a game for your bot via `@BotFather` and accept the terms.
903
+ * Otherwise, you can use links like `t.me/your_bot?start=XXXX` which open your bot with a parameter.
904
+ *
905
+ * @param callback_query_id Unique query identifier
906
+ * @param options Additional response parameters (text, show_alert, url, etc.)
907
+ * @returns `True` on success
908
+ */
909
+ answerCallbackQuery(callback_query_id: string, options?: Omit<AnswerCallbackQueryParams, 'callback_query_id'>): Promise<boolean>;
910
+ /**
911
+ * Use this method to reply to a received guest query.
912
+ * On success, a `SentGuestMessage` object is returned.
913
+ *
914
+ * @param guest_query_id Unique query identifier
915
+ * @param result Serialized JSON object describing the message to be sent.
916
+ * @returns `SentGuestMessage`
917
+ */
918
+ answerGuestQuery(guest_query_id: string, result: InlineQueryResult): Promise<SentGuestMessage>;
919
+ /**
920
+ * Use this method to get information about boosts provided by a chat user.
921
+ * Returns `UserChatBoosts` on success.
922
+ *
923
+ * @param chat_id Unique identifier for the target chat
924
+ * @param user_id Unique user identifier
925
+ * @returns `UserChatBoosts`
926
+ */
927
+ getUserChatBoosts(chat_id: string | number, user_id: number): Promise<UserChatBoosts>;
928
+ /**
929
+ * Use this method to get information about the bot's connection to a business account.
930
+ * Returns a `BusinessConnection` object on success.
931
+ *
932
+ * @param business_connection_id Unique business connection identifier
933
+ * @returns `BusinessConnection` with connection information
934
+ */
935
+ getBusinessConnection(business_connection_id: string): Promise<BusinessConnection>;
936
+ /**
937
+ * Use this method to get a managed bot token.
938
+ * Returns the token as a string on success.
939
+ *
940
+ * @param user_id Unique user identifier (managed bot)
941
+ * @returns `string` token as a string
942
+ */
943
+ getManagedBotToken(user_id: number): Promise<string>;
944
+ /**
945
+ * Use this method to revoke the current managed bot token and generate a new one.
946
+ * Returns the new token as a string on success.
947
+ *
948
+ * @param user_id Unique user identifier (managed bot)
949
+ * @returns New token as a string
950
+ */
951
+ replaceManagedBotToken(user_id: number): Promise<string>;
952
+ /**
953
+ * Use this method to get managed bot access settings.
954
+ * Returns a `BotAccessSettings` object on success.
955
+ *
956
+ * @param user_id Unique user identifier (managed bot)
957
+ * @returns `BotAccessSettings` with access settings
958
+ */
959
+ getManagedBotAccessSettings(user_id: number): Promise<BotAccessSettings>;
960
+ /**
961
+ * Use this method to change managed bot access settings.
962
+ * Returns `True` on success.
963
+ *
964
+ * @param user_id Unique user identifier (managed bot)
965
+ * @param is_access_restricted `True` if only selected users have access to the bot. The bot owner always has access.
966
+ * @param options Additional parameters (see `SetManagedBotAccessSettingsParams`)
967
+ * @returns `True` on success
968
+ */
969
+ setManagedBotAccessSettings(user_id: number, is_access_restricted: boolean, options?: Omit<SetManagedBotAccessSettingsParams, 'user_id' | 'is_access_restricted'>): Promise<boolean>;
970
+ /**
971
+ * Use this method to get recent messages from a given user's personal chat.
972
+ * Returns an array of `Message` objects on success.
973
+ *
974
+ * @param user_id Unique user identifier
975
+ * @param limit Maximum number of messages to return; 1-20
976
+ * @returns Array of `Message` objects
977
+ */
978
+ getUserPersonalChatMessages(user_id: number, limit: number): Promise<Message[]>;
979
+ /**
980
+ * Use this method to change the list of bot commands.
981
+ * See this [guide](https://core.telegram.org/bots/features#commands) for more information about bot commands.
982
+ * Returns `True` on success.
983
+ *
984
+ * @param commands List of commands for the bot (max 100)
985
+ * @param options Additional parameters (scope, language_code)
986
+ * @returns `True` on success
987
+ */
988
+ setMyCommands(commands: BotCommand[], options?: Omit<SetMyCommandsParams, 'commands'>): Promise<boolean>;
989
+ /**
990
+ * Use this method to delete the list of bot commands for a given scope and user language.
991
+ * After deletion, [higher-level commands](https://core.telegram.org/bots/api#determining-list-of-commands) will be shown to affected users.
992
+ * Returns `True` on success.
993
+ *
994
+ * @param options Additional parameters (scope, language_code)
995
+ * @returns `True` on success
996
+ */
997
+ deleteMyCommands(options?: DeleteMyCommandsParams): Promise<boolean>;
998
+ /**
999
+ * Use this method to get the current list of bot commands for a given scope and user language.
1000
+ * Returns an array of [BotCommand](https://core.telegram.org/bots/api#botcommand) objects.
1001
+ * If commands are not set, an empty list is returned.
1002
+ *
1003
+ * @param options Additional parameters (scope, language_code)
1004
+ * @returns Array of [BotCommand](https://core.telegram.org/bots/api#botcommand) objects
1005
+ */
1006
+ getMyCommands(options?: GetMyCommandsParams): Promise<BotCommand[]>;
1007
+ /**
1008
+ * Use this method to change the bot's name.
1009
+ * Returns `True` on success.
1010
+ *
1011
+ * @param options Additional parameters (name, language_code)
1012
+ * @returns `True` on success
1013
+ */
1014
+ setMyName(options?: SetMyNameParams): Promise<boolean>;
1015
+ /**
1016
+ * Use this method to get the current bot name for a given user language.
1017
+ * Returns [BotName](https://core.telegram.org/bots/api#botname) on success.
1018
+ *
1019
+ * @param options Additional parameters (`language_code`)
1020
+ * @returns `BotName` object on success
1021
+ */
1022
+ getMyName(options?: GetMyNameParams): Promise<BotName>;
1023
+ /**
1024
+ * Use this method to change the bot's description, which is displayed in the chat with the bot if the chat is empty.
1025
+ * Returns `True` on success.
1026
+ *
1027
+ * @param options Additional parameters (description, language_code)
1028
+ * @returns `True` on success
1029
+ */
1030
+ setMyDescription(options?: SetMyDescriptionParams): Promise<boolean>;
1031
+ /**
1032
+ * Use this method to get the current bot description for a given user language.
1033
+ * Returns `BotDescription` on success.
1034
+ *
1035
+ * @param options Additional parameters (`language_code`)
1036
+ * @returns `BotDescription` object on success
1037
+ */
1038
+ getMyDescription(options?: GetMyDescriptionParams): Promise<BotDescription>;
1039
+ /**
1040
+ * Use this method to change the bot's short description, which is displayed on the bot's profile page and sent with a link when users share the bot.
1041
+ * Returns `True` on success.
1042
+ *
1043
+ * @param options Additional parameters (short_description, language_code)
1044
+ * @returns `True` on success
1045
+ */
1046
+ setMyShortDescription(options?: SetMyShortDescriptionParams): Promise<boolean>;
1047
+ /**
1048
+ * Use this method to get the current bot short description for a given user language.
1049
+ * Returns `BotShortDescription` on success.
1050
+ *
1051
+ * @param options Additional parameters (`language_code`)
1052
+ * @returns `BotShortDescription` object on success
1053
+ */
1054
+ getMyShortDescription(options?: GetMyShortDescriptionParams): Promise<BotShortDescription>;
1055
+ /**
1056
+ * Use this method to change the bot's profile photo.
1057
+ * Returns `True` on success.
1058
+ *
1059
+ * @param photo Bot profile photo
1060
+ * @returns `True` on success
1061
+ */
1062
+ setMyProfilePhoto(photo: InputProfilePhoto): Promise<boolean>;
1063
+ /**
1064
+ * Use this method to delete the bot's profile photo.
1065
+ * Returns `True` on success.
1066
+ *
1067
+ * @returns `True` on success
1068
+ */
1069
+ removeMyProfilePhoto(): Promise<boolean>;
1070
+ /**
1071
+ * Use this method to change the bot's menu button in a private chat or the default menu button.
1072
+ * Returns `True` on success.
1073
+ *
1074
+ * @param options Additional parameters (chat_id, menu_button)
1075
+ * @returns `True` on success
1076
+ */
1077
+ setChatMenuButton(options?: SetChatMenuButtonParams): Promise<boolean>;
1078
+ /**
1079
+ * Use this method to get the current value of the bot's menu button in a private chat or the default menu button.
1080
+ * Returns `MenuButton` on success.
1081
+ *
1082
+ * @param chat_id Chat identifier
1083
+ * @returns `MenuButton` object on success
1084
+ */
1085
+ getChatMenuButton(chat_id?: number): Promise<MenuButton>;
1086
+ /**
1087
+ * Use this method to change the default administrator rights requested by the bot when it is added as an administrator to groups or channels.
1088
+ * These rights will be proposed to users, but they can change the list before adding the bot.
1089
+ * Returns `True` on success.
1090
+ *
1091
+ * @param options Additional parameters (rights, for_channels)
1092
+ * @returns `True` on success
1093
+ */
1094
+ setMyDefaultAdministratorRights(options?: SetMyDefaultAdministratorRightsParams): Promise<boolean>;
1095
+ /**
1096
+ * Use this method to get the bot's current default administrator rights.
1097
+ * Returns `ChatAdministratorRights` on success.
1098
+ *
1099
+ * @param options Additional parameters (for_channels)
1100
+ * @returns `ChatAdministratorRights` object on success
1101
+ */
1102
+ getMyDefaultAdministratorRights(options?: GetMyDefaultAdministratorRightsParams): Promise<ChatAdministratorRights>;
1103
+ /**
1104
+ * Returns a list of gifts that the bot can send to users and channel chats.
1105
+ * No parameters required.
1106
+ * Returns a `Gifts` object on success.
1107
+ *
1108
+ * @returns `Gifts` object on success
1109
+ */
1110
+ getAvailableGifts(): Promise<Gifts>;
1111
+ /**
1112
+ * Sends a gift to a specified user or channel chat.
1113
+ * The recipient cannot convert the gift into Telegram Stars.
1114
+ * Returns `True` on success.
1115
+ *
1116
+ * @param gift_id Unique gift identifier
1117
+ * @param options Additional parameters (chat_id, gift_item_name, user_id)
1118
+ * @returns `True` on success
1119
+ */
1120
+ sendGift(gift_id: string, options: Omit<SendGiftParams, "gift_id">): Promise<boolean>;
1121
+ /**
1122
+ * Gifts a Telegram Premium subscription to a specified user.
1123
+ * Returns `True` on success.
1124
+ *
1125
+ * @param user_id User identifier
1126
+ * @param month_count Number of subscription months
1127
+ * @param star_count Number of stars
1128
+ * @returns `True` on success
1129
+ */
1130
+ giftPremiumSubscription(user_id: number, month_count: number, star_count: number, options?: Omit<GiftPremiumSubscriptionParams, "user_id" | "month_count" | "star_count">): Promise<boolean>;
1131
+ /**
1132
+ * Verifies a user [on behalf of an organization](https://telegram.org/verify#third-party-verification) represented by the bot.
1133
+ * Returns `True` on success.
1134
+ *
1135
+ * @param user_id User identifier
1136
+ * @param options Additional parameters (status, comment)
1137
+ * @returns `True` on success
1138
+ */
1139
+ verifyUser(user_id: number, options?: Omit<VerifyUserParams, "user_id">): Promise<boolean>;
1140
+ /**
1141
+ * Verifies a chat [on behalf of an organization](https://telegram.org/verify#third-party-verification) represented by the bot.
1142
+ * Returns `True` on success.
1143
+ *
1144
+ * @param chat_id Chat identifier
1145
+ * @param options Additional parameters (custom_description)
1146
+ * @returns `True` on success
1147
+ */
1148
+ verifyChat(chat_id: number, options?: Omit<VerifyChatParams, "chat_id">): Promise<boolean>;
1149
+ /**
1150
+ * Revokes a user verification established by the bot [on behalf of an organization](https://telegram.org/verify#third-party-verification).
1151
+ * Returns `True` on success.
1152
+ *
1153
+ * @param user_id User identifier
1154
+ * @returns `true` on success
1155
+ */
1156
+ removeUserVerification(user_id: number): Promise<boolean>;
1157
+ /**
1158
+ * Revokes a chat verification established by the bot [on behalf of an organization](https://telegram.org/verify#third-party-verification).
1159
+ * Returns `True` on success.
1160
+ *
1161
+ * @param chat_id Chat identifier
1162
+ * @returns `True` on success
1163
+ */
1164
+ removeChatVerification(chat_id: string | number): Promise<boolean>;
1165
+ /**
1166
+ * Marks an incoming message as read on behalf of a business account.
1167
+ * Requires the business bot right `can_read_messages`.
1168
+ * Returns `True` on success.
1169
+ *
1170
+ * @param business_connection_id Business account identifier
1171
+ * @param chat_id Chat identifier
1172
+ * @param message_id Message identifier
1173
+ * @returns `True` on success
1174
+ */
1175
+ readBusinessMessage(business_connection_id: string, chat_id: number, message_id: number): Promise<boolean>;
1176
+ /**
1177
+ * Deletes messages on behalf of a business account.
1178
+ * Requires the business bot right `can_delete_sent_messages` to delete messages sent by the bot itself, or `can_delete_all_messages` to delete any message.
1179
+ * Returns `True` on success.
1180
+ *
1181
+ * @param business_connection_id Business account identifier
1182
+ * @param message_ids Message identifiers
1183
+ * @returns `True` on success
1184
+ */
1185
+ deleteBusinessMessages(business_connection_id: string, message_ids: number[]): Promise<boolean>;
1186
+ /**
1187
+ * Changes the first and last name of a managed business account.
1188
+ * Requires the business bot right `can_change_name`.
1189
+ * Returns `True` on success.
1190
+ *
1191
+ * @param business_connection_id Business account identifier
1192
+ * @param first_name New first name of the managed business account
1193
+ * @param options Additional parameters (last_name)
1194
+ * @returns `True` on success
1195
+ */
1196
+ setBusinessAccountName(business_connection_id: string, first_name: string, options?: Omit<SetBusinessAccountNameParams, "business_connection_id" | "first_name">): Promise<boolean>;
1197
+ /**
1198
+ * Changes the username of a managed business account.
1199
+ * Requires the business bot right `can_change_username`.
1200
+ * On success, returns `True`.
1201
+ *
1202
+ * @param business_connection_id Business account identifier
1203
+ * @param options Additional parameters (username)
1204
+ * @returns `True` on success
1205
+ */
1206
+ setBusinessAccountUsername(business_connection_id: string, options?: Omit<SetBusinessAccountUsernameParams, "business_connection_id">): Promise<boolean>;
1207
+ /**
1208
+ * Changes the bio of a managed business account.
1209
+ * Requires the business bot right `can_change_bio`.
1210
+ * Returns `True` on success.
1211
+ *
1212
+ * @param business_connection_id Business account identifier
1213
+ * @param options Additional parameters (bio)
1214
+ * @returns `True` on success
1215
+ */
1216
+ setBusinessAccountBio(business_connection_id: string, options?: Omit<SetBusinessAccountBioParams, "business_connection_id">): Promise<boolean>;
1217
+ /**
1218
+ * Changes the profile photo of a managed business account.
1219
+ * Requires the business bot right `can_edit_profile_photo`.
1220
+ * Returns `True` on success.
1221
+ *
1222
+ * @param business_connection_id Business account identifier
1223
+ * @param photo Managed business account photo
1224
+ * @param options Additional parameters (photo)
1225
+ * @returns `True` on success
1226
+ */
1227
+ setBusinessAccountProfilePhoto(business_connection_id: string, photo: InputProfilePhoto, options?: Omit<SetBusinessAccountProfilePhotoParams, "business_connection_id" | "photo">): Promise<boolean>;
1228
+ /**
1229
+ * Deletes the current profile photo of a managed business account.
1230
+ * Requires the business bot right `can_edit_profile_photo`.
1231
+ * Returns `True` on success.
1232
+ *
1233
+ * @param business_connection_id Business account identifier
1234
+ * @returns `True` on success
1235
+ */
1236
+ removeBusinessAccountProfilePhoto(business_connection_id: string, options?: Omit<RemoveBusinessAccountProfilePhotoParams, "business_connection_id">): Promise<boolean>;
1237
+ /**
1238
+ * Changes the privacy settings regarding incoming gifts in a managed business account.
1239
+ * Requires the business bot right `can_change_gift_settings`.
1240
+ * Returns `True` on success.
1241
+ *
1242
+ * @param business_connection_id Business account identifier
1243
+ * @param show_gift_button Show gift button
1244
+ * @param accepted_gift_types Accepted gift types
1245
+ * @returns `True` on success
1246
+ */
1247
+ setBusinessAccountGiftSettings(business_connection_id: string, show_gift_button: boolean, accepted_gift_types: AcceptedGiftTypes): Promise<boolean>;
1248
+ /**
1249
+ * Returns the number of Telegram Stars belonging to a managed business account.
1250
+ * Requires the business bot right `can_view_gifts_and_stars`.
1251
+ * Returns `StarAmount` on success.
1252
+ *
1253
+ * @param business_connection_id Business account identifier
1254
+ * @returns Number of stars
1255
+ */
1256
+ getBusinessAccountStarBalance(business_connection_id: string): Promise<StarAmount>;
1257
+ /**
1258
+ * Transfers Telegram Stars from a business account balance to the bot balance.
1259
+ * Requires the business bot right `can_transfer_stars`.
1260
+ * Returns `True` on success.
1261
+ *
1262
+ * @param business_connection_id Business account identifier
1263
+ * @param star_count Number of stars to transfer
1264
+ * @returns `True` on success
1265
+ */
1266
+ transferBusinessAccountStars(business_connection_id: string, star_count: number): Promise<boolean>;
1267
+ /**
1268
+ * Returns received gifts belonging to a managed business account.
1269
+ * Requires the business bot right `can_view_gifts_and_stars`.
1270
+ * Returns `OwnedGifts` on success.
1271
+ *
1272
+ * @param business_connection_id Business account identifier
1273
+ * @param options Additional parameters
1274
+ * @returns Received gifts
1275
+ */
1276
+ getBusinessAccountGifts(business_connection_id: string, options?: Omit<GetBusinessAccountGiftsParams, "business_connection_id">): Promise<OwnedGifts>;
1277
+ /**
1278
+ * Returns gifts owned and displayed by a user.
1279
+ * Returns `OwnedGifts` on success.
1280
+ *
1281
+ * @param user_id User identifier
1282
+ * @param options Additional parameters
1283
+ * @returns Received gifts
1284
+ */
1285
+ getUserGifts(user_id: number, options?: Omit<GetUserGiftsParams, "user_id">): Promise<OwnedGifts>;
1286
+ /**
1287
+ * Returns gifts belonging to a chat.
1288
+ * Returns `OwnedGifts` on success.
1289
+ *
1290
+ * @param chat_id Chat identifier with the user
1291
+ * @param options Additional parameters
1292
+ * @returns Received gifts
1293
+ */
1294
+ getChatGifts(chat_id: number | string, options?: Omit<GetChatGiftsParams, "chat_id">): Promise<OwnedGifts>;
1295
+ /**
1296
+ * Converts a regular gift into Telegram Stars.
1297
+ * Requires the business bot right `can_convert_gifts_to_stars`.
1298
+ * On success, returns `True`.
1299
+ *
1300
+ * @param business_connection_id Business account identifier
1301
+ * @param owned_gift_id Gift identifier
1302
+ * @returns `True` on success
1303
+ */
1304
+ convertGiftToStars(business_connection_id: string, owned_gift_id: string): Promise<boolean>;
1305
+ /**
1306
+ * Upgrades a regular gift to a unique one.
1307
+ * Requires the business bot right `can_transfer_and_upgrade_gifts`.
1308
+ * Additionally requires the business bot right `can_transfer_stars` if the upgrade is paid.
1309
+ * Returns `True` on success.
1310
+ *
1311
+ * @param business_connection_id Business account identifier
1312
+ * @param owned_gift_id Gift identifier
1313
+ * @returns `True` on success
1314
+ */
1315
+ upgradeGift(business_connection_id: string, owned_gift_id: string, options?: Omit<UpgradeGiftParams, "business_connection_id" | "owned_gift_id">): Promise<boolean>;
1316
+ /**
1317
+ * Transfers an owned unique gift to another user.
1318
+ * Requires the business bot right `can_transfer_and_upgrade_gifts`.
1319
+ * Requires the business bot right `can_transfer_stars` if the transfer is paid.
1320
+ * Returns `True` on success.
1321
+ *
1322
+ * @param business_connection_id Business account identifier
1323
+ * @param owned_gift_id Gift identifier
1324
+ * @param new_owner_chat_id New owner's chat identifier
1325
+ * @param options Additional parameters
1326
+ * @returns `True` on success
1327
+ */
1328
+ transferGift(business_connection_id: string, owned_gift_id: string, new_owner_chat_id: number, options?: Omit<TransferGiftParams, "business_connection_id" | "owned_gift_id" | "new_owner_chat_id">): Promise<boolean>;
1329
+ /**
1330
+ * Posts a story on behalf of a managed business account.
1331
+ * Requires the business bot right `can_manage_stories`.
1332
+ * Returns `Story` on success.
1333
+ *
1334
+ * @param business_connection_id Unique business connection identifier
1335
+ * @param content Story content
1336
+ * @param active_period Story duration (from 1 to 72 hours)
1337
+ * @param options Additional parameters
1338
+ * @returns `Story` on success
1339
+ */
1340
+ postStory(business_connection_id: string, content: InputStoryContent, active_period: number, options?: Omit<PostStoryParams, "business_connection_id" | "content" | "active_period">): Promise<Story>;
1341
+ /**
1342
+ * Reposts a story on behalf of a business account from another business account.
1343
+ * Both business accounts must be managed by the same bot, and the story in the source account must be published (or reposted) by the bot.
1344
+ * Requires the business bot right `can_manage_stories` for both business accounts.
1345
+ * Returns `Story` on success.
1346
+ *
1347
+ * @param business_connection_id Business account identifier.
1348
+ * @param from_chat_id Source chat identifier.
1349
+ * @param from_story_id Source story identifier.
1350
+ * @param active_period Story duration.
1351
+ * @param options Additional parameters.
1352
+ * @returns `Story` on success.
1353
+ */
1354
+ repostStory(business_connection_id: string, from_chat_id: number, from_story_id: number, active_period: number, options?: Omit<RepostStoryParams, "business_connection_id" | "from_chat_id" | "from_story_id" | "active_period">): Promise<Story>;
1355
+ /**
1356
+ * Edits a story previously published by the bot on behalf of a managed business account.
1357
+ * Requires the business bot right `can_manage_stories`.
1358
+ * Returns `Story` on success.
1359
+ *
1360
+ * @param business_connection_id Unique business connection identifier
1361
+ * @param story_id Story identifier
1362
+ * @param content Story content
1363
+ * @param options Additional parameters
1364
+ * @returns `Story` on success
1365
+ */
1366
+ editStory(business_connection_id: string, story_id: number, content: InputStoryContent, options?: Omit<EditStoryParams, "business_connection_id" | "story_id" | "content">): Promise<Story>;
1367
+ /**
1368
+ * Deletes a story previously published by the bot on behalf of a managed business account.
1369
+ * Requires the business bot right `can_manage_stories`.
1370
+ * On success, returns `True`.
1371
+ *
1372
+ * @param business_connection_id Unique business connection identifier
1373
+ * @param story_id Story identifier
1374
+ * @returns `True` on success
1375
+ */
1376
+ deleteStory(business_connection_id: string, story_id: number): Promise<boolean>;
1377
+ /**
1378
+ * Use this method to set the result of an interaction with a web application and send a corresponding message on behalf of the user to the chat from which the query originated.
1379
+ * On success, a `SentWebAppMessage` object is returned.
1380
+ *
1381
+ * @param web_app_query_id Web App query identifier.
1382
+ * @param result Web application interaction result.
1383
+ * @returns `SentWebAppMessage`.
1384
+ */
1385
+ answerWebAppQuery(web_app_query_id: string, result: InlineQueryResult): Promise<SentWebAppMessage>;
1386
+ /**
1387
+ * Saves a message that can be sent by a mini-app user.
1388
+ * Returns a `PreparedInlineMessage` object.
1389
+ *
1390
+ * @param user_id User identifier
1391
+ * @param result Inline query result
1392
+ * @returns `PreparedInlineMessage` with the prepared message ID
1393
+ */
1394
+ savePreparedInlineMessage(user_id: number, result: InlineQueryResult, options?: Omit<SavePreparedInlineMessageParams, 'user_id' | 'result'>): Promise<PreparedInlineMessage>;
1395
+ /**
1396
+ * Saves a keyboard button that can be used by a mini-app user.
1397
+ * Returns a `PreparedKeyboardButton` object.
1398
+ *
1399
+ * @param user_id User identifier
1400
+ * @param button Keyboard button
1401
+ * @returns `PreparedKeyboardButton` with the prepared button ID
1402
+ */
1403
+ savePreparedKeyboardButton(user_id: number, button: KeyboardButton): Promise<PreparedKeyboardButton>;
1404
+ /**
1405
+ * Helper method for normalizing message ID when editing.
1406
+ */
1407
+ private getEditIds;
1408
+ /**
1409
+ * Edits a text message or inline message text.
1410
+ *
1411
+ * @param id Message identifier (either chat_id and message_id, or inline_message_id)
1412
+ * @param text New message text
1413
+ * @param options Additional parameters
1414
+ * @returns Edited message
1415
+ */
1416
+ editMessageText(id: EditMessageIds, text: string, options?: Omit<EditMessageTextParams, 'chat_id' | 'message_id' | 'inline_message_id' | 'text'>): Promise<Message | boolean>;
1417
+ /**
1418
+ * Use this method to edit message captions.
1419
+ * On success, if the edited message is not an inline message, the edited message is returned, otherwise `True` is returned.
1420
+ * 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 of being sent.
1421
+ *
1422
+ * @param id Message identifier (either chat_id and message_id, or inline_message_id)
1423
+ * @param options Additional parameters (caption, parse_mode, etc.)
1424
+ * @returns Edited message or `True` if editing was successful
1425
+ */
1426
+ editMessageCaption(id: EditMessageIds, options?: Omit<EditMessageCaptionParams, 'chat_id' | 'message_id' | 'inline_message_id'>): Promise<Message | boolean>;
1427
+ /**
1428
+ * Use this method to edit animation, audio, document, photo, or video messages, or to add media files to text messages.
1429
+ * If a message is part of a message album, it can only be edited as audio for audio albums, only as a document for document albums, and as a photo or video in other cases.
1430
+ * When editing an inline message, a new file cannot be uploaded; use a previously uploaded file via its `file_id` or specify a URL.
1431
+ * On success, if the edited message is not an inline message, the edited message is returned, otherwise `True` is returned.
1432
+ * 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 of being sent.
1433
+ *
1434
+ * @param id Message identifier. Can be an object with `chat_id` and `message_id` or an `inline_message_id` string.
1435
+ * @param options Media message editing parameters. Must include `media` (InputMediaVideo/InputMediaAnimation/InputMediaAudio/InputMediaPhoto).
1436
+ * @returns Edited message or `True` on success.
1437
+ */
1438
+ editMessageMedia(id: EditMessageIds, media: InputMedia, options?: Omit<EditMessageMediaParams, 'chat_id' | 'message_id' | 'inline_message_id' | 'media'>): Promise<Message | boolean>;
1439
+ /**
1440
+ * Use this method to edit live location messages.
1441
+ * A location can be edited until its `live_period` expires or editing is explicitly prohibited by calling `stopMessageLiveLocation`.
1442
+ * On success, if the edited message is not an inline message, the edited `Message` is returned, otherwise `True` is returned.
1443
+ *
1444
+ * @param id Message identifier. Can be an object with `chat_id` and `message_id` or an `inline_message_id` string.
1445
+ * @param latitude New location latitude
1446
+ * @param longitude New location longitude
1447
+ * @param options Additional parameters
1448
+ * @returns Edited message or `True` on success.
1449
+ */
1450
+ editMessageLiveLocation(id: EditMessageIds, latitude: number, longitude: number, options?: Omit<EditMessageLiveLocationParams, 'chat_id' | 'message_id' | 'inline_message_id' | 'latitude' | 'longitude'>): Promise<Message | boolean>;
1451
+ /**
1452
+ * Use this method to stop updating a live location message before `live_period` expires.
1453
+ * On success, if the message is not an inline message, the edited message is returned, otherwise `True` is returned.
1454
+ *
1455
+ * @param id Message identifier. Can be an object with `chat_id` and `message_id` or an `inline_message_id` string.
1456
+ * @param options Additional parameters
1457
+ * @returns Edited message or `True` on success.
1458
+ */
1459
+ stopMessageLiveLocation(id: EditMessageIds, options?: Omit<StopMessageLiveLocationParams, 'chat_id' | 'message_id' | 'inline_message_id'>): Promise<Message | boolean>;
1460
+ /**
1461
+ * Use this method to edit a checklist on behalf of a connected business account.
1462
+ * On success, the edited message is returned.
1463
+ *
1464
+ * @param business_connection_id Business connection identifier.
1465
+ * @param chat_id Chat identifier.
1466
+ * @param message_id Message identifier.
1467
+ * @param checklist New checklist.
1468
+ * @param options Additional parameters
1469
+ * @returns Edited message on success.
1470
+ */
1471
+ editMessageChecklist(business_connection_id: string, chat_id: number, message_id: number, checklist: InputChecklist, options?: Omit<EditMessageChecklistParams, 'business_connection_id' | 'chat_id' | 'message_id' | 'checklist'>): Promise<Message>;
1472
+ /**
1473
+ * Use this method to edit only the reply markup of messages.
1474
+ * On success, if the edited message is not an inline message, the edited message is returned, otherwise `True` is returned.
1475
+ * 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 of being sent.
1476
+ *
1477
+ * @param id Message identifier. Can be an object with `chat_id` and `message_id` or an `inline_message_id` string.
1478
+ * @param options Additional parameters.
1479
+ * @returns Edited message or `True` on success.
1480
+ */
1481
+ editMessageReplyMarkup(id: EditMessageIds, options?: Omit<EditMessageReplyMarkupParams, 'chat_id' | 'message_id' | 'inline_message_id'>): Promise<Message | boolean>;
1482
+ /**
1483
+ * Use this method to stop a poll.
1484
+ * On success, the updated poll is returned.
1485
+ *
1486
+ * @param chat_id Chat identifier or username.
1487
+ * @param message_id Message identifier with the poll.
1488
+ * @param options Additional parameters.
1489
+ * @returns Updated poll.
1490
+ */
1491
+ stopPoll(chat_id: number | string, message_id: number, options?: Omit<StopPollParams, 'chat_id' | 'message_id'>): Promise<Poll>;
1492
+ /**
1493
+ * Use this method to approve a suggested post in a direct message chat.
1494
+ * The bot must have the `can_post_messages` administrator right in the corresponding channel chat.
1495
+ * Returns `True` on success.
1496
+ *
1497
+ * @param chat_id Chat identifier or username.
1498
+ * @param message_id Suggested post identifier.
1499
+ * @returns `True` on success.
1500
+ */
1501
+ approveSuggestedPost(chat_id: number, message_id: number, options?: Omit<ApproveSuggestedPostParams, 'chat_id' | 'message_id'>): Promise<boolean>;
1502
+ /**
1503
+ * Use this method to decline a suggested post in a direct message chat.
1504
+ * The bot must have the `can_manage_direct_messages` administrator right in the corresponding channel chat.
1505
+ * Returns `True` on success.
1506
+ *
1507
+ * @param chat_id Chat identifier.
1508
+ * @param message_id Suggested post identifier.
1509
+ * @returns `True` on success.
1510
+ */
1511
+ declineSuggestedPost(chat_id: number, message_id: number, options?: Omit<DeclineSuggestedPostParams, 'chat_id' | 'message_id'>): Promise<boolean>;
1512
+ /**
1513
+ * Use this method to delete a message, including service messages, with the following restrictions:
1514
+ * - A message can only be deleted if it was sent less than 48 hours ago.
1515
+ * - Service messages about creating a supergroup, channel, or forum topic cannot be deleted.
1516
+ * - A `dice` message in a private chat can only be deleted if it was sent more than 24 hours ago.
1517
+ * - Bots can delete outgoing messages in private chats, groups, and supergroups.
1518
+ * - Bots can delete incoming messages in private chats.
1519
+ * - Bots granted the `can_post_messages` permission can delete outgoing messages in channels.
1520
+ * - If the bot is a group administrator, it can delete any message there.
1521
+ * - If the bot has the `can_delete_messages` administrator right in a supergroup or channel, it can delete any message there.
1522
+ * - If the bot has the `can_manage_direct_messages` administrator right in a channel, it can delete any message in the corresponding direct message chat.
1523
+ * Returns `True` on success.
1524
+ *
1525
+ * @param chat_id Chat identifier or username.
1526
+ * @param message_id Message identifier.
1527
+ * @returns `True` on success.
1528
+ */
1529
+ deleteMessage(chat_id: number | string, message_id: number): Promise<boolean>;
1530
+ /**
1531
+ * Use this method to delete multiple messages at once.
1532
+ * If some of the specified messages cannot be found, they are skipped.
1533
+ * Returns `True` on success.
1534
+ *
1535
+ * @param chat_id Chat identifier or username.
1536
+ * @param message_ids Message identifiers.
1537
+ * @returns `True` on success.
1538
+ */
1539
+ deleteMessages(chat_id: number | string, message_ids: number[]): Promise<boolean>;
1540
+ /**
1541
+ * Use this method to send static `.WEBP`, animated `.TGS`, or video `.WEBM` stickers.
1542
+ * On success, the sent message is returned.
1543
+ *
1544
+ * @param chat_id Chat identifier or username.
1545
+ * @param sticker Sticker to send. Can be `file_id`, `url`, or `InputFile`.
1546
+ * @param options Additional parameters.
1547
+ * @returns Sent message.
1548
+ */
1549
+ sendSticker(chat_id: number | string, sticker: string | InputFile, options?: Omit<SendStickerParams, 'chat_id' | 'sticker'>): Promise<Message>;
1550
+ /**
1551
+ * Use this method to get a sticker set.
1552
+ * On success, a `StickerSet` object is returned.
1553
+ *
1554
+ * @param name Sticker set name.
1555
+ * @returns `StickerSet`.
1556
+ */
1557
+ getStickerSet(name: string): Promise<StickerSet>;
1558
+ /**
1559
+ * Use this method to get information about custom emoji stickers by their identifiers.
1560
+ * Returns an array of `Sticker` objects.
1561
+ *
1562
+
1563
+ * @param custom_emoji_ids Sticker identifiers.
1564
+ * @returns Array of `Sticker` objects.
1565
+ */
1566
+ getCustomEmojiStickers(custom_emoji_ids: string[]): Promise<Sticker[]>;
1567
+ /**
1568
+ * Use this method to upload a sticker file for subsequent use in `createNewStickerSet`, `addStickerToSet`, or `replaceStickerInSet` methods (the file can be used multiple times).
1569
+ * Returns the uploaded file on success.
1570
+ *
1571
+ * @param user_id User identifier.
1572
+ * @param sticker Sticker to upload. Can be a `string` (file_id) or `InputFile`.
1573
+ * @param sticker_format Sticker format. Can be `'static'`, `'animated'`, or `'video'`.
1574
+ * @returns `File` object.
1575
+ */
1576
+ uploadStickerFile(user_id: number, sticker: string | InputFile, sticker_format: 'static' | 'animated' | 'video'): Promise<TelegramFile>;
1577
+ /**
1578
+ * Use this method to create a new sticker set belonging to a user.
1579
+ * The bot will be able to edit a sticker set created this way.
1580
+ * Returns `True` on success.
1581
+ *
1582
+ * @param user_id User identifier.
1583
+ * @param name Sticker set name. Must start with `a-z`, `A-Z`, or `0-9`, and can contain `_` and consist of no more than 64 characters.
1584
+ * @param title Sticker set title. Must consist of no more than 64 characters.
1585
+ * @param stickers Array of stickers to add. At least one sticker must be passed.
1586
+ * @param options Additional parameters.
1587
+ * @returns `True` on success.
1588
+ */
1589
+ createNewStickerSet(user_id: number, name: string, title: string, stickers: InputSticker[], options?: Omit<CreateNewStickerSetParams, 'name' | 'title' | 'stickers'>): Promise<boolean>;
1590
+ /**
1591
+ * Use this method to add a new sticker to a sticker set.
1592
+ * Returns `True` on success.
1593
+ *
1594
+ * @param user_id User identifier creating the sticker set.
1595
+ * @param name Sticker set name.
1596
+ * @param sticker Sticker to add. Must be an `InputSticker` object.
1597
+ * @returns `True` on success.
1598
+ */
1599
+ addStickerToSet(user_id: number, name: string, sticker: InputSticker): Promise<boolean>;
1600
+ /**
1601
+ * Use this method to move a sticker from a set created by the bot to a specific position.
1602
+ * Returns `True` on success.
1603
+ *
1604
+ * @param sticker Sticker identifier.
1605
+ * @param position New sticker position.
1606
+ * @returns `True` on success.
1607
+ */
1608
+ setStickerPositionInSet(sticker: string, position: number): Promise<boolean>;
1609
+ /**
1610
+ * Use this method to delete a sticker from a sticker set.
1611
+ * Returns `True` on success.
1612
+ *
1613
+ * @param sticker Sticker identifier.
1614
+ * @returns `True` on success.
1615
+ */
1616
+ deleteStickerFromSet(sticker: string): Promise<boolean>;
1617
+ /**
1618
+ * Use this method to replace a sticker in a sticker set.
1619
+ * Returns `True` on success.
1620
+ *
1621
+ * @param user_id User identifier creating the sticker set.
1622
+ * @param name Sticker set name.
1623
+ * @param old_sticker Identifier of the sticker to be replaced.
1624
+ * @param sticker New sticker. Must be an `InputSticker` object.
1625
+ * @returns `True` on success.
1626
+ */
1627
+ replaceStickerInSet(user_id: number, name: string, old_sticker: string, sticker: InputSticker): Promise<boolean>;
1628
+ /**
1629
+ * Use this method to change the list of emojis assigned to a regular or custom emoji sticker.
1630
+ * The sticker must belong to a sticker set created by the bot.
1631
+ * Returns `True` on success.
1632
+ *
1633
+ * @param sticker Sticker identifier.
1634
+ * @param emoji_list List of emojis.
1635
+ * @returns `True` on success.
1636
+ */
1637
+ setStickerEmojiList(sticker: string, emoji_list: string[]): Promise<boolean>;
1638
+ /**
1639
+ * Use this method to change the list of keywords assigned to a regular or custom emoji sticker.
1640
+ * The sticker must belong to a sticker set created by the bot.
1641
+ * Returns `True` on success.
1642
+ *
1643
+ * @param sticker Sticker identifier.
1644
+ * @param keywords List of keywords.
1645
+ * @returns `True` on success.
1646
+ */
1647
+ setStickerKeywords(sticker: string, keywords: string[]): Promise<boolean>;
1648
+ /**
1649
+ * Use this method to change the mask position of a sticker.
1650
+ * The sticker must belong to a set created by the bot.
1651
+ * Returns `True` on success.
1652
+ *
1653
+ * @param sticker Sticker identifier.
1654
+ * @param options Additional parameters.
1655
+ * @returns `True` on success.
1656
+ */
1657
+ setStickerMaskPosition(sticker: string, options?: Omit<SetStickerMaskPositionParams, 'sticker'>): Promise<boolean>;
1658
+ /**
1659
+ * Use this method to set the title of a created sticker set.
1660
+ * Returns `True` on success.
1661
+ *
1662
+ * @param name Sticker set name.
1663
+ * @param title New sticker set title.
1664
+ * @returns `True` on success.
1665
+ */
1666
+ setStickerSetTitle(name: string, title: string): Promise<boolean>;
1667
+ /**
1668
+ * Use this method to set the thumbnail of a regular sticker set or a mask set.
1669
+ * The thumbnail file format must match the format of the stickers in the set.
1670
+ * Returns `True` on success.
1671
+ *
1672
+ * @param name Sticker set name.
1673
+ * @param user_id User identifier creating the sticker set.
1674
+ * @param format Thumbnail file format.
1675
+ * @param options Additional parameters.
1676
+ * @returns `True` on success.
1677
+ */
1678
+ setStickerSetThumbnail(name: string, user_id: number, format: string, options?: Omit<SetStickerSetThumbnailParams, 'name' | 'user_id' | 'format'>): Promise<boolean>;
1679
+ /**
1680
+ * Use this method to set the thumbnail of a custom emoji sticker set.
1681
+ * Returns `True` on success.
1682
+ *
1683
+ * @param name Sticker set name.
1684
+ * @param custom_emoji_id Emoji identifier.
1685
+ * @returns `True` on success.
1686
+ */
1687
+ setCustomEmojiStickerSetThumbnail(name: string, custom_emoji_id: string): Promise<boolean>;
1688
+ /**
1689
+ * Use this method to delete a sticker set created by the bot.
1690
+ * Returns `True` on success.
1691
+ *
1692
+ * @param name Sticker set name.
1693
+ * @returns `True` on success.
1694
+ */
1695
+ deleteStickerSet(name: string): Promise<boolean>;
1696
+ /**
1697
+ * Use this method to send answers to an inline query.
1698
+ * Returns `True` on success.
1699
+ * No more than 50 results per query are allowed.
1700
+ *
1701
+ * @param inline_query_id Inline query identifier.
1702
+ * @param results Array of results.
1703
+ * @param options Additional parameters.
1704
+ * @returns `True` on success.
1705
+ */
1706
+ answerInlineQuery(inline_query_id: string, results: InlineQueryResult[], options?: Omit<AnswerInlineQueryParams, 'inline_query_id' | 'results'>): Promise<boolean>;
1707
+ /**
1708
+ * Use this method to send invoices.
1709
+ * On success, the sent message is returned.
1710
+ *
1711
+ * @param chat_id Chat identifier.
1712
+ * @param title Invoice title.
1713
+ * @param description Invoice description.
1714
+ * @param payload Internal invoice information.
1715
+ * @param currency Invoice currency.
1716
+ * @param prices Invoice prices.
1717
+ * @param options Additional parameters.
1718
+ * @returns Sent message.
1719
+ */
1720
+ sendInvoice(chat_id: number | string, title: string, description: string, payload: string, currency: string, prices: LabeledPrice[], options?: Omit<SendInvoiceParams, 'chat_id' | 'title' | 'description' | 'payload' | 'currency' | 'prices'>): Promise<Message>;
1721
+ /**
1722
+ * Use this method to create an invoice link.
1723
+ * On success, returns the created invoice link as a string.
1724
+ *
1725
+ * @param title Invoice title.
1726
+ * @param description Invoice description.
1727
+ * @param payload Internal invoice information.
1728
+ * @param currency Invoice currency.
1729
+ * @param prices Invoice prices.
1730
+ * @param options Additional parameters.
1731
+ * @returns Created invoice link.
1732
+ */
1733
+ createInvoiceLink(title: string, description: string, payload: string, currency: string, prices: LabeledPrice[], options?: Omit<CreateInvoiceLinkParams, 'title' | 'description' | 'payload' | 'currency' | 'prices'>): Promise<string>;
1734
+ /**
1735
+ * If you sent an invoice with a shipping address request and the `is_flexible` parameter was specified, the Bot API will send the bot an update with the `shipping_query` field.
1736
+ * Use this method to answer shipping queries.
1737
+ * Returns `True` on success.
1738
+ *
1739
+ * @param shipping_query_id Shipping query identifier.
1740
+ * @param ok Whether the response is successful.
1741
+ * @param shipping_options Array of shipping options.
1742
+ * @returns `True` on success.
1743
+ */
1744
+ answerShippingQuery(shipping_query_id: string, ok: boolean, shipping_options?: ShippingOption[]): Promise<boolean>;
1745
+ /**
1746
+ * After a user has confirmed their payment and shipping data, the Bot API sends a final confirmation as an update with the `pre_checkout_query` field.
1747
+ * Use this method to answer such pre-checkout queries.
1748
+ * Returns `True` on success.
1749
+ *
1750
+ * **Note**: The Bot API must receive a response within 10 seconds after sending a pre-checkout query.
1751
+ *
1752
+ * @param pre_checkout_query_id Pre-checkout query identifier.
1753
+ * @param ok Whether the response is successful.
1754
+ * @param options Additional parameters (error_message)
1755
+ * @returns `True` on success.
1756
+ */
1757
+ answerPreCheckoutQuery(pre_checkout_query_id: string, ok: boolean, options?: Omit<AnswerPreCheckoutQueryParams, 'pre_checkout_query_id' | 'ok'>): Promise<boolean>;
1758
+ /**
1759
+ * Method to get the current Telegram Stars balance of the bot.
1760
+ * Requires no parameters.
1761
+ * On success, returns a `StarAmount` object.
1762
+ *
1763
+ * @returns `StarAmount` object.
1764
+ */
1765
+ getMyStarBalance(): Promise<StarAmount>;
1766
+ /**
1767
+ * Returns the bot's Telegram Star transactions in chronological order.
1768
+ * On success, returns a `StarTransactions` object.
1769
+ *
1770
+ * @param options Parameters for filtering transactions.
1771
+ * @returns `StarTransactions` object with transaction information.
1772
+ */
1773
+ getStarTransactions(options?: GetStarTransactionsParams): Promise<StarTransactions>;
1774
+ /**
1775
+ * Refunds a successful payment in Telegram Stars.
1776
+ * Returns `True` on success.
1777
+ *
1778
+ * @param user_id User identifier.
1779
+ * @param telegram_payment_charge_id Telegram payment transaction identifier.
1780
+ * @returns `True` on success.
1781
+ */
1782
+ refundStarPayment(user_id: number, telegram_payment_charge_id: string): Promise<boolean>;
1783
+ /**
1784
+ * Allows the bot to cancel or re-enable the renewal of a subscription paid in Telegram Stars.
1785
+ * Returns `True` on success.
1786
+ *
1787
+ * @param user_id User identifier.
1788
+ * @param telegram_payment_charge_id Telegram payment identifier for the subscription.
1789
+ * @param is_canceled Whether the subscription is canceled.
1790
+ * @returns `True` on success.
1791
+ */
1792
+ editUserStarSubscription(user_id: number, telegram_payment_charge_id: string, is_canceled: boolean): Promise<boolean>;
1793
+ /**
1794
+ * Use this method to send a game.
1795
+ * On success, the sent message is returned.
1796
+ *
1797
+ * @param chat_id Chat identifier.
1798
+ * @param game_short_name Game short name.
1799
+ * @param options Additional parameters.
1800
+ * @returns `Message` object.
1801
+ */
1802
+ sendGame(chat_id: number, game_short_name: string, options?: Omit<SendGameParams, 'chat_id' | 'game_short_name'>): Promise<Message>;
1803
+ /**
1804
+ * Use this method to set the score of the specified user in a game message.
1805
+ * On success, if the message is not an inline message, the `Message` is returned, otherwise `True` is returned.
1806
+ * Returns an error if the new score is not greater than the user's current score in the chat and `force` is False.
1807
+ *
1808
+ * @param user_id User identifier.
1809
+ * @param score Player's score.
1810
+ * @param options Additional parameters.
1811
+ * @returns `Message` object or `True`.
1812
+ */
1813
+ setGameScore(user_id: number, score: number, options?: Omit<SetGameScoreParams, 'user_id' | 'score'>): Promise<Message | boolean>;
1814
+ /**
1815
+ * Use this method to get data for high score tables.
1816
+ * Returns the score of the specified user and several of their neighbors in the game.
1817
+ * Returns an array of `GameHighScore` objects.
1818
+ *
1819
+ * This method will currently return scores for the target user, as well as two of their closest neighbors on each side.
1820
+ * It will also return the top three users if the user and their neighbors are not among them.
1821
+ * Note that this behavior is subject to change.
1822
+ *
1823
+ * @param user_id User identifier.
1824
+ * @param options Additional parameters.
1825
+ * @returns Array of `GameHighScore` objects with user score information.
1826
+ */
1827
+ getGameHighScores(user_id: number, options?: Omit<GetGameHighScoresParams, 'user_id'>): Promise<GameHighScore[]>;
1828
+ }