balebaazoo 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +674 -0
- package/README.en.md +61 -0
- package/README.md +70 -0
- package/dist/index.cjs +1047 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +860 -0
- package/dist/index.d.ts +860 -0
- package/dist/index.js +1015 -0
- package/dist/index.js.map +1 -0
- package/package.json +80 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,860 @@
|
|
|
1
|
+
import { Readable } from 'node:stream';
|
|
2
|
+
|
|
3
|
+
type ChatId = number | string;
|
|
4
|
+
type UserId = number | string;
|
|
5
|
+
interface User {
|
|
6
|
+
id?: UserId;
|
|
7
|
+
is_bot: boolean;
|
|
8
|
+
first_name: string;
|
|
9
|
+
last_name?: string;
|
|
10
|
+
username?: string;
|
|
11
|
+
language_code?: string;
|
|
12
|
+
}
|
|
13
|
+
interface Chat {
|
|
14
|
+
id: ChatId;
|
|
15
|
+
type: "private" | "group" | "channel";
|
|
16
|
+
title?: string;
|
|
17
|
+
username?: string;
|
|
18
|
+
first_name?: string;
|
|
19
|
+
last_name?: string;
|
|
20
|
+
}
|
|
21
|
+
interface ChatPhoto {
|
|
22
|
+
small_file_id: string;
|
|
23
|
+
small_file_unique_id: string;
|
|
24
|
+
big_file_id: string;
|
|
25
|
+
big_file_unique_id: string;
|
|
26
|
+
}
|
|
27
|
+
interface ChatFullInfo extends Chat {
|
|
28
|
+
photo?: ChatPhoto;
|
|
29
|
+
bio?: string;
|
|
30
|
+
description?: string;
|
|
31
|
+
invite_link?: string;
|
|
32
|
+
linked_chat_id?: string;
|
|
33
|
+
}
|
|
34
|
+
interface MessageEntity {
|
|
35
|
+
type: "mention" | "bot_command";
|
|
36
|
+
offset: number;
|
|
37
|
+
length: number;
|
|
38
|
+
}
|
|
39
|
+
interface PhotoSize {
|
|
40
|
+
file_id: string;
|
|
41
|
+
file_unique_id: string;
|
|
42
|
+
width: number;
|
|
43
|
+
height: number;
|
|
44
|
+
file_size?: number;
|
|
45
|
+
}
|
|
46
|
+
interface Animation {
|
|
47
|
+
file_id: string;
|
|
48
|
+
file_unique_id: string;
|
|
49
|
+
width: number;
|
|
50
|
+
height: number;
|
|
51
|
+
duration: number;
|
|
52
|
+
file_name?: string;
|
|
53
|
+
mime_type?: string;
|
|
54
|
+
file_size?: number;
|
|
55
|
+
}
|
|
56
|
+
interface Audio {
|
|
57
|
+
file_id: string;
|
|
58
|
+
file_unique_id: string;
|
|
59
|
+
duration: number;
|
|
60
|
+
performer?: string;
|
|
61
|
+
title?: string;
|
|
62
|
+
file_name?: string;
|
|
63
|
+
mime_type?: string;
|
|
64
|
+
file_size?: number;
|
|
65
|
+
}
|
|
66
|
+
interface Document {
|
|
67
|
+
file_id: string;
|
|
68
|
+
file_unique_id: string;
|
|
69
|
+
file_name?: string;
|
|
70
|
+
mime_type?: string;
|
|
71
|
+
file_size?: number;
|
|
72
|
+
}
|
|
73
|
+
interface Video {
|
|
74
|
+
file_id: string;
|
|
75
|
+
file_unique_id: string;
|
|
76
|
+
width: number;
|
|
77
|
+
height: number;
|
|
78
|
+
duration: number;
|
|
79
|
+
file_name?: string;
|
|
80
|
+
mime_type?: string;
|
|
81
|
+
file_size?: number;
|
|
82
|
+
}
|
|
83
|
+
interface Voice {
|
|
84
|
+
file_id: string;
|
|
85
|
+
file_unique_id: string;
|
|
86
|
+
duration: number;
|
|
87
|
+
mime_type?: string;
|
|
88
|
+
file_size?: number;
|
|
89
|
+
}
|
|
90
|
+
interface Contact {
|
|
91
|
+
phone_number: string;
|
|
92
|
+
first_name: string;
|
|
93
|
+
last_name?: string;
|
|
94
|
+
user_id?: UserId;
|
|
95
|
+
}
|
|
96
|
+
interface Location {
|
|
97
|
+
latitude: number;
|
|
98
|
+
longitude: number;
|
|
99
|
+
horizontal_accuracy?: number;
|
|
100
|
+
}
|
|
101
|
+
interface Invoice {
|
|
102
|
+
title: string;
|
|
103
|
+
description: string;
|
|
104
|
+
payload: string;
|
|
105
|
+
provider_token: string;
|
|
106
|
+
prices: LabeledPrice[];
|
|
107
|
+
}
|
|
108
|
+
interface SuccessfulPayment {
|
|
109
|
+
currency: string;
|
|
110
|
+
total_amount: number;
|
|
111
|
+
invoice_payload: string;
|
|
112
|
+
telegram_payment_charge_id: string;
|
|
113
|
+
provider_payment_charge_id: string;
|
|
114
|
+
}
|
|
115
|
+
interface WebAppData {
|
|
116
|
+
data: string;
|
|
117
|
+
}
|
|
118
|
+
interface WebAppInfo {
|
|
119
|
+
url: string;
|
|
120
|
+
}
|
|
121
|
+
interface CopyTextButton {
|
|
122
|
+
text: string;
|
|
123
|
+
}
|
|
124
|
+
interface Message {
|
|
125
|
+
message_id: number;
|
|
126
|
+
from?: User;
|
|
127
|
+
date: number;
|
|
128
|
+
chat: Chat;
|
|
129
|
+
sender_chat?: Chat;
|
|
130
|
+
forward_from?: User;
|
|
131
|
+
forward_from_chat?: Chat;
|
|
132
|
+
forward_from_message_id?: number;
|
|
133
|
+
forward_date?: number;
|
|
134
|
+
reply_to_message?: Message;
|
|
135
|
+
edit_date?: number;
|
|
136
|
+
media_group_id?: string;
|
|
137
|
+
text?: string;
|
|
138
|
+
entities?: MessageEntity[];
|
|
139
|
+
animation?: Animation;
|
|
140
|
+
audio?: Audio;
|
|
141
|
+
document?: Document;
|
|
142
|
+
photo?: PhotoSize[];
|
|
143
|
+
sticker?: Sticker;
|
|
144
|
+
video?: Video;
|
|
145
|
+
voice?: Voice;
|
|
146
|
+
caption?: string;
|
|
147
|
+
caption_entities?: MessageEntity[];
|
|
148
|
+
contact?: Contact;
|
|
149
|
+
location?: Location;
|
|
150
|
+
new_chat_members?: User[];
|
|
151
|
+
left_chat_member?: User;
|
|
152
|
+
invoice?: Invoice;
|
|
153
|
+
successful_payment?: SuccessfulPayment;
|
|
154
|
+
web_app_data?: WebAppData;
|
|
155
|
+
reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove;
|
|
156
|
+
}
|
|
157
|
+
interface MessageId {
|
|
158
|
+
message_id: number;
|
|
159
|
+
}
|
|
160
|
+
interface CallbackQuery {
|
|
161
|
+
id: string;
|
|
162
|
+
from: User;
|
|
163
|
+
message?: Message;
|
|
164
|
+
data?: string;
|
|
165
|
+
}
|
|
166
|
+
interface PreCheckoutQuery {
|
|
167
|
+
id: string;
|
|
168
|
+
from: User;
|
|
169
|
+
currency: string;
|
|
170
|
+
total_amount: number;
|
|
171
|
+
invoice_payload: string;
|
|
172
|
+
}
|
|
173
|
+
interface Update {
|
|
174
|
+
update_id: number;
|
|
175
|
+
message?: Message;
|
|
176
|
+
edited_message?: Message;
|
|
177
|
+
callback_query?: CallbackQuery;
|
|
178
|
+
pre_checkout_query?: PreCheckoutQuery;
|
|
179
|
+
}
|
|
180
|
+
interface WebhookInfo {
|
|
181
|
+
url: string;
|
|
182
|
+
}
|
|
183
|
+
interface File {
|
|
184
|
+
file_id: string;
|
|
185
|
+
file_unique_id: string;
|
|
186
|
+
file_size?: number;
|
|
187
|
+
file_path?: string;
|
|
188
|
+
}
|
|
189
|
+
interface ResponseParameters {
|
|
190
|
+
migrate_to_chat_id?: ChatId;
|
|
191
|
+
retry_after?: number;
|
|
192
|
+
}
|
|
193
|
+
interface Sticker {
|
|
194
|
+
file_id: string;
|
|
195
|
+
file_unique_id: string;
|
|
196
|
+
type: "regular" | "mask";
|
|
197
|
+
width: number;
|
|
198
|
+
height: number;
|
|
199
|
+
file_size?: number;
|
|
200
|
+
}
|
|
201
|
+
interface StickerSet {
|
|
202
|
+
name: string;
|
|
203
|
+
title: string;
|
|
204
|
+
stickers: Sticker[];
|
|
205
|
+
thumbnail?: PhotoSize;
|
|
206
|
+
}
|
|
207
|
+
interface LabeledPrice {
|
|
208
|
+
label: string;
|
|
209
|
+
amount: number;
|
|
210
|
+
}
|
|
211
|
+
interface Transaction {
|
|
212
|
+
id: string;
|
|
213
|
+
status: string;
|
|
214
|
+
amount: number;
|
|
215
|
+
currency: string;
|
|
216
|
+
created_at: number;
|
|
217
|
+
updated_at: number;
|
|
218
|
+
}
|
|
219
|
+
interface InlineKeyboardButton {
|
|
220
|
+
text: string;
|
|
221
|
+
url?: string;
|
|
222
|
+
callback_data?: string;
|
|
223
|
+
web_app?: WebAppInfo;
|
|
224
|
+
copy_text?: CopyTextButton;
|
|
225
|
+
}
|
|
226
|
+
interface InlineKeyboardMarkup {
|
|
227
|
+
inline_keyboard: InlineKeyboardButton[][];
|
|
228
|
+
}
|
|
229
|
+
interface KeyboardButton {
|
|
230
|
+
text: string;
|
|
231
|
+
web_app?: WebAppInfo;
|
|
232
|
+
}
|
|
233
|
+
interface ReplyKeyboardMarkup {
|
|
234
|
+
keyboard: KeyboardButton[][];
|
|
235
|
+
resize_keyboard?: boolean;
|
|
236
|
+
one_time_keyboard?: boolean;
|
|
237
|
+
selective?: boolean;
|
|
238
|
+
}
|
|
239
|
+
interface ReplyKeyboardRemove {
|
|
240
|
+
remove_keyboard: true;
|
|
241
|
+
}
|
|
242
|
+
type ReplyMarkup = InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove;
|
|
243
|
+
type ChatMember = ChatMemberOwner | ChatMemberAdministrator | ChatMemberMember | ChatMemberRestricted;
|
|
244
|
+
interface ChatMemberOwner {
|
|
245
|
+
status: "creator";
|
|
246
|
+
user: User;
|
|
247
|
+
}
|
|
248
|
+
interface ChatMemberAdministrator {
|
|
249
|
+
status: "administrator";
|
|
250
|
+
user: User;
|
|
251
|
+
can_be_edited?: boolean;
|
|
252
|
+
is_anonymous?: boolean;
|
|
253
|
+
can_manage_chat?: boolean;
|
|
254
|
+
can_delete_messages?: boolean;
|
|
255
|
+
can_manage_video_chats?: boolean;
|
|
256
|
+
can_restrict_members?: boolean;
|
|
257
|
+
can_promote_members?: boolean;
|
|
258
|
+
can_change_info?: boolean;
|
|
259
|
+
can_invite_users?: boolean;
|
|
260
|
+
can_post_messages?: boolean;
|
|
261
|
+
can_edit_messages?: boolean;
|
|
262
|
+
can_pin_messages?: boolean;
|
|
263
|
+
}
|
|
264
|
+
interface ChatMemberMember {
|
|
265
|
+
status: "member";
|
|
266
|
+
user: User;
|
|
267
|
+
}
|
|
268
|
+
interface ChatMemberRestricted {
|
|
269
|
+
status: "restricted";
|
|
270
|
+
user: User;
|
|
271
|
+
is_member: boolean;
|
|
272
|
+
can_send_messages?: boolean;
|
|
273
|
+
can_send_media_messages?: boolean;
|
|
274
|
+
can_send_polls?: boolean;
|
|
275
|
+
can_send_other_messages?: boolean;
|
|
276
|
+
can_add_web_page_previews?: boolean;
|
|
277
|
+
can_change_info?: boolean;
|
|
278
|
+
can_invite_users?: boolean;
|
|
279
|
+
can_pin_messages?: boolean;
|
|
280
|
+
}
|
|
281
|
+
interface InputMediaPhoto {
|
|
282
|
+
type: "photo";
|
|
283
|
+
media: string;
|
|
284
|
+
caption?: string;
|
|
285
|
+
}
|
|
286
|
+
interface InputMediaVideo {
|
|
287
|
+
type: "video";
|
|
288
|
+
media: string;
|
|
289
|
+
caption?: string;
|
|
290
|
+
}
|
|
291
|
+
interface InputMediaAudio {
|
|
292
|
+
type: "audio";
|
|
293
|
+
media: string;
|
|
294
|
+
caption?: string;
|
|
295
|
+
}
|
|
296
|
+
interface InputMediaDocument {
|
|
297
|
+
type: "document";
|
|
298
|
+
media: string;
|
|
299
|
+
caption?: string;
|
|
300
|
+
}
|
|
301
|
+
interface InputMediaAnimation {
|
|
302
|
+
type: "animation";
|
|
303
|
+
media: string;
|
|
304
|
+
caption?: string;
|
|
305
|
+
}
|
|
306
|
+
type InputMedia = InputMediaPhoto | InputMediaVideo | InputMediaAudio | InputMediaDocument | InputMediaAnimation;
|
|
307
|
+
interface InputSticker {
|
|
308
|
+
sticker: string;
|
|
309
|
+
emoji_list?: string[];
|
|
310
|
+
}
|
|
311
|
+
interface BaleApiResponse<T = unknown> {
|
|
312
|
+
ok: boolean;
|
|
313
|
+
result?: T;
|
|
314
|
+
description?: string;
|
|
315
|
+
error_code?: number;
|
|
316
|
+
parameters?: ResponseParameters;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
type InputFileSource = Buffer | Uint8Array | Blob | ReadableStream<Uint8Array> | Readable | string;
|
|
320
|
+
declare class InputFile {
|
|
321
|
+
readonly source: InputFileSource;
|
|
322
|
+
readonly filename: string;
|
|
323
|
+
constructor(source: InputFileSource, filename?: string);
|
|
324
|
+
static fromPath(path: string, filename?: string): InputFile;
|
|
325
|
+
toBlob(): Promise<Blob>;
|
|
326
|
+
}
|
|
327
|
+
declare function isFilePath(source: InputFileSource): Promise<boolean>;
|
|
328
|
+
|
|
329
|
+
interface GetUpdatesParams {
|
|
330
|
+
offset?: number;
|
|
331
|
+
limit?: number;
|
|
332
|
+
timeout?: number;
|
|
333
|
+
allowed_updates?: string[];
|
|
334
|
+
}
|
|
335
|
+
interface SetWebhookParams {
|
|
336
|
+
url: string;
|
|
337
|
+
}
|
|
338
|
+
interface SendMessageParams {
|
|
339
|
+
chat_id: ChatId;
|
|
340
|
+
text: string;
|
|
341
|
+
reply_to_message_id?: number;
|
|
342
|
+
reply_markup?: ReplyMarkup;
|
|
343
|
+
}
|
|
344
|
+
interface ForwardMessageParams {
|
|
345
|
+
chat_id: ChatId;
|
|
346
|
+
from_chat_id: ChatId;
|
|
347
|
+
message_id: number;
|
|
348
|
+
}
|
|
349
|
+
interface CopyMessageParams {
|
|
350
|
+
chat_id: ChatId;
|
|
351
|
+
from_chat_id: ChatId;
|
|
352
|
+
message_id: number;
|
|
353
|
+
}
|
|
354
|
+
interface SendMediaParams {
|
|
355
|
+
chat_id: ChatId;
|
|
356
|
+
caption?: string;
|
|
357
|
+
reply_to_message_id?: number;
|
|
358
|
+
reply_markup?: ReplyMarkup;
|
|
359
|
+
}
|
|
360
|
+
interface SendPhotoParams extends SendMediaParams {
|
|
361
|
+
photo: string | InputFile;
|
|
362
|
+
}
|
|
363
|
+
interface SendAudioParams extends SendMediaParams {
|
|
364
|
+
audio: string | InputFile;
|
|
365
|
+
}
|
|
366
|
+
interface SendDocumentParams extends SendMediaParams {
|
|
367
|
+
document: string | InputFile;
|
|
368
|
+
}
|
|
369
|
+
interface SendVideoParams extends SendMediaParams {
|
|
370
|
+
video: string | InputFile;
|
|
371
|
+
}
|
|
372
|
+
interface SendAnimationParams extends SendMediaParams {
|
|
373
|
+
animation: string | InputFile;
|
|
374
|
+
}
|
|
375
|
+
interface SendVoiceParams extends SendMediaParams {
|
|
376
|
+
voice: string | InputFile;
|
|
377
|
+
}
|
|
378
|
+
interface SendMediaGroupParams {
|
|
379
|
+
chat_id: ChatId;
|
|
380
|
+
media: InputMedia[];
|
|
381
|
+
reply_to_message_id?: number;
|
|
382
|
+
}
|
|
383
|
+
interface SendLocationParams {
|
|
384
|
+
chat_id: ChatId;
|
|
385
|
+
latitude: number;
|
|
386
|
+
longitude: number;
|
|
387
|
+
horizontal_accuracy?: number;
|
|
388
|
+
reply_to_message_id?: number;
|
|
389
|
+
reply_markup?: ReplyMarkup;
|
|
390
|
+
}
|
|
391
|
+
interface SendContactParams {
|
|
392
|
+
chat_id: ChatId;
|
|
393
|
+
phone_number: string;
|
|
394
|
+
first_name: string;
|
|
395
|
+
last_name?: string;
|
|
396
|
+
reply_to_message_id?: number;
|
|
397
|
+
reply_markup?: ReplyMarkup;
|
|
398
|
+
}
|
|
399
|
+
type ChatAction = "typing" | "upload_photo" | "record_video" | "upload_video" | "record_voice" | "upload_voice" | "choose_sticker";
|
|
400
|
+
interface SendChatActionParams {
|
|
401
|
+
chat_id: ChatId;
|
|
402
|
+
action: ChatAction;
|
|
403
|
+
}
|
|
404
|
+
interface GetFileParams {
|
|
405
|
+
file_id: string;
|
|
406
|
+
}
|
|
407
|
+
interface AnswerCallbackQueryParams {
|
|
408
|
+
callback_query_id: string;
|
|
409
|
+
text?: string;
|
|
410
|
+
show_alert?: boolean;
|
|
411
|
+
}
|
|
412
|
+
interface AskReviewParams {
|
|
413
|
+
user_id: UserId;
|
|
414
|
+
delay_seconds: number;
|
|
415
|
+
}
|
|
416
|
+
interface BanChatMemberParams {
|
|
417
|
+
chat_id: ChatId;
|
|
418
|
+
user_id: UserId;
|
|
419
|
+
}
|
|
420
|
+
interface UnbanChatMemberParams {
|
|
421
|
+
chat_id: ChatId;
|
|
422
|
+
user_id: UserId;
|
|
423
|
+
only_if_banned?: boolean;
|
|
424
|
+
}
|
|
425
|
+
interface PromoteChatMemberParams {
|
|
426
|
+
chat_id: ChatId;
|
|
427
|
+
user_id: UserId;
|
|
428
|
+
can_change_info?: boolean;
|
|
429
|
+
can_post_messages?: boolean;
|
|
430
|
+
can_edit_messages?: boolean;
|
|
431
|
+
can_delete_messages?: boolean;
|
|
432
|
+
can_manage_video_chats?: boolean;
|
|
433
|
+
can_invite_users?: boolean;
|
|
434
|
+
can_restrict_members?: boolean;
|
|
435
|
+
}
|
|
436
|
+
interface SetChatPhotoParams {
|
|
437
|
+
chat_id: ChatId;
|
|
438
|
+
photo: InputFile;
|
|
439
|
+
}
|
|
440
|
+
interface LeaveChatParams {
|
|
441
|
+
chat_id: ChatId;
|
|
442
|
+
}
|
|
443
|
+
interface GetChatParams {
|
|
444
|
+
chat_id: ChatId;
|
|
445
|
+
}
|
|
446
|
+
interface GetChatMemberParams {
|
|
447
|
+
chat_id: ChatId;
|
|
448
|
+
user_id: UserId;
|
|
449
|
+
}
|
|
450
|
+
interface PinChatMessageParams {
|
|
451
|
+
chat_id: ChatId;
|
|
452
|
+
message_id: number;
|
|
453
|
+
}
|
|
454
|
+
interface SetChatTitleParams {
|
|
455
|
+
chat_id: ChatId;
|
|
456
|
+
title: string;
|
|
457
|
+
}
|
|
458
|
+
interface SetChatDescriptionParams {
|
|
459
|
+
chat_id: ChatId;
|
|
460
|
+
description: string;
|
|
461
|
+
}
|
|
462
|
+
interface CreateChatInviteLinkParams {
|
|
463
|
+
chat_id: ChatId;
|
|
464
|
+
}
|
|
465
|
+
interface RevokeChatInviteLinkParams {
|
|
466
|
+
chat_id: ChatId;
|
|
467
|
+
invite_link: string;
|
|
468
|
+
}
|
|
469
|
+
interface EditMessageTextParams {
|
|
470
|
+
chat_id: ChatId;
|
|
471
|
+
message_id: number;
|
|
472
|
+
text: string;
|
|
473
|
+
reply_markup?: InlineKeyboardMarkup;
|
|
474
|
+
}
|
|
475
|
+
interface EditMessageCaptionParams {
|
|
476
|
+
chat_id: ChatId;
|
|
477
|
+
message_id: number;
|
|
478
|
+
caption?: string;
|
|
479
|
+
reply_markup?: InlineKeyboardMarkup;
|
|
480
|
+
}
|
|
481
|
+
interface EditMessageReplyMarkupParams {
|
|
482
|
+
chat_id: ChatId;
|
|
483
|
+
message_id: number;
|
|
484
|
+
reply_markup?: InlineKeyboardMarkup;
|
|
485
|
+
}
|
|
486
|
+
interface DeleteMessageParams {
|
|
487
|
+
chat_id: ChatId;
|
|
488
|
+
message_id: number;
|
|
489
|
+
}
|
|
490
|
+
interface UploadStickerFileParams {
|
|
491
|
+
user_id: UserId;
|
|
492
|
+
sticker: InputFile;
|
|
493
|
+
}
|
|
494
|
+
interface CreateNewStickerSetParams {
|
|
495
|
+
user_id: UserId;
|
|
496
|
+
name: string;
|
|
497
|
+
title: string;
|
|
498
|
+
sticker: InputSticker[];
|
|
499
|
+
}
|
|
500
|
+
interface AddStickerToSetParams {
|
|
501
|
+
user_id: UserId;
|
|
502
|
+
name: string;
|
|
503
|
+
sticker: InputSticker;
|
|
504
|
+
}
|
|
505
|
+
interface SendInvoiceParams {
|
|
506
|
+
chat_id: ChatId;
|
|
507
|
+
title: string;
|
|
508
|
+
description: string;
|
|
509
|
+
payload: string;
|
|
510
|
+
provider_token: string;
|
|
511
|
+
prices: LabeledPrice[];
|
|
512
|
+
photo_url?: string;
|
|
513
|
+
reply_to_message_id?: number;
|
|
514
|
+
}
|
|
515
|
+
interface CreateInvoiceLinkParams {
|
|
516
|
+
title: string;
|
|
517
|
+
description: string;
|
|
518
|
+
payload: string;
|
|
519
|
+
provider_token: string;
|
|
520
|
+
prices: LabeledPrice[];
|
|
521
|
+
}
|
|
522
|
+
interface AnswerPreCheckoutQueryParams {
|
|
523
|
+
pre_checkout_query_id: string;
|
|
524
|
+
ok: boolean;
|
|
525
|
+
error_message?: string;
|
|
526
|
+
}
|
|
527
|
+
interface InquireTransactionParams {
|
|
528
|
+
provider_payment_charge_id: string;
|
|
529
|
+
}
|
|
530
|
+
type ApiMethodResultMap = {
|
|
531
|
+
getMe: User;
|
|
532
|
+
getUpdates: Update[];
|
|
533
|
+
setWebhook: boolean;
|
|
534
|
+
deleteWebhook: boolean;
|
|
535
|
+
getWebhookInfo: WebhookInfo;
|
|
536
|
+
sendMessage: Message;
|
|
537
|
+
forwardMessage: Message;
|
|
538
|
+
copyMessage: MessageId;
|
|
539
|
+
sendPhoto: Message;
|
|
540
|
+
sendAudio: Message;
|
|
541
|
+
sendDocument: Message;
|
|
542
|
+
sendVideo: Message;
|
|
543
|
+
sendAnimation: Message;
|
|
544
|
+
sendVoice: Message;
|
|
545
|
+
sendMediaGroup: Message[];
|
|
546
|
+
sendLocation: Message;
|
|
547
|
+
sendContact: Message;
|
|
548
|
+
sendChatAction: boolean;
|
|
549
|
+
getFile: File;
|
|
550
|
+
answerCallbackQuery: boolean;
|
|
551
|
+
askReview: boolean;
|
|
552
|
+
banChatMember: boolean;
|
|
553
|
+
unbanChatMember: boolean;
|
|
554
|
+
promoteChatMember: boolean;
|
|
555
|
+
setChatPhoto: boolean;
|
|
556
|
+
leaveChat: boolean;
|
|
557
|
+
getChat: ChatFullInfo;
|
|
558
|
+
getChatAdministrators: ChatMember[];
|
|
559
|
+
getChatMembersCount: number;
|
|
560
|
+
getChatMember: ChatMember;
|
|
561
|
+
pinChatMessage: boolean;
|
|
562
|
+
unPinChatMessage: boolean;
|
|
563
|
+
unpinAllChatMessages: boolean;
|
|
564
|
+
setChatTitle: boolean;
|
|
565
|
+
setChatDescription: boolean;
|
|
566
|
+
deleteChatPhoto: boolean;
|
|
567
|
+
createChatInviteLink: {
|
|
568
|
+
invite_link: string;
|
|
569
|
+
};
|
|
570
|
+
revokeChatInviteLink: {
|
|
571
|
+
invite_link: string;
|
|
572
|
+
};
|
|
573
|
+
exportChatInviteLink: string;
|
|
574
|
+
editMessageText: Message;
|
|
575
|
+
editMessageCaption: Message;
|
|
576
|
+
editMessageReplyMarkup: Message;
|
|
577
|
+
deleteMessage: boolean;
|
|
578
|
+
uploadStickerFile: File;
|
|
579
|
+
createNewStickerSet: boolean;
|
|
580
|
+
addStickerToSet: boolean;
|
|
581
|
+
sendInvoice: Message;
|
|
582
|
+
createInvoiceLink: string;
|
|
583
|
+
answerPreCheckoutQuery: boolean;
|
|
584
|
+
inquireTransaction: Transaction;
|
|
585
|
+
};
|
|
586
|
+
type ApiMethod = keyof ApiMethodResultMap;
|
|
587
|
+
|
|
588
|
+
declare const DEFAULT_API_BASE = "https://tapi.bale.ai";
|
|
589
|
+
interface ApiClientOptions {
|
|
590
|
+
token: string;
|
|
591
|
+
baseUrl?: string;
|
|
592
|
+
fetch?: typeof fetch;
|
|
593
|
+
maxRetries?: number;
|
|
594
|
+
retryDelayMs?: number;
|
|
595
|
+
}
|
|
596
|
+
declare class Api {
|
|
597
|
+
readonly token: string;
|
|
598
|
+
private readonly baseUrl;
|
|
599
|
+
private readonly fetchFn;
|
|
600
|
+
private readonly maxRetries;
|
|
601
|
+
private readonly retryDelayMs;
|
|
602
|
+
constructor(options: ApiClientOptions);
|
|
603
|
+
get fileBaseUrl(): string;
|
|
604
|
+
private methodUrl;
|
|
605
|
+
call<M extends ApiMethod>(method: M, params?: Record<string, unknown>): Promise<ApiMethodResultMap[M]>;
|
|
606
|
+
private invoke;
|
|
607
|
+
downloadFile(filePath: string): Promise<ArrayBuffer>;
|
|
608
|
+
private prepareBody;
|
|
609
|
+
private request;
|
|
610
|
+
private fetchWithRetry;
|
|
611
|
+
getMe(): Promise<User>;
|
|
612
|
+
getUpdates(params?: GetUpdatesParams): Promise<Update[]>;
|
|
613
|
+
setWebhook(params: SetWebhookParams): Promise<boolean>;
|
|
614
|
+
deleteWebhook(): Promise<boolean>;
|
|
615
|
+
getWebhookInfo(): Promise<WebhookInfo>;
|
|
616
|
+
sendMessage(params: SendMessageParams): Promise<Message>;
|
|
617
|
+
forwardMessage(params: ForwardMessageParams): Promise<Message>;
|
|
618
|
+
copyMessage(params: CopyMessageParams): Promise<MessageId>;
|
|
619
|
+
sendPhoto(params: SendPhotoParams): Promise<Message>;
|
|
620
|
+
sendAudio(params: SendAudioParams): Promise<Message>;
|
|
621
|
+
sendDocument(params: SendDocumentParams): Promise<Message>;
|
|
622
|
+
sendVideo(params: SendVideoParams): Promise<Message>;
|
|
623
|
+
sendAnimation(params: SendAnimationParams): Promise<Message>;
|
|
624
|
+
sendVoice(params: SendVoiceParams): Promise<Message>;
|
|
625
|
+
sendMediaGroup(params: SendMediaGroupParams): Promise<Message[]>;
|
|
626
|
+
sendLocation(params: SendLocationParams): Promise<Message>;
|
|
627
|
+
sendContact(params: SendContactParams): Promise<Message>;
|
|
628
|
+
sendChatAction(params: SendChatActionParams): Promise<boolean>;
|
|
629
|
+
getFile(params: GetFileParams): Promise<File>;
|
|
630
|
+
answerCallbackQuery(params: AnswerCallbackQueryParams): Promise<boolean>;
|
|
631
|
+
askReview(params: AskReviewParams): Promise<boolean>;
|
|
632
|
+
banChatMember(params: BanChatMemberParams): Promise<boolean>;
|
|
633
|
+
unbanChatMember(params: UnbanChatMemberParams): Promise<boolean>;
|
|
634
|
+
promoteChatMember(params: PromoteChatMemberParams): Promise<boolean>;
|
|
635
|
+
setChatPhoto(params: SetChatPhotoParams): Promise<boolean>;
|
|
636
|
+
leaveChat(params: LeaveChatParams): Promise<boolean>;
|
|
637
|
+
getChat(params: GetChatParams): Promise<ChatFullInfo>;
|
|
638
|
+
getChatAdministrators(params: GetChatParams): Promise<ChatMember[]>;
|
|
639
|
+
getChatMembersCount(params: GetChatParams): Promise<number>;
|
|
640
|
+
getChatMember(params: GetChatMemberParams): Promise<ChatMember>;
|
|
641
|
+
pinChatMessage(params: PinChatMessageParams): Promise<boolean>;
|
|
642
|
+
unPinChatMessage(params: PinChatMessageParams): Promise<boolean>;
|
|
643
|
+
unpinAllChatMessages(params: GetChatParams): Promise<boolean>;
|
|
644
|
+
setChatTitle(params: SetChatTitleParams): Promise<boolean>;
|
|
645
|
+
setChatDescription(params: SetChatDescriptionParams): Promise<boolean>;
|
|
646
|
+
deleteChatPhoto(params: GetChatParams): Promise<boolean>;
|
|
647
|
+
createChatInviteLink(params: CreateChatInviteLinkParams): Promise<{
|
|
648
|
+
invite_link: string;
|
|
649
|
+
}>;
|
|
650
|
+
revokeChatInviteLink(params: RevokeChatInviteLinkParams): Promise<{
|
|
651
|
+
invite_link: string;
|
|
652
|
+
}>;
|
|
653
|
+
exportChatInviteLink(params: GetChatParams): Promise<string>;
|
|
654
|
+
editMessageText(params: EditMessageTextParams): Promise<Message>;
|
|
655
|
+
editMessageCaption(params: EditMessageCaptionParams): Promise<Message>;
|
|
656
|
+
editMessageReplyMarkup(params: EditMessageReplyMarkupParams): Promise<Message>;
|
|
657
|
+
deleteMessage(params: DeleteMessageParams): Promise<boolean>;
|
|
658
|
+
uploadStickerFile(params: UploadStickerFileParams): Promise<File>;
|
|
659
|
+
createNewStickerSet(params: CreateNewStickerSetParams): Promise<boolean>;
|
|
660
|
+
addStickerToSet(params: AddStickerToSetParams): Promise<boolean>;
|
|
661
|
+
sendInvoice(params: SendInvoiceParams): Promise<Message>;
|
|
662
|
+
createInvoiceLink(params: CreateInvoiceLinkParams): Promise<string>;
|
|
663
|
+
answerPreCheckoutQuery(params: AnswerPreCheckoutQueryParams): Promise<boolean>;
|
|
664
|
+
inquireTransaction(params: InquireTransactionParams): Promise<Transaction>;
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
interface ContextOptions {
|
|
668
|
+
api: Api;
|
|
669
|
+
update: Update;
|
|
670
|
+
botInfo?: User;
|
|
671
|
+
}
|
|
672
|
+
declare class Context {
|
|
673
|
+
readonly api: Api;
|
|
674
|
+
readonly update: Update;
|
|
675
|
+
readonly botInfo?: User;
|
|
676
|
+
callbackQueryAnswered: boolean;
|
|
677
|
+
constructor(options: ContextOptions);
|
|
678
|
+
get updateId(): number;
|
|
679
|
+
get message(): Message | undefined;
|
|
680
|
+
get editedMessage(): Message | undefined;
|
|
681
|
+
get callbackQuery(): CallbackQuery | undefined;
|
|
682
|
+
get preCheckoutQuery(): PreCheckoutQuery | undefined;
|
|
683
|
+
get from(): User | undefined;
|
|
684
|
+
get chat(): Chat | undefined;
|
|
685
|
+
get chatId(): ChatId | undefined;
|
|
686
|
+
get text(): string | undefined;
|
|
687
|
+
get match(): RegExpMatchArray | null;
|
|
688
|
+
set match(value: RegExpMatchArray | null);
|
|
689
|
+
reply(text: string, extra?: Omit<SendMessageParams, "chat_id" | "text">): Promise<Message>;
|
|
690
|
+
replyWithPhoto(photo: SendPhotoParams["photo"], extra?: Omit<SendPhotoParams, "chat_id" | "photo">): Promise<Message>;
|
|
691
|
+
replyWithAudio(audio: SendAudioParams["audio"], extra?: Omit<SendAudioParams, "chat_id" | "audio">): Promise<Message>;
|
|
692
|
+
replyWithDocument(document: SendDocumentParams["document"], extra?: Omit<SendDocumentParams, "chat_id" | "document">): Promise<Message>;
|
|
693
|
+
replyWithVideo(video: SendVideoParams["video"], extra?: Omit<SendVideoParams, "chat_id" | "video">): Promise<Message>;
|
|
694
|
+
replyWithAnimation(animation: SendAnimationParams["animation"], extra?: Omit<SendAnimationParams, "chat_id" | "animation">): Promise<Message>;
|
|
695
|
+
replyWithVoice(voice: SendVoiceParams["voice"], extra?: Omit<SendVoiceParams, "chat_id" | "voice">): Promise<Message>;
|
|
696
|
+
replyWithLocation(latitude: number, longitude: number, extra?: Omit<SendLocationParams, "chat_id" | "latitude" | "longitude">): Promise<Message>;
|
|
697
|
+
replyWithContact(phoneNumber: string, firstName: string, extra?: Omit<SendContactParams, "chat_id" | "phone_number" | "first_name">): Promise<Message>;
|
|
698
|
+
replyWithInvoice(params: Omit<SendInvoiceParams, "chat_id">): Promise<Message>;
|
|
699
|
+
sendChatAction(action: ChatAction): Promise<boolean>;
|
|
700
|
+
answerCallbackQuery(params?: Omit<AnswerCallbackQueryParams, "callback_query_id">): Promise<boolean>;
|
|
701
|
+
answerPreCheckoutQuery(params: Omit<AnswerPreCheckoutQueryParams, "pre_checkout_query_id">): Promise<boolean>;
|
|
702
|
+
askReview(userId: UserId, delaySeconds: number): Promise<boolean>;
|
|
703
|
+
inquireTransaction(params: InquireTransactionParams): Promise<Transaction>;
|
|
704
|
+
downloadFile(fileId: string): Promise<ArrayBuffer>;
|
|
705
|
+
downloadToBuffer(fileId: string): Promise<Buffer>;
|
|
706
|
+
requireChatId(): ChatId;
|
|
707
|
+
requireFrom(): User;
|
|
708
|
+
}
|
|
709
|
+
type ReplyOptions = {
|
|
710
|
+
reply_markup?: ReplyMarkup;
|
|
711
|
+
reply_to_message_id?: number;
|
|
712
|
+
};
|
|
713
|
+
|
|
714
|
+
type NextFunction = () => Promise<void>;
|
|
715
|
+
type Middleware<C extends Context = Context> = (ctx: C, next: NextFunction) => Promise<void> | void;
|
|
716
|
+
type MiddlewareObject<C extends Context = Context> = {
|
|
717
|
+
middleware: () => Middleware<C>;
|
|
718
|
+
};
|
|
719
|
+
type MiddlewareLike<C extends Context = Context> = Middleware<C> | MiddlewareObject<C>;
|
|
720
|
+
declare function isMiddlewareObject<C extends Context>(value: MiddlewareLike<C>): value is MiddlewareObject<C>;
|
|
721
|
+
declare function normalizeMiddleware<C extends Context>(middleware: MiddlewareLike<C>): Middleware<C>;
|
|
722
|
+
declare function runMiddleware<C extends Context>(middleware: Middleware<C>[], ctx: C): Promise<void>;
|
|
723
|
+
declare function matchUpdate(update: Update): string[];
|
|
724
|
+
declare function extractCommand(text: string): {
|
|
725
|
+
command: string;
|
|
726
|
+
args: string;
|
|
727
|
+
} | null;
|
|
728
|
+
|
|
729
|
+
type FilterQuery = "message" | "message:text" | "message:photo" | "message:document" | "message:voice" | "message:audio" | "message:video" | "message:location" | "message:contact" | "message:sticker" | "message:command" | "message:successful_payment" | "message:web_app_data" | "edited_message" | "edited_message:text" | "callback_query" | "callback_query:data" | "pre_checkout_query";
|
|
730
|
+
type FilterContext<Q extends FilterQuery> = Q extends "message" ? Context & {
|
|
731
|
+
message: NonNullable<Context["message"]>;
|
|
732
|
+
} : Q extends "message:text" ? Context & {
|
|
733
|
+
message: NonNullable<Context["message"]> & {
|
|
734
|
+
text: string;
|
|
735
|
+
};
|
|
736
|
+
} : Q extends "callback_query" ? Context & {
|
|
737
|
+
callbackQuery: NonNullable<Context["callbackQuery"]>;
|
|
738
|
+
} : Q extends "callback_query:data" ? Context & {
|
|
739
|
+
callbackQuery: NonNullable<Context["callbackQuery"]> & {
|
|
740
|
+
data: string;
|
|
741
|
+
};
|
|
742
|
+
} : Q extends "pre_checkout_query" ? Context & {
|
|
743
|
+
preCheckoutQuery: NonNullable<Context["preCheckoutQuery"]>;
|
|
744
|
+
} : Context;
|
|
745
|
+
declare function matchesFilter(ctx: Context, filter: FilterQuery): boolean;
|
|
746
|
+
declare function matchesAnyFilter(ctx: Context, filters: FilterQuery[]): boolean;
|
|
747
|
+
declare function matchesChatType(ctx: Context, chatType: Chat["type"] | Chat["type"][]): boolean;
|
|
748
|
+
|
|
749
|
+
declare class Composer<C extends Context = Context> {
|
|
750
|
+
private readonly handler;
|
|
751
|
+
private readonly registered;
|
|
752
|
+
constructor(...middleware: MiddlewareLike<C>[]);
|
|
753
|
+
middleware(): Middleware<C>;
|
|
754
|
+
use(...middleware: MiddlewareLike<C>[]): this;
|
|
755
|
+
on(filter: FilterQuery | FilterQuery[], ...middleware: Middleware<C>[]): this;
|
|
756
|
+
filter(predicate: (ctx: C) => boolean | Promise<boolean>, ...middleware: Middleware<C>[]): this;
|
|
757
|
+
command(command: string | string[], ...middleware: Middleware<C>[]): this;
|
|
758
|
+
hears(pattern: string | RegExp, ...middleware: Middleware<C>[]): this;
|
|
759
|
+
chatType(chatType: Chat["type"] | Chat["type"][], ...middleware: Middleware<C>[]): this;
|
|
760
|
+
}
|
|
761
|
+
|
|
762
|
+
interface PollingBot {
|
|
763
|
+
api: Bot["api"];
|
|
764
|
+
handleUpdate(update: Update): Promise<void>;
|
|
765
|
+
init(): Promise<unknown>;
|
|
766
|
+
}
|
|
767
|
+
interface PollingOptions {
|
|
768
|
+
limit?: number;
|
|
769
|
+
timeout?: number;
|
|
770
|
+
allowedUpdates?: string[];
|
|
771
|
+
onError?: (error: unknown) => void;
|
|
772
|
+
signal?: AbortSignal;
|
|
773
|
+
}
|
|
774
|
+
declare class PollingRunner {
|
|
775
|
+
private running;
|
|
776
|
+
private abortController?;
|
|
777
|
+
private offset;
|
|
778
|
+
start(bot: PollingBot, options?: PollingOptions): Promise<void>;
|
|
779
|
+
stop(): Promise<void>;
|
|
780
|
+
}
|
|
781
|
+
declare function createWebhookHandler(bot: PollingBot, getUpdate: (request: Request) => Promise<Update>, options?: {
|
|
782
|
+
secretToken?: string;
|
|
783
|
+
maxBodyBytes?: number;
|
|
784
|
+
}): Promise<(request: Request) => Promise<Response>>;
|
|
785
|
+
declare function webhookFromJson(bot: PollingBot): Promise<(request: Request) => Promise<Response>>;
|
|
786
|
+
|
|
787
|
+
interface BotOptions extends ApiClientOptions {
|
|
788
|
+
botInfo?: User;
|
|
789
|
+
autoAnswerCallback?: boolean;
|
|
790
|
+
}
|
|
791
|
+
declare class Bot<C extends Context = Context> extends Composer<C> {
|
|
792
|
+
readonly api: Api;
|
|
793
|
+
private botInfo?;
|
|
794
|
+
private readonly polling;
|
|
795
|
+
private readonly autoAnswer;
|
|
796
|
+
constructor(token: string, options?: Omit<BotOptions, "token">);
|
|
797
|
+
init(): Promise<User>;
|
|
798
|
+
handleUpdate(update: Update): Promise<void>;
|
|
799
|
+
createContext(update: Update): Context;
|
|
800
|
+
start(options?: PollingOptions): Promise<void>;
|
|
801
|
+
stop(): Promise<void>;
|
|
802
|
+
webhookCallback(): (update: Update) => Promise<void>;
|
|
803
|
+
use(...middleware: MiddlewareLike<C>[]): this;
|
|
804
|
+
}
|
|
805
|
+
|
|
806
|
+
declare class BaleError extends Error {
|
|
807
|
+
constructor(message: string, options?: ErrorOptions);
|
|
808
|
+
}
|
|
809
|
+
declare class BaleAPIError extends BaleError {
|
|
810
|
+
readonly errorCode: number;
|
|
811
|
+
readonly description: string;
|
|
812
|
+
readonly parameters?: ResponseParameters;
|
|
813
|
+
constructor(errorCode: number, description: string, parameters?: ResponseParameters);
|
|
814
|
+
}
|
|
815
|
+
declare class BaleNetworkError extends BaleError {
|
|
816
|
+
constructor(message: string, options?: ErrorOptions);
|
|
817
|
+
}
|
|
818
|
+
|
|
819
|
+
declare const bold: (text: string) => string;
|
|
820
|
+
declare const italic: (text: string) => string;
|
|
821
|
+
declare const link: (text: string, url: string) => string;
|
|
822
|
+
declare const spoiler: (text: string, description: string) => string;
|
|
823
|
+
declare const md: {
|
|
824
|
+
bold: (text: string) => string;
|
|
825
|
+
italic: (text: string) => string;
|
|
826
|
+
link: (text: string, url: string) => string;
|
|
827
|
+
spoiler: (text: string, description: string) => string;
|
|
828
|
+
};
|
|
829
|
+
|
|
830
|
+
declare class InlineKeyboard implements InlineKeyboardMarkup {
|
|
831
|
+
inline_keyboard: InlineKeyboardButton[][];
|
|
832
|
+
constructor(rows?: InlineKeyboardButton[][]);
|
|
833
|
+
row(...buttons: InlineKeyboardButton[]): this;
|
|
834
|
+
text(text: string, callbackData: string): this;
|
|
835
|
+
url(text: string, url: string): this;
|
|
836
|
+
webApp(text: string, webApp: WebAppInfo): this;
|
|
837
|
+
copyText(text: string, copyText: CopyTextButton): this;
|
|
838
|
+
toJSON(): InlineKeyboardMarkup;
|
|
839
|
+
}
|
|
840
|
+
|
|
841
|
+
declare class ReplyKeyboard implements ReplyKeyboardMarkup {
|
|
842
|
+
keyboard: KeyboardButton[][];
|
|
843
|
+
resize_keyboard?: boolean;
|
|
844
|
+
one_time_keyboard?: boolean;
|
|
845
|
+
selective?: boolean;
|
|
846
|
+
constructor(rows?: KeyboardButton[][]);
|
|
847
|
+
row(...buttons: KeyboardButton[]): this;
|
|
848
|
+
text(text: string): this;
|
|
849
|
+
webApp(text: string, webApp: WebAppInfo): this;
|
|
850
|
+
resized(value?: boolean): this;
|
|
851
|
+
oneTime(value?: boolean): this;
|
|
852
|
+
onlySelective(value?: boolean): this;
|
|
853
|
+
toJSON(): ReplyKeyboardMarkup;
|
|
854
|
+
}
|
|
855
|
+
declare function removeKeyboard(): ReplyKeyboardRemove;
|
|
856
|
+
|
|
857
|
+
declare function autoAnswerCallback(): Middleware<Context>;
|
|
858
|
+
declare function errorHandler(onError: (error: unknown, ctx: Context) => Promise<void> | void): Middleware<Context>;
|
|
859
|
+
|
|
860
|
+
export { type AddStickerToSetParams, type Animation, type AnswerCallbackQueryParams, type AnswerPreCheckoutQueryParams, Api, type ApiClientOptions, type ApiMethod, type ApiMethodResultMap, type AskReviewParams, type Audio, BaleAPIError, type BaleApiResponse, BaleError, BaleNetworkError, type BanChatMemberParams, Bot, type BotOptions, type CallbackQuery, type Chat, type ChatAction, type ChatFullInfo, type ChatId, type ChatMember, type ChatMemberAdministrator, type ChatMemberMember, type ChatMemberOwner, type ChatMemberRestricted, type ChatPhoto, Composer, type Contact, Context, type ContextOptions, type CopyMessageParams, type CopyTextButton, type CreateChatInviteLinkParams, type CreateInvoiceLinkParams, type CreateNewStickerSetParams, DEFAULT_API_BASE, type DeleteMessageParams, type Document, type EditMessageCaptionParams, type EditMessageReplyMarkupParams, type EditMessageTextParams, type File, type FilterContext, type FilterQuery, type ForwardMessageParams, type GetChatMemberParams, type GetChatParams, type GetFileParams, type GetUpdatesParams, InlineKeyboard, type InlineKeyboardButton, type InlineKeyboardMarkup, InputFile, type InputMedia, type InputMediaAnimation, type InputMediaAudio, type InputMediaDocument, type InputMediaPhoto, type InputMediaVideo, type InputSticker, type InquireTransactionParams, type Invoice, type KeyboardButton, type LabeledPrice, type LeaveChatParams, type Location, type Message, type MessageEntity, type MessageId, type Middleware, type MiddlewareLike, type MiddlewareObject, type NextFunction, type PhotoSize, type PinChatMessageParams, type PollingBot, type PollingOptions, PollingRunner, type PreCheckoutQuery, type PromoteChatMemberParams, ReplyKeyboard, type ReplyKeyboardMarkup, type ReplyKeyboardRemove, type ReplyMarkup, type ReplyOptions, type ResponseParameters, type RevokeChatInviteLinkParams, type SendAnimationParams, type SendAudioParams, type SendChatActionParams, type SendContactParams, type SendDocumentParams, type SendInvoiceParams, type SendLocationParams, type SendMediaGroupParams, type SendMediaParams, type SendMessageParams, type SendPhotoParams, type SendVideoParams, type SendVoiceParams, type SetChatDescriptionParams, type SetChatPhotoParams, type SetChatTitleParams, type SetWebhookParams, type Sticker, type StickerSet, type SuccessfulPayment, type Transaction, type UnbanChatMemberParams, type Update, type UploadStickerFileParams, type User, type UserId, type Video, type Voice, type WebAppData, type WebAppInfo, type WebhookInfo, autoAnswerCallback, bold, createWebhookHandler, errorHandler, extractCommand, isFilePath, isMiddlewareObject, italic, link, matchUpdate, matchesAnyFilter, matchesChatType, matchesFilter, md, normalizeMiddleware, removeKeyboard, runMiddleware, spoiler, webhookFromJson };
|