teledzik 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 +22 -0
- package/README.md +1126 -0
- package/filters.d.ts +1 -0
- package/filters.js +1 -0
- package/format.d.ts +1 -0
- package/format.js +1 -0
- package/future.d.ts +1 -0
- package/future.js +1 -0
- package/lib/button.js +101 -0
- package/lib/cli.mjs +105 -0
- package/lib/composer.js +581 -0
- package/lib/context.js +1300 -0
- package/lib/core/helpers/ai-stream.js +69 -0
- package/lib/core/helpers/args.js +58 -0
- package/lib/core/helpers/check.js +56 -0
- package/lib/core/helpers/compact.js +17 -0
- package/lib/core/helpers/deunionize.js +13 -0
- package/lib/core/helpers/formatting.js +89 -0
- package/lib/core/helpers/input-box.js +87 -0
- package/lib/core/helpers/rich-sanitizer.js +31 -0
- package/lib/core/helpers/smart-queue.js +70 -0
- package/lib/core/helpers/util.js +50 -0
- package/lib/core/network/client.js +318 -0
- package/lib/core/network/error.js +21 -0
- package/lib/core/network/multipart-stream.js +61 -0
- package/lib/core/network/polling.js +86 -0
- package/lib/core/network/webhook.js +54 -0
- package/lib/core/types/rich-message.js +287 -0
- package/lib/core/types/typegram.js +18 -0
- package/lib/filters.js +69 -0
- package/lib/format.js +38 -0
- package/lib/future.js +166 -0
- package/lib/index.js +61 -0
- package/lib/input.js +61 -0
- package/lib/markup.js +111 -0
- package/lib/middleware.js +2 -0
- package/lib/paginated.js +76 -0
- package/lib/reactions.js +81 -0
- package/lib/router.js +45 -0
- package/lib/scenes/base.js +39 -0
- package/lib/scenes/context.js +99 -0
- package/lib/scenes/form-scene.js +23 -0
- package/lib/scenes/index.js +21 -0
- package/lib/scenes/stage.js +49 -0
- package/lib/scenes/wizard/context.js +30 -0
- package/lib/scenes/wizard/index.js +45 -0
- package/lib/scenes.js +17 -0
- package/lib/session.js +163 -0
- package/lib/telegraf.js +274 -0
- package/lib/telegram-types.js +6 -0
- package/lib/telegram.js +1286 -0
- package/lib/types.js +2 -0
- package/lib/utils.js +5 -0
- package/markup.d.ts +1 -0
- package/markup.js +1 -0
- package/package.json +141 -0
- package/scenes.d.ts +1 -0
- package/scenes.js +1 -0
- package/session.d.ts +1 -0
- package/session.js +1 -0
- package/src/button.ts +182 -0
- package/src/composer.ts +1008 -0
- package/src/context.ts +1778 -0
- package/src/core/helpers/ai-stream.ts +96 -0
- package/src/core/helpers/args.ts +63 -0
- package/src/core/helpers/check.ts +71 -0
- package/src/core/helpers/compact.ts +18 -0
- package/src/core/helpers/deunionize.ts +26 -0
- package/src/core/helpers/formatting.ts +119 -0
- package/src/core/helpers/input-box.ts +86 -0
- package/src/core/helpers/rich-sanitizer.ts +36 -0
- package/src/core/helpers/smart-queue.ts +89 -0
- package/src/core/helpers/util.ts +96 -0
- package/src/core/network/client.ts +396 -0
- package/src/core/network/error.ts +29 -0
- package/src/core/network/multipart-stream.ts +45 -0
- package/src/core/network/polling.ts +94 -0
- package/src/core/network/webhook.ts +58 -0
- package/src/core/types/rich-message.ts +375 -0
- package/src/core/types/typegram.ts +44 -0
- package/src/filters.js +69 -0
- package/src/filters.ts +109 -0
- package/src/format.js +38 -0
- package/src/format.ts +110 -0
- package/src/future.js +147 -0
- package/src/future.ts +231 -0
- package/src/index.ts +27 -0
- package/src/input.ts +59 -0
- package/src/markup.js +93 -0
- package/src/markup.ts +142 -0
- package/src/middleware.ts +24 -0
- package/src/paginated.ts +75 -0
- package/src/reactions.ts +118 -0
- package/src/router.ts +55 -0
- package/src/scenes/base.ts +52 -0
- package/src/scenes/context.ts +136 -0
- package/src/scenes/form-scene.ts +34 -0
- package/src/scenes/index.ts +21 -0
- package/src/scenes/stage.ts +71 -0
- package/src/scenes/wizard/context.ts +58 -0
- package/src/scenes/wizard/index.ts +63 -0
- package/src/scenes.js +17 -0
- package/src/scenes.ts +1 -0
- package/src/session.js +175 -0
- package/src/session.ts +204 -0
- package/src/telegraf.ts +385 -0
- package/src/telegram-types.ts +256 -0
- package/src/telegram.ts +1700 -0
- package/src/types.js +2 -0
- package/src/types.ts +2 -0
- package/src/utils.js +5 -0
- package/src/utils.ts +1 -0
- package/types.d.ts +1 -0
- package/types.js +1 -0
- package/typings/button.d.ts +35 -0
- package/typings/button.d.ts.map +1 -0
- package/typings/composer.d.ts +226 -0
- package/typings/composer.d.ts.map +1 -0
- package/typings/context.d.ts +711 -0
- package/typings/context.d.ts.map +1 -0
- package/typings/core/helpers/ai-stream.d.ts +33 -0
- package/typings/core/helpers/args.d.ts +10 -0
- package/typings/core/helpers/args.d.ts.map +1 -0
- package/typings/core/helpers/check.d.ts +55 -0
- package/typings/core/helpers/check.d.ts.map +1 -0
- package/typings/core/helpers/compact.d.ts +3 -0
- package/typings/core/helpers/compact.d.ts.map +1 -0
- package/typings/core/helpers/deunionize.d.ts +17 -0
- package/typings/core/helpers/deunionize.d.ts.map +1 -0
- package/typings/core/helpers/formatting.d.ts +29 -0
- package/typings/core/helpers/formatting.d.ts.map +1 -0
- package/typings/core/helpers/input-box.d.ts +32 -0
- package/typings/core/helpers/rich-sanitizer.d.ts +5 -0
- package/typings/core/helpers/smart-queue.d.ts +18 -0
- package/typings/core/helpers/util.d.ts +26 -0
- package/typings/core/helpers/util.d.ts.map +1 -0
- package/typings/core/network/client.d.ts +54 -0
- package/typings/core/network/client.d.ts.map +1 -0
- package/typings/core/network/error.d.ts +15 -0
- package/typings/core/network/error.d.ts.map +1 -0
- package/typings/core/network/multipart-stream.d.ts +19 -0
- package/typings/core/network/multipart-stream.d.ts.map +1 -0
- package/typings/core/network/polling.d.ts +15 -0
- package/typings/core/network/polling.d.ts.map +1 -0
- package/typings/core/network/webhook.d.ts +6 -0
- package/typings/core/network/webhook.d.ts.map +1 -0
- package/typings/core/types/rich-message.d.ts +143 -0
- package/typings/core/types/rich-message.d.ts.map +1 -0
- package/typings/core/types/typegram.d.ts +36 -0
- package/typings/core/types/typegram.d.ts.map +1 -0
- package/typings/filters.d.ts +17 -0
- package/typings/filters.d.ts.map +1 -0
- package/typings/format.d.ts +21 -0
- package/typings/format.d.ts.map +1 -0
- package/typings/future.d.ts +11 -0
- package/typings/future.d.ts.map +1 -0
- package/typings/index.d.ts +21 -0
- package/typings/index.d.ts.map +1 -0
- package/typings/input.d.ts +58 -0
- package/typings/input.d.ts.map +1 -0
- package/typings/markup.d.ts +26 -0
- package/typings/markup.d.ts.map +1 -0
- package/typings/middleware.d.ts +7 -0
- package/typings/middleware.d.ts.map +1 -0
- package/typings/paginated.d.ts +20 -0
- package/typings/reactions.d.ts +31 -0
- package/typings/reactions.d.ts.map +1 -0
- package/typings/router.d.ts +20 -0
- package/typings/router.d.ts.map +1 -0
- package/typings/scenes/base.d.ts +21 -0
- package/typings/scenes/base.d.ts.map +1 -0
- package/typings/scenes/context.d.ts +35 -0
- package/typings/scenes/context.d.ts.map +1 -0
- package/typings/scenes/form-scene.d.ts +17 -0
- package/typings/scenes/index.d.ts +10 -0
- package/typings/scenes/index.d.ts.map +1 -0
- package/typings/scenes/stage.d.ts +23 -0
- package/typings/scenes/stage.d.ts.map +1 -0
- package/typings/scenes/wizard/context.d.ts +28 -0
- package/typings/scenes/wizard/context.d.ts.map +1 -0
- package/typings/scenes/wizard/index.d.ts +15 -0
- package/typings/scenes/wizard/index.d.ts.map +1 -0
- package/typings/scenes.d.ts +1 -0
- package/typings/scenes.d.ts.map +1 -0
- package/typings/session.d.ts +54 -0
- package/typings/session.d.ts.map +1 -0
- package/typings/telegraf.d.ts +118 -0
- package/typings/telegraf.d.ts.map +1 -0
- package/typings/telegram-types.d.ts +140 -0
- package/typings/telegram-types.d.ts.map +1 -0
- package/typings/telegram.d.ts +697 -0
- package/typings/telegram.d.ts.map +1 -0
- package/typings/types.d.ts +2 -0
- package/typings/types.d.ts.map +1 -0
- package/typings/utils.d.ts +1 -0
- package/typings/utils.d.ts.map +1 -0
- package/utils.d.ts +1 -0
- package/utils.js +1 -0
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Telegram Bot API 10.1 — Rich Messages
|
|
4
|
+
* https://core.telegram.org/bots/api#june-11-2026
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.MD = exports.H = exports.RichMarkdownBuilder = exports.RichHTMLBuilder = void 0;
|
|
8
|
+
// ---------------------------------------------------------------------------
|
|
9
|
+
// HTML Builder
|
|
10
|
+
// ---------------------------------------------------------------------------
|
|
11
|
+
/**
|
|
12
|
+
* Fluent builder for Rich Messages using HTML format.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* const msg = new RichHTMLBuilder()
|
|
16
|
+
* .heading(1, 'Title')
|
|
17
|
+
* .paragraph(RichHTMLBuilder.bold('Hello') + ' world')
|
|
18
|
+
* .build()
|
|
19
|
+
*/
|
|
20
|
+
class RichHTMLBuilder {
|
|
21
|
+
constructor() {
|
|
22
|
+
this._parts = [];
|
|
23
|
+
}
|
|
24
|
+
// ── Inline static helpers ──────────────────────────────────────────────
|
|
25
|
+
static bold(t) { return `<b>${t}</b>`; }
|
|
26
|
+
static italic(t) { return `<i>${t}</i>`; }
|
|
27
|
+
static underline(t) { return `<u>${t}</u>`; }
|
|
28
|
+
static strikethrough(t) { return `<s>${t}</s>`; }
|
|
29
|
+
static spoiler(t) { return `<tg-spoiler>${t}</tg-spoiler>`; }
|
|
30
|
+
static code(t) { return `<code>${t}</code>`; }
|
|
31
|
+
static marked(t) { return `<mark>${t}</mark>`; }
|
|
32
|
+
static sub(t) { return `<sub>${t}</sub>`; }
|
|
33
|
+
static sup(t) { return `<sup>${t}</sup>`; }
|
|
34
|
+
static url(href, text) { return `<a href="${href}">${text}</a>`; }
|
|
35
|
+
static email(email, text) { return `<a href="mailto:${email}">${text ?? email}</a>`; }
|
|
36
|
+
static phone(phone, text) { return `<a href="tel:${phone}">${text ?? phone}</a>`; }
|
|
37
|
+
static mention(userId, text) { return `<a href="tg://user?id=${userId}">${text}</a>`; }
|
|
38
|
+
static customEmoji(emojiId, fallback) { return `<tg-emoji emoji-id="${emojiId}">${fallback}</tg-emoji>`; }
|
|
39
|
+
static time(unix, format, text) { return `<tg-time unix="${unix}" format="${format}">${text}</tg-time>`; }
|
|
40
|
+
static inlineMath(expression) { return `$${expression}$`; }
|
|
41
|
+
static anchor(name) { return `<a name="${name}"></a>`; }
|
|
42
|
+
static anchorLink(name, text) { return `<a href="#${name}">${text}</a>`; }
|
|
43
|
+
static ref(id, text) { return `<a href="#${id}">${text}</a>`; }
|
|
44
|
+
// ── Block methods ──────────────────────────────────────────────────────
|
|
45
|
+
heading(level, html) {
|
|
46
|
+
this._parts.push(`<h${level}>${html}</h${level}>`);
|
|
47
|
+
return this;
|
|
48
|
+
}
|
|
49
|
+
paragraph(html) {
|
|
50
|
+
this._parts.push(`<p>${html}</p>`);
|
|
51
|
+
return this;
|
|
52
|
+
}
|
|
53
|
+
pre(code, language) {
|
|
54
|
+
this._parts.push(language
|
|
55
|
+
? `<pre><code class="language-${language}">${code}</code></pre>`
|
|
56
|
+
: `<pre>${code}</pre>`);
|
|
57
|
+
return this;
|
|
58
|
+
}
|
|
59
|
+
footer(html) {
|
|
60
|
+
this._parts.push(`<footer>${html}</footer>`);
|
|
61
|
+
return this;
|
|
62
|
+
}
|
|
63
|
+
divider() {
|
|
64
|
+
this._parts.push('<hr/>');
|
|
65
|
+
return this;
|
|
66
|
+
}
|
|
67
|
+
ul(...items) {
|
|
68
|
+
this._parts.push(`<ul>${items.map((i) => `<li>${i}</li>`).join('')}</ul>`);
|
|
69
|
+
return this;
|
|
70
|
+
}
|
|
71
|
+
ol(...items) {
|
|
72
|
+
this._parts.push(`<ol>${items.map((i) => `<li>${i}</li>`).join('')}</ol>`);
|
|
73
|
+
return this;
|
|
74
|
+
}
|
|
75
|
+
taskList(...items) {
|
|
76
|
+
const lis = items.map((i) => `<li><input type="checkbox"${i.checked ? ' checked' : ''}>${i.text}</li>`);
|
|
77
|
+
this._parts.push(`<ul>${lis.join('')}</ul>`);
|
|
78
|
+
return this;
|
|
79
|
+
}
|
|
80
|
+
blockQuote(html) {
|
|
81
|
+
this._parts.push(`<blockquote>${html}</blockquote>`);
|
|
82
|
+
return this;
|
|
83
|
+
}
|
|
84
|
+
pullQuote(html, cite) {
|
|
85
|
+
this._parts.push(`<aside>${html}${cite ? `<cite>${cite}</cite>` : ''}</aside>`);
|
|
86
|
+
return this;
|
|
87
|
+
}
|
|
88
|
+
photo(src, caption, spoiler) {
|
|
89
|
+
const img = `<img src="${src}"${spoiler ? ' tg-spoiler' : ''}/>`;
|
|
90
|
+
this._parts.push(caption ? `<figure>${img}<figcaption>${caption}</figcaption></figure>` : img);
|
|
91
|
+
return this;
|
|
92
|
+
}
|
|
93
|
+
video(src, caption, spoiler) {
|
|
94
|
+
const vid = `<video src="${src}"${spoiler ? ' tg-spoiler' : ''}></video>`;
|
|
95
|
+
this._parts.push(caption ? `<figure>${vid}<figcaption>${caption}</figcaption></figure>` : vid);
|
|
96
|
+
return this;
|
|
97
|
+
}
|
|
98
|
+
audio(src, caption) {
|
|
99
|
+
const aud = `<audio src="${src}"></audio>`;
|
|
100
|
+
this._parts.push(caption ? `<figure>${aud}<figcaption>${caption}</figcaption></figure>` : aud);
|
|
101
|
+
return this;
|
|
102
|
+
}
|
|
103
|
+
map(lat, long, zoom, caption) {
|
|
104
|
+
const tag = `<tg-map lat="${lat}" long="${long}"${zoom != null ? ` zoom="${zoom}"` : ''}/>`;
|
|
105
|
+
this._parts.push(caption ? `<figure>${tag}<figcaption>${caption}</figcaption></figure>` : tag);
|
|
106
|
+
return this;
|
|
107
|
+
}
|
|
108
|
+
collage(...media) {
|
|
109
|
+
this._parts.push(`<tg-collage>${media.join('')}</tg-collage>`);
|
|
110
|
+
return this;
|
|
111
|
+
}
|
|
112
|
+
slideshow(...media) {
|
|
113
|
+
this._parts.push(`<tg-slideshow>${media.join('')}</tg-slideshow>`);
|
|
114
|
+
return this;
|
|
115
|
+
}
|
|
116
|
+
table(rows, options) {
|
|
117
|
+
const attrs = [options?.bordered && 'bordered', options?.striped && 'striped']
|
|
118
|
+
.filter(Boolean)
|
|
119
|
+
.join(' ');
|
|
120
|
+
const [header, ...body] = rows;
|
|
121
|
+
const headHtml = options?.hasHeader && header
|
|
122
|
+
? `<tr>${header.map((c) => `<th>${c}</th>`).join('')}</tr>`
|
|
123
|
+
: '';
|
|
124
|
+
const bodyRows = (options?.hasHeader ? body : rows)
|
|
125
|
+
.map((r) => `<tr>${r.map((c) => `<td>${c}</td>`).join('')}</tr>`)
|
|
126
|
+
.join('');
|
|
127
|
+
this._parts.push(`<table${attrs ? ` ${attrs}` : ''}>${headHtml}${bodyRows}</table>`);
|
|
128
|
+
return this;
|
|
129
|
+
}
|
|
130
|
+
details(summary, content, open) {
|
|
131
|
+
this._parts.push(`<details${open ? ' open' : ''}><summary>${summary}</summary>${content}</details>`);
|
|
132
|
+
return this;
|
|
133
|
+
}
|
|
134
|
+
mathBlock(expression) {
|
|
135
|
+
this._parts.push(`<tg-math-block>${expression}</tg-math-block>`);
|
|
136
|
+
return this;
|
|
137
|
+
}
|
|
138
|
+
thinking(html) {
|
|
139
|
+
this._parts.push(`<tg-thinking>${html}</tg-thinking>`);
|
|
140
|
+
return this;
|
|
141
|
+
}
|
|
142
|
+
referenceDefinition(id, html) {
|
|
143
|
+
this._parts.push(`<tg-reference name="${id}">${html}</tg-reference>`);
|
|
144
|
+
return this;
|
|
145
|
+
}
|
|
146
|
+
raw(html) {
|
|
147
|
+
this._parts.push(html);
|
|
148
|
+
return this;
|
|
149
|
+
}
|
|
150
|
+
build(options) {
|
|
151
|
+
return { html: this._parts.join('\n'), ...options };
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
exports.RichHTMLBuilder = RichHTMLBuilder;
|
|
155
|
+
// ---------------------------------------------------------------------------
|
|
156
|
+
// Markdown Builder
|
|
157
|
+
// ---------------------------------------------------------------------------
|
|
158
|
+
/**
|
|
159
|
+
* Fluent builder for Rich Messages using Markdown format.
|
|
160
|
+
*
|
|
161
|
+
* @example
|
|
162
|
+
* const msg = new RichMarkdownBuilder()
|
|
163
|
+
* .heading(1, 'Title')
|
|
164
|
+
* .paragraph(RichMarkdownBuilder.bold('Hello') + ' world')
|
|
165
|
+
* .build()
|
|
166
|
+
*/
|
|
167
|
+
class RichMarkdownBuilder {
|
|
168
|
+
constructor() {
|
|
169
|
+
this._parts = [];
|
|
170
|
+
}
|
|
171
|
+
// ── Inline static helpers ──────────────────────────────────────────────
|
|
172
|
+
static bold(t) { return `**${t}**`; }
|
|
173
|
+
static italic(t) { return `*${t}*`; }
|
|
174
|
+
static underline(t) { return `<u>${t}</u>`; }
|
|
175
|
+
static strikethrough(t) { return `~~${t}~~`; }
|
|
176
|
+
static spoiler(t) { return `||${t}||`; }
|
|
177
|
+
static code(t) { return `\`${t}\``; }
|
|
178
|
+
static marked(t) { return `==${t}==`; }
|
|
179
|
+
static sub(t) { return `<sub>${t}</sub>`; }
|
|
180
|
+
static sup(t) { return `<sup>${t}</sup>`; }
|
|
181
|
+
static url(href, text) { return `[${text}](${href})`; }
|
|
182
|
+
static email(email, text) { return `[${text ?? email}](mailto:${email})`; }
|
|
183
|
+
static phone(phone, text) { return `[${text ?? phone}](tel:${phone})`; }
|
|
184
|
+
static mention(userId, text) { return `[${text}](tg://user?id=${userId})`; }
|
|
185
|
+
static customEmoji(emojiId, fallback) { return ``; }
|
|
186
|
+
static time(unix, format) { return ``; }
|
|
187
|
+
static inlineMath(expression) { return `$${expression}$`; }
|
|
188
|
+
// ── Block methods ──────────────────────────────────────────────────────
|
|
189
|
+
heading(level, text) {
|
|
190
|
+
this._parts.push(`${'#'.repeat(level)} ${text}`);
|
|
191
|
+
return this;
|
|
192
|
+
}
|
|
193
|
+
paragraph(text) {
|
|
194
|
+
this._parts.push(text);
|
|
195
|
+
return this;
|
|
196
|
+
}
|
|
197
|
+
pre(code, language) {
|
|
198
|
+
this._parts.push(`\`\`\`${language ?? ''}\n${code}\n\`\`\``);
|
|
199
|
+
return this;
|
|
200
|
+
}
|
|
201
|
+
divider() {
|
|
202
|
+
this._parts.push('---');
|
|
203
|
+
return this;
|
|
204
|
+
}
|
|
205
|
+
ul(...items) {
|
|
206
|
+
this._parts.push(items.map((i) => `- ${i}`).join('\n'));
|
|
207
|
+
return this;
|
|
208
|
+
}
|
|
209
|
+
ol(...items) {
|
|
210
|
+
this._parts.push(items.map((i, idx) => `${idx + 1}. ${i}`).join('\n'));
|
|
211
|
+
return this;
|
|
212
|
+
}
|
|
213
|
+
taskList(...items) {
|
|
214
|
+
this._parts.push(items.map((i) => `- [${i.checked ? 'x' : ' '}] ${i.text}`).join('\n'));
|
|
215
|
+
return this;
|
|
216
|
+
}
|
|
217
|
+
blockQuote(...lines) {
|
|
218
|
+
this._parts.push(lines.map((l) => `>${l}`).join('\n'));
|
|
219
|
+
return this;
|
|
220
|
+
}
|
|
221
|
+
photo(src, caption) {
|
|
222
|
+
this._parts.push(``);
|
|
223
|
+
return this;
|
|
224
|
+
}
|
|
225
|
+
video(src, caption) {
|
|
226
|
+
this._parts.push(``);
|
|
227
|
+
return this;
|
|
228
|
+
}
|
|
229
|
+
audio(src, caption) {
|
|
230
|
+
this._parts.push(``);
|
|
231
|
+
return this;
|
|
232
|
+
}
|
|
233
|
+
table(headers, rows, alignment) {
|
|
234
|
+
const sep = headers.map((_, i) => {
|
|
235
|
+
const a = alignment?.[i];
|
|
236
|
+
if (a === 'center')
|
|
237
|
+
return ':---:';
|
|
238
|
+
if (a === 'right')
|
|
239
|
+
return '---:';
|
|
240
|
+
return ':---';
|
|
241
|
+
});
|
|
242
|
+
const lines = [
|
|
243
|
+
`| ${headers.join(' | ')} |`,
|
|
244
|
+
`|${sep.map((s) => s + '-').join('|')}|`,
|
|
245
|
+
...rows.map((r) => `| ${r.join(' | ')} |`),
|
|
246
|
+
];
|
|
247
|
+
this._parts.push(lines.join('\n'));
|
|
248
|
+
return this;
|
|
249
|
+
}
|
|
250
|
+
footnoteRef(id) { return `[^${id}]`; }
|
|
251
|
+
footnote(id, definition) {
|
|
252
|
+
this._parts.push(`[^${id}]: ${definition}`);
|
|
253
|
+
return this;
|
|
254
|
+
}
|
|
255
|
+
mathBlock(expression) {
|
|
256
|
+
this._parts.push(`$$${expression}$$`);
|
|
257
|
+
return this;
|
|
258
|
+
}
|
|
259
|
+
thinking(text) {
|
|
260
|
+
this._parts.push(`<tg-thinking>${text}</tg-thinking>`);
|
|
261
|
+
return this;
|
|
262
|
+
}
|
|
263
|
+
collage(...mediaSrcs) {
|
|
264
|
+
this._parts.push(`<tg-collage>\n${mediaSrcs.map((s) => ``).join('\n')}\n</tg-collage>`);
|
|
265
|
+
return this;
|
|
266
|
+
}
|
|
267
|
+
slideshow(...mediaSrcs) {
|
|
268
|
+
this._parts.push(`<tg-slideshow>\n${mediaSrcs.map((s) => ``).join('\n')}\n</tg-slideshow>`);
|
|
269
|
+
return this;
|
|
270
|
+
}
|
|
271
|
+
details(summary, content, open) {
|
|
272
|
+
this._parts.push(`<details${open ? ' open' : ''}><summary>${summary}</summary>\n${content}\n</details>`);
|
|
273
|
+
return this;
|
|
274
|
+
}
|
|
275
|
+
raw(md) {
|
|
276
|
+
this._parts.push(md);
|
|
277
|
+
return this;
|
|
278
|
+
}
|
|
279
|
+
build(options) {
|
|
280
|
+
return { markdown: this._parts.join('\n\n'), ...options };
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
exports.RichMarkdownBuilder = RichMarkdownBuilder;
|
|
284
|
+
/** Shorthand alias for RichHTMLBuilder */
|
|
285
|
+
exports.H = RichHTMLBuilder;
|
|
286
|
+
/** Shorthand alias for RichMarkdownBuilder */
|
|
287
|
+
exports.MD = RichMarkdownBuilder;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("@telegraf/types"), exports);
|
|
18
|
+
__exportStar(require("./rich-message"), exports);
|
package/lib/filters.js
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.allOf = exports.anyOf = exports.callbackQuery = exports.editedChannelPost = exports.channelPost = exports.editedMessage = exports.message = void 0;
|
|
4
|
+
const message = (...keys) => (update) => {
|
|
5
|
+
if (!('message' in update))
|
|
6
|
+
return false;
|
|
7
|
+
for (const key of keys) {
|
|
8
|
+
if (!(key in update.message))
|
|
9
|
+
return false;
|
|
10
|
+
}
|
|
11
|
+
return true;
|
|
12
|
+
};
|
|
13
|
+
exports.message = message;
|
|
14
|
+
const editedMessage = (...keys) => (update) => {
|
|
15
|
+
if (!('edited_message' in update))
|
|
16
|
+
return false;
|
|
17
|
+
for (const key of keys) {
|
|
18
|
+
if (!(key in update.edited_message))
|
|
19
|
+
return false;
|
|
20
|
+
}
|
|
21
|
+
return true;
|
|
22
|
+
};
|
|
23
|
+
exports.editedMessage = editedMessage;
|
|
24
|
+
const channelPost = (...keys) => (update) => {
|
|
25
|
+
if (!('channel_post' in update))
|
|
26
|
+
return false;
|
|
27
|
+
for (const key of keys) {
|
|
28
|
+
if (!(key in update.channel_post))
|
|
29
|
+
return false;
|
|
30
|
+
}
|
|
31
|
+
return true;
|
|
32
|
+
};
|
|
33
|
+
exports.channelPost = channelPost;
|
|
34
|
+
const editedChannelPost = (...keys) => (update) => {
|
|
35
|
+
if (!('edited_channel_post' in update))
|
|
36
|
+
return false;
|
|
37
|
+
for (const key of keys) {
|
|
38
|
+
if (!(key in update.edited_channel_post))
|
|
39
|
+
return false;
|
|
40
|
+
}
|
|
41
|
+
return true;
|
|
42
|
+
};
|
|
43
|
+
exports.editedChannelPost = editedChannelPost;
|
|
44
|
+
const callbackQuery = (...keys) => (update) => {
|
|
45
|
+
if (!('callback_query' in update))
|
|
46
|
+
return false;
|
|
47
|
+
for (const key of keys) {
|
|
48
|
+
if (!(key in update.callback_query))
|
|
49
|
+
return false;
|
|
50
|
+
}
|
|
51
|
+
return true;
|
|
52
|
+
};
|
|
53
|
+
exports.callbackQuery = callbackQuery;
|
|
54
|
+
/** Any of the provided filters must match */
|
|
55
|
+
const anyOf = (...filters) => (update) => {
|
|
56
|
+
for (const filter of filters)
|
|
57
|
+
if (filter(update))
|
|
58
|
+
return true;
|
|
59
|
+
return false;
|
|
60
|
+
};
|
|
61
|
+
exports.anyOf = anyOf;
|
|
62
|
+
/** All of the provided filters must match */
|
|
63
|
+
const allOf = (...filters) => (update) => {
|
|
64
|
+
for (const filter of filters)
|
|
65
|
+
if (!filter(update))
|
|
66
|
+
return false;
|
|
67
|
+
return true;
|
|
68
|
+
};
|
|
69
|
+
exports.allOf = allOf;
|
package/lib/format.js
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.mention = exports.link = exports.pre = exports.code = exports.quote = exports.underline = exports.strikethrough = exports.spoiler = exports.italic = exports.bold = exports.fmt = exports.join = exports.FmtString = void 0;
|
|
4
|
+
const formatting_1 = require("./core/helpers/formatting");
|
|
5
|
+
Object.defineProperty(exports, "FmtString", { enumerable: true, get: function () { return formatting_1.FmtString; } });
|
|
6
|
+
// Nests<A, B> means the function will return A, and it can nest B
|
|
7
|
+
// Nests<'fmt', string> means it will nest anything
|
|
8
|
+
// Nests<'code', never> means it will not nest anything
|
|
9
|
+
// Allowing everything to nest 'fmt' is a necessary evil; it allows to indirectly nest illegal entities
|
|
10
|
+
// Except for 'code' and 'pre', which don't nest anything anyway, so they only deal with strings
|
|
11
|
+
exports.join = formatting_1.join;
|
|
12
|
+
exports.fmt = (0, formatting_1.createFmt)();
|
|
13
|
+
exports.bold = (0, formatting_1.createFmt)('bold');
|
|
14
|
+
exports.italic = (0, formatting_1.createFmt)('italic');
|
|
15
|
+
exports.spoiler = (0, formatting_1.createFmt)('spoiler');
|
|
16
|
+
exports.strikethrough =
|
|
17
|
+
//
|
|
18
|
+
(0, formatting_1.createFmt)('strikethrough');
|
|
19
|
+
exports.underline =
|
|
20
|
+
//
|
|
21
|
+
(0, formatting_1.createFmt)('underline');
|
|
22
|
+
exports.quote =
|
|
23
|
+
//
|
|
24
|
+
(0, formatting_1.createFmt)('blockquote');
|
|
25
|
+
exports.code = (0, formatting_1.createFmt)('code');
|
|
26
|
+
const pre = (language) => (0, formatting_1.createFmt)('pre', { language });
|
|
27
|
+
exports.pre = pre;
|
|
28
|
+
const link = (content, url) =>
|
|
29
|
+
//
|
|
30
|
+
(0, formatting_1.linkOrMention)(content, { type: 'text_link', url });
|
|
31
|
+
exports.link = link;
|
|
32
|
+
const mention = (name, user) => typeof user === 'number'
|
|
33
|
+
? (0, exports.link)(name, 'tg://user?id=' + user)
|
|
34
|
+
: (0, formatting_1.linkOrMention)(name, {
|
|
35
|
+
type: 'text_mention',
|
|
36
|
+
user,
|
|
37
|
+
});
|
|
38
|
+
exports.mention = mention;
|
package/lib/future.js
ADDED
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useNewReplies = void 0;
|
|
4
|
+
function makeReply(ctx, extra) {
|
|
5
|
+
if (ctx.msgId)
|
|
6
|
+
return {
|
|
7
|
+
// overrides in this order so user can override all properties
|
|
8
|
+
reply_parameters: {
|
|
9
|
+
message_id: ctx.msgId,
|
|
10
|
+
...extra?.reply_parameters,
|
|
11
|
+
},
|
|
12
|
+
...extra,
|
|
13
|
+
};
|
|
14
|
+
else
|
|
15
|
+
return extra;
|
|
16
|
+
}
|
|
17
|
+
const replyContext = {
|
|
18
|
+
replyWithChatAction: function () {
|
|
19
|
+
throw new TypeError('ctx.replyWithChatAction has been removed, use ctx.sendChatAction instead');
|
|
20
|
+
},
|
|
21
|
+
reply(text, extra) {
|
|
22
|
+
this.assert(this.chat, 'reply');
|
|
23
|
+
return this.telegram.sendMessage(this.chat.id, text, makeReply(this, extra));
|
|
24
|
+
},
|
|
25
|
+
replyWithAnimation(animation, extra) {
|
|
26
|
+
this.assert(this.chat, 'replyWithAnimation');
|
|
27
|
+
return this.telegram.sendAnimation(this.chat.id, animation, makeReply(this, extra));
|
|
28
|
+
},
|
|
29
|
+
replyWithAudio(audio, extra) {
|
|
30
|
+
this.assert(this.chat, 'replyWithAudio');
|
|
31
|
+
return this.telegram.sendAudio(this.chat.id, audio, makeReply(this, extra));
|
|
32
|
+
},
|
|
33
|
+
replyWithContact(phoneNumber, firstName, extra) {
|
|
34
|
+
this.assert(this.chat, 'replyWithContact');
|
|
35
|
+
return this.telegram.sendContact(this.chat.id, phoneNumber, firstName, makeReply(this, extra));
|
|
36
|
+
},
|
|
37
|
+
replyWithDice(extra) {
|
|
38
|
+
this.assert(this.chat, 'replyWithDice');
|
|
39
|
+
return this.telegram.sendDice(this.chat.id, makeReply(this, extra));
|
|
40
|
+
},
|
|
41
|
+
replyWithDocument(document, extra) {
|
|
42
|
+
this.assert(this.chat, 'replyWithDocument');
|
|
43
|
+
return this.telegram.sendDocument(this.chat.id, document, makeReply(this, extra));
|
|
44
|
+
},
|
|
45
|
+
replyWithGame(gameName, extra) {
|
|
46
|
+
this.assert(this.chat, 'replyWithGame');
|
|
47
|
+
return this.telegram.sendGame(this.chat.id, gameName, makeReply(this, extra));
|
|
48
|
+
},
|
|
49
|
+
replyWithHTML(html, extra) {
|
|
50
|
+
this.assert(this.chat, 'replyWithHTML');
|
|
51
|
+
return this.telegram.sendMessage(this.chat.id, html, {
|
|
52
|
+
parse_mode: 'HTML',
|
|
53
|
+
...makeReply(this, extra),
|
|
54
|
+
});
|
|
55
|
+
},
|
|
56
|
+
replyWithInvoice(invoice, extra) {
|
|
57
|
+
this.assert(this.chat, 'replyWithInvoice');
|
|
58
|
+
return this.telegram.sendInvoice(this.chat.id, invoice, makeReply(this, extra));
|
|
59
|
+
},
|
|
60
|
+
replyWithLocation(latitude, longitude, extra) {
|
|
61
|
+
this.assert(this.chat, 'replyWithLocation');
|
|
62
|
+
return this.telegram.sendLocation(this.chat.id, latitude, longitude, makeReply(this, extra));
|
|
63
|
+
},
|
|
64
|
+
replyWithMarkdown(markdown, extra) {
|
|
65
|
+
this.assert(this.chat, 'replyWithMarkdown');
|
|
66
|
+
return this.telegram.sendMessage(this.chat.id, markdown, {
|
|
67
|
+
parse_mode: 'Markdown',
|
|
68
|
+
...makeReply(this, extra),
|
|
69
|
+
});
|
|
70
|
+
},
|
|
71
|
+
replyWithMarkdownV2(markdown, extra) {
|
|
72
|
+
this.assert(this.chat, 'replyWithMarkdownV2');
|
|
73
|
+
return this.telegram.sendMessage(this.chat.id, markdown, {
|
|
74
|
+
parse_mode: 'MarkdownV2',
|
|
75
|
+
...makeReply(this, extra),
|
|
76
|
+
});
|
|
77
|
+
},
|
|
78
|
+
replyWithMediaGroup(media, extra) {
|
|
79
|
+
this.assert(this.chat, 'replyWithMediaGroup');
|
|
80
|
+
return this.telegram.sendMediaGroup(this.chat.id, media, makeReply(this, extra));
|
|
81
|
+
},
|
|
82
|
+
replyWithPhoto(photo, extra) {
|
|
83
|
+
this.assert(this.chat, 'replyWithPhoto');
|
|
84
|
+
return this.telegram.sendPhoto(this.chat.id, photo, makeReply(this, extra));
|
|
85
|
+
},
|
|
86
|
+
replyWithPoll(question, options, extra) {
|
|
87
|
+
this.assert(this.chat, 'replyWithPoll');
|
|
88
|
+
return this.telegram.sendPoll(this.chat.id, question, options, makeReply(this, extra));
|
|
89
|
+
},
|
|
90
|
+
replyWithQuiz(question, options, extra) {
|
|
91
|
+
this.assert(this.chat, 'replyWithQuiz');
|
|
92
|
+
return this.telegram.sendQuiz(this.chat.id, question, options, makeReply(this, extra));
|
|
93
|
+
},
|
|
94
|
+
replyWithSticker(sticker, extra) {
|
|
95
|
+
this.assert(this.chat, 'replyWithSticker');
|
|
96
|
+
return this.telegram.sendSticker(this.chat.id, sticker, makeReply(this, extra));
|
|
97
|
+
},
|
|
98
|
+
replyWithVenue(latitude, longitude, title, address, extra) {
|
|
99
|
+
this.assert(this.chat, 'replyWithVenue');
|
|
100
|
+
return this.telegram.sendVenue(this.chat.id, latitude, longitude, title, address, makeReply(this, extra));
|
|
101
|
+
},
|
|
102
|
+
replyWithVideo(video, extra) {
|
|
103
|
+
this.assert(this.chat, 'replyWithVideo');
|
|
104
|
+
return this.telegram.sendVideo(this.chat.id, video, makeReply(this, extra));
|
|
105
|
+
},
|
|
106
|
+
replyWithVideoNote(videoNote, extra) {
|
|
107
|
+
this.assert(this.chat, 'replyWithVideoNote');
|
|
108
|
+
return this.telegram.sendVideoNote(this.chat.id, videoNote, makeReply(this, extra));
|
|
109
|
+
},
|
|
110
|
+
replyWithVoice(voice, extra) {
|
|
111
|
+
this.assert(this.chat, 'replyWithVoice');
|
|
112
|
+
return this.telegram.sendVoice(this.chat.id, voice, makeReply(this, extra));
|
|
113
|
+
},
|
|
114
|
+
replyWithRichMessage(options) {
|
|
115
|
+
this.assert(this.chat, 'replyWithRichMessage');
|
|
116
|
+
const { text, parseMode = 'HTML', buttons, disableLinkPreview, extra } = options;
|
|
117
|
+
return this.telegram.sendMessage(this.chat.id, text, makeReply(this, {
|
|
118
|
+
parse_mode: parseMode,
|
|
119
|
+
link_preview_options: disableLinkPreview ? { is_disabled: true } : undefined,
|
|
120
|
+
reply_markup: buttons?.length ? { inline_keyboard: buttons } : undefined,
|
|
121
|
+
...extra,
|
|
122
|
+
}));
|
|
123
|
+
},
|
|
124
|
+
replyWithRichMessageContent(richMessage, extra) {
|
|
125
|
+
this.assert(this.chat, 'replyWithRichMessageContent');
|
|
126
|
+
return this.telegram.sendRichMessage(this.chat.id, richMessage, makeReply(this, extra));
|
|
127
|
+
},
|
|
128
|
+
};
|
|
129
|
+
/**
|
|
130
|
+
* Sets up Context to use the new reply methods.
|
|
131
|
+
* This middleware makes `ctx.reply()` and `ctx.replyWith*()` methods will actually reply to the message they are replying to.
|
|
132
|
+
* Use `ctx.sendMessage()` to send a message in chat without replying to it.
|
|
133
|
+
*
|
|
134
|
+
* If the message to reply is deleted, `reply()` will send a normal message.
|
|
135
|
+
* If the update is not a message and we are unable to reply, `reply()` will send a normal message.
|
|
136
|
+
*/
|
|
137
|
+
function useNewReplies() {
|
|
138
|
+
return (ctx, next) => {
|
|
139
|
+
ctx.reply = replyContext.reply;
|
|
140
|
+
ctx.replyWithPhoto = replyContext.replyWithPhoto;
|
|
141
|
+
ctx.replyWithMediaGroup = replyContext.replyWithMediaGroup;
|
|
142
|
+
ctx.replyWithAudio = replyContext.replyWithAudio;
|
|
143
|
+
ctx.replyWithDice = replyContext.replyWithDice;
|
|
144
|
+
ctx.replyWithDocument = replyContext.replyWithDocument;
|
|
145
|
+
ctx.replyWithSticker = replyContext.replyWithSticker;
|
|
146
|
+
ctx.replyWithVideo = replyContext.replyWithVideo;
|
|
147
|
+
ctx.replyWithAnimation = replyContext.replyWithAnimation;
|
|
148
|
+
ctx.replyWithVideoNote = replyContext.replyWithVideoNote;
|
|
149
|
+
ctx.replyWithInvoice = replyContext.replyWithInvoice;
|
|
150
|
+
ctx.replyWithGame = replyContext.replyWithGame;
|
|
151
|
+
ctx.replyWithVoice = replyContext.replyWithVoice;
|
|
152
|
+
ctx.replyWithPoll = replyContext.replyWithPoll;
|
|
153
|
+
ctx.replyWithQuiz = replyContext.replyWithQuiz;
|
|
154
|
+
ctx.replyWithChatAction = replyContext.replyWithChatAction;
|
|
155
|
+
ctx.replyWithLocation = replyContext.replyWithLocation;
|
|
156
|
+
ctx.replyWithVenue = replyContext.replyWithVenue;
|
|
157
|
+
ctx.replyWithContact = replyContext.replyWithContact;
|
|
158
|
+
ctx.replyWithMarkdown = replyContext.replyWithMarkdown;
|
|
159
|
+
ctx.replyWithMarkdownV2 = replyContext.replyWithMarkdownV2;
|
|
160
|
+
ctx.replyWithHTML = replyContext.replyWithHTML;
|
|
161
|
+
ctx.replyWithRichMessage = replyContext.replyWithRichMessage;
|
|
162
|
+
ctx.replyWithRichMessageContent = replyContext.replyWithRichMessageContent;
|
|
163
|
+
return next();
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
exports.useNewReplies = useNewReplies;
|
package/lib/index.js
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.InputBox = exports.FormScene = exports.PaginatedBuilder = exports.sanitizeRichHtml = exports.AIStreamAdapter = exports.SmartQueue = exports.RichMessage = exports.Scenes = exports.MemorySessionStore = exports.session = exports.deunionize = exports.Format = exports.Input = exports.Markup = exports.Types = exports.Telegram = exports.TelegramError = exports.Router = exports.Composer = exports.Context = exports.Telegraf = void 0;
|
|
27
|
+
var telegraf_1 = require("./telegraf");
|
|
28
|
+
Object.defineProperty(exports, "Telegraf", { enumerable: true, get: function () { return telegraf_1.Telegraf; } });
|
|
29
|
+
var context_1 = require("./context");
|
|
30
|
+
Object.defineProperty(exports, "Context", { enumerable: true, get: function () { return context_1.Context; } });
|
|
31
|
+
var composer_1 = require("./composer");
|
|
32
|
+
Object.defineProperty(exports, "Composer", { enumerable: true, get: function () { return composer_1.Composer; } });
|
|
33
|
+
var router_1 = require("./router");
|
|
34
|
+
Object.defineProperty(exports, "Router", { enumerable: true, get: function () { return router_1.Router; } });
|
|
35
|
+
var error_1 = require("./core/network/error");
|
|
36
|
+
Object.defineProperty(exports, "TelegramError", { enumerable: true, get: function () { return error_1.TelegramError; } });
|
|
37
|
+
var telegram_1 = require("./telegram");
|
|
38
|
+
Object.defineProperty(exports, "Telegram", { enumerable: true, get: function () { return telegram_1.Telegram; } });
|
|
39
|
+
exports.Types = __importStar(require("./telegram-types"));
|
|
40
|
+
exports.Markup = __importStar(require("./markup"));
|
|
41
|
+
exports.Input = __importStar(require("./input"));
|
|
42
|
+
exports.Format = __importStar(require("./format"));
|
|
43
|
+
var deunionize_1 = require("./core/helpers/deunionize");
|
|
44
|
+
Object.defineProperty(exports, "deunionize", { enumerable: true, get: function () { return deunionize_1.deunionize; } });
|
|
45
|
+
var session_1 = require("./session");
|
|
46
|
+
Object.defineProperty(exports, "session", { enumerable: true, get: function () { return session_1.session; } });
|
|
47
|
+
Object.defineProperty(exports, "MemorySessionStore", { enumerable: true, get: function () { return session_1.MemorySessionStore; } });
|
|
48
|
+
exports.Scenes = __importStar(require("./scenes"));
|
|
49
|
+
exports.RichMessage = __importStar(require("./core/types/rich-message"));
|
|
50
|
+
var smart_queue_1 = require("./core/helpers/smart-queue");
|
|
51
|
+
Object.defineProperty(exports, "SmartQueue", { enumerable: true, get: function () { return smart_queue_1.SmartQueue; } });
|
|
52
|
+
var ai_stream_1 = require("./core/helpers/ai-stream");
|
|
53
|
+
Object.defineProperty(exports, "AIStreamAdapter", { enumerable: true, get: function () { return ai_stream_1.AIStreamAdapter; } });
|
|
54
|
+
var rich_sanitizer_1 = require("./core/helpers/rich-sanitizer");
|
|
55
|
+
Object.defineProperty(exports, "sanitizeRichHtml", { enumerable: true, get: function () { return rich_sanitizer_1.sanitizeRichHtml; } });
|
|
56
|
+
var paginated_1 = require("./paginated");
|
|
57
|
+
Object.defineProperty(exports, "PaginatedBuilder", { enumerable: true, get: function () { return paginated_1.PaginatedBuilder; } });
|
|
58
|
+
var form_scene_1 = require("./scenes/form-scene");
|
|
59
|
+
Object.defineProperty(exports, "FormScene", { enumerable: true, get: function () { return form_scene_1.FormScene; } });
|
|
60
|
+
var input_box_1 = require("./core/helpers/input-box");
|
|
61
|
+
Object.defineProperty(exports, "InputBox", { enumerable: true, get: function () { return input_box_1.InputBox; } });
|