halbot 1995.1.23 → 1995.1.24
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/package.json +1 -1
- package/pipeline/070_collect.mjs +4 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "halbot",
|
|
3
3
|
"description": "Just another AI powered Telegram bot, which is simple design, easy to use, extendable and fun.",
|
|
4
|
-
"version": "1995.1.
|
|
4
|
+
"version": "1995.1.24",
|
|
5
5
|
"private": false,
|
|
6
6
|
"homepage": "https://github.com/Leask/halbot",
|
|
7
7
|
"type": "module",
|
package/pipeline/070_collect.mjs
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { bot, hal, media, storage, utilitas, vision, web } from '../index.mjs';
|
|
2
2
|
|
|
3
3
|
const collectableFiles = ['document', 'sticker', 'video_note', 'video'];
|
|
4
|
-
const sendInit = async (ctx, txt) => ctx._.done.length || await ctx.ok(txt);
|
|
5
4
|
|
|
6
5
|
const [API_ROOT, BUFFER_ENCODE, EMOJI_SPEECH, EMOJI_LOOK, ATTACHMENT, PROMPT]
|
|
7
6
|
= [
|
|
@@ -16,6 +15,10 @@ const collectableObjects = [
|
|
|
16
15
|
|
|
17
16
|
const metaPrompt = "The following are meta information changes or attachment details for the current chat. Please respond appropriately. For example, if it's a poll, make a selection based on your understanding. If there are changes in group members, greet or bid farewell to the respective individuals. If it's a geographical location description, provide a suitable answer based on the context. You may also receive other types of information, for which a reasonable, human-like response is expected.";
|
|
18
17
|
|
|
18
|
+
// Processing will bypass the keyboard update while keeping the message editable.
|
|
19
|
+
const sendInit = async (ctx, txt) => ctx._.done.length
|
|
20
|
+
|| await ctx.ok(txt, { processing: true });
|
|
21
|
+
|
|
19
22
|
const getFileUrl = async (ctx, file_id) => {
|
|
20
23
|
assert(file_id, 'File ID is required.', 400);
|
|
21
24
|
const file = await ctx.telegram.getFile(file_id);
|