@effect-ak/tg-bot-client 0.2.1 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. package/dist/index.d.ts +2821 -0
  2. package/dist/index.js +462 -0
  3. package/dist/index.mjs +418 -0
  4. package/package.json +15 -15
  5. package/readme.md +1 -1
  6. package/dist/cjs/bot/factory/_service.js +0 -59
  7. package/dist/cjs/bot/factory/client-config.js +0 -68
  8. package/dist/cjs/bot/factory/make-bot.js +0 -59
  9. package/dist/cjs/bot/message-handler/_service.js +0 -51
  10. package/dist/cjs/bot/message-handler/types.js +0 -5
  11. package/dist/cjs/bot/message-handler/utils.js +0 -19
  12. package/dist/cjs/bot/run.js +0 -10
  13. package/dist/cjs/bot/update-poller/_service.js +0 -78
  14. package/dist/cjs/bot/update-poller/errors.js +0 -5
  15. package/dist/cjs/bot/update-poller/fetch-updates.js +0 -109
  16. package/dist/cjs/bot/update-poller/poll-and-handle.js +0 -89
  17. package/dist/cjs/bot/update-poller/settings.js +0 -23
  18. package/dist/cjs/client/_client.js +0 -64
  19. package/dist/cjs/client/config.js +0 -56
  20. package/dist/cjs/client/errors.js +0 -57
  21. package/dist/cjs/client/execute-request/_service.js +0 -59
  22. package/dist/cjs/client/execute-request/execute.js +0 -98
  23. package/dist/cjs/client/execute-request/payload.js +0 -24
  24. package/dist/cjs/client/file/_service.js +0 -61
  25. package/dist/cjs/client/file/get-file.js +0 -77
  26. package/dist/cjs/client/guards.js +0 -12
  27. package/dist/cjs/const.js +0 -20
  28. package/dist/cjs/index.js +0 -29
  29. package/dist/cjs/specification/api.js +0 -5
  30. package/dist/cjs/specification/types.js +0 -5
  31. package/dist/dts/bot/factory/_service.d.ts +0 -37
  32. package/dist/dts/bot/factory/client-config.d.ts +0 -3
  33. package/dist/dts/bot/factory/make-bot.d.ts +0 -7
  34. package/dist/dts/bot/message-handler/_service.d.ts +0 -6
  35. package/dist/dts/bot/message-handler/types.d.ts +0 -16
  36. package/dist/dts/bot/message-handler/utils.d.ts +0 -6
  37. package/dist/dts/bot/run.d.ts +0 -7
  38. package/dist/dts/bot/update-poller/_service.d.ts +0 -21
  39. package/dist/dts/bot/update-poller/errors.d.ts +0 -1
  40. package/dist/dts/bot/update-poller/fetch-updates.d.ts +0 -17
  41. package/dist/dts/bot/update-poller/poll-and-handle.d.ts +0 -16
  42. package/dist/dts/bot/update-poller/settings.d.ts +0 -6
  43. package/dist/dts/client/_client.d.ts +0 -8
  44. package/dist/dts/client/config.d.ts +0 -8
  45. package/dist/dts/client/errors.d.ts +0 -23
  46. package/dist/dts/client/execute-request/_service.d.ts +0 -15
  47. package/dist/dts/client/execute-request/execute.d.ts +0 -5
  48. package/dist/dts/client/execute-request/payload.d.ts +0 -1
  49. package/dist/dts/client/file/_service.d.ts +0 -16
  50. package/dist/dts/client/file/get-file.d.ts +0 -5
  51. package/dist/dts/client/guards.d.ts +0 -17
  52. package/dist/dts/const.d.ts +0 -12
  53. package/dist/dts/index.d.ts +0 -5
  54. package/dist/dts/specification/api.d.ts +0 -1030
  55. package/dist/dts/specification/types.d.ts +0 -1663
  56. package/dist/esm/bot/factory/_service.js +0 -49
  57. package/dist/esm/bot/factory/client-config.js +0 -57
  58. package/dist/esm/bot/factory/make-bot.js +0 -46
  59. package/dist/esm/bot/message-handler/_service.js +0 -41
  60. package/dist/esm/bot/message-handler/types.js +0 -2
  61. package/dist/esm/bot/message-handler/utils.js +0 -16
  62. package/dist/esm/bot/run.js +0 -10
  63. package/dist/esm/bot/update-poller/_service.js +0 -68
  64. package/dist/esm/bot/update-poller/errors.js +0 -2
  65. package/dist/esm/bot/update-poller/fetch-updates.js +0 -86
  66. package/dist/esm/bot/update-poller/poll-and-handle.js +0 -74
  67. package/dist/esm/bot/update-poller/settings.js +0 -19
  68. package/dist/esm/client/_client.js +0 -53
  69. package/dist/esm/client/config.js +0 -46
  70. package/dist/esm/client/errors.js +0 -46
  71. package/dist/esm/client/execute-request/_service.js +0 -49
  72. package/dist/esm/client/execute-request/execute.js +0 -74
  73. package/dist/esm/client/execute-request/payload.js +0 -25
  74. package/dist/esm/client/file/_service.js +0 -51
  75. package/dist/esm/client/file/get-file.js +0 -61
  76. package/dist/esm/client/guards.js +0 -13
  77. package/dist/esm/const.js +0 -17
  78. package/dist/esm/index.js +0 -21
  79. package/dist/esm/specification/api.js +0 -2
  80. package/dist/esm/specification/types.js +0 -2
@@ -0,0 +1,2821 @@
1
+ import * as Context from 'effect/Context';
2
+ import * as Micro from 'effect/Micro';
3
+ import * as effect_Cause from 'effect/Cause';
4
+ import * as effect_Types from 'effect/Types';
5
+
6
+ type ErrorReason = {
7
+ readonly type: "NotOkResponse";
8
+ readonly errorCode?: number;
9
+ readonly details?: string;
10
+ } | {
11
+ readonly type: "UnexpectedResponse";
12
+ readonly response: unknown;
13
+ } | {
14
+ readonly type: "ClientInternalError";
15
+ readonly cause: unknown;
16
+ } | {
17
+ readonly type: "UnableToGetFile";
18
+ readonly cause: unknown;
19
+ };
20
+ declare const TgBotClientError_base: new <A extends Record<string, any> = {}>(args: effect_Types.Equals<A, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }) => effect_Cause.YieldableError & {
21
+ readonly _tag: "TgBotClientError";
22
+ } & Readonly<A>;
23
+ declare class TgBotClientError extends TgBotClientError_base<{
24
+ reason: ErrorReason;
25
+ }> {
26
+ static readonly missingSuccess: TgBotClientError;
27
+ }
28
+
29
+ type TgBotClientSettingsInput = {
30
+ ["bot-token"]: string;
31
+ ["base-url"]?: string;
32
+ };
33
+
34
+ type TgBotClientConfigObject = Required<TgBotClientSettingsInput>;
35
+ declare const TgBotClientConfig_base: Context.TagClass<TgBotClientConfig, "TgBotClientConfig", Required<TgBotClientSettingsInput>>;
36
+ declare class TgBotClientConfig extends TgBotClientConfig_base {
37
+ }
38
+
39
+ interface AffiliateInfo {
40
+ commission_per_mille: number;
41
+ amount: number;
42
+ affiliate_user?: User;
43
+ affiliate_chat?: Chat;
44
+ nanostar_amount?: number;
45
+ }
46
+ interface Animation {
47
+ file_id: string;
48
+ file_unique_id: string;
49
+ width: number;
50
+ height: number;
51
+ duration: number;
52
+ thumbnail?: PhotoSize;
53
+ file_name?: string;
54
+ mime_type?: string;
55
+ file_size?: number;
56
+ }
57
+ interface Audio {
58
+ file_id: string;
59
+ file_unique_id: string;
60
+ duration: number;
61
+ performer?: string;
62
+ title?: string;
63
+ file_name?: string;
64
+ mime_type?: string;
65
+ file_size?: number;
66
+ thumbnail?: PhotoSize;
67
+ }
68
+ type BackgroundFill = BackgroundFillSolid | BackgroundFillGradient | BackgroundFillFreeformGradient;
69
+ interface BackgroundFillFreeformGradient {
70
+ type: "freeform_gradient";
71
+ colors: number[];
72
+ }
73
+ interface BackgroundFillGradient {
74
+ type: "gradient";
75
+ top_color: number;
76
+ bottom_color: number;
77
+ rotation_angle: number;
78
+ }
79
+ interface BackgroundFillSolid {
80
+ type: "solid";
81
+ color: number;
82
+ }
83
+ type BackgroundType = BackgroundTypeFill | BackgroundTypeWallpaper | BackgroundTypePattern | BackgroundTypeChatTheme;
84
+ interface BackgroundTypeChatTheme {
85
+ type: "chat_theme";
86
+ theme_name: string;
87
+ }
88
+ interface BackgroundTypeFill {
89
+ type: "fill";
90
+ fill: BackgroundFill;
91
+ dark_theme_dimming: number;
92
+ }
93
+ interface BackgroundTypePattern {
94
+ type: "pattern";
95
+ document: Document;
96
+ fill: BackgroundFill;
97
+ intensity: number;
98
+ is_inverted?: boolean;
99
+ is_moving?: boolean;
100
+ }
101
+ interface BackgroundTypeWallpaper {
102
+ type: "wallpaper";
103
+ document: Document;
104
+ dark_theme_dimming: number;
105
+ is_blurred?: boolean;
106
+ is_moving?: boolean;
107
+ }
108
+ interface Birthdate {
109
+ day: number;
110
+ month: number;
111
+ year?: number;
112
+ }
113
+ interface BotCommand {
114
+ command: string;
115
+ description: string;
116
+ }
117
+ type BotCommandScope = BotCommandScopeDefault | BotCommandScopeAllPrivateChats | BotCommandScopeAllGroupChats | BotCommandScopeAllChatAdministrators | BotCommandScopeChat | BotCommandScopeChatAdministrators | BotCommandScopeChatMember;
118
+ interface BotCommandScopeAllChatAdministrators {
119
+ type: "all_chat_administrators";
120
+ }
121
+ interface BotCommandScopeAllGroupChats {
122
+ type: "all_group_chats";
123
+ }
124
+ interface BotCommandScopeAllPrivateChats {
125
+ type: "all_private_chats";
126
+ }
127
+ interface BotCommandScopeChat {
128
+ type: "chat";
129
+ chat_id: number | string;
130
+ }
131
+ interface BotCommandScopeChatAdministrators {
132
+ type: "chat_administrators";
133
+ chat_id: number | string;
134
+ }
135
+ interface BotCommandScopeChatMember {
136
+ type: "chat_member";
137
+ chat_id: number | string;
138
+ user_id: number;
139
+ }
140
+ interface BotCommandScopeDefault {
141
+ type: "default";
142
+ }
143
+ interface BotDescription {
144
+ description: string;
145
+ }
146
+ interface BotName {
147
+ name: string;
148
+ }
149
+ interface BotShortDescription {
150
+ short_description: string;
151
+ }
152
+ interface BusinessConnection {
153
+ id: string;
154
+ user: User;
155
+ user_chat_id: number;
156
+ date: number;
157
+ can_reply: boolean;
158
+ is_enabled: boolean;
159
+ }
160
+ interface BusinessIntro {
161
+ title?: string;
162
+ message?: string;
163
+ sticker?: Sticker;
164
+ }
165
+ interface BusinessLocation {
166
+ address: string;
167
+ location?: Location;
168
+ }
169
+ interface BusinessMessagesDeleted {
170
+ business_connection_id: string;
171
+ chat: Chat;
172
+ message_ids: number[];
173
+ }
174
+ interface BusinessOpeningHours {
175
+ time_zone_name: string;
176
+ opening_hours: BusinessOpeningHoursInterval[];
177
+ }
178
+ interface BusinessOpeningHoursInterval {
179
+ opening_minute: number;
180
+ closing_minute: number;
181
+ }
182
+ type CallbackGame = never;
183
+ interface CallbackQuery {
184
+ id: string;
185
+ from: User;
186
+ chat_instance: string;
187
+ message?: MaybeInaccessibleMessage;
188
+ inline_message_id?: string;
189
+ data?: string;
190
+ game_short_name?: string;
191
+ }
192
+ interface Chat {
193
+ id: number;
194
+ type: "private" | "group" | "supergroup" | "channel";
195
+ title?: string;
196
+ username?: string;
197
+ first_name?: string;
198
+ last_name?: string;
199
+ is_forum?: boolean;
200
+ }
201
+ interface ChatAdministratorRights {
202
+ is_anonymous: boolean;
203
+ can_manage_chat: boolean;
204
+ can_delete_messages: boolean;
205
+ can_manage_video_chats: boolean;
206
+ can_restrict_members: boolean;
207
+ can_promote_members: boolean;
208
+ can_change_info: boolean;
209
+ can_invite_users: boolean;
210
+ can_post_stories: boolean;
211
+ can_edit_stories: boolean;
212
+ can_delete_stories: boolean;
213
+ can_post_messages?: boolean;
214
+ can_edit_messages?: boolean;
215
+ can_pin_messages?: boolean;
216
+ can_manage_topics?: boolean;
217
+ }
218
+ interface ChatBackground {
219
+ type: BackgroundType;
220
+ }
221
+ interface ChatBoost {
222
+ boost_id: string;
223
+ add_date: number;
224
+ expiration_date: number;
225
+ source: ChatBoostSource;
226
+ }
227
+ interface ChatBoostAdded {
228
+ boost_count: number;
229
+ }
230
+ interface ChatBoostRemoved {
231
+ chat: Chat;
232
+ boost_id: string;
233
+ remove_date: number;
234
+ source: ChatBoostSource;
235
+ }
236
+ type ChatBoostSource = ChatBoostSourcePremium | ChatBoostSourceGiftCode | ChatBoostSourceGiveaway;
237
+ interface ChatBoostSourceGiftCode {
238
+ source: "gift_code";
239
+ user: User;
240
+ }
241
+ interface ChatBoostSourceGiveaway {
242
+ source: "giveaway";
243
+ giveaway_message_id: number;
244
+ user?: User;
245
+ prize_star_count?: number;
246
+ is_unclaimed?: boolean;
247
+ }
248
+ interface ChatBoostSourcePremium {
249
+ source: "premium";
250
+ user: User;
251
+ }
252
+ interface ChatBoostUpdated {
253
+ chat: Chat;
254
+ boost: ChatBoost;
255
+ }
256
+ interface ChatFullInfo {
257
+ id: number;
258
+ type: "private" | "group" | "supergroup" | "channel";
259
+ accent_color_id: number;
260
+ max_reaction_count: number;
261
+ title?: string;
262
+ username?: string;
263
+ first_name?: string;
264
+ last_name?: string;
265
+ is_forum?: boolean;
266
+ photo?: ChatPhoto;
267
+ active_usernames?: string[];
268
+ birthdate?: Birthdate;
269
+ business_intro?: BusinessIntro;
270
+ business_location?: BusinessLocation;
271
+ business_opening_hours?: BusinessOpeningHours;
272
+ personal_chat?: Chat;
273
+ available_reactions?: ReactionType[];
274
+ background_custom_emoji_id?: string;
275
+ profile_accent_color_id?: number;
276
+ profile_background_custom_emoji_id?: string;
277
+ emoji_status_custom_emoji_id?: string;
278
+ emoji_status_expiration_date?: number;
279
+ bio?: string;
280
+ has_private_forwards?: boolean;
281
+ has_restricted_voice_and_video_messages?: boolean;
282
+ join_to_send_messages?: boolean;
283
+ join_by_request?: boolean;
284
+ description?: string;
285
+ invite_link?: string;
286
+ pinned_message?: Message;
287
+ permissions?: ChatPermissions;
288
+ can_send_paid_media?: boolean;
289
+ slow_mode_delay?: number;
290
+ unrestrict_boost_count?: number;
291
+ message_auto_delete_time?: number;
292
+ has_aggressive_anti_spam_enabled?: boolean;
293
+ has_hidden_members?: boolean;
294
+ has_protected_content?: boolean;
295
+ has_visible_history?: boolean;
296
+ sticker_set_name?: string;
297
+ can_set_sticker_set?: boolean;
298
+ custom_emoji_sticker_set_name?: string;
299
+ linked_chat_id?: number;
300
+ location?: ChatLocation;
301
+ }
302
+ interface ChatInviteLink {
303
+ invite_link: string;
304
+ creator: User;
305
+ creates_join_request: boolean;
306
+ is_primary: boolean;
307
+ is_revoked: boolean;
308
+ name?: string;
309
+ expire_date?: number;
310
+ member_limit?: number;
311
+ pending_join_request_count?: number;
312
+ subscription_period?: number;
313
+ subscription_price?: number;
314
+ }
315
+ interface ChatJoinRequest {
316
+ chat: Chat;
317
+ from: User;
318
+ user_chat_id: number;
319
+ date: number;
320
+ bio?: string;
321
+ invite_link?: ChatInviteLink;
322
+ }
323
+ interface ChatLocation {
324
+ location: Location;
325
+ address: string;
326
+ }
327
+ type ChatMember = ChatMemberOwner | ChatMemberAdministrator | ChatMemberMember | ChatMemberRestricted | ChatMemberLeft | ChatMemberBanned;
328
+ interface ChatMemberAdministrator {
329
+ status: "administrator";
330
+ user: User;
331
+ can_be_edited: boolean;
332
+ is_anonymous: boolean;
333
+ can_manage_chat: boolean;
334
+ can_delete_messages: boolean;
335
+ can_manage_video_chats: boolean;
336
+ can_restrict_members: boolean;
337
+ can_promote_members: boolean;
338
+ can_change_info: boolean;
339
+ can_invite_users: boolean;
340
+ can_post_stories: boolean;
341
+ can_edit_stories: boolean;
342
+ can_delete_stories: boolean;
343
+ can_post_messages?: boolean;
344
+ can_edit_messages?: boolean;
345
+ can_pin_messages?: boolean;
346
+ can_manage_topics?: boolean;
347
+ custom_title?: string;
348
+ }
349
+ interface ChatMemberBanned {
350
+ status: "kicked";
351
+ user: User;
352
+ until_date: number;
353
+ }
354
+ interface ChatMemberLeft {
355
+ status: "left";
356
+ user: User;
357
+ }
358
+ interface ChatMemberMember {
359
+ status: "member";
360
+ user: User;
361
+ until_date?: number;
362
+ }
363
+ interface ChatMemberOwner {
364
+ status: "creator";
365
+ user: User;
366
+ is_anonymous: boolean;
367
+ custom_title?: string;
368
+ }
369
+ interface ChatMemberRestricted {
370
+ status: "restricted";
371
+ user: User;
372
+ is_member: boolean;
373
+ can_send_messages: boolean;
374
+ can_send_audios: boolean;
375
+ can_send_documents: boolean;
376
+ can_send_photos: boolean;
377
+ can_send_videos: boolean;
378
+ can_send_video_notes: boolean;
379
+ can_send_voice_notes: boolean;
380
+ can_send_polls: boolean;
381
+ can_send_other_messages: boolean;
382
+ can_add_web_page_previews: boolean;
383
+ can_change_info: boolean;
384
+ can_invite_users: boolean;
385
+ can_pin_messages: boolean;
386
+ can_manage_topics: boolean;
387
+ until_date: number;
388
+ }
389
+ interface ChatMemberUpdated {
390
+ chat: Chat;
391
+ from: User;
392
+ date: number;
393
+ old_chat_member: ChatMember;
394
+ new_chat_member: ChatMember;
395
+ invite_link?: ChatInviteLink;
396
+ via_join_request?: boolean;
397
+ via_chat_folder_invite_link?: boolean;
398
+ }
399
+ interface ChatPermissions {
400
+ can_send_messages?: boolean;
401
+ can_send_audios?: boolean;
402
+ can_send_documents?: boolean;
403
+ can_send_photos?: boolean;
404
+ can_send_videos?: boolean;
405
+ can_send_video_notes?: boolean;
406
+ can_send_voice_notes?: boolean;
407
+ can_send_polls?: boolean;
408
+ can_send_other_messages?: boolean;
409
+ can_add_web_page_previews?: boolean;
410
+ can_change_info?: boolean;
411
+ can_invite_users?: boolean;
412
+ can_pin_messages?: boolean;
413
+ can_manage_topics?: boolean;
414
+ }
415
+ interface ChatPhoto {
416
+ small_file_id: string;
417
+ small_file_unique_id: string;
418
+ big_file_id: string;
419
+ big_file_unique_id: string;
420
+ }
421
+ interface ChatShared {
422
+ request_id: number;
423
+ chat_id: number;
424
+ title?: string;
425
+ username?: string;
426
+ photo?: PhotoSize[];
427
+ }
428
+ interface ChosenInlineResult {
429
+ result_id: string;
430
+ from: User;
431
+ query: string;
432
+ location?: Location;
433
+ inline_message_id?: string;
434
+ }
435
+ interface Contact {
436
+ phone_number: string;
437
+ first_name: string;
438
+ last_name?: string;
439
+ user_id?: number;
440
+ vcard?: string;
441
+ }
442
+ interface CopyTextButton {
443
+ text: string;
444
+ }
445
+ interface Dice {
446
+ emoji: string;
447
+ value: number;
448
+ }
449
+ interface Document {
450
+ file_id: string;
451
+ file_unique_id: string;
452
+ thumbnail?: PhotoSize;
453
+ file_name?: string;
454
+ mime_type?: string;
455
+ file_size?: number;
456
+ }
457
+ interface EncryptedCredentials {
458
+ data: string;
459
+ hash: string;
460
+ secret: string;
461
+ }
462
+ interface EncryptedPassportElement {
463
+ type: string;
464
+ hash: string;
465
+ data?: string;
466
+ phone_number?: string;
467
+ email?: string;
468
+ files?: PassportFile[];
469
+ front_side?: PassportFile;
470
+ reverse_side?: PassportFile;
471
+ selfie?: PassportFile;
472
+ translation?: PassportFile[];
473
+ }
474
+ interface ExternalReplyInfo {
475
+ origin: MessageOrigin;
476
+ chat?: Chat;
477
+ message_id?: number;
478
+ link_preview_options?: LinkPreviewOptions;
479
+ animation?: Animation;
480
+ audio?: Audio;
481
+ document?: Document;
482
+ paid_media?: PaidMediaInfo;
483
+ photo?: PhotoSize[];
484
+ sticker?: Sticker;
485
+ story?: Story;
486
+ video?: Video;
487
+ video_note?: VideoNote;
488
+ voice?: Voice;
489
+ has_media_spoiler?: boolean;
490
+ contact?: Contact;
491
+ dice?: Dice;
492
+ game?: Game;
493
+ giveaway?: Giveaway;
494
+ giveaway_winners?: GiveawayWinners;
495
+ invoice?: Invoice;
496
+ location?: Location;
497
+ poll?: Poll;
498
+ venue?: Venue;
499
+ }
500
+ interface File$1 {
501
+ file_id: string;
502
+ file_unique_id: string;
503
+ file_size?: number;
504
+ file_path?: string;
505
+ }
506
+ interface ForceReply {
507
+ force_reply: boolean;
508
+ input_field_placeholder?: string;
509
+ selective?: boolean;
510
+ }
511
+ interface ForumTopic {
512
+ message_thread_id: number;
513
+ name: string;
514
+ icon_color: number;
515
+ icon_custom_emoji_id?: string;
516
+ }
517
+ type ForumTopicClosed = never;
518
+ interface ForumTopicCreated {
519
+ name: string;
520
+ icon_color: number;
521
+ icon_custom_emoji_id?: string;
522
+ }
523
+ interface ForumTopicEdited {
524
+ name?: string;
525
+ icon_custom_emoji_id?: string;
526
+ }
527
+ type ForumTopicReopened = never;
528
+ interface Game {
529
+ title: string;
530
+ description: string;
531
+ photo: PhotoSize[];
532
+ text?: string;
533
+ text_entities?: MessageEntity[];
534
+ animation?: Animation;
535
+ }
536
+ interface GameHighScore {
537
+ position: number;
538
+ user: User;
539
+ score: number;
540
+ }
541
+ type GeneralForumTopicHidden = never;
542
+ type GeneralForumTopicUnhidden = never;
543
+ interface Gift {
544
+ id: string;
545
+ sticker: Sticker;
546
+ star_count: number;
547
+ total_count?: number;
548
+ remaining_count?: number;
549
+ }
550
+ interface Gifts {
551
+ gifts: Gift[];
552
+ }
553
+ interface Giveaway {
554
+ chats: Chat[];
555
+ winners_selection_date: number;
556
+ winner_count: number;
557
+ only_new_members?: boolean;
558
+ has_public_winners?: boolean;
559
+ prize_description?: string;
560
+ country_codes?: string[];
561
+ prize_star_count?: number;
562
+ premium_subscription_month_count?: number;
563
+ }
564
+ interface GiveawayCompleted {
565
+ winner_count: number;
566
+ unclaimed_prize_count?: number;
567
+ giveaway_message?: Message;
568
+ is_star_giveaway?: boolean;
569
+ }
570
+ interface GiveawayCreated {
571
+ prize_star_count?: number;
572
+ }
573
+ interface GiveawayWinners {
574
+ chat: Chat;
575
+ giveaway_message_id: number;
576
+ winners_selection_date: number;
577
+ winner_count: number;
578
+ winners: User[];
579
+ additional_chat_count?: number;
580
+ prize_star_count?: number;
581
+ premium_subscription_month_count?: number;
582
+ unclaimed_prize_count?: number;
583
+ only_new_members?: boolean;
584
+ was_refunded?: boolean;
585
+ prize_description?: string;
586
+ }
587
+ interface InaccessibleMessage {
588
+ chat: Chat;
589
+ message_id: number;
590
+ date: number;
591
+ }
592
+ interface InlineKeyboardButton {
593
+ text: string;
594
+ url?: string;
595
+ callback_data?: string;
596
+ web_app?: WebAppInfo;
597
+ login_url?: LoginUrl;
598
+ switch_inline_query?: string;
599
+ switch_inline_query_current_chat?: string;
600
+ switch_inline_query_chosen_chat?: SwitchInlineQueryChosenChat;
601
+ copy_text?: CopyTextButton;
602
+ callback_game?: CallbackGame;
603
+ pay?: boolean;
604
+ }
605
+ interface InlineKeyboardMarkup {
606
+ inline_keyboard: InlineKeyboardButton[][];
607
+ }
608
+ interface InlineQuery {
609
+ id: string;
610
+ from: User;
611
+ query: string;
612
+ offset: string;
613
+ chat_type?: string;
614
+ location?: Location;
615
+ }
616
+ type InlineQueryResult = InlineQueryResultCachedAudio | InlineQueryResultCachedDocument | InlineQueryResultCachedGif | InlineQueryResultCachedMpeg4Gif | InlineQueryResultCachedPhoto | InlineQueryResultCachedSticker | InlineQueryResultCachedVideo | InlineQueryResultCachedVoice | InlineQueryResultArticle | InlineQueryResultAudio | InlineQueryResultContact | InlineQueryResultGame | InlineQueryResultDocument | InlineQueryResultGif | InlineQueryResultLocation | InlineQueryResultMpeg4Gif | InlineQueryResultPhoto | InlineQueryResultVenue | InlineQueryResultVideo | InlineQueryResultVoice;
617
+ interface InlineQueryResultArticle {
618
+ type: "article";
619
+ id: string;
620
+ title: string;
621
+ input_message_content: InputMessageContent;
622
+ reply_markup?: InlineKeyboardMarkup;
623
+ url?: string;
624
+ hide_url?: boolean;
625
+ description?: string;
626
+ thumbnail_url?: string;
627
+ thumbnail_width?: number;
628
+ thumbnail_height?: number;
629
+ }
630
+ interface InlineQueryResultAudio {
631
+ type: "audio";
632
+ id: string;
633
+ audio_url: string;
634
+ title: string;
635
+ caption?: string;
636
+ parse_mode?: "HTML" | "MarkdownV2";
637
+ caption_entities?: MessageEntity[];
638
+ performer?: string;
639
+ audio_duration?: number;
640
+ reply_markup?: InlineKeyboardMarkup;
641
+ input_message_content?: InputMessageContent;
642
+ }
643
+ interface InlineQueryResultCachedAudio {
644
+ type: "audio";
645
+ id: string;
646
+ audio_file_id: string;
647
+ caption?: string;
648
+ parse_mode?: "HTML" | "MarkdownV2";
649
+ caption_entities?: MessageEntity[];
650
+ reply_markup?: InlineKeyboardMarkup;
651
+ input_message_content?: InputMessageContent;
652
+ }
653
+ interface InlineQueryResultCachedDocument {
654
+ type: "document";
655
+ id: string;
656
+ title: string;
657
+ document_file_id: string;
658
+ description?: string;
659
+ caption?: string;
660
+ parse_mode?: "HTML" | "MarkdownV2";
661
+ caption_entities?: MessageEntity[];
662
+ reply_markup?: InlineKeyboardMarkup;
663
+ input_message_content?: InputMessageContent;
664
+ }
665
+ interface InlineQueryResultCachedGif {
666
+ type: "gif";
667
+ id: string;
668
+ gif_file_id: string;
669
+ title?: string;
670
+ caption?: string;
671
+ parse_mode?: "HTML" | "MarkdownV2";
672
+ caption_entities?: MessageEntity[];
673
+ show_caption_above_media?: boolean;
674
+ reply_markup?: InlineKeyboardMarkup;
675
+ input_message_content?: InputMessageContent;
676
+ }
677
+ interface InlineQueryResultCachedMpeg4Gif {
678
+ type: "mpeg4_gif";
679
+ id: string;
680
+ mpeg4_file_id: string;
681
+ title?: string;
682
+ caption?: string;
683
+ parse_mode?: "HTML" | "MarkdownV2";
684
+ caption_entities?: MessageEntity[];
685
+ show_caption_above_media?: boolean;
686
+ reply_markup?: InlineKeyboardMarkup;
687
+ input_message_content?: InputMessageContent;
688
+ }
689
+ interface InlineQueryResultCachedPhoto {
690
+ type: "photo";
691
+ id: string;
692
+ photo_file_id: string;
693
+ title?: string;
694
+ description?: string;
695
+ caption?: string;
696
+ parse_mode?: "HTML" | "MarkdownV2";
697
+ caption_entities?: MessageEntity[];
698
+ show_caption_above_media?: boolean;
699
+ reply_markup?: InlineKeyboardMarkup;
700
+ input_message_content?: InputMessageContent;
701
+ }
702
+ interface InlineQueryResultCachedSticker {
703
+ type: "sticker";
704
+ id: string;
705
+ sticker_file_id: string;
706
+ reply_markup?: InlineKeyboardMarkup;
707
+ input_message_content?: InputMessageContent;
708
+ }
709
+ interface InlineQueryResultCachedVideo {
710
+ type: "video";
711
+ id: string;
712
+ video_file_id: string;
713
+ title: string;
714
+ description?: string;
715
+ caption?: string;
716
+ parse_mode?: "HTML" | "MarkdownV2";
717
+ caption_entities?: MessageEntity[];
718
+ show_caption_above_media?: boolean;
719
+ reply_markup?: InlineKeyboardMarkup;
720
+ input_message_content?: InputMessageContent;
721
+ }
722
+ interface InlineQueryResultCachedVoice {
723
+ type: "voice";
724
+ id: string;
725
+ voice_file_id: string;
726
+ title: string;
727
+ caption?: string;
728
+ parse_mode?: "HTML" | "MarkdownV2";
729
+ caption_entities?: MessageEntity[];
730
+ reply_markup?: InlineKeyboardMarkup;
731
+ input_message_content?: InputMessageContent;
732
+ }
733
+ interface InlineQueryResultContact {
734
+ type: "contact";
735
+ id: string;
736
+ phone_number: string;
737
+ first_name: string;
738
+ last_name?: string;
739
+ vcard?: string;
740
+ reply_markup?: InlineKeyboardMarkup;
741
+ input_message_content?: InputMessageContent;
742
+ thumbnail_url?: string;
743
+ thumbnail_width?: number;
744
+ thumbnail_height?: number;
745
+ }
746
+ interface InlineQueryResultDocument {
747
+ type: "document";
748
+ id: string;
749
+ title: string;
750
+ document_url: string;
751
+ mime_type: string;
752
+ caption?: string;
753
+ parse_mode?: "HTML" | "MarkdownV2";
754
+ caption_entities?: MessageEntity[];
755
+ description?: string;
756
+ reply_markup?: InlineKeyboardMarkup;
757
+ input_message_content?: InputMessageContent;
758
+ thumbnail_url?: string;
759
+ thumbnail_width?: number;
760
+ thumbnail_height?: number;
761
+ }
762
+ interface InlineQueryResultGame {
763
+ type: "game";
764
+ id: string;
765
+ game_short_name: string;
766
+ reply_markup?: InlineKeyboardMarkup;
767
+ }
768
+ interface InlineQueryResultGif {
769
+ type: "gif";
770
+ id: string;
771
+ gif_url: string;
772
+ thumbnail_url: string;
773
+ gif_width?: number;
774
+ gif_height?: number;
775
+ gif_duration?: number;
776
+ thumbnail_mime_type?: "image/jpeg" | "image/gif" | "video/mp4";
777
+ title?: string;
778
+ caption?: string;
779
+ parse_mode?: "HTML" | "MarkdownV2";
780
+ caption_entities?: MessageEntity[];
781
+ show_caption_above_media?: boolean;
782
+ reply_markup?: InlineKeyboardMarkup;
783
+ input_message_content?: InputMessageContent;
784
+ }
785
+ interface InlineQueryResultLocation {
786
+ type: "location";
787
+ id: string;
788
+ latitude: number;
789
+ longitude: number;
790
+ title: string;
791
+ horizontal_accuracy?: number;
792
+ live_period?: number;
793
+ heading?: number;
794
+ proximity_alert_radius?: number;
795
+ reply_markup?: InlineKeyboardMarkup;
796
+ input_message_content?: InputMessageContent;
797
+ thumbnail_url?: string;
798
+ thumbnail_width?: number;
799
+ thumbnail_height?: number;
800
+ }
801
+ interface InlineQueryResultMpeg4Gif {
802
+ type: "mpeg4_gif";
803
+ id: string;
804
+ mpeg4_url: string;
805
+ thumbnail_url: string;
806
+ mpeg4_width?: number;
807
+ mpeg4_height?: number;
808
+ mpeg4_duration?: number;
809
+ thumbnail_mime_type?: "image/jpeg" | "image/gif" | "video/mp4";
810
+ title?: string;
811
+ caption?: string;
812
+ parse_mode?: "HTML" | "MarkdownV2";
813
+ caption_entities?: MessageEntity[];
814
+ show_caption_above_media?: boolean;
815
+ reply_markup?: InlineKeyboardMarkup;
816
+ input_message_content?: InputMessageContent;
817
+ }
818
+ interface InlineQueryResultPhoto {
819
+ type: "photo";
820
+ id: string;
821
+ photo_url: string;
822
+ thumbnail_url: string;
823
+ photo_width?: number;
824
+ photo_height?: number;
825
+ title?: string;
826
+ description?: string;
827
+ caption?: string;
828
+ parse_mode?: "HTML" | "MarkdownV2";
829
+ caption_entities?: MessageEntity[];
830
+ show_caption_above_media?: boolean;
831
+ reply_markup?: InlineKeyboardMarkup;
832
+ input_message_content?: InputMessageContent;
833
+ }
834
+ interface InlineQueryResultsButton {
835
+ text: string;
836
+ web_app?: WebAppInfo;
837
+ start_parameter?: string;
838
+ }
839
+ interface InlineQueryResultVenue {
840
+ type: "venue";
841
+ id: string;
842
+ latitude: number;
843
+ longitude: number;
844
+ title: string;
845
+ address: string;
846
+ foursquare_id?: string;
847
+ foursquare_type?: string;
848
+ google_place_id?: string;
849
+ google_place_type?: string;
850
+ reply_markup?: InlineKeyboardMarkup;
851
+ input_message_content?: InputMessageContent;
852
+ thumbnail_url?: string;
853
+ thumbnail_width?: number;
854
+ thumbnail_height?: number;
855
+ }
856
+ interface InlineQueryResultVideo {
857
+ type: "video";
858
+ id: string;
859
+ video_url: string;
860
+ mime_type: string;
861
+ thumbnail_url: string;
862
+ title: string;
863
+ caption?: string;
864
+ parse_mode?: "HTML" | "MarkdownV2";
865
+ caption_entities?: MessageEntity[];
866
+ show_caption_above_media?: boolean;
867
+ video_width?: number;
868
+ video_height?: number;
869
+ video_duration?: number;
870
+ description?: string;
871
+ reply_markup?: InlineKeyboardMarkup;
872
+ input_message_content?: InputMessageContent;
873
+ }
874
+ interface InlineQueryResultVoice {
875
+ type: "voice";
876
+ id: string;
877
+ voice_url: string;
878
+ title: string;
879
+ caption?: string;
880
+ parse_mode?: "HTML" | "MarkdownV2";
881
+ caption_entities?: MessageEntity[];
882
+ voice_duration?: number;
883
+ reply_markup?: InlineKeyboardMarkup;
884
+ input_message_content?: InputMessageContent;
885
+ }
886
+ interface InputContactMessageContent {
887
+ phone_number: string;
888
+ first_name: string;
889
+ last_name?: string;
890
+ vcard?: string;
891
+ }
892
+ type InputFile = {
893
+ file_content: Uint8Array;
894
+ file_name: string;
895
+ };
896
+ interface InputInvoiceMessageContent {
897
+ title: string;
898
+ description: string;
899
+ payload: string;
900
+ currency: string;
901
+ prices: LabeledPrice[];
902
+ provider_token?: string;
903
+ max_tip_amount?: number;
904
+ suggested_tip_amounts?: number[];
905
+ provider_data?: string;
906
+ photo_url?: string;
907
+ photo_size?: number;
908
+ photo_width?: number;
909
+ photo_height?: number;
910
+ need_name?: boolean;
911
+ need_phone_number?: boolean;
912
+ need_email?: boolean;
913
+ need_shipping_address?: boolean;
914
+ send_phone_number_to_provider?: boolean;
915
+ send_email_to_provider?: boolean;
916
+ is_flexible?: boolean;
917
+ }
918
+ interface InputLocationMessageContent {
919
+ latitude: number;
920
+ longitude: number;
921
+ horizontal_accuracy?: number;
922
+ live_period?: number;
923
+ heading?: number;
924
+ proximity_alert_radius?: number;
925
+ }
926
+ type InputMedia = InputMediaAnimation | InputMediaDocument | InputMediaAudio | InputMediaPhoto | InputMediaVideo;
927
+ interface InputMediaAnimation {
928
+ type: "animation";
929
+ media: string;
930
+ thumbnail?: InputFile | string;
931
+ caption?: string;
932
+ parse_mode?: "HTML" | "MarkdownV2";
933
+ caption_entities?: MessageEntity[];
934
+ show_caption_above_media?: boolean;
935
+ width?: number;
936
+ height?: number;
937
+ duration?: number;
938
+ has_spoiler?: boolean;
939
+ }
940
+ interface InputMediaAudio {
941
+ type: "audio";
942
+ media: string;
943
+ thumbnail?: InputFile | string;
944
+ caption?: string;
945
+ parse_mode?: "HTML" | "MarkdownV2";
946
+ caption_entities?: MessageEntity[];
947
+ duration?: number;
948
+ performer?: string;
949
+ title?: string;
950
+ }
951
+ interface InputMediaDocument {
952
+ type: "document";
953
+ media: string;
954
+ thumbnail?: InputFile | string;
955
+ caption?: string;
956
+ parse_mode?: "HTML" | "MarkdownV2";
957
+ caption_entities?: MessageEntity[];
958
+ disable_content_type_detection?: boolean;
959
+ }
960
+ interface InputMediaPhoto {
961
+ type: "photo";
962
+ media: string;
963
+ caption?: string;
964
+ parse_mode?: "HTML" | "MarkdownV2";
965
+ caption_entities?: MessageEntity[];
966
+ show_caption_above_media?: boolean;
967
+ has_spoiler?: boolean;
968
+ }
969
+ interface InputMediaVideo {
970
+ type: "video";
971
+ media: string;
972
+ thumbnail?: InputFile | string;
973
+ caption?: string;
974
+ parse_mode?: "HTML" | "MarkdownV2";
975
+ caption_entities?: MessageEntity[];
976
+ show_caption_above_media?: boolean;
977
+ width?: number;
978
+ height?: number;
979
+ duration?: number;
980
+ supports_streaming?: boolean;
981
+ has_spoiler?: boolean;
982
+ }
983
+ type InputMessageContent = InputTextMessageContent | InputLocationMessageContent | InputVenueMessageContent | InputContactMessageContent | InputInvoiceMessageContent;
984
+ type InputPaidMedia = InputPaidMediaPhoto | InputPaidMediaVideo;
985
+ interface InputPaidMediaPhoto {
986
+ type: "photo";
987
+ media: string;
988
+ }
989
+ interface InputPaidMediaVideo {
990
+ type: "video";
991
+ media: string;
992
+ thumbnail?: InputFile | string;
993
+ width?: number;
994
+ height?: number;
995
+ duration?: number;
996
+ supports_streaming?: boolean;
997
+ }
998
+ interface InputPollOption {
999
+ text: string;
1000
+ text_parse_mode?: "HTML" | "MarkdownV2";
1001
+ text_entities?: MessageEntity[];
1002
+ }
1003
+ interface InputSticker {
1004
+ sticker: InputFile | string;
1005
+ format: "static" | "animated" | "video";
1006
+ emoji_list: string[];
1007
+ mask_position?: MaskPosition;
1008
+ keywords?: string[];
1009
+ }
1010
+ interface InputTextMessageContent {
1011
+ message_text: string;
1012
+ parse_mode?: "HTML" | "MarkdownV2";
1013
+ entities?: MessageEntity[];
1014
+ link_preview_options?: LinkPreviewOptions;
1015
+ }
1016
+ interface InputVenueMessageContent {
1017
+ latitude: number;
1018
+ longitude: number;
1019
+ title: string;
1020
+ address: string;
1021
+ foursquare_id?: string;
1022
+ foursquare_type?: string;
1023
+ google_place_id?: string;
1024
+ google_place_type?: string;
1025
+ }
1026
+ interface Invoice {
1027
+ title: string;
1028
+ description: string;
1029
+ start_parameter: string;
1030
+ currency: string;
1031
+ total_amount: number;
1032
+ }
1033
+ interface KeyboardButton {
1034
+ text: string;
1035
+ request_users?: KeyboardButtonRequestUsers;
1036
+ request_chat?: KeyboardButtonRequestChat;
1037
+ request_contact?: boolean;
1038
+ request_location?: boolean;
1039
+ request_poll?: KeyboardButtonPollType;
1040
+ web_app?: WebAppInfo;
1041
+ }
1042
+ interface KeyboardButtonPollType {
1043
+ type?: string;
1044
+ }
1045
+ interface KeyboardButtonRequestChat {
1046
+ request_id: number;
1047
+ chat_is_channel: boolean;
1048
+ chat_is_forum?: boolean;
1049
+ chat_has_username?: boolean;
1050
+ chat_is_created?: boolean;
1051
+ user_administrator_rights?: ChatAdministratorRights;
1052
+ bot_administrator_rights?: ChatAdministratorRights;
1053
+ bot_is_member?: boolean;
1054
+ request_title?: boolean;
1055
+ request_username?: boolean;
1056
+ request_photo?: boolean;
1057
+ }
1058
+ interface KeyboardButtonRequestUsers {
1059
+ request_id: number;
1060
+ user_is_bot?: boolean;
1061
+ user_is_premium?: boolean;
1062
+ max_quantity?: number;
1063
+ request_name?: boolean;
1064
+ request_username?: boolean;
1065
+ request_photo?: boolean;
1066
+ }
1067
+ interface LabeledPrice {
1068
+ label: string;
1069
+ amount: number;
1070
+ }
1071
+ interface LinkPreviewOptions {
1072
+ is_disabled?: boolean;
1073
+ url?: string;
1074
+ prefer_small_media?: boolean;
1075
+ prefer_large_media?: boolean;
1076
+ show_above_text?: boolean;
1077
+ }
1078
+ interface Location {
1079
+ latitude: number;
1080
+ longitude: number;
1081
+ horizontal_accuracy?: number;
1082
+ live_period?: number;
1083
+ heading?: number;
1084
+ proximity_alert_radius?: number;
1085
+ }
1086
+ interface LoginUrl {
1087
+ url: string;
1088
+ forward_text?: string;
1089
+ bot_username?: string;
1090
+ request_write_access?: boolean;
1091
+ }
1092
+ interface MaskPosition {
1093
+ point: string;
1094
+ x_shift: number;
1095
+ y_shift: number;
1096
+ scale: number;
1097
+ }
1098
+ type MaybeInaccessibleMessage = Message | InaccessibleMessage;
1099
+ type MenuButton = MenuButtonCommands | MenuButtonWebApp | MenuButtonDefault;
1100
+ interface MenuButtonCommands {
1101
+ type: "commands";
1102
+ }
1103
+ interface MenuButtonDefault {
1104
+ type: "default";
1105
+ }
1106
+ interface MenuButtonWebApp {
1107
+ type: "web_app";
1108
+ text: string;
1109
+ web_app: WebAppInfo;
1110
+ }
1111
+ interface Message {
1112
+ message_id: number;
1113
+ date: number;
1114
+ chat: Chat;
1115
+ message_thread_id?: number;
1116
+ from?: User;
1117
+ sender_chat?: Chat;
1118
+ sender_boost_count?: number;
1119
+ sender_business_bot?: User;
1120
+ business_connection_id?: string;
1121
+ forward_origin?: MessageOrigin;
1122
+ is_topic_message?: boolean;
1123
+ is_automatic_forward?: boolean;
1124
+ reply_to_message?: Message;
1125
+ external_reply?: ExternalReplyInfo;
1126
+ quote?: TextQuote;
1127
+ reply_to_story?: Story;
1128
+ via_bot?: User;
1129
+ edit_date?: number;
1130
+ has_protected_content?: boolean;
1131
+ is_from_offline?: boolean;
1132
+ media_group_id?: string;
1133
+ author_signature?: string;
1134
+ text?: string;
1135
+ entities?: MessageEntity[];
1136
+ link_preview_options?: LinkPreviewOptions;
1137
+ effect_id?: string;
1138
+ animation?: Animation;
1139
+ audio?: Audio;
1140
+ document?: Document;
1141
+ paid_media?: PaidMediaInfo;
1142
+ photo?: PhotoSize[];
1143
+ sticker?: Sticker;
1144
+ story?: Story;
1145
+ video?: Video;
1146
+ video_note?: VideoNote;
1147
+ voice?: Voice;
1148
+ caption?: string;
1149
+ caption_entities?: MessageEntity[];
1150
+ show_caption_above_media?: boolean;
1151
+ has_media_spoiler?: boolean;
1152
+ contact?: Contact;
1153
+ dice?: Dice;
1154
+ game?: Game;
1155
+ poll?: Poll;
1156
+ venue?: Venue;
1157
+ location?: Location;
1158
+ new_chat_members?: User[];
1159
+ left_chat_member?: User;
1160
+ new_chat_title?: string;
1161
+ new_chat_photo?: PhotoSize[];
1162
+ delete_chat_photo?: boolean;
1163
+ group_chat_created?: boolean;
1164
+ supergroup_chat_created?: boolean;
1165
+ channel_chat_created?: boolean;
1166
+ message_auto_delete_timer_changed?: MessageAutoDeleteTimerChanged;
1167
+ migrate_to_chat_id?: number;
1168
+ migrate_from_chat_id?: number;
1169
+ pinned_message?: MaybeInaccessibleMessage;
1170
+ invoice?: Invoice;
1171
+ successful_payment?: SuccessfulPayment;
1172
+ refunded_payment?: RefundedPayment;
1173
+ users_shared?: UsersShared;
1174
+ chat_shared?: ChatShared;
1175
+ connected_website?: string;
1176
+ write_access_allowed?: WriteAccessAllowed;
1177
+ passport_data?: PassportData;
1178
+ proximity_alert_triggered?: ProximityAlertTriggered;
1179
+ boost_added?: ChatBoostAdded;
1180
+ chat_background_set?: ChatBackground;
1181
+ forum_topic_created?: ForumTopicCreated;
1182
+ forum_topic_edited?: ForumTopicEdited;
1183
+ forum_topic_closed?: ForumTopicClosed;
1184
+ forum_topic_reopened?: ForumTopicReopened;
1185
+ general_forum_topic_hidden?: GeneralForumTopicHidden;
1186
+ general_forum_topic_unhidden?: GeneralForumTopicUnhidden;
1187
+ giveaway_created?: GiveawayCreated;
1188
+ giveaway?: Giveaway;
1189
+ giveaway_winners?: GiveawayWinners;
1190
+ giveaway_completed?: GiveawayCompleted;
1191
+ video_chat_scheduled?: VideoChatScheduled;
1192
+ video_chat_started?: VideoChatStarted;
1193
+ video_chat_ended?: VideoChatEnded;
1194
+ video_chat_participants_invited?: VideoChatParticipantsInvited;
1195
+ web_app_data?: WebAppData;
1196
+ reply_markup?: InlineKeyboardMarkup;
1197
+ }
1198
+ interface MessageAutoDeleteTimerChanged {
1199
+ message_auto_delete_time: number;
1200
+ }
1201
+ interface MessageEntity {
1202
+ type: "mention" | "hashtag" | "cashtag" | "bot_command" | "url" | "email" | "phone_number" | "bold" | "italic" | "underline" | "strikethrough" | "spoiler" | "blockquote" | "expandable_blockquote" | "code" | "pre" | "text_link" | "text_mention" | "custom_emoji";
1203
+ offset: number;
1204
+ length: number;
1205
+ url?: string;
1206
+ user?: User;
1207
+ language?: string;
1208
+ custom_emoji_id?: string;
1209
+ }
1210
+ interface MessageId {
1211
+ message_id: number;
1212
+ }
1213
+ type MessageOrigin = MessageOriginUser | MessageOriginHiddenUser | MessageOriginChat | MessageOriginChannel;
1214
+ interface MessageOriginChannel {
1215
+ type: "channel";
1216
+ date: number;
1217
+ chat: Chat;
1218
+ message_id: number;
1219
+ author_signature?: string;
1220
+ }
1221
+ interface MessageOriginChat {
1222
+ type: "chat";
1223
+ date: number;
1224
+ sender_chat: Chat;
1225
+ author_signature?: string;
1226
+ }
1227
+ interface MessageOriginHiddenUser {
1228
+ type: "hidden_user";
1229
+ date: number;
1230
+ sender_user_name: string;
1231
+ }
1232
+ interface MessageOriginUser {
1233
+ type: "user";
1234
+ date: number;
1235
+ sender_user: User;
1236
+ }
1237
+ interface MessageReactionCountUpdated {
1238
+ chat: Chat;
1239
+ message_id: number;
1240
+ date: number;
1241
+ reactions: ReactionCount[];
1242
+ }
1243
+ interface MessageReactionUpdated {
1244
+ chat: Chat;
1245
+ message_id: number;
1246
+ date: number;
1247
+ old_reaction: ReactionType[];
1248
+ new_reaction: ReactionType[];
1249
+ user?: User;
1250
+ actor_chat?: Chat;
1251
+ }
1252
+ interface OrderInfo {
1253
+ name?: string;
1254
+ phone_number?: string;
1255
+ email?: string;
1256
+ shipping_address?: ShippingAddress;
1257
+ }
1258
+ type PaidMedia = PaidMediaPreview | PaidMediaPhoto | PaidMediaVideo;
1259
+ interface PaidMediaInfo {
1260
+ star_count: number;
1261
+ paid_media: PaidMedia[];
1262
+ }
1263
+ interface PaidMediaPhoto {
1264
+ type: "photo";
1265
+ photo: PhotoSize[];
1266
+ }
1267
+ interface PaidMediaPreview {
1268
+ type: "preview";
1269
+ width?: number;
1270
+ height?: number;
1271
+ duration?: number;
1272
+ }
1273
+ interface PaidMediaPurchased {
1274
+ from: User;
1275
+ paid_media_payload: string;
1276
+ }
1277
+ interface PaidMediaVideo {
1278
+ type: "video";
1279
+ video: Video;
1280
+ }
1281
+ interface PassportData {
1282
+ data: EncryptedPassportElement[];
1283
+ credentials: EncryptedCredentials;
1284
+ }
1285
+ type PassportElementError = PassportElementErrorDataField | PassportElementErrorFrontSide | PassportElementErrorReverseSide | PassportElementErrorSelfie | PassportElementErrorFile | PassportElementErrorFiles | PassportElementErrorTranslationFile | PassportElementErrorTranslationFiles | PassportElementErrorUnspecified;
1286
+ interface PassportElementErrorDataField {
1287
+ source: "data";
1288
+ type: "personal_details" | "passport" | "driver_license" | "identity_card" | "internal_passport" | "address";
1289
+ field_name: string;
1290
+ data_hash: string;
1291
+ message: string;
1292
+ }
1293
+ interface PassportElementErrorFile {
1294
+ source: "file";
1295
+ type: "utility_bill" | "bank_statement" | "rental_agreement" | "passport_registration" | "temporary_registration";
1296
+ file_hash: string;
1297
+ message: string;
1298
+ }
1299
+ interface PassportElementErrorFiles {
1300
+ source: "files";
1301
+ type: "utility_bill" | "bank_statement" | "rental_agreement" | "passport_registration" | "temporary_registration";
1302
+ file_hashes: string[];
1303
+ message: string;
1304
+ }
1305
+ interface PassportElementErrorFrontSide {
1306
+ source: "front_side";
1307
+ type: "passport" | "driver_license" | "identity_card" | "internal_passport";
1308
+ file_hash: string;
1309
+ message: string;
1310
+ }
1311
+ interface PassportElementErrorReverseSide {
1312
+ source: "reverse_side";
1313
+ type: "driver_license" | "identity_card";
1314
+ file_hash: string;
1315
+ message: string;
1316
+ }
1317
+ interface PassportElementErrorSelfie {
1318
+ source: "selfie";
1319
+ type: "passport" | "driver_license" | "identity_card" | "internal_passport";
1320
+ file_hash: string;
1321
+ message: string;
1322
+ }
1323
+ interface PassportElementErrorTranslationFile {
1324
+ source: "translation_file";
1325
+ type: "passport" | "driver_license" | "identity_card" | "internal_passport" | "utility_bill" | "bank_statement" | "rental_agreement" | "passport_registration" | "temporary_registration";
1326
+ file_hash: string;
1327
+ message: string;
1328
+ }
1329
+ interface PassportElementErrorTranslationFiles {
1330
+ source: "translation_files";
1331
+ type: "passport" | "driver_license" | "identity_card" | "internal_passport" | "utility_bill" | "bank_statement" | "rental_agreement" | "passport_registration" | "temporary_registration";
1332
+ file_hashes: string[];
1333
+ message: string;
1334
+ }
1335
+ interface PassportElementErrorUnspecified {
1336
+ source: "unspecified";
1337
+ type: string;
1338
+ element_hash: string;
1339
+ message: string;
1340
+ }
1341
+ interface PassportFile {
1342
+ file_id: string;
1343
+ file_unique_id: string;
1344
+ file_size: number;
1345
+ file_date: number;
1346
+ }
1347
+ interface PhotoSize {
1348
+ file_id: string;
1349
+ file_unique_id: string;
1350
+ width: number;
1351
+ height: number;
1352
+ file_size?: number;
1353
+ }
1354
+ interface Poll {
1355
+ id: string;
1356
+ question: string;
1357
+ options: PollOption[];
1358
+ total_voter_count: number;
1359
+ is_closed: boolean;
1360
+ is_anonymous: boolean;
1361
+ type: "regular" | "quiz";
1362
+ allows_multiple_answers: boolean;
1363
+ question_entities?: MessageEntity[];
1364
+ correct_option_id?: number;
1365
+ explanation?: string;
1366
+ explanation_entities?: MessageEntity[];
1367
+ open_period?: number;
1368
+ close_date?: number;
1369
+ }
1370
+ interface PollAnswer {
1371
+ poll_id: string;
1372
+ option_ids: number[];
1373
+ voter_chat?: Chat;
1374
+ user?: User;
1375
+ }
1376
+ interface PollOption {
1377
+ text: string;
1378
+ voter_count: number;
1379
+ text_entities?: MessageEntity[];
1380
+ }
1381
+ interface PreCheckoutQuery {
1382
+ id: string;
1383
+ from: User;
1384
+ currency: string;
1385
+ total_amount: number;
1386
+ invoice_payload: string;
1387
+ shipping_option_id?: string;
1388
+ order_info?: OrderInfo;
1389
+ }
1390
+ interface PreparedInlineMessage {
1391
+ id: string;
1392
+ expiration_date: number;
1393
+ }
1394
+ interface ProximityAlertTriggered {
1395
+ traveler: User;
1396
+ watcher: User;
1397
+ distance: number;
1398
+ }
1399
+ interface ReactionCount {
1400
+ type: ReactionType;
1401
+ total_count: number;
1402
+ }
1403
+ type ReactionType = ReactionTypeEmoji | ReactionTypeCustomEmoji | ReactionTypePaid;
1404
+ interface ReactionTypeCustomEmoji {
1405
+ type: "custom_emoji";
1406
+ custom_emoji_id: string;
1407
+ }
1408
+ interface ReactionTypeEmoji {
1409
+ type: "emoji";
1410
+ emoji: "👍" | "👎" | "❤" | "🔥" | "🥰" | "👏" | "😁" | "🤔" | "🤯" | "😱" | "🤬" | "😢" | "🎉" | "🤩" | "🤮" | "💩" | "🙏" | "👌" | "🕊" | "🤡" | "🥱" | "🥴" | "😍" | "🐳" | "❤‍🔥" | "🌚" | "🌭" | "💯" | "🤣" | "⚡" | "🍌" | "🏆" | "💔" | "🤨" | "😐" | "🍓" | "🍾" | "💋" | "🖕" | "😈" | "😴" | "😭" | "🤓" | "👻" | "👨‍💻" | "👀" | "🎃" | "🙈" | "😇" | "😨" | "🤝" | "✍" | "🤗" | "🫡" | "🎅" | "🎄" | "☃" | "💅" | "🤪" | "🗿" | "🆒" | "💘" | "🙉" | "🦄" | "😘" | "💊" | "🙊" | "😎" | "👾" | "🤷‍♂" | "🤷" | "🤷‍♀" | "😡";
1411
+ }
1412
+ interface ReactionTypePaid {
1413
+ type: "paid";
1414
+ }
1415
+ interface RefundedPayment {
1416
+ currency: "XTR";
1417
+ total_amount: number;
1418
+ invoice_payload: string;
1419
+ telegram_payment_charge_id: string;
1420
+ provider_payment_charge_id?: string;
1421
+ }
1422
+ interface ReplyKeyboardMarkup {
1423
+ keyboard: KeyboardButton[][];
1424
+ is_persistent?: boolean;
1425
+ resize_keyboard?: boolean;
1426
+ one_time_keyboard?: boolean;
1427
+ input_field_placeholder?: string;
1428
+ selective?: boolean;
1429
+ }
1430
+ interface ReplyKeyboardRemove {
1431
+ remove_keyboard: boolean;
1432
+ selective?: boolean;
1433
+ }
1434
+ interface ReplyParameters {
1435
+ message_id: number;
1436
+ chat_id?: number | string;
1437
+ allow_sending_without_reply?: boolean;
1438
+ quote?: string;
1439
+ quote_parse_mode?: "HTML" | "MarkdownV2";
1440
+ quote_entities?: MessageEntity[];
1441
+ quote_position?: number;
1442
+ }
1443
+ interface ResponseParameters {
1444
+ migrate_to_chat_id?: number;
1445
+ retry_after?: number;
1446
+ }
1447
+ type RevenueWithdrawalState = RevenueWithdrawalStatePending | RevenueWithdrawalStateSucceeded | RevenueWithdrawalStateFailed;
1448
+ interface RevenueWithdrawalStateFailed {
1449
+ type: "failed";
1450
+ }
1451
+ interface RevenueWithdrawalStatePending {
1452
+ type: "pending";
1453
+ }
1454
+ interface RevenueWithdrawalStateSucceeded {
1455
+ type: "succeeded";
1456
+ date: number;
1457
+ url: string;
1458
+ }
1459
+ interface SentWebAppMessage {
1460
+ inline_message_id?: string;
1461
+ }
1462
+ interface SharedUser {
1463
+ user_id: number;
1464
+ first_name?: string;
1465
+ last_name?: string;
1466
+ username?: string;
1467
+ photo?: PhotoSize[];
1468
+ }
1469
+ interface ShippingAddress {
1470
+ country_code: string;
1471
+ state: string;
1472
+ city: string;
1473
+ street_line1: string;
1474
+ street_line2: string;
1475
+ post_code: string;
1476
+ }
1477
+ interface ShippingOption {
1478
+ id: string;
1479
+ title: string;
1480
+ prices: LabeledPrice[];
1481
+ }
1482
+ interface ShippingQuery {
1483
+ id: string;
1484
+ from: User;
1485
+ invoice_payload: string;
1486
+ shipping_address: ShippingAddress;
1487
+ }
1488
+ interface StarTransaction {
1489
+ id: string;
1490
+ amount: number;
1491
+ date: number;
1492
+ nanostar_amount?: number;
1493
+ source?: TransactionPartner;
1494
+ receiver?: TransactionPartner;
1495
+ }
1496
+ interface StarTransactions {
1497
+ transactions: StarTransaction[];
1498
+ }
1499
+ interface Sticker {
1500
+ file_id: string;
1501
+ file_unique_id: string;
1502
+ type: "regular" | "mask" | "custom_emoji";
1503
+ width: number;
1504
+ height: number;
1505
+ is_animated: boolean;
1506
+ is_video: boolean;
1507
+ thumbnail?: PhotoSize;
1508
+ emoji?: string;
1509
+ set_name?: string;
1510
+ premium_animation?: File$1;
1511
+ mask_position?: MaskPosition;
1512
+ custom_emoji_id?: string;
1513
+ needs_repainting?: boolean;
1514
+ file_size?: number;
1515
+ }
1516
+ interface StickerSet {
1517
+ name: string;
1518
+ title: string;
1519
+ sticker_type: "regular" | "mask" | "custom_emoji";
1520
+ stickers: Sticker[];
1521
+ thumbnail?: PhotoSize;
1522
+ }
1523
+ interface Story {
1524
+ chat: Chat;
1525
+ id: number;
1526
+ }
1527
+ interface SuccessfulPayment {
1528
+ currency: string;
1529
+ total_amount: number;
1530
+ invoice_payload: string;
1531
+ telegram_payment_charge_id: string;
1532
+ provider_payment_charge_id: string;
1533
+ subscription_expiration_date?: number;
1534
+ is_recurring?: boolean;
1535
+ is_first_recurring?: boolean;
1536
+ shipping_option_id?: string;
1537
+ order_info?: OrderInfo;
1538
+ }
1539
+ interface SwitchInlineQueryChosenChat {
1540
+ query?: string;
1541
+ allow_user_chats?: boolean;
1542
+ allow_bot_chats?: boolean;
1543
+ allow_group_chats?: boolean;
1544
+ allow_channel_chats?: boolean;
1545
+ }
1546
+ interface TextQuote {
1547
+ text: string;
1548
+ position: number;
1549
+ entities?: MessageEntity[];
1550
+ is_manual?: boolean;
1551
+ }
1552
+ type TransactionPartner = TransactionPartnerUser | TransactionPartnerAffiliateProgram | TransactionPartnerFragment | TransactionPartnerTelegramAds | TransactionPartnerTelegramApi | TransactionPartnerOther;
1553
+ interface TransactionPartnerAffiliateProgram {
1554
+ type: "affiliate_program";
1555
+ commission_per_mille: number;
1556
+ sponsor_user?: User;
1557
+ }
1558
+ interface TransactionPartnerFragment {
1559
+ type: "fragment";
1560
+ withdrawal_state?: RevenueWithdrawalState;
1561
+ }
1562
+ interface TransactionPartnerOther {
1563
+ type: "other";
1564
+ }
1565
+ interface TransactionPartnerTelegramAds {
1566
+ type: "telegram_ads";
1567
+ }
1568
+ interface TransactionPartnerTelegramApi {
1569
+ type: "telegram_api";
1570
+ request_count: number;
1571
+ }
1572
+ interface TransactionPartnerUser {
1573
+ type: "user";
1574
+ user: User;
1575
+ affiliate?: AffiliateInfo;
1576
+ invoice_payload?: string;
1577
+ subscription_period?: number;
1578
+ paid_media?: PaidMedia[];
1579
+ paid_media_payload?: string;
1580
+ gift?: Gift;
1581
+ }
1582
+ interface Update {
1583
+ update_id: number;
1584
+ message?: Message;
1585
+ edited_message?: Message;
1586
+ channel_post?: Message;
1587
+ edited_channel_post?: Message;
1588
+ business_connection?: BusinessConnection;
1589
+ business_message?: Message;
1590
+ edited_business_message?: Message;
1591
+ deleted_business_messages?: BusinessMessagesDeleted;
1592
+ message_reaction?: MessageReactionUpdated;
1593
+ message_reaction_count?: MessageReactionCountUpdated;
1594
+ inline_query?: InlineQuery;
1595
+ chosen_inline_result?: ChosenInlineResult;
1596
+ callback_query?: CallbackQuery;
1597
+ shipping_query?: ShippingQuery;
1598
+ pre_checkout_query?: PreCheckoutQuery;
1599
+ purchased_paid_media?: PaidMediaPurchased;
1600
+ poll?: Poll;
1601
+ poll_answer?: PollAnswer;
1602
+ my_chat_member?: ChatMemberUpdated;
1603
+ chat_member?: ChatMemberUpdated;
1604
+ chat_join_request?: ChatJoinRequest;
1605
+ chat_boost?: ChatBoostUpdated;
1606
+ removed_chat_boost?: ChatBoostRemoved;
1607
+ }
1608
+ interface User {
1609
+ id: number;
1610
+ is_bot: boolean;
1611
+ first_name: string;
1612
+ last_name?: string;
1613
+ username?: string;
1614
+ language_code?: string;
1615
+ is_premium?: boolean;
1616
+ added_to_attachment_menu?: boolean;
1617
+ can_join_groups?: boolean;
1618
+ can_read_all_group_messages?: boolean;
1619
+ supports_inline_queries?: boolean;
1620
+ can_connect_to_business?: boolean;
1621
+ has_main_web_app?: boolean;
1622
+ }
1623
+ interface UserChatBoosts {
1624
+ boosts: ChatBoost[];
1625
+ }
1626
+ interface UserProfilePhotos {
1627
+ total_count: number;
1628
+ photos: PhotoSize[][];
1629
+ }
1630
+ interface UsersShared {
1631
+ request_id: number;
1632
+ users: SharedUser[];
1633
+ }
1634
+ interface Venue {
1635
+ location: Location;
1636
+ title: string;
1637
+ address: string;
1638
+ foursquare_id?: string;
1639
+ foursquare_type?: string;
1640
+ google_place_id?: string;
1641
+ google_place_type?: string;
1642
+ }
1643
+ interface Video {
1644
+ file_id: string;
1645
+ file_unique_id: string;
1646
+ width: number;
1647
+ height: number;
1648
+ duration: number;
1649
+ thumbnail?: PhotoSize;
1650
+ file_name?: string;
1651
+ mime_type?: string;
1652
+ file_size?: number;
1653
+ }
1654
+ interface VideoChatEnded {
1655
+ duration: number;
1656
+ }
1657
+ interface VideoChatParticipantsInvited {
1658
+ users: User[];
1659
+ }
1660
+ interface VideoChatScheduled {
1661
+ start_date: number;
1662
+ }
1663
+ type VideoChatStarted = never;
1664
+ interface VideoNote {
1665
+ file_id: string;
1666
+ file_unique_id: string;
1667
+ length: number;
1668
+ duration: number;
1669
+ thumbnail?: PhotoSize;
1670
+ file_size?: number;
1671
+ }
1672
+ interface Voice {
1673
+ file_id: string;
1674
+ file_unique_id: string;
1675
+ duration: number;
1676
+ mime_type?: string;
1677
+ file_size?: number;
1678
+ }
1679
+ interface WebAppData {
1680
+ data: string;
1681
+ button_text: string;
1682
+ }
1683
+ interface WebAppInfo {
1684
+ url: string;
1685
+ }
1686
+ interface WebhookInfo {
1687
+ url: string;
1688
+ has_custom_certificate: boolean;
1689
+ pending_update_count: number;
1690
+ ip_address?: string;
1691
+ last_error_date?: number;
1692
+ last_error_message?: string;
1693
+ last_synchronization_error_date?: number;
1694
+ max_connections?: number;
1695
+ allowed_updates?: string[];
1696
+ }
1697
+ interface WriteAccessAllowed {
1698
+ from_request?: boolean;
1699
+ web_app_name?: string;
1700
+ from_attachment_menu?: boolean;
1701
+ }
1702
+
1703
+ interface Api {
1704
+ add_sticker_to_set(_: AddStickerToSetInput): boolean;
1705
+ answer_callback_query(_: AnswerCallbackQueryInput): boolean;
1706
+ answer_inline_query(_: AnswerInlineQueryInput): boolean;
1707
+ answer_pre_checkout_query(_: AnswerPreCheckoutQueryInput): boolean;
1708
+ answer_shipping_query(_: AnswerShippingQueryInput): boolean;
1709
+ answer_web_app_query(_: AnswerWebAppQueryInput): SentWebAppMessage;
1710
+ approve_chat_join_request(_: ApproveChatJoinRequestInput): boolean;
1711
+ ban_chat_member(_: BanChatMemberInput): boolean;
1712
+ ban_chat_sender_chat(_: BanChatSenderChatInput): boolean;
1713
+ close(_: CloseInput): boolean;
1714
+ close_forum_topic(_: CloseForumTopicInput): boolean;
1715
+ close_general_forum_topic(_: CloseGeneralForumTopicInput): boolean;
1716
+ copy_message(_: CopyMessageInput): MessageId;
1717
+ copy_messages(_: CopyMessagesInput): MessageId[];
1718
+ create_chat_invite_link(_: CreateChatInviteLinkInput): ChatInviteLink;
1719
+ create_chat_subscription_invite_link(_: CreateChatSubscriptionInviteLinkInput): ChatInviteLink;
1720
+ create_forum_topic(_: CreateForumTopicInput): ForumTopic;
1721
+ create_invoice_link(_: CreateInvoiceLinkInput): string;
1722
+ create_new_sticker_set(_: CreateNewStickerSetInput): boolean;
1723
+ decline_chat_join_request(_: DeclineChatJoinRequestInput): boolean;
1724
+ delete_chat_photo(_: DeleteChatPhotoInput): boolean;
1725
+ delete_chat_sticker_set(_: DeleteChatStickerSetInput): boolean;
1726
+ delete_forum_topic(_: DeleteForumTopicInput): boolean;
1727
+ delete_message(_: DeleteMessageInput): boolean;
1728
+ delete_messages(_: DeleteMessagesInput): boolean;
1729
+ delete_my_commands(_: DeleteMyCommandsInput): boolean;
1730
+ delete_sticker_from_set(_: DeleteStickerFromSetInput): boolean;
1731
+ delete_sticker_set(_: DeleteStickerSetInput): boolean;
1732
+ delete_webhook(_: DeleteWebhookInput): boolean;
1733
+ edit_chat_invite_link(_: EditChatInviteLinkInput): ChatInviteLink;
1734
+ edit_chat_subscription_invite_link(_: EditChatSubscriptionInviteLinkInput): ChatInviteLink;
1735
+ edit_forum_topic(_: EditForumTopicInput): boolean;
1736
+ edit_general_forum_topic(_: EditGeneralForumTopicInput): boolean;
1737
+ edit_message_caption(_: EditMessageCaptionInput): Message | boolean;
1738
+ edit_message_live_location(_: EditMessageLiveLocationInput): Message | boolean;
1739
+ edit_message_media(_: EditMessageMediaInput): Message | boolean;
1740
+ edit_message_reply_markup(_: EditMessageReplyMarkupInput): Message | boolean;
1741
+ edit_message_text(_: EditMessageTextInput): Message | boolean;
1742
+ edit_user_star_subscription(_: EditUserStarSubscriptionInput): boolean;
1743
+ export_chat_invite_link(_: ExportChatInviteLinkInput): string;
1744
+ forward_message(_: ForwardMessageInput): Message;
1745
+ forward_messages(_: ForwardMessagesInput): MessageId[];
1746
+ get_available_gifts(_: GetAvailableGiftsInput): Gifts;
1747
+ get_business_connection(_: GetBusinessConnectionInput): BusinessConnection;
1748
+ get_chat(_: GetChatInput): ChatFullInfo;
1749
+ get_chat_administrators(_: GetChatAdministratorsInput): ChatMember[];
1750
+ get_chat_member(_: GetChatMemberInput): ChatMember;
1751
+ get_chat_member_count(_: GetChatMemberCountInput): number;
1752
+ get_chat_menu_button(_: GetChatMenuButtonInput): MenuButton;
1753
+ get_custom_emoji_stickers(_: GetCustomEmojiStickersInput): Sticker[];
1754
+ get_file(_: GetFileInput): File$1;
1755
+ get_forum_topic_icon_stickers(_: GetForumTopicIconStickersInput): Sticker[];
1756
+ get_game_high_scores(_: GetGameHighScoresInput): GameHighScore[];
1757
+ get_me(_: GetMeInput): User;
1758
+ get_my_commands(_: GetMyCommandsInput): BotCommand[];
1759
+ get_my_default_administrator_rights(_: GetMyDefaultAdministratorRightsInput): ChatAdministratorRights;
1760
+ get_my_description(_: GetMyDescriptionInput): BotDescription;
1761
+ get_my_name(_: GetMyNameInput): BotName;
1762
+ get_my_short_description(_: GetMyShortDescriptionInput): BotShortDescription;
1763
+ get_star_transactions(_: GetStarTransactionsInput): StarTransactions;
1764
+ get_sticker_set(_: GetStickerSetInput): StickerSet;
1765
+ get_updates(_: GetUpdatesInput): Update[];
1766
+ get_user_chat_boosts(_: GetUserChatBoostsInput): UserChatBoosts;
1767
+ get_user_profile_photos(_: GetUserProfilePhotosInput): UserProfilePhotos;
1768
+ get_webhook_info(_: GetWebhookInfoInput): WebhookInfo;
1769
+ hide_general_forum_topic(_: HideGeneralForumTopicInput): boolean;
1770
+ leave_chat(_: LeaveChatInput): boolean;
1771
+ log_out(_: LogOutInput): boolean;
1772
+ pin_chat_message(_: PinChatMessageInput): boolean;
1773
+ promote_chat_member(_: PromoteChatMemberInput): boolean;
1774
+ refund_star_payment(_: RefundStarPaymentInput): boolean;
1775
+ reopen_forum_topic(_: ReopenForumTopicInput): boolean;
1776
+ reopen_general_forum_topic(_: ReopenGeneralForumTopicInput): boolean;
1777
+ replace_sticker_in_set(_: ReplaceStickerInSetInput): boolean;
1778
+ restrict_chat_member(_: RestrictChatMemberInput): boolean;
1779
+ revoke_chat_invite_link(_: RevokeChatInviteLinkInput): ChatInviteLink;
1780
+ save_prepared_inline_message(_: SavePreparedInlineMessageInput): PreparedInlineMessage;
1781
+ send_animation(_: SendAnimationInput): Message;
1782
+ send_audio(_: SendAudioInput): Message;
1783
+ send_chat_action(_: SendChatActionInput): boolean;
1784
+ send_contact(_: SendContactInput): Message;
1785
+ send_dice(_: SendDiceInput): Message;
1786
+ send_document(_: SendDocumentInput): Message;
1787
+ send_game(_: SendGameInput): Message;
1788
+ send_gift(_: SendGiftInput): boolean;
1789
+ send_invoice(_: SendInvoiceInput): Message;
1790
+ send_location(_: SendLocationInput): Message;
1791
+ send_media_group(_: SendMediaGroupInput): Message[];
1792
+ send_message(_: SendMessageInput): Message;
1793
+ send_paid_media(_: SendPaidMediaInput): Message;
1794
+ send_photo(_: SendPhotoInput): Message;
1795
+ send_poll(_: SendPollInput): Message;
1796
+ send_sticker(_: SendStickerInput): Message;
1797
+ send_venue(_: SendVenueInput): Message;
1798
+ send_video(_: SendVideoInput): Message;
1799
+ send_video_note(_: SendVideoNoteInput): Message;
1800
+ send_voice(_: SendVoiceInput): Message;
1801
+ set_chat_administrator_custom_title(_: SetChatAdministratorCustomTitleInput): boolean;
1802
+ set_chat_description(_: SetChatDescriptionInput): boolean;
1803
+ set_chat_menu_button(_: SetChatMenuButtonInput): boolean;
1804
+ set_chat_permissions(_: SetChatPermissionsInput): boolean;
1805
+ set_chat_photo(_: SetChatPhotoInput): boolean;
1806
+ set_chat_sticker_set(_: SetChatStickerSetInput): boolean;
1807
+ set_chat_title(_: SetChatTitleInput): boolean;
1808
+ set_custom_emoji_sticker_set_thumbnail(_: SetCustomEmojiStickerSetThumbnailInput): boolean;
1809
+ set_game_score(_: SetGameScoreInput): Message | boolean;
1810
+ set_message_reaction(_: SetMessageReactionInput): boolean;
1811
+ set_my_commands(_: SetMyCommandsInput): boolean;
1812
+ set_my_default_administrator_rights(_: SetMyDefaultAdministratorRightsInput): boolean;
1813
+ set_my_description(_: SetMyDescriptionInput): boolean;
1814
+ set_my_name(_: SetMyNameInput): boolean;
1815
+ set_my_short_description(_: SetMyShortDescriptionInput): boolean;
1816
+ set_passport_data_errors(_: SetPassportDataErrorsInput): boolean;
1817
+ set_sticker_emoji_list(_: SetStickerEmojiListInput): boolean;
1818
+ set_sticker_keywords(_: SetStickerKeywordsInput): boolean;
1819
+ set_sticker_mask_position(_: SetStickerMaskPositionInput): boolean;
1820
+ set_sticker_position_in_set(_: SetStickerPositionInSetInput): boolean;
1821
+ set_sticker_set_thumbnail(_: SetStickerSetThumbnailInput): boolean;
1822
+ set_sticker_set_title(_: SetStickerSetTitleInput): boolean;
1823
+ set_user_emoji_status(_: SetUserEmojiStatusInput): boolean;
1824
+ set_webhook(_: SetWebhookInput): boolean;
1825
+ stop_message_live_location(_: StopMessageLiveLocationInput): Message | boolean;
1826
+ stop_poll(_: StopPollInput): Poll;
1827
+ unban_chat_member(_: UnbanChatMemberInput): boolean;
1828
+ unban_chat_sender_chat(_: UnbanChatSenderChatInput): boolean;
1829
+ unhide_general_forum_topic(_: UnhideGeneralForumTopicInput): boolean;
1830
+ unpin_all_chat_messages(_: UnpinAllChatMessagesInput): boolean;
1831
+ unpin_all_forum_topic_messages(_: UnpinAllForumTopicMessagesInput): boolean;
1832
+ unpin_all_general_forum_topic_messages(_: UnpinAllGeneralForumTopicMessagesInput): boolean;
1833
+ unpin_chat_message(_: UnpinChatMessageInput): boolean;
1834
+ upload_sticker_file(_: UploadStickerFileInput): File$1;
1835
+ }
1836
+ interface AddStickerToSetInput {
1837
+ user_id: number;
1838
+ name: string;
1839
+ sticker: InputSticker;
1840
+ }
1841
+ interface AnswerCallbackQueryInput {
1842
+ callback_query_id: string;
1843
+ text?: string;
1844
+ show_alert?: boolean;
1845
+ url?: string;
1846
+ cache_time?: number;
1847
+ }
1848
+ interface AnswerInlineQueryInput {
1849
+ inline_query_id: string;
1850
+ results: InlineQueryResult[];
1851
+ cache_time?: number;
1852
+ is_personal?: boolean;
1853
+ next_offset?: string;
1854
+ button?: InlineQueryResultsButton;
1855
+ }
1856
+ interface AnswerPreCheckoutQueryInput {
1857
+ pre_checkout_query_id: string;
1858
+ ok: boolean;
1859
+ error_message?: string;
1860
+ }
1861
+ interface AnswerShippingQueryInput {
1862
+ shipping_query_id: string;
1863
+ ok: boolean;
1864
+ shipping_options?: ShippingOption[];
1865
+ error_message?: string;
1866
+ }
1867
+ interface AnswerWebAppQueryInput {
1868
+ web_app_query_id: string;
1869
+ result: InlineQueryResult;
1870
+ }
1871
+ interface ApproveChatJoinRequestInput {
1872
+ chat_id: number | string;
1873
+ user_id: number;
1874
+ }
1875
+ interface BanChatMemberInput {
1876
+ chat_id: number | string;
1877
+ user_id: number;
1878
+ until_date?: number;
1879
+ revoke_messages?: boolean;
1880
+ }
1881
+ interface BanChatSenderChatInput {
1882
+ chat_id: number | string;
1883
+ sender_chat_id: number;
1884
+ }
1885
+ interface CloseInput {
1886
+ }
1887
+ interface CloseForumTopicInput {
1888
+ chat_id: number | string;
1889
+ message_thread_id: number;
1890
+ }
1891
+ interface CloseGeneralForumTopicInput {
1892
+ chat_id: number | string;
1893
+ }
1894
+ interface CopyMessageInput {
1895
+ chat_id: number | string;
1896
+ from_chat_id: number | string;
1897
+ message_id: number;
1898
+ message_thread_id?: number;
1899
+ caption?: string;
1900
+ parse_mode?: "HTML" | "MarkdownV2";
1901
+ caption_entities?: MessageEntity[];
1902
+ show_caption_above_media?: boolean;
1903
+ disable_notification?: boolean;
1904
+ protect_content?: boolean;
1905
+ allow_paid_broadcast?: boolean;
1906
+ reply_parameters?: ReplyParameters;
1907
+ reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
1908
+ }
1909
+ interface CopyMessagesInput {
1910
+ chat_id: number | string;
1911
+ from_chat_id: number | string;
1912
+ message_ids: number[];
1913
+ message_thread_id?: number;
1914
+ disable_notification?: boolean;
1915
+ protect_content?: boolean;
1916
+ remove_caption?: boolean;
1917
+ }
1918
+ interface CreateChatInviteLinkInput {
1919
+ chat_id: number | string;
1920
+ name?: string;
1921
+ expire_date?: number;
1922
+ member_limit?: number;
1923
+ creates_join_request?: boolean;
1924
+ }
1925
+ interface CreateChatSubscriptionInviteLinkInput {
1926
+ chat_id: number | string;
1927
+ subscription_period: number;
1928
+ subscription_price: number;
1929
+ name?: string;
1930
+ }
1931
+ interface CreateForumTopicInput {
1932
+ chat_id: number | string;
1933
+ name: string;
1934
+ icon_color?: number;
1935
+ icon_custom_emoji_id?: string;
1936
+ }
1937
+ interface CreateInvoiceLinkInput {
1938
+ title: string;
1939
+ description: string;
1940
+ payload: string;
1941
+ currency: string;
1942
+ prices: LabeledPrice[];
1943
+ business_connection_id?: string;
1944
+ provider_token?: string;
1945
+ subscription_period?: number;
1946
+ max_tip_amount?: number;
1947
+ suggested_tip_amounts?: number[];
1948
+ provider_data?: string;
1949
+ photo_url?: string;
1950
+ photo_size?: number;
1951
+ photo_width?: number;
1952
+ photo_height?: number;
1953
+ need_name?: boolean;
1954
+ need_phone_number?: boolean;
1955
+ need_email?: boolean;
1956
+ need_shipping_address?: boolean;
1957
+ send_phone_number_to_provider?: boolean;
1958
+ send_email_to_provider?: boolean;
1959
+ is_flexible?: boolean;
1960
+ }
1961
+ interface CreateNewStickerSetInput {
1962
+ user_id: number;
1963
+ name: string;
1964
+ title: string;
1965
+ stickers: InputSticker[];
1966
+ sticker_type?: string;
1967
+ needs_repainting?: boolean;
1968
+ }
1969
+ interface DeclineChatJoinRequestInput {
1970
+ chat_id: number | string;
1971
+ user_id: number;
1972
+ }
1973
+ interface DeleteChatPhotoInput {
1974
+ chat_id: number | string;
1975
+ }
1976
+ interface DeleteChatStickerSetInput {
1977
+ chat_id: number | string;
1978
+ }
1979
+ interface DeleteForumTopicInput {
1980
+ chat_id: number | string;
1981
+ message_thread_id: number;
1982
+ }
1983
+ interface DeleteMessageInput {
1984
+ chat_id: number | string;
1985
+ message_id: number;
1986
+ }
1987
+ interface DeleteMessagesInput {
1988
+ chat_id: number | string;
1989
+ message_ids: number[];
1990
+ }
1991
+ interface DeleteMyCommandsInput {
1992
+ scope?: BotCommandScope;
1993
+ language_code?: string;
1994
+ }
1995
+ interface DeleteStickerFromSetInput {
1996
+ sticker: string;
1997
+ }
1998
+ interface DeleteStickerSetInput {
1999
+ name: string;
2000
+ }
2001
+ interface DeleteWebhookInput {
2002
+ drop_pending_updates?: boolean;
2003
+ }
2004
+ interface EditChatInviteLinkInput {
2005
+ chat_id: number | string;
2006
+ invite_link: string;
2007
+ name?: string;
2008
+ expire_date?: number;
2009
+ member_limit?: number;
2010
+ creates_join_request?: boolean;
2011
+ }
2012
+ interface EditChatSubscriptionInviteLinkInput {
2013
+ chat_id: number | string;
2014
+ invite_link: string;
2015
+ name?: string;
2016
+ }
2017
+ interface EditForumTopicInput {
2018
+ chat_id: number | string;
2019
+ message_thread_id: number;
2020
+ name?: string;
2021
+ icon_custom_emoji_id?: string;
2022
+ }
2023
+ interface EditGeneralForumTopicInput {
2024
+ chat_id: number | string;
2025
+ name: string;
2026
+ }
2027
+ interface EditMessageCaptionInput {
2028
+ business_connection_id?: string;
2029
+ chat_id?: number | string;
2030
+ message_id?: number;
2031
+ inline_message_id?: string;
2032
+ caption?: string;
2033
+ parse_mode?: "HTML" | "MarkdownV2";
2034
+ caption_entities?: MessageEntity[];
2035
+ show_caption_above_media?: boolean;
2036
+ reply_markup?: InlineKeyboardMarkup;
2037
+ }
2038
+ interface EditMessageLiveLocationInput {
2039
+ latitude: number;
2040
+ longitude: number;
2041
+ business_connection_id?: string;
2042
+ chat_id?: number | string;
2043
+ message_id?: number;
2044
+ inline_message_id?: string;
2045
+ live_period?: number;
2046
+ horizontal_accuracy?: number;
2047
+ heading?: number;
2048
+ proximity_alert_radius?: number;
2049
+ reply_markup?: InlineKeyboardMarkup;
2050
+ }
2051
+ interface EditMessageMediaInput {
2052
+ media: InputMedia;
2053
+ business_connection_id?: string;
2054
+ chat_id?: number | string;
2055
+ message_id?: number;
2056
+ inline_message_id?: string;
2057
+ reply_markup?: InlineKeyboardMarkup;
2058
+ }
2059
+ interface EditMessageReplyMarkupInput {
2060
+ business_connection_id?: string;
2061
+ chat_id?: number | string;
2062
+ message_id?: number;
2063
+ inline_message_id?: string;
2064
+ reply_markup?: InlineKeyboardMarkup;
2065
+ }
2066
+ interface EditMessageTextInput {
2067
+ text: string;
2068
+ business_connection_id?: string;
2069
+ chat_id?: number | string;
2070
+ message_id?: number;
2071
+ inline_message_id?: string;
2072
+ parse_mode?: "HTML" | "MarkdownV2";
2073
+ entities?: MessageEntity[];
2074
+ link_preview_options?: LinkPreviewOptions;
2075
+ reply_markup?: InlineKeyboardMarkup;
2076
+ }
2077
+ interface EditUserStarSubscriptionInput {
2078
+ user_id: number;
2079
+ telegram_payment_charge_id: string;
2080
+ is_canceled: boolean;
2081
+ }
2082
+ interface ExportChatInviteLinkInput {
2083
+ chat_id: number | string;
2084
+ }
2085
+ interface ForwardMessageInput {
2086
+ chat_id: number | string;
2087
+ from_chat_id: number | string;
2088
+ message_id: number;
2089
+ message_thread_id?: number;
2090
+ disable_notification?: boolean;
2091
+ protect_content?: boolean;
2092
+ }
2093
+ interface ForwardMessagesInput {
2094
+ chat_id: number | string;
2095
+ from_chat_id: number | string;
2096
+ message_ids: number[];
2097
+ message_thread_id?: number;
2098
+ disable_notification?: boolean;
2099
+ protect_content?: boolean;
2100
+ }
2101
+ interface GetAvailableGiftsInput {
2102
+ }
2103
+ interface GetBusinessConnectionInput {
2104
+ business_connection_id: string;
2105
+ }
2106
+ interface GetChatInput {
2107
+ chat_id: number | string;
2108
+ }
2109
+ interface GetChatAdministratorsInput {
2110
+ chat_id: number | string;
2111
+ }
2112
+ interface GetChatMemberInput {
2113
+ chat_id: number | string;
2114
+ user_id: number;
2115
+ }
2116
+ interface GetChatMemberCountInput {
2117
+ chat_id: number | string;
2118
+ }
2119
+ interface GetChatMenuButtonInput {
2120
+ chat_id?: number;
2121
+ }
2122
+ interface GetCustomEmojiStickersInput {
2123
+ custom_emoji_ids: string[];
2124
+ }
2125
+ interface GetFileInput {
2126
+ file_id: string;
2127
+ }
2128
+ interface GetForumTopicIconStickersInput {
2129
+ }
2130
+ interface GetGameHighScoresInput {
2131
+ user_id: number;
2132
+ chat_id?: number;
2133
+ message_id?: number;
2134
+ inline_message_id?: string;
2135
+ }
2136
+ interface GetMeInput {
2137
+ }
2138
+ interface GetMyCommandsInput {
2139
+ scope?: BotCommandScope;
2140
+ language_code?: string;
2141
+ }
2142
+ interface GetMyDefaultAdministratorRightsInput {
2143
+ for_channels?: boolean;
2144
+ }
2145
+ interface GetMyDescriptionInput {
2146
+ language_code?: string;
2147
+ }
2148
+ interface GetMyNameInput {
2149
+ language_code?: string;
2150
+ }
2151
+ interface GetMyShortDescriptionInput {
2152
+ language_code?: string;
2153
+ }
2154
+ interface GetStarTransactionsInput {
2155
+ offset?: number;
2156
+ limit?: number;
2157
+ }
2158
+ interface GetStickerSetInput {
2159
+ name: string;
2160
+ }
2161
+ interface GetUpdatesInput {
2162
+ offset?: number;
2163
+ limit?: number;
2164
+ timeout?: number;
2165
+ allowed_updates?: string[];
2166
+ }
2167
+ interface GetUserChatBoostsInput {
2168
+ chat_id: number | string;
2169
+ user_id: number;
2170
+ }
2171
+ interface GetUserProfilePhotosInput {
2172
+ user_id: number;
2173
+ offset?: number;
2174
+ limit?: number;
2175
+ }
2176
+ interface GetWebhookInfoInput {
2177
+ }
2178
+ interface HideGeneralForumTopicInput {
2179
+ chat_id: number | string;
2180
+ }
2181
+ interface LeaveChatInput {
2182
+ chat_id: number | string;
2183
+ }
2184
+ interface LogOutInput {
2185
+ }
2186
+ interface PinChatMessageInput {
2187
+ chat_id: number | string;
2188
+ message_id: number;
2189
+ business_connection_id?: string;
2190
+ disable_notification?: boolean;
2191
+ }
2192
+ interface PromoteChatMemberInput {
2193
+ chat_id: number | string;
2194
+ user_id: number;
2195
+ is_anonymous?: boolean;
2196
+ can_manage_chat?: boolean;
2197
+ can_delete_messages?: boolean;
2198
+ can_manage_video_chats?: boolean;
2199
+ can_restrict_members?: boolean;
2200
+ can_promote_members?: boolean;
2201
+ can_change_info?: boolean;
2202
+ can_invite_users?: boolean;
2203
+ can_post_stories?: boolean;
2204
+ can_edit_stories?: boolean;
2205
+ can_delete_stories?: boolean;
2206
+ can_post_messages?: boolean;
2207
+ can_edit_messages?: boolean;
2208
+ can_pin_messages?: boolean;
2209
+ can_manage_topics?: boolean;
2210
+ }
2211
+ interface RefundStarPaymentInput {
2212
+ user_id: number;
2213
+ telegram_payment_charge_id: string;
2214
+ }
2215
+ interface ReopenForumTopicInput {
2216
+ chat_id: number | string;
2217
+ message_thread_id: number;
2218
+ }
2219
+ interface ReopenGeneralForumTopicInput {
2220
+ chat_id: number | string;
2221
+ }
2222
+ interface ReplaceStickerInSetInput {
2223
+ user_id: number;
2224
+ name: string;
2225
+ old_sticker: string;
2226
+ sticker: InputSticker;
2227
+ }
2228
+ interface RestrictChatMemberInput {
2229
+ chat_id: number | string;
2230
+ user_id: number;
2231
+ permissions: ChatPermissions;
2232
+ use_independent_chat_permissions?: boolean;
2233
+ until_date?: number;
2234
+ }
2235
+ interface RevokeChatInviteLinkInput {
2236
+ chat_id: number | string;
2237
+ invite_link: string;
2238
+ }
2239
+ interface SavePreparedInlineMessageInput {
2240
+ user_id: number;
2241
+ result: InlineQueryResult;
2242
+ allow_user_chats?: boolean;
2243
+ allow_bot_chats?: boolean;
2244
+ allow_group_chats?: boolean;
2245
+ allow_channel_chats?: boolean;
2246
+ }
2247
+ interface SendAnimationInput {
2248
+ chat_id: number | string;
2249
+ animation: InputFile | string;
2250
+ business_connection_id?: string;
2251
+ message_thread_id?: number;
2252
+ duration?: number;
2253
+ width?: number;
2254
+ height?: number;
2255
+ thumbnail?: InputFile | string;
2256
+ caption?: string;
2257
+ parse_mode?: "HTML" | "MarkdownV2";
2258
+ caption_entities?: MessageEntity[];
2259
+ show_caption_above_media?: boolean;
2260
+ has_spoiler?: boolean;
2261
+ disable_notification?: boolean;
2262
+ protect_content?: boolean;
2263
+ allow_paid_broadcast?: boolean;
2264
+ message_effect_id?: string;
2265
+ reply_parameters?: ReplyParameters;
2266
+ reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
2267
+ }
2268
+ interface SendAudioInput {
2269
+ chat_id: number | string;
2270
+ audio: InputFile | string;
2271
+ business_connection_id?: string;
2272
+ message_thread_id?: number;
2273
+ caption?: string;
2274
+ parse_mode?: "HTML" | "MarkdownV2";
2275
+ caption_entities?: MessageEntity[];
2276
+ duration?: number;
2277
+ performer?: string;
2278
+ title?: string;
2279
+ thumbnail?: InputFile | string;
2280
+ disable_notification?: boolean;
2281
+ protect_content?: boolean;
2282
+ allow_paid_broadcast?: boolean;
2283
+ message_effect_id?: string;
2284
+ reply_parameters?: ReplyParameters;
2285
+ reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
2286
+ }
2287
+ interface SendChatActionInput {
2288
+ chat_id: number | string;
2289
+ action: string;
2290
+ business_connection_id?: string;
2291
+ message_thread_id?: number;
2292
+ }
2293
+ interface SendContactInput {
2294
+ chat_id: number | string;
2295
+ phone_number: string;
2296
+ first_name: string;
2297
+ business_connection_id?: string;
2298
+ message_thread_id?: number;
2299
+ last_name?: string;
2300
+ vcard?: string;
2301
+ disable_notification?: boolean;
2302
+ protect_content?: boolean;
2303
+ allow_paid_broadcast?: boolean;
2304
+ message_effect_id?: string;
2305
+ reply_parameters?: ReplyParameters;
2306
+ reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
2307
+ }
2308
+ interface SendDiceInput {
2309
+ chat_id: number | string;
2310
+ business_connection_id?: string;
2311
+ message_thread_id?: number;
2312
+ emoji?: "🎲" | "🎯" | "🏀" | "⚽" | "🎳" | "🎰";
2313
+ disable_notification?: boolean;
2314
+ protect_content?: boolean;
2315
+ allow_paid_broadcast?: boolean;
2316
+ message_effect_id?: string;
2317
+ reply_parameters?: ReplyParameters;
2318
+ reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
2319
+ }
2320
+ interface SendDocumentInput {
2321
+ chat_id: number | string;
2322
+ document: InputFile | string;
2323
+ business_connection_id?: string;
2324
+ message_thread_id?: number;
2325
+ thumbnail?: InputFile | string;
2326
+ caption?: string;
2327
+ parse_mode?: "HTML" | "MarkdownV2";
2328
+ caption_entities?: MessageEntity[];
2329
+ disable_content_type_detection?: boolean;
2330
+ disable_notification?: boolean;
2331
+ protect_content?: boolean;
2332
+ allow_paid_broadcast?: boolean;
2333
+ message_effect_id?: string;
2334
+ reply_parameters?: ReplyParameters;
2335
+ reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
2336
+ }
2337
+ interface SendGameInput {
2338
+ chat_id: number;
2339
+ game_short_name: string;
2340
+ business_connection_id?: string;
2341
+ message_thread_id?: number;
2342
+ disable_notification?: boolean;
2343
+ protect_content?: boolean;
2344
+ allow_paid_broadcast?: boolean;
2345
+ message_effect_id?: string;
2346
+ reply_parameters?: ReplyParameters;
2347
+ reply_markup?: InlineKeyboardMarkup;
2348
+ }
2349
+ interface SendGiftInput {
2350
+ user_id: number;
2351
+ gift_id: string;
2352
+ text?: string;
2353
+ text_parse_mode?: "HTML" | "MarkdownV2";
2354
+ text_entities?: MessageEntity[];
2355
+ }
2356
+ interface SendInvoiceInput {
2357
+ chat_id: number | string;
2358
+ title: string;
2359
+ description: string;
2360
+ payload: string;
2361
+ currency: string;
2362
+ prices: LabeledPrice[];
2363
+ message_thread_id?: number;
2364
+ provider_token?: string;
2365
+ max_tip_amount?: number;
2366
+ suggested_tip_amounts?: number[];
2367
+ start_parameter?: string;
2368
+ provider_data?: string;
2369
+ photo_url?: string;
2370
+ photo_size?: number;
2371
+ photo_width?: number;
2372
+ photo_height?: number;
2373
+ need_name?: boolean;
2374
+ need_phone_number?: boolean;
2375
+ need_email?: boolean;
2376
+ need_shipping_address?: boolean;
2377
+ send_phone_number_to_provider?: boolean;
2378
+ send_email_to_provider?: boolean;
2379
+ is_flexible?: boolean;
2380
+ disable_notification?: boolean;
2381
+ protect_content?: boolean;
2382
+ allow_paid_broadcast?: boolean;
2383
+ message_effect_id?: string;
2384
+ reply_parameters?: ReplyParameters;
2385
+ reply_markup?: InlineKeyboardMarkup;
2386
+ }
2387
+ interface SendLocationInput {
2388
+ chat_id: number | string;
2389
+ latitude: number;
2390
+ longitude: number;
2391
+ business_connection_id?: string;
2392
+ message_thread_id?: number;
2393
+ horizontal_accuracy?: number;
2394
+ live_period?: number;
2395
+ heading?: number;
2396
+ proximity_alert_radius?: number;
2397
+ disable_notification?: boolean;
2398
+ protect_content?: boolean;
2399
+ allow_paid_broadcast?: boolean;
2400
+ message_effect_id?: string;
2401
+ reply_parameters?: ReplyParameters;
2402
+ reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
2403
+ }
2404
+ interface SendMediaGroupInput {
2405
+ chat_id: number | string;
2406
+ media: (InputMediaAudio | InputMediaDocument | InputMediaPhoto | InputMediaVideo)[];
2407
+ business_connection_id?: string;
2408
+ message_thread_id?: number;
2409
+ disable_notification?: boolean;
2410
+ protect_content?: boolean;
2411
+ allow_paid_broadcast?: boolean;
2412
+ message_effect_id?: string;
2413
+ reply_parameters?: ReplyParameters;
2414
+ }
2415
+ interface SendMessageInput {
2416
+ chat_id: number | string;
2417
+ text: string;
2418
+ business_connection_id?: string;
2419
+ message_thread_id?: number;
2420
+ parse_mode?: "HTML" | "MarkdownV2";
2421
+ entities?: MessageEntity[];
2422
+ link_preview_options?: LinkPreviewOptions;
2423
+ disable_notification?: boolean;
2424
+ protect_content?: boolean;
2425
+ allow_paid_broadcast?: boolean;
2426
+ message_effect_id?: string;
2427
+ reply_parameters?: ReplyParameters;
2428
+ reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
2429
+ }
2430
+ interface SendPaidMediaInput {
2431
+ chat_id: number | string;
2432
+ star_count: number;
2433
+ media: InputPaidMedia[];
2434
+ business_connection_id?: string;
2435
+ payload?: string;
2436
+ caption?: string;
2437
+ parse_mode?: "HTML" | "MarkdownV2";
2438
+ caption_entities?: MessageEntity[];
2439
+ show_caption_above_media?: boolean;
2440
+ disable_notification?: boolean;
2441
+ protect_content?: boolean;
2442
+ allow_paid_broadcast?: boolean;
2443
+ reply_parameters?: ReplyParameters;
2444
+ reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
2445
+ }
2446
+ interface SendPhotoInput {
2447
+ chat_id: number | string;
2448
+ photo: InputFile | string;
2449
+ business_connection_id?: string;
2450
+ message_thread_id?: number;
2451
+ caption?: string;
2452
+ parse_mode?: "HTML" | "MarkdownV2";
2453
+ caption_entities?: MessageEntity[];
2454
+ show_caption_above_media?: boolean;
2455
+ has_spoiler?: boolean;
2456
+ disable_notification?: boolean;
2457
+ protect_content?: boolean;
2458
+ allow_paid_broadcast?: boolean;
2459
+ message_effect_id?: string;
2460
+ reply_parameters?: ReplyParameters;
2461
+ reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
2462
+ }
2463
+ interface SendPollInput {
2464
+ chat_id: number | string;
2465
+ question: string;
2466
+ options: InputPollOption[];
2467
+ business_connection_id?: string;
2468
+ message_thread_id?: number;
2469
+ question_parse_mode?: "HTML" | "MarkdownV2";
2470
+ question_entities?: MessageEntity[];
2471
+ is_anonymous?: boolean;
2472
+ type?: string;
2473
+ allows_multiple_answers?: boolean;
2474
+ correct_option_id?: number;
2475
+ explanation?: string;
2476
+ explanation_parse_mode?: "HTML" | "MarkdownV2";
2477
+ explanation_entities?: MessageEntity[];
2478
+ open_period?: number;
2479
+ close_date?: number;
2480
+ is_closed?: boolean;
2481
+ disable_notification?: boolean;
2482
+ protect_content?: boolean;
2483
+ allow_paid_broadcast?: boolean;
2484
+ message_effect_id?: string;
2485
+ reply_parameters?: ReplyParameters;
2486
+ reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
2487
+ }
2488
+ interface SendStickerInput {
2489
+ chat_id: number | string;
2490
+ sticker: InputFile | string;
2491
+ business_connection_id?: string;
2492
+ message_thread_id?: number;
2493
+ emoji?: string;
2494
+ disable_notification?: boolean;
2495
+ protect_content?: boolean;
2496
+ allow_paid_broadcast?: boolean;
2497
+ message_effect_id?: string;
2498
+ reply_parameters?: ReplyParameters;
2499
+ reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
2500
+ }
2501
+ interface SendVenueInput {
2502
+ chat_id: number | string;
2503
+ latitude: number;
2504
+ longitude: number;
2505
+ title: string;
2506
+ address: string;
2507
+ business_connection_id?: string;
2508
+ message_thread_id?: number;
2509
+ foursquare_id?: string;
2510
+ foursquare_type?: string;
2511
+ google_place_id?: string;
2512
+ google_place_type?: string;
2513
+ disable_notification?: boolean;
2514
+ protect_content?: boolean;
2515
+ allow_paid_broadcast?: boolean;
2516
+ message_effect_id?: string;
2517
+ reply_parameters?: ReplyParameters;
2518
+ reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
2519
+ }
2520
+ interface SendVideoInput {
2521
+ chat_id: number | string;
2522
+ video: InputFile | string;
2523
+ business_connection_id?: string;
2524
+ message_thread_id?: number;
2525
+ duration?: number;
2526
+ width?: number;
2527
+ height?: number;
2528
+ thumbnail?: InputFile | string;
2529
+ caption?: string;
2530
+ parse_mode?: "HTML" | "MarkdownV2";
2531
+ caption_entities?: MessageEntity[];
2532
+ show_caption_above_media?: boolean;
2533
+ has_spoiler?: boolean;
2534
+ supports_streaming?: boolean;
2535
+ disable_notification?: boolean;
2536
+ protect_content?: boolean;
2537
+ allow_paid_broadcast?: boolean;
2538
+ message_effect_id?: string;
2539
+ reply_parameters?: ReplyParameters;
2540
+ reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
2541
+ }
2542
+ interface SendVideoNoteInput {
2543
+ chat_id: number | string;
2544
+ video_note: InputFile | string;
2545
+ business_connection_id?: string;
2546
+ message_thread_id?: number;
2547
+ duration?: number;
2548
+ length?: number;
2549
+ thumbnail?: InputFile | string;
2550
+ disable_notification?: boolean;
2551
+ protect_content?: boolean;
2552
+ allow_paid_broadcast?: boolean;
2553
+ message_effect_id?: string;
2554
+ reply_parameters?: ReplyParameters;
2555
+ reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
2556
+ }
2557
+ interface SendVoiceInput {
2558
+ chat_id: number | string;
2559
+ voice: InputFile | string;
2560
+ business_connection_id?: string;
2561
+ message_thread_id?: number;
2562
+ caption?: string;
2563
+ parse_mode?: "HTML" | "MarkdownV2";
2564
+ caption_entities?: MessageEntity[];
2565
+ duration?: number;
2566
+ disable_notification?: boolean;
2567
+ protect_content?: boolean;
2568
+ allow_paid_broadcast?: boolean;
2569
+ message_effect_id?: string;
2570
+ reply_parameters?: ReplyParameters;
2571
+ reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
2572
+ }
2573
+ interface SetChatAdministratorCustomTitleInput {
2574
+ chat_id: number | string;
2575
+ user_id: number;
2576
+ custom_title: string;
2577
+ }
2578
+ interface SetChatDescriptionInput {
2579
+ chat_id: number | string;
2580
+ description?: string;
2581
+ }
2582
+ interface SetChatMenuButtonInput {
2583
+ chat_id?: number;
2584
+ menu_button?: MenuButton;
2585
+ }
2586
+ interface SetChatPermissionsInput {
2587
+ chat_id: number | string;
2588
+ permissions: ChatPermissions;
2589
+ use_independent_chat_permissions?: boolean;
2590
+ }
2591
+ interface SetChatPhotoInput {
2592
+ chat_id: number | string;
2593
+ photo: InputFile;
2594
+ }
2595
+ interface SetChatStickerSetInput {
2596
+ chat_id: number | string;
2597
+ sticker_set_name: string;
2598
+ }
2599
+ interface SetChatTitleInput {
2600
+ chat_id: number | string;
2601
+ title: string;
2602
+ }
2603
+ interface SetCustomEmojiStickerSetThumbnailInput {
2604
+ name: string;
2605
+ custom_emoji_id?: string;
2606
+ }
2607
+ interface SetGameScoreInput {
2608
+ user_id: number;
2609
+ score: number;
2610
+ force?: boolean;
2611
+ disable_edit_message?: boolean;
2612
+ chat_id?: number;
2613
+ message_id?: number;
2614
+ inline_message_id?: string;
2615
+ }
2616
+ interface SetMessageReactionInput {
2617
+ chat_id: number | string;
2618
+ message_id: number;
2619
+ reaction?: ReactionType[];
2620
+ is_big?: boolean;
2621
+ }
2622
+ interface SetMyCommandsInput {
2623
+ commands: BotCommand[];
2624
+ scope?: BotCommandScope;
2625
+ language_code?: string;
2626
+ }
2627
+ interface SetMyDefaultAdministratorRightsInput {
2628
+ rights?: ChatAdministratorRights;
2629
+ for_channels?: boolean;
2630
+ }
2631
+ interface SetMyDescriptionInput {
2632
+ description?: string;
2633
+ language_code?: string;
2634
+ }
2635
+ interface SetMyNameInput {
2636
+ name?: string;
2637
+ language_code?: string;
2638
+ }
2639
+ interface SetMyShortDescriptionInput {
2640
+ short_description?: string;
2641
+ language_code?: string;
2642
+ }
2643
+ interface SetPassportDataErrorsInput {
2644
+ user_id: number;
2645
+ errors: PassportElementError[];
2646
+ }
2647
+ interface SetStickerEmojiListInput {
2648
+ sticker: string;
2649
+ emoji_list: string[];
2650
+ }
2651
+ interface SetStickerKeywordsInput {
2652
+ sticker: string;
2653
+ keywords?: string[];
2654
+ }
2655
+ interface SetStickerMaskPositionInput {
2656
+ sticker: string;
2657
+ mask_position?: MaskPosition;
2658
+ }
2659
+ interface SetStickerPositionInSetInput {
2660
+ sticker: string;
2661
+ position: number;
2662
+ }
2663
+ interface SetStickerSetThumbnailInput {
2664
+ name: string;
2665
+ user_id: number;
2666
+ format: "static" | "animated" | "video";
2667
+ thumbnail?: InputFile | string;
2668
+ }
2669
+ interface SetStickerSetTitleInput {
2670
+ name: string;
2671
+ title: string;
2672
+ }
2673
+ interface SetUserEmojiStatusInput {
2674
+ user_id: number;
2675
+ emoji_status_custom_emoji_id?: string;
2676
+ emoji_status_expiration_date?: number;
2677
+ }
2678
+ interface SetWebhookInput {
2679
+ url: string;
2680
+ certificate?: InputFile;
2681
+ ip_address?: string;
2682
+ max_connections?: number;
2683
+ allowed_updates?: string[];
2684
+ drop_pending_updates?: boolean;
2685
+ secret_token?: string;
2686
+ }
2687
+ interface StopMessageLiveLocationInput {
2688
+ business_connection_id?: string;
2689
+ chat_id?: number | string;
2690
+ message_id?: number;
2691
+ inline_message_id?: string;
2692
+ reply_markup?: InlineKeyboardMarkup;
2693
+ }
2694
+ interface StopPollInput {
2695
+ chat_id: number | string;
2696
+ message_id: number;
2697
+ business_connection_id?: string;
2698
+ reply_markup?: InlineKeyboardMarkup;
2699
+ }
2700
+ interface UnbanChatMemberInput {
2701
+ chat_id: number | string;
2702
+ user_id: number;
2703
+ only_if_banned?: boolean;
2704
+ }
2705
+ interface UnbanChatSenderChatInput {
2706
+ chat_id: number | string;
2707
+ sender_chat_id: number;
2708
+ }
2709
+ interface UnhideGeneralForumTopicInput {
2710
+ chat_id: number | string;
2711
+ }
2712
+ interface UnpinAllChatMessagesInput {
2713
+ chat_id: number | string;
2714
+ }
2715
+ interface UnpinAllForumTopicMessagesInput {
2716
+ chat_id: number | string;
2717
+ message_thread_id: number;
2718
+ }
2719
+ interface UnpinAllGeneralForumTopicMessagesInput {
2720
+ chat_id: number | string;
2721
+ }
2722
+ interface UnpinChatMessageInput {
2723
+ chat_id: number | string;
2724
+ business_connection_id?: string;
2725
+ message_id?: number;
2726
+ }
2727
+ interface UploadStickerFileInput {
2728
+ user_id: number;
2729
+ sticker: InputFile;
2730
+ sticker_format: "static" | "animated" | "video";
2731
+ }
2732
+
2733
+ type ClientExecuteRequestServiceInterface = Micro.Micro.Success<typeof ClientExecuteRequestServiceDefault>;
2734
+ declare const ClientExecuteRequestServiceDefault: Micro.Micro<{
2735
+ readonly execute: <M extends keyof Api>(method: M, input: Parameters<Api[M]>[0]) => Micro.Micro<ReturnType<Api[M]>, TgBotClientError, never>;
2736
+ }, never, TgBotClientConfig>;
2737
+
2738
+ declare const getFile: (fileId: string, config: TgBotClientConfigObject, execute: ClientExecuteRequestServiceInterface) => Micro.Micro<File, TgBotClientError>;
2739
+
2740
+ type ClientFileServiceInterface = Context.Tag.Service<typeof ClientFileService>;
2741
+ declare const ClientFileService_base: Context.TagClass<ClientFileService, "ClientFileService", {
2742
+ getFile: (input: {
2743
+ file_id: string;
2744
+ }) => ReturnType<typeof getFile>;
2745
+ }>;
2746
+ declare class ClientFileService extends ClientFileService_base {
2747
+ }
2748
+
2749
+ type TgBotClient = ReturnType<typeof makeTgBotClient>;
2750
+ declare const makeTgBotClient: (input: TgBotClientSettingsInput) => {
2751
+ execute: <M extends keyof Api>(method: M, input: Parameters<Api[M]>[0]) => Promise<ReturnType<Api[M]>>;
2752
+ getFile: (input: Parameters<ClientFileServiceInterface["getFile"]>[0]) => Promise<File>;
2753
+ };
2754
+
2755
+ type AvailableUpdateTypes = Exclude<keyof Update, 'update_id'>;
2756
+ type BotResponse = {
2757
+ [K in keyof Api]: K extends `send_${infer R}` ? {
2758
+ type: Lowercase<R>;
2759
+ } & Omit<Parameters<Api[K]>[0], 'chat_id'> : never;
2760
+ }[keyof Api];
2761
+ type BotMessageHandlers = {
2762
+ [K in AvailableUpdateTypes as `on_${K}`]?: (update: NonNullable<Update[K]>) => BotResponse;
2763
+ };
2764
+ type BotMessageHandlerSettings = {
2765
+ readonly batch_size?: number;
2766
+ readonly timeout?: number;
2767
+ readonly max_empty_responses?: number;
2768
+ } & BotMessageHandlers;
2769
+
2770
+ declare const BotFactoryService_base: Context.TagClass<BotFactoryService, "BotFactoryService", {
2771
+ makeBot: (messageHandler: BotMessageHandlerSettings) => Micro.Micro<Micro.MicroFiber<{
2772
+ updates: Update[];
2773
+ lastSuccessId: number | undefined;
2774
+ hasError: boolean;
2775
+ }, TgBotClientError>, string, TgBotClientConfig>;
2776
+ runBot: (input: RunBotInput) => Micro.Micro<Micro.MicroFiber<{
2777
+ updates: Update[];
2778
+ lastSuccessId: number | undefined;
2779
+ hasError: boolean;
2780
+ }, TgBotClientError>, string, never>;
2781
+ }>;
2782
+ declare class BotFactoryService extends BotFactoryService_base {
2783
+ }
2784
+ type RunBotInput = ({
2785
+ type: "fromJsonFile";
2786
+ } | {
2787
+ type: "config";
2788
+ } & TgBotClientSettingsInput) & BotMessageHandlerSettings;
2789
+ declare const BotFactoryServiceDefault: {
2790
+ makeBot: (messageHandler: BotMessageHandlerSettings) => Micro.Micro<Micro.MicroFiber<{
2791
+ updates: Update[];
2792
+ lastSuccessId: number | undefined;
2793
+ hasError: boolean;
2794
+ }, TgBotClientError>, string, TgBotClientConfig>;
2795
+ runBot: (input: RunBotInput) => Micro.Micro<Micro.MicroFiber<{
2796
+ updates: Update[];
2797
+ lastSuccessId: number | undefined;
2798
+ hasError: boolean;
2799
+ }, TgBotClientError>, string, never>;
2800
+ };
2801
+
2802
+ declare const runTgChatBot: (input: Parameters<typeof BotFactoryServiceDefault.runBot>[0]) => Promise<Micro.MicroExit<Micro.MicroFiber<{
2803
+ updates: Update[];
2804
+ lastSuccessId: number | undefined;
2805
+ hasError: boolean;
2806
+ }, TgBotClientError>, string>>;
2807
+
2808
+ declare const defaultBaseUrl = "https://api.telegram.org";
2809
+ declare const MESSAGE_EFFECTS: {
2810
+ readonly "\uD83D\uDD25": "5104841245755180586";
2811
+ readonly "\uD83D\uDC4D": "5107584321108051014";
2812
+ readonly "\uD83D\uDC4E": "5104858069142078462";
2813
+ readonly "\u2764\uFE0F": "5159385139981059251";
2814
+ readonly "\uD83C\uDF89": "5046509860389126442";
2815
+ readonly "\uD83D\uDCA9": "5046589136895476101";
2816
+ };
2817
+ type MessageEffect = keyof typeof MESSAGE_EFFECTS;
2818
+ declare const messageEffectIdCodes: MessageEffect[];
2819
+ declare const isMessageEffect: (input: unknown) => input is MessageEffect;
2820
+
2821
+ export { type AddStickerToSetInput, type AffiliateInfo, type Animation, type AnswerCallbackQueryInput, type AnswerInlineQueryInput, type AnswerPreCheckoutQueryInput, type AnswerShippingQueryInput, type AnswerWebAppQueryInput, type Api, type ApproveChatJoinRequestInput, type Audio, type AvailableUpdateTypes, type BackgroundFill, type BackgroundFillFreeformGradient, type BackgroundFillGradient, type BackgroundFillSolid, type BackgroundType, type BackgroundTypeChatTheme, type BackgroundTypeFill, type BackgroundTypePattern, type BackgroundTypeWallpaper, type BanChatMemberInput, type BanChatSenderChatInput, type Birthdate, type BotCommand, type BotCommandScope, type BotCommandScopeAllChatAdministrators, type BotCommandScopeAllGroupChats, type BotCommandScopeAllPrivateChats, type BotCommandScopeChat, type BotCommandScopeChatAdministrators, type BotCommandScopeChatMember, type BotCommandScopeDefault, type BotDescription, BotFactoryService, BotFactoryServiceDefault, type BotMessageHandlerSettings, type BotMessageHandlers, type BotName, type BotResponse, type BotShortDescription, type BusinessConnection, type BusinessIntro, type BusinessLocation, type BusinessMessagesDeleted, type BusinessOpeningHours, type BusinessOpeningHoursInterval, type CallbackGame, type CallbackQuery, type Chat, type ChatAdministratorRights, type ChatBackground, type ChatBoost, type ChatBoostAdded, type ChatBoostRemoved, type ChatBoostSource, type ChatBoostSourceGiftCode, type ChatBoostSourceGiveaway, type ChatBoostSourcePremium, type ChatBoostUpdated, type ChatFullInfo, type ChatInviteLink, type ChatJoinRequest, type ChatLocation, type ChatMember, type ChatMemberAdministrator, type ChatMemberBanned, type ChatMemberLeft, type ChatMemberMember, type ChatMemberOwner, type ChatMemberRestricted, type ChatMemberUpdated, type ChatPermissions, type ChatPhoto, type ChatShared, type ChosenInlineResult, type CloseForumTopicInput, type CloseGeneralForumTopicInput, type CloseInput, type Contact, type CopyMessageInput, type CopyMessagesInput, type CopyTextButton, type CreateChatInviteLinkInput, type CreateChatSubscriptionInviteLinkInput, type CreateForumTopicInput, type CreateInvoiceLinkInput, type CreateNewStickerSetInput, type DeclineChatJoinRequestInput, type DeleteChatPhotoInput, type DeleteChatStickerSetInput, type DeleteForumTopicInput, type DeleteMessageInput, type DeleteMessagesInput, type DeleteMyCommandsInput, type DeleteStickerFromSetInput, type DeleteStickerSetInput, type DeleteWebhookInput, type Dice, type Document, type EditChatInviteLinkInput, type EditChatSubscriptionInviteLinkInput, type EditForumTopicInput, type EditGeneralForumTopicInput, type EditMessageCaptionInput, type EditMessageLiveLocationInput, type EditMessageMediaInput, type EditMessageReplyMarkupInput, type EditMessageTextInput, type EditUserStarSubscriptionInput, type EncryptedCredentials, type EncryptedPassportElement, type ExportChatInviteLinkInput, type ExternalReplyInfo, type File$1 as File, type ForceReply, type ForumTopic, type ForumTopicClosed, type ForumTopicCreated, type ForumTopicEdited, type ForumTopicReopened, type ForwardMessageInput, type ForwardMessagesInput, type Game, type GameHighScore, type GeneralForumTopicHidden, type GeneralForumTopicUnhidden, type GetAvailableGiftsInput, type GetBusinessConnectionInput, type GetChatAdministratorsInput, type GetChatInput, type GetChatMemberCountInput, type GetChatMemberInput, type GetChatMenuButtonInput, type GetCustomEmojiStickersInput, type GetFileInput, type GetForumTopicIconStickersInput, type GetGameHighScoresInput, type GetMeInput, type GetMyCommandsInput, type GetMyDefaultAdministratorRightsInput, type GetMyDescriptionInput, type GetMyNameInput, type GetMyShortDescriptionInput, type GetStarTransactionsInput, type GetStickerSetInput, type GetUpdatesInput, type GetUserChatBoostsInput, type GetUserProfilePhotosInput, type GetWebhookInfoInput, type Gift, type Gifts, type Giveaway, type GiveawayCompleted, type GiveawayCreated, type GiveawayWinners, type HideGeneralForumTopicInput, type InaccessibleMessage, type InlineKeyboardButton, type InlineKeyboardMarkup, type InlineQuery, type InlineQueryResult, type InlineQueryResultArticle, type InlineQueryResultAudio, type InlineQueryResultCachedAudio, type InlineQueryResultCachedDocument, type InlineQueryResultCachedGif, type InlineQueryResultCachedMpeg4Gif, type InlineQueryResultCachedPhoto, type InlineQueryResultCachedSticker, type InlineQueryResultCachedVideo, type InlineQueryResultCachedVoice, type InlineQueryResultContact, type InlineQueryResultDocument, type InlineQueryResultGame, type InlineQueryResultGif, type InlineQueryResultLocation, type InlineQueryResultMpeg4Gif, type InlineQueryResultPhoto, type InlineQueryResultVenue, type InlineQueryResultVideo, type InlineQueryResultVoice, type InlineQueryResultsButton, type InputContactMessageContent, type InputFile, type InputInvoiceMessageContent, type InputLocationMessageContent, type InputMedia, type InputMediaAnimation, type InputMediaAudio, type InputMediaDocument, type InputMediaPhoto, type InputMediaVideo, type InputMessageContent, type InputPaidMedia, type InputPaidMediaPhoto, type InputPaidMediaVideo, type InputPollOption, type InputSticker, type InputTextMessageContent, type InputVenueMessageContent, type Invoice, type KeyboardButton, type KeyboardButtonPollType, type KeyboardButtonRequestChat, type KeyboardButtonRequestUsers, type LabeledPrice, type LeaveChatInput, type LinkPreviewOptions, type Location, type LogOutInput, type LoginUrl, MESSAGE_EFFECTS, type MaskPosition, type MaybeInaccessibleMessage, type MenuButton, type MenuButtonCommands, type MenuButtonDefault, type MenuButtonWebApp, type Message, type MessageAutoDeleteTimerChanged, type MessageEffect, type MessageEntity, type MessageId, type MessageOrigin, type MessageOriginChannel, type MessageOriginChat, type MessageOriginHiddenUser, type MessageOriginUser, type MessageReactionCountUpdated, type MessageReactionUpdated, type OrderInfo, type PaidMedia, type PaidMediaInfo, type PaidMediaPhoto, type PaidMediaPreview, type PaidMediaPurchased, type PaidMediaVideo, type PassportData, type PassportElementError, type PassportElementErrorDataField, type PassportElementErrorFile, type PassportElementErrorFiles, type PassportElementErrorFrontSide, type PassportElementErrorReverseSide, type PassportElementErrorSelfie, type PassportElementErrorTranslationFile, type PassportElementErrorTranslationFiles, type PassportElementErrorUnspecified, type PassportFile, type PhotoSize, type PinChatMessageInput, type Poll, type PollAnswer, type PollOption, type PreCheckoutQuery, type PreparedInlineMessage, type PromoteChatMemberInput, type ProximityAlertTriggered, type ReactionCount, type ReactionType, type ReactionTypeCustomEmoji, type ReactionTypeEmoji, type ReactionTypePaid, type RefundStarPaymentInput, type RefundedPayment, type ReopenForumTopicInput, type ReopenGeneralForumTopicInput, type ReplaceStickerInSetInput, type ReplyKeyboardMarkup, type ReplyKeyboardRemove, type ReplyParameters, type ResponseParameters, type RestrictChatMemberInput, type RevenueWithdrawalState, type RevenueWithdrawalStateFailed, type RevenueWithdrawalStatePending, type RevenueWithdrawalStateSucceeded, type RevokeChatInviteLinkInput, type RunBotInput, type SavePreparedInlineMessageInput, type SendAnimationInput, type SendAudioInput, type SendChatActionInput, type SendContactInput, type SendDiceInput, type SendDocumentInput, type SendGameInput, type SendGiftInput, type SendInvoiceInput, type SendLocationInput, type SendMediaGroupInput, type SendMessageInput, type SendPaidMediaInput, type SendPhotoInput, type SendPollInput, type SendStickerInput, type SendVenueInput, type SendVideoInput, type SendVideoNoteInput, type SendVoiceInput, type SentWebAppMessage, type SetChatAdministratorCustomTitleInput, type SetChatDescriptionInput, type SetChatMenuButtonInput, type SetChatPermissionsInput, type SetChatPhotoInput, type SetChatStickerSetInput, type SetChatTitleInput, type SetCustomEmojiStickerSetThumbnailInput, type SetGameScoreInput, type SetMessageReactionInput, type SetMyCommandsInput, type SetMyDefaultAdministratorRightsInput, type SetMyDescriptionInput, type SetMyNameInput, type SetMyShortDescriptionInput, type SetPassportDataErrorsInput, type SetStickerEmojiListInput, type SetStickerKeywordsInput, type SetStickerMaskPositionInput, type SetStickerPositionInSetInput, type SetStickerSetThumbnailInput, type SetStickerSetTitleInput, type SetUserEmojiStatusInput, type SetWebhookInput, type SharedUser, type ShippingAddress, type ShippingOption, type ShippingQuery, type StarTransaction, type StarTransactions, type Sticker, type StickerSet, type StopMessageLiveLocationInput, type StopPollInput, type Story, type SuccessfulPayment, type SwitchInlineQueryChosenChat, type TextQuote, type TgBotClient, type TransactionPartner, type TransactionPartnerAffiliateProgram, type TransactionPartnerFragment, type TransactionPartnerOther, type TransactionPartnerTelegramAds, type TransactionPartnerTelegramApi, type TransactionPartnerUser, type UnbanChatMemberInput, type UnbanChatSenderChatInput, type UnhideGeneralForumTopicInput, type UnpinAllChatMessagesInput, type UnpinAllForumTopicMessagesInput, type UnpinAllGeneralForumTopicMessagesInput, type UnpinChatMessageInput, type Update, type UploadStickerFileInput, type User, type UserChatBoosts, type UserProfilePhotos, type UsersShared, type Venue, type Video, type VideoChatEnded, type VideoChatParticipantsInvited, type VideoChatScheduled, type VideoChatStarted, type VideoNote, type Voice, type WebAppData, type WebAppInfo, type WebhookInfo, type WriteAccessAllowed, defaultBaseUrl, isMessageEffect, makeTgBotClient, messageEffectIdCodes, runTgChatBot };