@roitium/telegram-stickers-brain 2.2.0 → 2.3.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/index.js CHANGED
@@ -95,7 +95,7 @@ module.exports = function(api) {
95
95
 
96
96
  // Helper for admin notifications
97
97
  async function notifyAdmin(text) {
98
- const pCfg = api.config?.plugins?.entries?.['telegram-stickers']?.config || {};
98
+ const pCfg = api.config?.plugins?.entries?.['telegram-stickers-brain']?.config || {};
99
99
  const target = pCfg.notifyChatId;
100
100
  if (!target) return;
101
101
  try {
@@ -137,7 +137,7 @@ module.exports = function(api) {
137
137
 
138
138
  let caption = "无法生成描述";
139
139
  try {
140
- const pCfg = api.config?.plugins?.entries?.['telegram-stickers']?.config || {};
140
+ const pCfg = api.config?.plugins?.entries?.['telegram-stickers-brain']?.config || {};
141
141
  const scriptPath = path.join(__dirname, "describe_sticker.js");
142
142
  const child = cp.spawnSync('node', [scriptPath, downloadUrl, prompt], {
143
143
  env: {
@@ -224,9 +224,15 @@ ${caption}`;
224
224
 
225
225
  if (!event.content || (!event.content.includes('<media:sticker>') && !event.content.includes('sticker'))) return;
226
226
 
227
- const pCfg = api.config?.plugins?.entries?.['telegram-stickers']?.config || {};
228
- const autoCollect = pCfg.autoCollect !== false;
229
- if (!autoCollect) return;
227
+ const pCfg = api.config?.plugins?.entries?.['telegram-stickers-brain']?.config || {};
228
+ const autoCollect = pCfg.autoCollect === true;
229
+ if (!autoCollect) {
230
+ return;
231
+ }
232
+
233
+ // 必须当前消息确实包含 sticker 标记才继续
234
+ const hasSticker = event.content && (event.content.includes('<media:sticker>') || event.content.includes('sticker'));
235
+ if (!hasSticker) return;
230
236
 
231
237
  setTimeout(() => {
232
238
  try {
@@ -2,7 +2,7 @@
2
2
  "id": "telegram-stickers-brain",
3
3
  "name": "Telegram Stickers Brain",
4
4
  "description": "Semantic Telegram sticker management with VLM captioning and QMD vector indexing",
5
- "version": "2.2.0",
5
+ "version": "2.3.0",
6
6
  "configSchema": {
7
7
  "type": "object",
8
8
  "additionalProperties": false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@roitium/telegram-stickers-brain",
3
- "version": "2.2.0",
3
+ "version": "2.3.0",
4
4
  "description": "Telegram Stickers Plugin with auto-collection and load balancing",
5
5
  "main": "index.js",
6
6
  "openclaw": {