dsh-qq-moony 0.4.0 → 0.5.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/CHANGELOG.md +11 -0
- package/README.md +3 -1
- package/client.js +27 -1
- package/index.js +15 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# CHANGELOG
|
|
2
2
|
|
|
3
|
+
## 0.5.0 — 2026-10-25
|
|
4
|
+
|
|
5
|
+
装完之后不再一片红:缺什么会自己说出来。
|
|
6
|
+
|
|
7
|
+
**新增**
|
|
8
|
+
- 体检:设置页顶部检查三件事——QQ NT 装没装、NapCat 找不找得到、能不能连上;缺哪样就列出来,写清去哪儿下、哪几步
|
|
9
|
+
- 状态接口多返回 `qqnt` / `napcat` 两个字段
|
|
10
|
+
|
|
11
|
+
**为什么不能一条命令全装**
|
|
12
|
+
QQ NT 是几百兆的客户端(要管理员权限),NapCat 要往 QQ 进程里注入(要匹配版本)——npm 包装不下这两样。插件能做的是:缺东西的时候说清楚缺什么,而不是让人装完盯着一片红发呆。
|
|
13
|
+
|
|
3
14
|
## 0.4.0 — 2026-10-25
|
|
4
15
|
|
|
5
16
|
群聊从"只回 @"变成"会参与聊天"。
|
package/README.md
CHANGED
|
@@ -64,7 +64,9 @@ NapCat 是接管整个 QQ 客户端的行为——消息收发、登录态、空
|
|
|
64
64
|
|
|
65
65
|
## 三、设置页(名字叫「QQ嗦嗨嗨」)
|
|
66
66
|
|
|
67
|
-
装完重启 DSH,设置里会多一项 **QQ
|
|
67
|
+
装完重启 DSH,设置里会多一项 **QQ嗦嗨嗨**。
|
|
68
|
+
|
|
69
|
+
**顶上一块是体检**:QQ NT 装没装、NapCat 找不找得到、能不能连上。缺哪样它就列哪样,写明去哪儿下、哪几步——不用盯着一片红猜。
|
|
68
70
|
|
|
69
71
|
- **连接状态**:在线没有、登录的是谁、今天发了多少、上限多少
|
|
70
72
|
- **主动说话**:开关(点一下即时保存)
|
package/client.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
window.__ModuleLoader__.load({
|
|
2
2
|
id: 'dsh-qq-moony',
|
|
3
3
|
factory(require) {
|
|
4
4
|
const React = require('react');
|
|
@@ -152,9 +152,35 @@
|
|
|
152
152
|
return h('div', { style: { padding: '8px 0', opacity: 0.6 } }, 错 || '读状态中…');
|
|
153
153
|
}
|
|
154
154
|
|
|
155
|
+
const 缺口 = [];
|
|
156
|
+
if (!状态.qqnt) 缺口.push('没找到 QQ NT —— 去 im.qq.com 装新版(9.9.x)。老版 9.7 注不进去,这是死条件。');
|
|
157
|
+
if (!状态.napcat) 缺口.push('没找到 NapCat —— 去 github.com/NapNeko/NapCatQQ 下 Shell 版,解压后把 napCatDir 指过去。');
|
|
158
|
+
if (状态.qqnt && 状态.napcat && !状态.online)
|
|
159
|
+
缺口.push('QQ NT 和 NapCat 都在,但连不上 —— 检查 NapCat 启没启、3000 端口、token 三样。');
|
|
160
|
+
|
|
155
161
|
return h(
|
|
156
162
|
'div',
|
|
157
163
|
null,
|
|
164
|
+
缺口.length > 0
|
|
165
|
+
? h(
|
|
166
|
+
'div',
|
|
167
|
+
{
|
|
168
|
+
style: {
|
|
169
|
+
...卡片,
|
|
170
|
+
flexDirection: 'column',
|
|
171
|
+
alignItems: 'stretch',
|
|
172
|
+
gap: '6px',
|
|
173
|
+
borderColor: 'var(--dsw-alias-warning-1, #d99b2b)',
|
|
174
|
+
},
|
|
175
|
+
},
|
|
176
|
+
h(
|
|
177
|
+
'div',
|
|
178
|
+
{ style: { ...标题, color: 'var(--dsw-alias-warning-1, #d99b2b)' } },
|
|
179
|
+
'还差几步才能用',
|
|
180
|
+
),
|
|
181
|
+
缺口.map((行, i) => h('div', { key: i, style: 说明 }, `${i + 1}. ${行}`)),
|
|
182
|
+
)
|
|
183
|
+
: null,
|
|
158
184
|
h(
|
|
159
185
|
'div',
|
|
160
186
|
{ style: { ...卡片 } },
|
package/index.js
CHANGED
|
@@ -120,6 +120,19 @@ export function apply(ctx, 配置) {
|
|
|
120
120
|
|
|
121
121
|
ctx.logger?.info?.(`qq-moony: 接到 ${c.baseUrl}(限额 ${c.perHour}/时、${c.perDay}/天)`);
|
|
122
122
|
|
|
123
|
+
/** 体检:QQ NT 装没装、NapCat 在不在——缺东西的时候要能说清缺什么。 */
|
|
124
|
+
function 体检() {
|
|
125
|
+
const 候选 = [
|
|
126
|
+
'C:/Program Files/Tencent/QQNT/QQ.exe',
|
|
127
|
+
'C:/Program Files (x86)/Tencent/QQNT/QQ.exe',
|
|
128
|
+
join(homedir(), 'AppData/Local/Programs/QQNT/QQ.exe'),
|
|
129
|
+
'D:/Tencent/QQNT/QQ.exe',
|
|
130
|
+
];
|
|
131
|
+
const qqnt = 候选.some((p) => existsSync(p));
|
|
132
|
+
const napcat = Boolean(c.napCatDir) && existsSync(join(c.napCatDir, 'launcher-user.bat'));
|
|
133
|
+
return { qqnt, napcat };
|
|
134
|
+
}
|
|
135
|
+
|
|
123
136
|
/** DSH 起来时顺手看一眼 NapCat:没跑就自己拉起来(免扫码,用 -q 快速登录)。 */
|
|
124
137
|
async function 确认NapCat在跑() {
|
|
125
138
|
if (c.autoStartNapCat === false) return;
|
|
@@ -658,6 +671,8 @@ export function apply(ctx, 配置) {
|
|
|
658
671
|
ok: true,
|
|
659
672
|
online: 在线,
|
|
660
673
|
nickname: 昵称,
|
|
674
|
+
qqnt: 体检().qqnt,
|
|
675
|
+
napcat: 体检().napcat,
|
|
661
676
|
uin: Number(c.uin ?? 0),
|
|
662
677
|
proactive: Boolean(c.proactive),
|
|
663
678
|
autoReply: Boolean(c.autoReply),
|