gramstax 0.0.27 → 0.1.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 +25 -25
- package/dist/src/index.cjs +1 -1
- package/dist/src/index.d.cts +194 -203
- package/dist/src/index.d.ts +194 -203
- package/dist/src/index.js +1 -1
- package/package.json +9 -1
package/dist/src/index.d.ts
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { LoggingPretty } from 'logging-pretty';
|
|
1
|
+
import LoggingPretty, { LoggingPretty as LoggingPretty$1 } from 'logging-pretty';
|
|
2
2
|
import { Keyv } from 'keyv';
|
|
3
3
|
import * as grammy from 'grammy';
|
|
4
4
|
import { Context, Keyboard, InlineKeyboard, Bot, BotError } from 'grammy';
|
|
5
|
-
import * as
|
|
6
|
-
import { UserFromGetMe } from 'grammy/types';
|
|
5
|
+
import * as _grammyjs_types from '@grammyjs/types';
|
|
7
6
|
import { FSWatcher } from 'chokidar';
|
|
7
|
+
import { UserFromGetMe } from 'grammy/types';
|
|
8
8
|
|
|
9
|
-
declare
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
logError(error: any, constructorName?: string, funcName?: string): void;
|
|
9
|
+
declare class LoggingUtils extends LoggingPretty {
|
|
10
|
+
constructor();
|
|
11
|
+
errorMake(error: any, constructorOrName?: any, funcName?: string): void;
|
|
13
12
|
}
|
|
13
|
+
declare const log: LoggingUtils;
|
|
14
14
|
|
|
15
15
|
type IMore = Omit<Required<ConstructorParameters<typeof Keyv>>[0], `store` | `namespace` | `ttl`> & {
|
|
16
16
|
forceStore?: any;
|
|
17
17
|
};
|
|
18
18
|
declare class CacheExternal extends Keyv {
|
|
19
|
-
url: string
|
|
20
|
-
constructor(url?: string
|
|
19
|
+
url: string;
|
|
20
|
+
constructor(url?: string, namespace?: string, ttl?: number, more?: IMore);
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
type IMediaBlock = {
|
|
@@ -96,7 +96,7 @@ type ICompiledTemplate = {
|
|
|
96
96
|
type ITemplateOptions = {
|
|
97
97
|
/** Base path for template files */
|
|
98
98
|
path: string[];
|
|
99
|
-
/** Enable file watching for hot reloading
|
|
99
|
+
/** Enable file watching for hot reloading for value template only */
|
|
100
100
|
enableWatch?: boolean;
|
|
101
101
|
};
|
|
102
102
|
/** Template management system */
|
|
@@ -121,7 +121,7 @@ declare class TemplateManager {
|
|
|
121
121
|
/** Handle watcher errors */
|
|
122
122
|
_handleWatchError(error: any): void;
|
|
123
123
|
/** Load all Template files during initialization */
|
|
124
|
-
_loadAllFiles(): void
|
|
124
|
+
_loadAllFiles(): Promise<void>;
|
|
125
125
|
/** Load and compile a single template file */
|
|
126
126
|
_loadFile(filename: string, useSync?: boolean): Promise<void>;
|
|
127
127
|
_getExtension(filename: string): string;
|
|
@@ -138,7 +138,7 @@ declare class TemplateManager {
|
|
|
138
138
|
* @param data Template variables
|
|
139
139
|
* @returns media object
|
|
140
140
|
*/
|
|
141
|
-
getMedia(key: string, baseId?: string, language?: string, data?: Record<string, any>):
|
|
141
|
+
getMedia(key: string, baseId?: string, language?: string, data?: Record<string, any>): ReturnType<ICompiledTemplate[`media`][`default`][`default`]>;
|
|
142
142
|
/**
|
|
143
143
|
* Get compiled message template
|
|
144
144
|
* @param key Template identifier (filename without extension)
|
|
@@ -180,14 +180,6 @@ declare class TemplateManager {
|
|
|
180
180
|
* @returns True if template exists
|
|
181
181
|
*/
|
|
182
182
|
has(key: string): boolean;
|
|
183
|
-
/**
|
|
184
|
-
* Get cache statistics
|
|
185
|
-
* @returns Object with cache information
|
|
186
|
-
*/
|
|
187
|
-
getCacheStats(): {
|
|
188
|
-
templateCount: number;
|
|
189
|
-
totalSize: number;
|
|
190
|
-
};
|
|
191
183
|
/**
|
|
192
184
|
* Cleanup resources and close watchers
|
|
193
185
|
* @returns Promise void
|
|
@@ -195,31 +187,31 @@ declare class TemplateManager {
|
|
|
195
187
|
destroy(): Promise<void>;
|
|
196
188
|
}
|
|
197
189
|
|
|
198
|
-
type IInlineKb = InlineKeyboard
|
|
199
|
-
type IBottomKb = Keyboard
|
|
200
|
-
type IKb = IBottomKb | IInlineKb
|
|
201
|
-
type ICt = Context
|
|
202
|
-
type IOptReply = Parameters<Context[`reply`]>[1]
|
|
203
|
-
type IOptReplyPhoto = Parameters<Context[`replyWithPhoto`]>[1]
|
|
204
|
-
type IOptReplyVideo = Parameters<Context[`replyWithVideo`]>[1]
|
|
205
|
-
type IOptReplyAudio = Parameters<Context[`replyWithAudio`]>[1]
|
|
206
|
-
type IOptReplyDocument = Parameters<Context[`replyWithDocument`]>[1]
|
|
207
|
-
type IOptReplyAnimation = Parameters<Context[`replyWithAnimation`]>[1]
|
|
208
|
-
type IOptReplyVoice = Parameters<Context[`replyWithVoice`]>[1]
|
|
209
|
-
type IOptReplyVideoNote = Parameters<Context[`replyWithVideoNote`]>[1]
|
|
210
|
-
type IOptReplySticker = Parameters<Context[`replyWithSticker`]>[1]
|
|
211
|
-
type IOptReplyLocation = Parameters<Context[`replyWithLocation`]>[2]
|
|
212
|
-
type IOptReplyContact = Parameters<Context[`replyWithContact`]>[2]
|
|
213
|
-
type IOptEdit = Parameters<Context[`editMessageText`]>[1]
|
|
214
|
-
type IOptEditMedia1 = Parameters<Context[`editMessageMedia`]>[0]
|
|
215
|
-
type IOptEditMedia2 = Parameters<Context[`editMessageMedia`]>[1]
|
|
216
|
-
|
|
217
|
-
type ITypeReplyAction = Parameters<Context[`replyWithChatAction`]>[0]
|
|
190
|
+
type IInlineKb = InlineKeyboard
|
|
191
|
+
type IBottomKb = Keyboard
|
|
192
|
+
type IKb = IBottomKb | IInlineKb
|
|
193
|
+
type ICt = Context
|
|
194
|
+
type IOptReply = Parameters<Context[`reply`]>[1]
|
|
195
|
+
type IOptReplyPhoto = Parameters<Context[`replyWithPhoto`]>[1]
|
|
196
|
+
type IOptReplyVideo = Parameters<Context[`replyWithVideo`]>[1]
|
|
197
|
+
type IOptReplyAudio = Parameters<Context[`replyWithAudio`]>[1]
|
|
198
|
+
type IOptReplyDocument = Parameters<Context[`replyWithDocument`]>[1]
|
|
199
|
+
type IOptReplyAnimation = Parameters<Context[`replyWithAnimation`]>[1]
|
|
200
|
+
type IOptReplyVoice = Parameters<Context[`replyWithVoice`]>[1]
|
|
201
|
+
type IOptReplyVideoNote = Parameters<Context[`replyWithVideoNote`]>[1]
|
|
202
|
+
type IOptReplySticker = Parameters<Context[`replyWithSticker`]>[1]
|
|
203
|
+
type IOptReplyLocation = Parameters<Context[`replyWithLocation`]>[2]
|
|
204
|
+
type IOptReplyContact = Parameters<Context[`replyWithContact`]>[2]
|
|
205
|
+
type IOptEdit = Parameters<Context[`editMessageText`]>[1]
|
|
206
|
+
type IOptEditMedia1 = Parameters<Context[`editMessageMedia`]>[0]
|
|
207
|
+
type IOptEditMedia2 = Parameters<Context[`editMessageMedia`]>[1]
|
|
208
|
+
|
|
209
|
+
type ITypeReplyAction = Parameters<Context[`replyWithChatAction`]>[0]
|
|
218
210
|
type IData = Record<string, any>
|
|
219
211
|
|
|
220
212
|
type IPageData = {
|
|
221
213
|
name: string;
|
|
222
|
-
callbackData: (...args:
|
|
214
|
+
callbackData: (...args: string[]) => string;
|
|
223
215
|
};
|
|
224
216
|
type ITemp = {
|
|
225
217
|
session: {
|
|
@@ -229,35 +221,35 @@ type ITemp = {
|
|
|
229
221
|
data: Partial<IPageData>;
|
|
230
222
|
[key: string]: any;
|
|
231
223
|
};
|
|
232
|
-
declare class Ctx
|
|
224
|
+
declare class Ctx {
|
|
233
225
|
static template?: string;
|
|
234
226
|
static data: IPageData;
|
|
235
227
|
data: IPageData;
|
|
236
|
-
get
|
|
237
|
-
get
|
|
238
|
-
get
|
|
239
|
-
get
|
|
240
|
-
get
|
|
241
|
-
get
|
|
242
|
-
get
|
|
228
|
+
get userIsPremium(): boolean;
|
|
229
|
+
get userIsBot(): boolean;
|
|
230
|
+
get userId(): number;
|
|
231
|
+
get userName(): string;
|
|
232
|
+
get userFullName(): string;
|
|
233
|
+
get userFirstName(): string;
|
|
234
|
+
get userLastName(): string;
|
|
235
|
+
get userLanguage(): string;
|
|
236
|
+
set userLanguage(v: string);
|
|
243
237
|
get msgText(): string;
|
|
244
238
|
get msgTextIntent(): string;
|
|
245
|
-
get msgTextPayloads():
|
|
239
|
+
get msgTextPayloads(): string[];
|
|
246
240
|
get msgTextPayload(): string;
|
|
247
241
|
get msgCaption(): string;
|
|
248
242
|
get msgCaptionIntent(): string;
|
|
249
|
-
get msgPhoto():
|
|
250
|
-
get msgVideo():
|
|
251
|
-
get msgAudio():
|
|
243
|
+
get msgPhoto(): _grammyjs_types.PhotoSize[] | undefined;
|
|
244
|
+
get msgVideo(): _grammyjs_types.Video | undefined;
|
|
245
|
+
get msgAudio(): _grammyjs_types.Audio | undefined;
|
|
252
246
|
get callbackData(): string;
|
|
253
247
|
get callbackDataIntent(): string;
|
|
254
|
-
get callbackDataPayloads():
|
|
248
|
+
get callbackDataPayloads(): string[];
|
|
255
249
|
get callbackDataPayload(): string;
|
|
256
|
-
get callbackDataParts():
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
set session(v: any);
|
|
260
|
-
get session(): any;
|
|
250
|
+
get callbackDataParts(): string[];
|
|
251
|
+
set session(v: ITemp[`session`]);
|
|
252
|
+
get session(): ITemp[`session`];
|
|
261
253
|
ct: ICt;
|
|
262
254
|
cacheSession: CacheExternal;
|
|
263
255
|
cacheKeyboard: Map<any, any>;
|
|
@@ -270,38 +262,38 @@ declare class Ctx extends BaseGeneral {
|
|
|
270
262
|
templateManager: TemplateManager;
|
|
271
263
|
temp: ITemp;
|
|
272
264
|
});
|
|
273
|
-
broadcast(ids:
|
|
274
|
-
reply(keyboard?: IKb, data?: IData, baseId?: string, options?: IOptReply): Promise<
|
|
275
|
-
replyMedia<T extends IMediaBlock[`type`]>(type: T, keyboard?: IKb, data?: IData, baseId?: string, options?: T extends `photo` ? IOptReplyPhoto : T extends `video` ? IOptReplyVideo : T extends `audio` ? IOptReplyAudio : T extends `document` ? IOptReplyDocument : T extends `animation` ? IOptReplyAnimation : T extends `voice` ? IOptReplyVoice : T extends `video_note` ? IOptReplyVideoNote : T extends `sticker` ? IOptReplySticker : T extends `location` ? IOptReplyLocation : T extends `contact` ? IOptReplyContact : undefined): Promise<
|
|
276
|
-
replyPhoto(keyboard?: IKb, data?: IData, baseId?: string, options?: IOptReplyPhoto): Promise<
|
|
277
|
-
replyVideo(keyboard?: IKb, data?: IData, baseId?: string, options?: IOptReplyVideo): Promise<
|
|
278
|
-
replyAudio(keyboard?: IKb, data?: IData, baseId?: string, options?: IOptReplyAudio): Promise<
|
|
279
|
-
replyDocument(keyboard?: IKb, data?: IData, baseId?: string, options?: IOptReplyDocument): Promise<
|
|
280
|
-
replyAnimation(keyboard?: IKb, data?: IData, baseId?: string, options?: IOptReplyAnimation): Promise<
|
|
281
|
-
replyVoice(keyboard?: IKb, data?: IData, baseId?: string, options?: IOptReplyVoice): Promise<
|
|
282
|
-
replyVideoNote(keyboard?: IKb, data?: IData, baseId?: string, options?: IOptReplyVideoNote): Promise<
|
|
283
|
-
replySticker(keyboard?: IKb, data?: IData, baseId?: string, options?: IOptReplySticker): Promise<
|
|
284
|
-
replyLocation(keyboard?: IKb, data?: IData, baseId?: string, options?: IOptReplyLocation): Promise<
|
|
285
|
-
replyContact(keyboard?: IKb, data?: IData, baseId?: string, options?: IOptReplyContact): Promise<
|
|
265
|
+
broadcast(ids: number[], languageCode: string[], keyboard?: IKb, data?: IData, baseId?: string, options?: IOptReply, throwError?: boolean): Promise<void>;
|
|
266
|
+
reply(keyboard?: IKb, data?: IData, baseId?: string, options?: IOptReply): Promise<_grammyjs_types.Message.TextMessage>;
|
|
267
|
+
replyMedia<T extends IMediaBlock[`type`]>(type: T, keyboard?: IKb, data?: IData, baseId?: string, options?: T extends `photo` ? IOptReplyPhoto : T extends `video` ? IOptReplyVideo : T extends `audio` ? IOptReplyAudio : T extends `document` ? IOptReplyDocument : T extends `animation` ? IOptReplyAnimation : T extends `voice` ? IOptReplyVoice : T extends `video_note` ? IOptReplyVideoNote : T extends `sticker` ? IOptReplySticker : T extends `location` ? IOptReplyLocation : T extends `contact` ? IOptReplyContact : undefined): Promise<_grammyjs_types.Message.LocationMessage | _grammyjs_types.Message.ContactMessage | _grammyjs_types.Message.PhotoMessage | _grammyjs_types.Message.VideoMessage | _grammyjs_types.Message.AudioMessage | _grammyjs_types.Message.DocumentMessage | _grammyjs_types.Message.VoiceMessage | _grammyjs_types.Message.VideoNoteMessage | _grammyjs_types.Message.StickerMessage | undefined>;
|
|
268
|
+
replyPhoto(keyboard?: IKb, data?: IData, baseId?: string, options?: IOptReplyPhoto): Promise<_grammyjs_types.Message.LocationMessage | _grammyjs_types.Message.ContactMessage | _grammyjs_types.Message.PhotoMessage | _grammyjs_types.Message.VideoMessage | _grammyjs_types.Message.AudioMessage | _grammyjs_types.Message.DocumentMessage | _grammyjs_types.Message.VoiceMessage | _grammyjs_types.Message.VideoNoteMessage | _grammyjs_types.Message.StickerMessage | undefined>;
|
|
269
|
+
replyVideo(keyboard?: IKb, data?: IData, baseId?: string, options?: IOptReplyVideo): Promise<_grammyjs_types.Message.LocationMessage | _grammyjs_types.Message.ContactMessage | _grammyjs_types.Message.PhotoMessage | _grammyjs_types.Message.VideoMessage | _grammyjs_types.Message.AudioMessage | _grammyjs_types.Message.DocumentMessage | _grammyjs_types.Message.VoiceMessage | _grammyjs_types.Message.VideoNoteMessage | _grammyjs_types.Message.StickerMessage | undefined>;
|
|
270
|
+
replyAudio(keyboard?: IKb, data?: IData, baseId?: string, options?: IOptReplyAudio): Promise<_grammyjs_types.Message.LocationMessage | _grammyjs_types.Message.ContactMessage | _grammyjs_types.Message.PhotoMessage | _grammyjs_types.Message.VideoMessage | _grammyjs_types.Message.AudioMessage | _grammyjs_types.Message.DocumentMessage | _grammyjs_types.Message.VoiceMessage | _grammyjs_types.Message.VideoNoteMessage | _grammyjs_types.Message.StickerMessage | undefined>;
|
|
271
|
+
replyDocument(keyboard?: IKb, data?: IData, baseId?: string, options?: IOptReplyDocument): Promise<_grammyjs_types.Message.LocationMessage | _grammyjs_types.Message.ContactMessage | _grammyjs_types.Message.PhotoMessage | _grammyjs_types.Message.VideoMessage | _grammyjs_types.Message.AudioMessage | _grammyjs_types.Message.DocumentMessage | _grammyjs_types.Message.VoiceMessage | _grammyjs_types.Message.VideoNoteMessage | _grammyjs_types.Message.StickerMessage | undefined>;
|
|
272
|
+
replyAnimation(keyboard?: IKb, data?: IData, baseId?: string, options?: IOptReplyAnimation): Promise<_grammyjs_types.Message.LocationMessage | _grammyjs_types.Message.ContactMessage | _grammyjs_types.Message.PhotoMessage | _grammyjs_types.Message.VideoMessage | _grammyjs_types.Message.AudioMessage | _grammyjs_types.Message.DocumentMessage | _grammyjs_types.Message.VoiceMessage | _grammyjs_types.Message.VideoNoteMessage | _grammyjs_types.Message.StickerMessage | undefined>;
|
|
273
|
+
replyVoice(keyboard?: IKb, data?: IData, baseId?: string, options?: IOptReplyVoice): Promise<_grammyjs_types.Message.LocationMessage | _grammyjs_types.Message.ContactMessage | _grammyjs_types.Message.PhotoMessage | _grammyjs_types.Message.VideoMessage | _grammyjs_types.Message.AudioMessage | _grammyjs_types.Message.DocumentMessage | _grammyjs_types.Message.VoiceMessage | _grammyjs_types.Message.VideoNoteMessage | _grammyjs_types.Message.StickerMessage | undefined>;
|
|
274
|
+
replyVideoNote(keyboard?: IKb, data?: IData, baseId?: string, options?: IOptReplyVideoNote): Promise<_grammyjs_types.Message.LocationMessage | _grammyjs_types.Message.ContactMessage | _grammyjs_types.Message.PhotoMessage | _grammyjs_types.Message.VideoMessage | _grammyjs_types.Message.AudioMessage | _grammyjs_types.Message.DocumentMessage | _grammyjs_types.Message.VoiceMessage | _grammyjs_types.Message.VideoNoteMessage | _grammyjs_types.Message.StickerMessage | undefined>;
|
|
275
|
+
replySticker(keyboard?: IKb, data?: IData, baseId?: string, options?: IOptReplySticker): Promise<_grammyjs_types.Message.LocationMessage | _grammyjs_types.Message.ContactMessage | _grammyjs_types.Message.PhotoMessage | _grammyjs_types.Message.VideoMessage | _grammyjs_types.Message.AudioMessage | _grammyjs_types.Message.DocumentMessage | _grammyjs_types.Message.VoiceMessage | _grammyjs_types.Message.VideoNoteMessage | _grammyjs_types.Message.StickerMessage | undefined>;
|
|
276
|
+
replyLocation(keyboard?: IKb, data?: IData, baseId?: string, options?: IOptReplyLocation): Promise<_grammyjs_types.Message.LocationMessage | _grammyjs_types.Message.ContactMessage | _grammyjs_types.Message.PhotoMessage | _grammyjs_types.Message.VideoMessage | _grammyjs_types.Message.AudioMessage | _grammyjs_types.Message.DocumentMessage | _grammyjs_types.Message.VoiceMessage | _grammyjs_types.Message.VideoNoteMessage | _grammyjs_types.Message.StickerMessage | undefined>;
|
|
277
|
+
replyContact(keyboard?: IKb, data?: IData, baseId?: string, options?: IOptReplyContact): Promise<_grammyjs_types.Message.LocationMessage | _grammyjs_types.Message.ContactMessage | _grammyjs_types.Message.PhotoMessage | _grammyjs_types.Message.VideoMessage | _grammyjs_types.Message.AudioMessage | _grammyjs_types.Message.DocumentMessage | _grammyjs_types.Message.VoiceMessage | _grammyjs_types.Message.VideoNoteMessage | _grammyjs_types.Message.StickerMessage | undefined>;
|
|
286
278
|
replyAction(type: ITypeReplyAction): Promise<true>;
|
|
287
|
-
edit(
|
|
279
|
+
edit(keyboardInline?: IInlineKb, data?: IData, baseId?: string, options?: IOptEdit, fallbackReply?: boolean): Promise<true | (_grammyjs_types.Update.Edited & _grammyjs_types.Message.CommonMessage & {
|
|
288
280
|
text: string;
|
|
289
281
|
} & Partial<{
|
|
290
|
-
entities:
|
|
282
|
+
entities: _grammyjs_types.MessageEntity[];
|
|
291
283
|
}>) | undefined>;
|
|
292
|
-
editMedia<T extends IMediaBlock[`type`]>(type: T,
|
|
293
|
-
editPhoto(
|
|
294
|
-
editVideo(
|
|
295
|
-
editAudio(
|
|
296
|
-
editDocument(
|
|
297
|
-
editAnimation(
|
|
298
|
-
editVoice(
|
|
299
|
-
editVideoNote(
|
|
300
|
-
editSticker(
|
|
301
|
-
editLocation(
|
|
302
|
-
editContact(
|
|
284
|
+
editMedia<T extends IMediaBlock[`type`]>(type: T, keyboardInline?: IInlineKb, data?: IData, baseId?: string, options1?: T extends `voice` ? IOptReplyVoice : T extends `video_note` ? IOptReplyVideoNote : T extends `sticker` ? IOptReplySticker : T extends `location` ? IOptReplyLocation : T extends `contact` ? IOptReplyContact : IOptEditMedia1, options2?: IOptEditMedia2, fallbackReply?: boolean): Promise<true | _grammyjs_types.Message.LocationMessage | _grammyjs_types.Message.ContactMessage | _grammyjs_types.Message.PhotoMessage | _grammyjs_types.Message.VideoMessage | _grammyjs_types.Message.AudioMessage | _grammyjs_types.Message.DocumentMessage | _grammyjs_types.Message.VoiceMessage | _grammyjs_types.Message.VideoNoteMessage | _grammyjs_types.Message.StickerMessage | (_grammyjs_types.Update.Edited & _grammyjs_types.Message) | undefined>;
|
|
285
|
+
editPhoto(keyboardInline?: IInlineKb, data?: IData, baseId?: string, options1?: IOptEditMedia1, options2?: IOptEditMedia2): Promise<true | _grammyjs_types.Message.LocationMessage | _grammyjs_types.Message.ContactMessage | _grammyjs_types.Message.PhotoMessage | _grammyjs_types.Message.VideoMessage | _grammyjs_types.Message.AudioMessage | _grammyjs_types.Message.DocumentMessage | _grammyjs_types.Message.VoiceMessage | _grammyjs_types.Message.VideoNoteMessage | _grammyjs_types.Message.StickerMessage | (_grammyjs_types.Update.Edited & _grammyjs_types.Message) | undefined>;
|
|
286
|
+
editVideo(keyboardInline?: IInlineKb, data?: IData, baseId?: string, options1?: IOptEditMedia1, options2?: IOptEditMedia2): Promise<true | _grammyjs_types.Message.LocationMessage | _grammyjs_types.Message.ContactMessage | _grammyjs_types.Message.PhotoMessage | _grammyjs_types.Message.VideoMessage | _grammyjs_types.Message.AudioMessage | _grammyjs_types.Message.DocumentMessage | _grammyjs_types.Message.VoiceMessage | _grammyjs_types.Message.VideoNoteMessage | _grammyjs_types.Message.StickerMessage | (_grammyjs_types.Update.Edited & _grammyjs_types.Message) | undefined>;
|
|
287
|
+
editAudio(keyboardInline?: IInlineKb, data?: IData, baseId?: string, options1?: IOptEditMedia1, options2?: IOptEditMedia2): Promise<true | _grammyjs_types.Message.LocationMessage | _grammyjs_types.Message.ContactMessage | _grammyjs_types.Message.PhotoMessage | _grammyjs_types.Message.VideoMessage | _grammyjs_types.Message.AudioMessage | _grammyjs_types.Message.DocumentMessage | _grammyjs_types.Message.VoiceMessage | _grammyjs_types.Message.VideoNoteMessage | _grammyjs_types.Message.StickerMessage | (_grammyjs_types.Update.Edited & _grammyjs_types.Message) | undefined>;
|
|
288
|
+
editDocument(keyboardInline?: IInlineKb, data?: IData, baseId?: string, options1?: IOptEditMedia1, options2?: IOptEditMedia2): Promise<true | _grammyjs_types.Message.LocationMessage | _grammyjs_types.Message.ContactMessage | _grammyjs_types.Message.PhotoMessage | _grammyjs_types.Message.VideoMessage | _grammyjs_types.Message.AudioMessage | _grammyjs_types.Message.DocumentMessage | _grammyjs_types.Message.VoiceMessage | _grammyjs_types.Message.VideoNoteMessage | _grammyjs_types.Message.StickerMessage | (_grammyjs_types.Update.Edited & _grammyjs_types.Message) | undefined>;
|
|
289
|
+
editAnimation(keyboardInline?: IInlineKb, data?: IData, baseId?: string, options1?: IOptEditMedia1, options2?: IOptEditMedia2): Promise<true | _grammyjs_types.Message.LocationMessage | _grammyjs_types.Message.ContactMessage | _grammyjs_types.Message.PhotoMessage | _grammyjs_types.Message.VideoMessage | _grammyjs_types.Message.AudioMessage | _grammyjs_types.Message.DocumentMessage | _grammyjs_types.Message.VoiceMessage | _grammyjs_types.Message.VideoNoteMessage | _grammyjs_types.Message.StickerMessage | (_grammyjs_types.Update.Edited & _grammyjs_types.Message) | undefined>;
|
|
290
|
+
editVoice(keyboardInline?: IInlineKb, data?: IData, baseId?: string, options?: IOptEditMedia2): Promise<true | _grammyjs_types.Message.LocationMessage | _grammyjs_types.Message.ContactMessage | _grammyjs_types.Message.PhotoMessage | _grammyjs_types.Message.VideoMessage | _grammyjs_types.Message.AudioMessage | _grammyjs_types.Message.DocumentMessage | _grammyjs_types.Message.VoiceMessage | _grammyjs_types.Message.VideoNoteMessage | _grammyjs_types.Message.StickerMessage | (_grammyjs_types.Update.Edited & _grammyjs_types.Message) | undefined>;
|
|
291
|
+
editVideoNote(keyboardInline?: IInlineKb, data?: IData, baseId?: string, options?: IOptEditMedia2): Promise<true | _grammyjs_types.Message.LocationMessage | _grammyjs_types.Message.ContactMessage | _grammyjs_types.Message.PhotoMessage | _grammyjs_types.Message.VideoMessage | _grammyjs_types.Message.AudioMessage | _grammyjs_types.Message.DocumentMessage | _grammyjs_types.Message.VoiceMessage | _grammyjs_types.Message.VideoNoteMessage | _grammyjs_types.Message.StickerMessage | (_grammyjs_types.Update.Edited & _grammyjs_types.Message) | undefined>;
|
|
292
|
+
editSticker(keyboardInline?: IInlineKb, data?: IData, baseId?: string, options?: IOptEditMedia2): Promise<true | _grammyjs_types.Message.LocationMessage | _grammyjs_types.Message.ContactMessage | _grammyjs_types.Message.PhotoMessage | _grammyjs_types.Message.VideoMessage | _grammyjs_types.Message.AudioMessage | _grammyjs_types.Message.DocumentMessage | _grammyjs_types.Message.VoiceMessage | _grammyjs_types.Message.VideoNoteMessage | _grammyjs_types.Message.StickerMessage | (_grammyjs_types.Update.Edited & _grammyjs_types.Message) | undefined>;
|
|
293
|
+
editLocation(keyboardInline?: IInlineKb, data?: IData, baseId?: string, options?: IOptEditMedia2): Promise<true | _grammyjs_types.Message.LocationMessage | _grammyjs_types.Message.ContactMessage | _grammyjs_types.Message.PhotoMessage | _grammyjs_types.Message.VideoMessage | _grammyjs_types.Message.AudioMessage | _grammyjs_types.Message.DocumentMessage | _grammyjs_types.Message.VoiceMessage | _grammyjs_types.Message.VideoNoteMessage | _grammyjs_types.Message.StickerMessage | (_grammyjs_types.Update.Edited & _grammyjs_types.Message) | undefined>;
|
|
294
|
+
editContact(keyboardInline?: IInlineKb, data?: IData, baseId?: string, options?: IOptEditMedia2): Promise<true | _grammyjs_types.Message.LocationMessage | _grammyjs_types.Message.ContactMessage | _grammyjs_types.Message.PhotoMessage | _grammyjs_types.Message.VideoMessage | _grammyjs_types.Message.AudioMessage | _grammyjs_types.Message.DocumentMessage | _grammyjs_types.Message.VoiceMessage | _grammyjs_types.Message.VideoNoteMessage | _grammyjs_types.Message.StickerMessage | (_grammyjs_types.Update.Edited & _grammyjs_types.Message) | undefined>;
|
|
303
295
|
delete(): Promise<true>;
|
|
304
|
-
callbackQueryAnswer(options?:
|
|
296
|
+
callbackQueryAnswer(options?: Parameters<typeof this$1.ct.answerCallbackQuery>[0]): Promise<true | null>;
|
|
305
297
|
sessionSet(method: string, params: any, moreRoot?: Record<any, any>): Promise<boolean | null>;
|
|
306
298
|
sessionGet(): Promise<{
|
|
307
299
|
method: string;
|
|
@@ -309,7 +301,7 @@ declare class Ctx extends BaseGeneral {
|
|
|
309
301
|
[moreRoot: string]: any;
|
|
310
302
|
} | null>;
|
|
311
303
|
sessionClear(): Promise<boolean | null>;
|
|
312
|
-
static buildData<C extends ((...args:
|
|
304
|
+
static buildData<C extends ((...args: string[]) => any) | undefined = undefined>(callback?: C): {
|
|
313
305
|
name: string;
|
|
314
306
|
callbackData: ((this: {
|
|
315
307
|
name: string;
|
|
@@ -317,19 +309,18 @@ declare class Ctx extends BaseGeneral {
|
|
|
317
309
|
name: string;
|
|
318
310
|
}) => string);
|
|
319
311
|
};
|
|
320
|
-
inlineKeyboard(callback: (kb: IInlineKb, arr:
|
|
321
|
-
baseId?:
|
|
312
|
+
inlineKeyboard(callback: (kb: IInlineKb, arr: string[]) => IInlineKb, params?: {
|
|
313
|
+
baseId?: string;
|
|
322
314
|
data?: IData;
|
|
323
315
|
cache?: boolean;
|
|
324
316
|
}): IInlineKb;
|
|
325
|
-
bottomKeyboard(callback: (kb: IBottomKb, arr:
|
|
326
|
-
baseId?:
|
|
317
|
+
bottomKeyboard(callback: (kb: IBottomKb, arr: string[]) => IBottomKb, params?: {
|
|
318
|
+
baseId?: string;
|
|
327
319
|
data?: IData;
|
|
328
320
|
cache?: boolean;
|
|
329
321
|
}): IBottomKb;
|
|
330
322
|
transition?(...args: any): Promise<void>;
|
|
331
323
|
internal?(...args: any): Promise<void>;
|
|
332
|
-
notify?(...args: any): Promise<void>;
|
|
333
324
|
callback?(): Promise<void>;
|
|
334
325
|
callbackPayload?(): Promise<void>;
|
|
335
326
|
text?(): Promise<void>;
|
|
@@ -511,7 +502,7 @@ declare class Ctx extends BaseGeneral {
|
|
|
511
502
|
sessionToStickerFree(paramsAdd?: any, name?: string): Promise<boolean | null>;
|
|
512
503
|
sessionToLocationFree(paramsAdd?: any, name?: string): Promise<boolean | null>;
|
|
513
504
|
sessionToContactFree(paramsAdd?: any, name?: string): Promise<boolean | null>;
|
|
514
|
-
intent(str?: string,
|
|
505
|
+
intent(str?: string, isCallbackData?: boolean): string;
|
|
515
506
|
methodSession(prefix: string, name: string | undefined): string;
|
|
516
507
|
methodSessionCallback(name?: string): string;
|
|
517
508
|
methodSessionCallbackPayload(name?: string): string;
|
|
@@ -560,18 +551,18 @@ declare class Ctx extends BaseGeneral {
|
|
|
560
551
|
methodSessionContactFree(name?: string): string;
|
|
561
552
|
}
|
|
562
553
|
|
|
563
|
-
declare class Gramstax<ICtx extends Ctx = Ctx
|
|
554
|
+
declare class Gramstax<ICtx extends Ctx = Ctx> {
|
|
564
555
|
templateManager: TemplateManager;
|
|
565
556
|
cacheKeyboard: Map<any, any>;
|
|
566
557
|
cacheSession: CacheExternal;
|
|
567
558
|
pages: ReturnType<typeof this.pageLoads>;
|
|
568
|
-
log: LoggingPretty | undefined;
|
|
569
|
-
bot:
|
|
559
|
+
log: LoggingPretty$1 | undefined;
|
|
560
|
+
bot: Bot;
|
|
570
561
|
handlerBotUpdate: any;
|
|
571
562
|
constructor(params: {
|
|
572
563
|
token: string;
|
|
573
564
|
deploy: string;
|
|
574
|
-
log?: LoggingPretty | boolean | null;
|
|
565
|
+
log?: LoggingPretty$1 | boolean | null;
|
|
575
566
|
cacheData?: CacheExternal;
|
|
576
567
|
cacheSession?: CacheExternal;
|
|
577
568
|
cacheKeyboard?: Map<any, any>;
|
|
@@ -581,395 +572,395 @@ declare class Gramstax<ICtx extends Ctx = Ctx, IBot extends Bot = Bot> {
|
|
|
581
572
|
onStart(botInfo: UserFromGetMe, method: `polling` | `webhook` | `serverless`, data: string | null): void;
|
|
582
573
|
createBot(token: string): Bot<Context, grammy.Api<grammy.RawApi>>;
|
|
583
574
|
createCtx(ct: Context): ICtx;
|
|
584
|
-
runPolling():
|
|
585
|
-
runWebhook(
|
|
575
|
+
runPolling(): void;
|
|
576
|
+
runWebhook(fullUrl: string): Promise<void>;
|
|
586
577
|
runServerless(adapter: string): Promise<void>;
|
|
587
578
|
pageBuildData(Page: typeof Ctx, filePath: string): void;
|
|
588
579
|
pageSorts(Page: typeof Ctx, pages: typeof this.pages): void;
|
|
589
580
|
pageSyncDescription(pages: typeof this.pages): Promise<void>;
|
|
590
581
|
pageLoads(): {
|
|
591
582
|
all: Record<string, typeof Ctx>;
|
|
592
|
-
|
|
593
|
-
|
|
583
|
+
routeDynamic: string[];
|
|
584
|
+
routeDynamicSpesific: {
|
|
594
585
|
text: {
|
|
595
586
|
name: string;
|
|
596
|
-
|
|
587
|
+
routeName: string;
|
|
597
588
|
}[];
|
|
598
589
|
photo: {
|
|
599
590
|
name: string;
|
|
600
|
-
|
|
591
|
+
routeName: string;
|
|
601
592
|
}[];
|
|
602
593
|
video: {
|
|
603
594
|
name: string;
|
|
604
|
-
|
|
595
|
+
routeName: string;
|
|
605
596
|
}[];
|
|
606
597
|
audio: {
|
|
607
598
|
name: string;
|
|
608
|
-
|
|
599
|
+
routeName: string;
|
|
609
600
|
}[];
|
|
610
601
|
document: {
|
|
611
602
|
name: string;
|
|
612
|
-
|
|
603
|
+
routeName: string;
|
|
613
604
|
}[];
|
|
614
605
|
animation: {
|
|
615
606
|
name: string;
|
|
616
|
-
|
|
607
|
+
routeName: string;
|
|
617
608
|
}[];
|
|
618
609
|
voice: {
|
|
619
610
|
name: string;
|
|
620
|
-
|
|
611
|
+
routeName: string;
|
|
621
612
|
}[];
|
|
622
613
|
videoNote: {
|
|
623
614
|
name: string;
|
|
624
|
-
|
|
615
|
+
routeName: string;
|
|
625
616
|
}[];
|
|
626
617
|
sticker: {
|
|
627
618
|
name: string;
|
|
628
|
-
|
|
619
|
+
routeName: string;
|
|
629
620
|
}[];
|
|
630
621
|
location: {
|
|
631
622
|
name: string;
|
|
632
|
-
|
|
623
|
+
routeName: string;
|
|
633
624
|
}[];
|
|
634
625
|
contact: {
|
|
635
626
|
name: string;
|
|
636
|
-
|
|
627
|
+
routeName: string;
|
|
637
628
|
}[];
|
|
638
629
|
};
|
|
639
|
-
|
|
630
|
+
routeStatic: {
|
|
640
631
|
text: Record<string, {
|
|
641
632
|
name: string;
|
|
642
|
-
|
|
633
|
+
routeName: string;
|
|
643
634
|
}>;
|
|
644
635
|
callback: Record<string, {
|
|
645
636
|
name: string;
|
|
646
|
-
|
|
637
|
+
routeName: string;
|
|
647
638
|
}>;
|
|
648
639
|
textCommand: Record<string, {
|
|
649
640
|
name: string;
|
|
650
|
-
|
|
641
|
+
routeName: string;
|
|
651
642
|
}>;
|
|
652
643
|
photoCaption: Record<string, {
|
|
653
644
|
name: string;
|
|
654
|
-
|
|
645
|
+
routeName: string;
|
|
655
646
|
}>;
|
|
656
647
|
photoCaptionCommand: Record<string, {
|
|
657
648
|
name: string;
|
|
658
|
-
|
|
649
|
+
routeName: string;
|
|
659
650
|
}>;
|
|
660
651
|
videoCaption: Record<string, {
|
|
661
652
|
name: string;
|
|
662
|
-
|
|
653
|
+
routeName: string;
|
|
663
654
|
}>;
|
|
664
655
|
videoCaptionCommand: Record<string, {
|
|
665
656
|
name: string;
|
|
666
|
-
|
|
657
|
+
routeName: string;
|
|
667
658
|
}>;
|
|
668
659
|
audioCaption: Record<string, {
|
|
669
660
|
name: string;
|
|
670
|
-
|
|
661
|
+
routeName: string;
|
|
671
662
|
}>;
|
|
672
663
|
audioCaptionCommand: Record<string, {
|
|
673
664
|
name: string;
|
|
674
|
-
|
|
665
|
+
routeName: string;
|
|
675
666
|
}>;
|
|
676
667
|
documentCaption: Record<string, {
|
|
677
668
|
name: string;
|
|
678
|
-
|
|
669
|
+
routeName: string;
|
|
679
670
|
}>;
|
|
680
671
|
documentCaptionCommand: Record<string, {
|
|
681
672
|
name: string;
|
|
682
|
-
|
|
673
|
+
routeName: string;
|
|
683
674
|
}>;
|
|
684
675
|
animationCaption: Record<string, {
|
|
685
676
|
name: string;
|
|
686
|
-
|
|
677
|
+
routeName: string;
|
|
687
678
|
}>;
|
|
688
679
|
animationCaptionCommand: Record<string, {
|
|
689
680
|
name: string;
|
|
690
|
-
|
|
681
|
+
routeName: string;
|
|
691
682
|
}>;
|
|
692
683
|
voiceCaption: Record<string, {
|
|
693
684
|
name: string;
|
|
694
|
-
|
|
685
|
+
routeName: string;
|
|
695
686
|
}>;
|
|
696
687
|
voiceCaptionCommand: Record<string, {
|
|
697
688
|
name: string;
|
|
698
|
-
|
|
689
|
+
routeName: string;
|
|
699
690
|
}>;
|
|
700
691
|
videoNoteCaption: Record<string, {
|
|
701
692
|
name: string;
|
|
702
|
-
|
|
693
|
+
routeName: string;
|
|
703
694
|
}>;
|
|
704
695
|
videoNoteCaptionCommand: Record<string, {
|
|
705
696
|
name: string;
|
|
706
|
-
|
|
697
|
+
routeName: string;
|
|
707
698
|
}>;
|
|
708
699
|
};
|
|
709
|
-
|
|
700
|
+
routeStaticIntent: {
|
|
710
701
|
callbackPayload: Record<string, {
|
|
711
702
|
name: string;
|
|
712
|
-
|
|
703
|
+
routeName: string;
|
|
713
704
|
}>;
|
|
714
705
|
textPayload: Record<string, {
|
|
715
706
|
name: string;
|
|
716
|
-
|
|
707
|
+
routeName: string;
|
|
717
708
|
}>;
|
|
718
709
|
textCommandPayload: Record<string, {
|
|
719
710
|
name: string;
|
|
720
|
-
|
|
711
|
+
routeName: string;
|
|
721
712
|
}>;
|
|
722
713
|
photoCaptionPayload: Record<string, {
|
|
723
714
|
name: string;
|
|
724
|
-
|
|
715
|
+
routeName: string;
|
|
725
716
|
}>;
|
|
726
717
|
photoCaptionCommandPayload: Record<string, {
|
|
727
718
|
name: string;
|
|
728
|
-
|
|
719
|
+
routeName: string;
|
|
729
720
|
}>;
|
|
730
721
|
videoCaptionPayload: Record<string, {
|
|
731
722
|
name: string;
|
|
732
|
-
|
|
723
|
+
routeName: string;
|
|
733
724
|
}>;
|
|
734
725
|
videoCaptionCommandPayload: Record<string, {
|
|
735
726
|
name: string;
|
|
736
|
-
|
|
727
|
+
routeName: string;
|
|
737
728
|
}>;
|
|
738
729
|
audioCaptionPayload: Record<string, {
|
|
739
730
|
name: string;
|
|
740
|
-
|
|
731
|
+
routeName: string;
|
|
741
732
|
}>;
|
|
742
733
|
audioCaptionCommandPayload: Record<string, {
|
|
743
734
|
name: string;
|
|
744
|
-
|
|
735
|
+
routeName: string;
|
|
745
736
|
}>;
|
|
746
737
|
documentCaptionPayload: Record<string, {
|
|
747
738
|
name: string;
|
|
748
|
-
|
|
739
|
+
routeName: string;
|
|
749
740
|
}>;
|
|
750
741
|
documentCaptionCommandPayload: Record<string, {
|
|
751
742
|
name: string;
|
|
752
|
-
|
|
743
|
+
routeName: string;
|
|
753
744
|
}>;
|
|
754
745
|
animationCaptionPayload: Record<string, {
|
|
755
746
|
name: string;
|
|
756
|
-
|
|
747
|
+
routeName: string;
|
|
757
748
|
}>;
|
|
758
749
|
animationCaptionCommandPayload: Record<string, {
|
|
759
750
|
name: string;
|
|
760
|
-
|
|
751
|
+
routeName: string;
|
|
761
752
|
}>;
|
|
762
753
|
voiceCaptionPayload: Record<string, {
|
|
763
754
|
name: string;
|
|
764
|
-
|
|
755
|
+
routeName: string;
|
|
765
756
|
}>;
|
|
766
757
|
voiceCaptionCommandPayload: Record<string, {
|
|
767
758
|
name: string;
|
|
768
|
-
|
|
759
|
+
routeName: string;
|
|
769
760
|
}>;
|
|
770
761
|
videoNoteCaptionPayload: Record<string, {
|
|
771
762
|
name: string;
|
|
772
|
-
|
|
763
|
+
routeName: string;
|
|
773
764
|
}>;
|
|
774
765
|
videoNoteCaptionCommandPayload: Record<string, {
|
|
775
766
|
name: string;
|
|
776
|
-
|
|
767
|
+
routeName: string;
|
|
777
768
|
}>;
|
|
778
769
|
};
|
|
779
|
-
|
|
770
|
+
routeStaticSession: {
|
|
780
771
|
text: Record<string, {
|
|
781
772
|
name: string;
|
|
782
|
-
|
|
773
|
+
routeName: string;
|
|
783
774
|
}>;
|
|
784
775
|
callback: Record<string, {
|
|
785
776
|
name: string;
|
|
786
|
-
|
|
777
|
+
routeName: string;
|
|
787
778
|
}>;
|
|
788
779
|
textCommand: Record<string, {
|
|
789
780
|
name: string;
|
|
790
|
-
|
|
781
|
+
routeName: string;
|
|
791
782
|
}>;
|
|
792
783
|
photoCaption: Record<string, {
|
|
793
784
|
name: string;
|
|
794
|
-
|
|
785
|
+
routeName: string;
|
|
795
786
|
}>;
|
|
796
787
|
photoCaptionCommand: Record<string, {
|
|
797
788
|
name: string;
|
|
798
|
-
|
|
789
|
+
routeName: string;
|
|
799
790
|
}>;
|
|
800
791
|
videoCaption: Record<string, {
|
|
801
792
|
name: string;
|
|
802
|
-
|
|
793
|
+
routeName: string;
|
|
803
794
|
}>;
|
|
804
795
|
videoCaptionCommand: Record<string, {
|
|
805
796
|
name: string;
|
|
806
|
-
|
|
797
|
+
routeName: string;
|
|
807
798
|
}>;
|
|
808
799
|
audioCaption: Record<string, {
|
|
809
800
|
name: string;
|
|
810
|
-
|
|
801
|
+
routeName: string;
|
|
811
802
|
}>;
|
|
812
803
|
audioCaptionCommand: Record<string, {
|
|
813
804
|
name: string;
|
|
814
|
-
|
|
805
|
+
routeName: string;
|
|
815
806
|
}>;
|
|
816
807
|
documentCaption: Record<string, {
|
|
817
808
|
name: string;
|
|
818
|
-
|
|
809
|
+
routeName: string;
|
|
819
810
|
}>;
|
|
820
811
|
documentCaptionCommand: Record<string, {
|
|
821
812
|
name: string;
|
|
822
|
-
|
|
813
|
+
routeName: string;
|
|
823
814
|
}>;
|
|
824
815
|
animationCaption: Record<string, {
|
|
825
816
|
name: string;
|
|
826
|
-
|
|
817
|
+
routeName: string;
|
|
827
818
|
}>;
|
|
828
819
|
animationCaptionCommand: Record<string, {
|
|
829
820
|
name: string;
|
|
830
|
-
|
|
821
|
+
routeName: string;
|
|
831
822
|
}>;
|
|
832
823
|
voiceCaption: Record<string, {
|
|
833
824
|
name: string;
|
|
834
|
-
|
|
825
|
+
routeName: string;
|
|
835
826
|
}>;
|
|
836
827
|
voiceCaptionCommand: Record<string, {
|
|
837
828
|
name: string;
|
|
838
|
-
|
|
829
|
+
routeName: string;
|
|
839
830
|
}>;
|
|
840
831
|
videoNoteCaption: Record<string, {
|
|
841
832
|
name: string;
|
|
842
|
-
|
|
833
|
+
routeName: string;
|
|
843
834
|
}>;
|
|
844
835
|
videoNoteCaptionCommand: Record<string, {
|
|
845
836
|
name: string;
|
|
846
|
-
|
|
837
|
+
routeName: string;
|
|
847
838
|
}>;
|
|
848
839
|
callbackPayload: Record<string, {
|
|
849
840
|
name: string;
|
|
850
|
-
|
|
841
|
+
routeName: string;
|
|
851
842
|
}>;
|
|
852
843
|
textPayload: Record<string, {
|
|
853
844
|
name: string;
|
|
854
|
-
|
|
845
|
+
routeName: string;
|
|
855
846
|
}>;
|
|
856
847
|
textCommandPayload: Record<string, {
|
|
857
848
|
name: string;
|
|
858
|
-
|
|
849
|
+
routeName: string;
|
|
859
850
|
}>;
|
|
860
851
|
photoCaptionPayload: Record<string, {
|
|
861
852
|
name: string;
|
|
862
|
-
|
|
853
|
+
routeName: string;
|
|
863
854
|
}>;
|
|
864
855
|
photoCaptionCommandPayload: Record<string, {
|
|
865
856
|
name: string;
|
|
866
|
-
|
|
857
|
+
routeName: string;
|
|
867
858
|
}>;
|
|
868
859
|
videoCaptionPayload: Record<string, {
|
|
869
860
|
name: string;
|
|
870
|
-
|
|
861
|
+
routeName: string;
|
|
871
862
|
}>;
|
|
872
863
|
videoCaptionCommandPayload: Record<string, {
|
|
873
864
|
name: string;
|
|
874
|
-
|
|
865
|
+
routeName: string;
|
|
875
866
|
}>;
|
|
876
867
|
audioCaptionPayload: Record<string, {
|
|
877
868
|
name: string;
|
|
878
|
-
|
|
869
|
+
routeName: string;
|
|
879
870
|
}>;
|
|
880
871
|
audioCaptionCommandPayload: Record<string, {
|
|
881
872
|
name: string;
|
|
882
|
-
|
|
873
|
+
routeName: string;
|
|
883
874
|
}>;
|
|
884
875
|
documentCaptionPayload: Record<string, {
|
|
885
876
|
name: string;
|
|
886
|
-
|
|
877
|
+
routeName: string;
|
|
887
878
|
}>;
|
|
888
879
|
documentCaptionCommandPayload: Record<string, {
|
|
889
880
|
name: string;
|
|
890
|
-
|
|
881
|
+
routeName: string;
|
|
891
882
|
}>;
|
|
892
883
|
animationCaptionPayload: Record<string, {
|
|
893
884
|
name: string;
|
|
894
|
-
|
|
885
|
+
routeName: string;
|
|
895
886
|
}>;
|
|
896
887
|
animationCaptionCommandPayload: Record<string, {
|
|
897
888
|
name: string;
|
|
898
|
-
|
|
889
|
+
routeName: string;
|
|
899
890
|
}>;
|
|
900
891
|
voiceCaptionPayload: Record<string, {
|
|
901
892
|
name: string;
|
|
902
|
-
|
|
893
|
+
routeName: string;
|
|
903
894
|
}>;
|
|
904
895
|
voiceCaptionCommandPayload: Record<string, {
|
|
905
896
|
name: string;
|
|
906
|
-
|
|
897
|
+
routeName: string;
|
|
907
898
|
}>;
|
|
908
899
|
videoNoteCaptionPayload: Record<string, {
|
|
909
900
|
name: string;
|
|
910
|
-
|
|
901
|
+
routeName: string;
|
|
911
902
|
}>;
|
|
912
903
|
videoNoteCaptionCommandPayload: Record<string, {
|
|
913
904
|
name: string;
|
|
914
|
-
|
|
905
|
+
routeName: string;
|
|
915
906
|
}>;
|
|
916
907
|
textFree: Record<string, {
|
|
917
908
|
name: string;
|
|
918
|
-
|
|
909
|
+
routeName: string;
|
|
919
910
|
}>;
|
|
920
911
|
photoFree: Record<string, {
|
|
921
912
|
name: string;
|
|
922
|
-
|
|
913
|
+
routeName: string;
|
|
923
914
|
}>;
|
|
924
915
|
videoFree: Record<string, {
|
|
925
916
|
name: string;
|
|
926
|
-
|
|
917
|
+
routeName: string;
|
|
927
918
|
}>;
|
|
928
919
|
audioFree: Record<string, {
|
|
929
920
|
name: string;
|
|
930
|
-
|
|
921
|
+
routeName: string;
|
|
931
922
|
}>;
|
|
932
923
|
documentFree: Record<string, {
|
|
933
924
|
name: string;
|
|
934
|
-
|
|
925
|
+
routeName: string;
|
|
935
926
|
}>;
|
|
936
927
|
animationFree: Record<string, {
|
|
937
928
|
name: string;
|
|
938
|
-
|
|
929
|
+
routeName: string;
|
|
939
930
|
}>;
|
|
940
931
|
voiceFree: Record<string, {
|
|
941
932
|
name: string;
|
|
942
|
-
|
|
933
|
+
routeName: string;
|
|
943
934
|
}>;
|
|
944
935
|
videoNoteFree: Record<string, {
|
|
945
936
|
name: string;
|
|
946
|
-
|
|
937
|
+
routeName: string;
|
|
947
938
|
}>;
|
|
948
939
|
stickerFree: Record<string, {
|
|
949
940
|
name: string;
|
|
950
|
-
|
|
941
|
+
routeName: string;
|
|
951
942
|
}>;
|
|
952
943
|
locationFree: Record<string, {
|
|
953
944
|
name: string;
|
|
954
|
-
|
|
945
|
+
routeName: string;
|
|
955
946
|
}>;
|
|
956
947
|
contactFree: Record<string, {
|
|
957
948
|
name: string;
|
|
958
|
-
|
|
949
|
+
routeName: string;
|
|
959
950
|
}>;
|
|
960
951
|
};
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
952
|
+
listRouteStatic: readonly ["callback", "text", "textCommand", "photoCaption", "photoCaptionCommand", "videoCaption", "videoCaptionCommand", "audioCaption", "audioCaptionCommand", "documentCaption", "documentCaptionCommand", "animationCaption", "animationCaptionCommand", "voiceCaption", "voiceCaptionCommand", "videoNoteCaption", "videoNoteCaptionCommand"];
|
|
953
|
+
listRouteStaticIntent: readonly ["callbackPayload", "textPayload", "textCommandPayload", "photoCaptionPayload", "photoCaptionCommandPayload", "videoCaptionPayload", "videoCaptionCommandPayload", "audioCaptionPayload", "audioCaptionCommandPayload", "documentCaptionPayload", "documentCaptionCommandPayload", "animationCaptionPayload", "animationCaptionCommandPayload", "voiceCaptionPayload", "voiceCaptionCommandPayload", "videoNoteCaptionPayload", "videoNoteCaptionCommandPayload"];
|
|
954
|
+
listRouteStaticSession: readonly ["callback", "text", "textCommand", "photoCaption", "photoCaptionCommand", "videoCaption", "videoCaptionCommand", "audioCaption", "audioCaptionCommand", "documentCaption", "documentCaptionCommand", "animationCaption", "animationCaptionCommand", "voiceCaption", "voiceCaptionCommand", "videoNoteCaption", "videoNoteCaptionCommand", "callbackPayload", "textPayload", "textCommandPayload", "photoCaptionPayload", "photoCaptionCommandPayload", "videoCaptionPayload", "videoCaptionCommandPayload", "audioCaptionPayload", "audioCaptionCommandPayload", "documentCaptionPayload", "documentCaptionCommandPayload", "animationCaptionPayload", "animationCaptionCommandPayload", "voiceCaptionPayload", "voiceCaptionCommandPayload", "videoNoteCaptionPayload", "videoNoteCaptionCommandPayload", "textFree", "photoFree", "videoFree", "audioFree", "documentFree", "animationFree", "voiceFree", "videoNoteFree", "stickerFree", "locationFree", "contactFree"];
|
|
955
|
+
lenListRouteStatic: 17;
|
|
956
|
+
lenListRouteStaticIntent: 17;
|
|
957
|
+
lenListRouteStaticSession: 45;
|
|
967
958
|
};
|
|
968
|
-
pageRoutes(ctx: ICtx, fromListener: `callback` | keyof typeof this$1.pages.
|
|
959
|
+
pageRoutes(ctx: ICtx, fromListener: `callback` | keyof typeof this$1.pages.routeDynamicSpesific): Promise<any>;
|
|
969
960
|
hookBeforeRoute(ctx: ICtx, listenerName: string): Promise<boolean>;
|
|
970
961
|
hookErrorPage(ctx: ICtx, listenerName: string, error: any, isEdit: boolean): Promise<void>;
|
|
971
962
|
hookErrorInputNotFoundPage(ctx: ICtx): Promise<void>;
|
|
972
|
-
onMessage(ct: Context, listenerName:
|
|
963
|
+
onMessage(ct: Context, listenerName: keyof typeof this$1.pages.routeDynamicSpesific): Promise<void>;
|
|
973
964
|
onCallbackQueryData(ct: Context): Promise<void>;
|
|
974
965
|
onMessageText(ct: Context): Promise<void>;
|
|
975
966
|
onMessagePhoto(ct: Context): Promise<void>;
|
|
@@ -996,4 +987,4 @@ declare class Gramstax<ICtx extends Ctx = Ctx, IBot extends Bot = Bot> {
|
|
|
996
987
|
registerOnMessageContact(): void;
|
|
997
988
|
}
|
|
998
989
|
|
|
999
|
-
export {
|
|
990
|
+
export { CacheExternal, Ctx, Gramstax, type IMediaBlock, LoggingUtils, TemplateEngine, TemplateManager, log };
|