mirror of
https://mirror.skon.top/github.com/sliverp/qqbot
synced 2026-04-30 13:50:24 +08:00
fix: resolve plugin id mismatch warning and log spam
- Rename package to @tencent-connect/qqbot to match manifest id, eliminating 'plugin id mismatch' warning - Add explicit openclaw.id to clawdbot/moltbot/openclaw config sections - Remove high-frequency debug logs in channel config callbacks (listAccountIds, resolveAccount, defaultAccountId) - Add one-click install & run method using upgrade-and-run.sh to README
This commit is contained in:
12
README.md
12
README.md
@@ -162,8 +162,18 @@ Scan to join the QQ group chat
|
||||
|
||||
### Step 2 — Install the Plugin
|
||||
|
||||
**Option A: One-Click Install & Run (Recommended)**
|
||||
|
||||
```bash
|
||||
git clone https://github.com/tencent-connect/openclaw-qq.git && cd openclaw-qq
|
||||
bash ./scripts/upgrade-and-run.sh --appid YOUR_APPID --secret YOUR_SECRET
|
||||
```
|
||||
|
||||
The script handles everything: cleanup old plugins → install deps → register plugin → configure channel → start service. Once done, skip to [Step 4](#step-4--start--test).
|
||||
|
||||
**Option B: Manual Step-by-Step**
|
||||
|
||||
```bash
|
||||
# From source (npm package coming soon)
|
||||
git clone https://github.com/tencent-connect/openclaw-qq.git && cd openclaw-qq
|
||||
npm install --omit=dev
|
||||
openclaw plugins install .
|
||||
|
||||
12
README.zh.md
12
README.zh.md
@@ -158,8 +158,18 @@
|
||||
|
||||
### 第二步 — 安装插件
|
||||
|
||||
**方式一:一键安装并启动(推荐)**
|
||||
|
||||
```bash
|
||||
git clone https://github.com/tencent-connect/openclaw-qq.git && cd openclaw-qq
|
||||
bash ./scripts/upgrade-and-run.sh --appid YOUR_APPID --secret YOUR_SECRET
|
||||
```
|
||||
|
||||
脚本会自动完成:清理旧插件 → 安装依赖 → 注册插件 → 配置通道 → 启动服务。完成后可直接跳到[第四步](#第四步--启动并测试)。
|
||||
|
||||
**方式二:手动分步安装**
|
||||
|
||||
```bash
|
||||
# 从源码安装(npm 包即将发布)
|
||||
git clone https://github.com/tencent-connect/openclaw-qq.git && cd openclaw-qq
|
||||
npm install --omit=dev
|
||||
openclaw plugins install .
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "@tencent-connect/openclaw-qq",
|
||||
"name": "@tencent-connect/qqbot",
|
||||
"version": "1.5.4",
|
||||
"type": "module",
|
||||
"main": "dist/index.js",
|
||||
@@ -20,16 +20,19 @@
|
||||
"moltbot.plugin.json"
|
||||
],
|
||||
"clawdbot": {
|
||||
"id": "qqbot",
|
||||
"extensions": [
|
||||
"./index.ts"
|
||||
]
|
||||
},
|
||||
"moltbot": {
|
||||
"id": "qqbot",
|
||||
"extensions": [
|
||||
"./index.ts"
|
||||
]
|
||||
},
|
||||
"openclaw": {
|
||||
"id": "qqbot",
|
||||
"extensions": [
|
||||
"./index.ts"
|
||||
]
|
||||
|
||||
@@ -73,21 +73,9 @@ export const qqbotPlugin: ChannelPlugin<ResolvedQQBotAccount> = {
|
||||
onboarding: qqbotOnboardingAdapter,
|
||||
|
||||
config: {
|
||||
listAccountIds: (cfg) => {
|
||||
const ids = listQQBotAccountIds(cfg);
|
||||
console.log(`[qqbot:channel] listAccountIds: ${JSON.stringify(ids)}`);
|
||||
return ids;
|
||||
},
|
||||
resolveAccount: (cfg, accountId) => {
|
||||
const account = resolveQQBotAccount(cfg, accountId);
|
||||
console.log(`[qqbot:channel] resolveAccount: input=${accountId} → resolved=${account.accountId}, appId=${account.appId}, enabled=${account.enabled}`);
|
||||
return account;
|
||||
},
|
||||
defaultAccountId: (cfg) => {
|
||||
const id = resolveDefaultQQBotAccountId(cfg);
|
||||
console.log(`[qqbot:channel] defaultAccountId: ${id}`);
|
||||
return id;
|
||||
},
|
||||
listAccountIds: (cfg) => listQQBotAccountIds(cfg),
|
||||
resolveAccount: (cfg, accountId) => resolveQQBotAccount(cfg, accountId),
|
||||
defaultAccountId: (cfg) => resolveDefaultQQBotAccountId(cfg),
|
||||
// 新增:设置账户启用状态
|
||||
setAccountEnabled: ({ cfg, accountId, enabled }) =>
|
||||
setAccountEnabledInConfigSection({
|
||||
|
||||
Reference in New Issue
Block a user