koishi-plugin-stock 2.1.8 → 2.2.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/README.md +5 -0
- package/lib/commands/stock-commands.js +19 -13
- package/lib/core/broadcast.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -65,6 +65,11 @@ npm install koishi-plugin-stock
|
|
|
65
65
|
|
|
66
66
|
## 更新日志
|
|
67
67
|
|
|
68
|
+
### v2.1.9 (2026-03-02)
|
|
69
|
+
- 🎯 **消息格式优化**:简化定时广播前缀为"[定时广播]",移除冗余的内容标识
|
|
70
|
+
- ✅ **格式统一**:所有定时推送消息格式为"[定时广播] 📊指数看板:..."
|
|
71
|
+
- 📦 保持所有功能逻辑不变,仅优化消息显示格式
|
|
72
|
+
|
|
68
73
|
### v2.1.8 (2026-03-02)
|
|
69
74
|
- 🎯 **用户体验优化**:为定时广播消息添加"[定时广播 - 内容]"前缀标识
|
|
70
75
|
- ✅ **消息识别**:用户可以清楚区分定时推送和手动触发的消息
|
|
@@ -145,18 +145,24 @@ class StockCommands {
|
|
|
145
145
|
}
|
|
146
146
|
// 映射策略名称到API端点
|
|
147
147
|
const strategyMap = {
|
|
148
|
-
'N型': '
|
|
149
|
-
'
|
|
150
|
-
'
|
|
151
|
-
'
|
|
152
|
-
'
|
|
153
|
-
'
|
|
154
|
-
'
|
|
155
|
-
'
|
|
156
|
-
'3': '
|
|
157
|
-
'
|
|
158
|
-
'
|
|
159
|
-
'
|
|
148
|
+
'N型': 'n_shape',
|
|
149
|
+
'n_shape': 'n_shape',
|
|
150
|
+
'1': 'n_shape',
|
|
151
|
+
'填坑': 'fill_pit',
|
|
152
|
+
'fill_pit': 'fill_pit',
|
|
153
|
+
'2': 'fill_pit',
|
|
154
|
+
'少妇': 'young_woman',
|
|
155
|
+
'young_woman': 'young_woman',
|
|
156
|
+
'3': 'young_woman',
|
|
157
|
+
'突破': 'breakthrough',
|
|
158
|
+
'breakthrough': 'breakthrough',
|
|
159
|
+
'4': 'breakthrough',
|
|
160
|
+
'补票': 'ticket',
|
|
161
|
+
'ticket': 'ticket',
|
|
162
|
+
'5': 'ticket',
|
|
163
|
+
'少妇pro': 'young_woman_pro',
|
|
164
|
+
'young_woman_pro': 'young_woman_pro',
|
|
165
|
+
'6': 'young_woman_pro'
|
|
160
166
|
};
|
|
161
167
|
const apiEndpoint = strategyMap[strategy];
|
|
162
168
|
if (!apiEndpoint) {
|
|
@@ -164,7 +170,7 @@ class StockCommands {
|
|
|
164
170
|
}
|
|
165
171
|
try {
|
|
166
172
|
// 使用带重试机制的HTTP请求
|
|
167
|
-
const responseText = await httpRequestWithRetry(ctx, `https://stock.svip886.com/api/
|
|
173
|
+
const responseText = await httpRequestWithRetry(ctx, `https://stock.svip886.com/api/dyq_select/${apiEndpoint}`, {
|
|
168
174
|
responseType: 'text'
|
|
169
175
|
});
|
|
170
176
|
return `🎯 选股结果 (${strategy}): \n\n${responseText}`;
|
package/lib/core/broadcast.js
CHANGED
|
@@ -93,7 +93,7 @@ class BroadcastScheduler {
|
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
95
|
// 添加定时广播前缀
|
|
96
|
-
messageContent = `[定时广播
|
|
96
|
+
messageContent = `[定时广播] ${messageContent}`;
|
|
97
97
|
// 执行广播任务
|
|
98
98
|
const targets = task.targetIds.split(',').map(id => id.trim()).filter(id => id);
|
|
99
99
|
if (task.type === 'private') {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "koishi-plugin-stock",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"description": "A Koishi plugin that fetches stock data and provides market analysis, including active market cap, stock alerts, limit-up board, stock selection features, and heart method card drawing with configurable blacklists for each command.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"typings": "lib/index.d.ts",
|