mioku-plugin-meme 1.0.0 → 2.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/config.md +1 -1
- package/index.ts +6 -2
- package/package.json +32 -1
- package/runtime.ts +1 -1
- package/skills.ts +1 -1
package/config.md
CHANGED
package/index.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type { AIService } from "
|
|
2
|
-
import type { ConfigService } from "../../src/services/config/tpyes";
|
|
1
|
+
import type { AIService, ConfigService } from "mioku";
|
|
3
2
|
import { definePlugin, type MiokiContext } from "mioki";
|
|
4
3
|
import { MEME_BASE_CONFIG } from "./configs/base";
|
|
5
4
|
import { MEME_FILTER_CONFIG } from "./configs/filters";
|
|
@@ -76,6 +75,11 @@ const memePlugin = definePlugin({
|
|
|
76
75
|
`[meme] ${instruction}\n执行错误: ${normalizeErrorMessage(error)}`,
|
|
77
76
|
);
|
|
78
77
|
}
|
|
78
|
+
const rawText = ctx.text(event)?.trim() ?? "";
|
|
79
|
+
const hasSlashPrefix = baseConfig.trigger.prefixes.some((p: string) => rawText.startsWith(p));
|
|
80
|
+
if (!hasSlashPrefix) {
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
79
83
|
const chatRuntime = aiService?.getChatRuntime();
|
|
80
84
|
if (chatRuntime) {
|
|
81
85
|
try {
|
package/package.json
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mioku-plugin-meme",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"description": "基于 meme-generator API 的表情包制作插件",
|
|
5
5
|
"main": "index.ts",
|
|
6
|
+
"type": "module",
|
|
6
7
|
"keywords": [
|
|
7
8
|
"mioku"
|
|
8
9
|
],
|
|
@@ -15,6 +16,28 @@
|
|
|
15
16
|
"config",
|
|
16
17
|
"ai"
|
|
17
18
|
],
|
|
19
|
+
"accessHooks": [
|
|
20
|
+
{
|
|
21
|
+
"id": "meme-菜单",
|
|
22
|
+
"match": "/^\\/meme\\s*菜单/"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"id": "meme-搜索",
|
|
26
|
+
"match": "/^\\/meme\\s*搜索/"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"id": "meme-详情",
|
|
30
|
+
"match": "/^\\/meme\\s*详情/"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"id": "meme-更新",
|
|
34
|
+
"match": "/^\\/meme\\s*更新/"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"id": "随机表情",
|
|
38
|
+
"match": "/^\\/随机表情/"
|
|
39
|
+
}
|
|
40
|
+
],
|
|
18
41
|
"help": {
|
|
19
42
|
"title": "Meme 表情包",
|
|
20
43
|
"description": "接入 meme-generator API 的表情包制作插件",
|
|
@@ -57,5 +80,13 @@
|
|
|
57
80
|
}
|
|
58
81
|
]
|
|
59
82
|
}
|
|
83
|
+
},
|
|
84
|
+
"peerDependencies": {
|
|
85
|
+
"mioku": "^0.8.0",
|
|
86
|
+
"mioki": "^0.16.0"
|
|
87
|
+
},
|
|
88
|
+
"devDependencies": {
|
|
89
|
+
"mioku": "workspace:*",
|
|
90
|
+
"mioki": "^0.16.0"
|
|
60
91
|
}
|
|
61
92
|
}
|
package/runtime.ts
CHANGED
package/skills.ts
CHANGED