mirror of
https://mirror.skon.top/github.com/sliverp/qqbot
synced 2026-04-30 13:50:24 +08:00
feat: v1.6.0 — 斜杠指令体系 / qqmedia统一标签 / token缓存优化 / 版本更新
This commit is contained in:
@@ -13,6 +13,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/).
|
||||
- **Startup greeting**: Distinguish first install vs. restart with different greeting messages.
|
||||
- **Log download**: `/qqbot-logs` packages the last 2000 lines of logs and sends as a file.
|
||||
|
||||
### Changed
|
||||
|
||||
- **Unified rich media tag**: Replaced `<qqimg>`, `<qqvoice>`, `<qqfile>`, `<qqvideo>` with a single `<qqmedia>` tag — the system auto-detects media type by file extension.
|
||||
|
||||
### Improved
|
||||
|
||||
- **Greeting debounce**: Suppress duplicate greetings within 60s during rapid restarts (e.g. upgrades).
|
||||
|
||||
@@ -13,6 +13,10 @@
|
||||
- **启动问候语**:区分首次安装与普通重启,发送不同问候语。
|
||||
- **日志下载**:`/qqbot-logs` 打包最近 2000 行日志发送文件给用户。
|
||||
|
||||
### 变更
|
||||
|
||||
- **统一富媒体标签**:将 `<qqimg>`、`<qqvoice>`、`<qqfile>`、`<qqvideo>` 统一为 `<qqmedia>` 标签,系统根据文件扩展名自动识别媒体类型。
|
||||
|
||||
### 改进
|
||||
|
||||
- **问候语防抖**:60s 内重复重启不再重复发送问候语(解决升级过程中刷屏问题)。
|
||||
|
||||
68
README.md
68
README.md
@@ -99,7 +99,7 @@ If your main model supports vision (e.g. Tencent Hunyuan `hunyuan-vision`), AI c
|
||||
>
|
||||
> **QQBot**: Here you go! 🐱
|
||||
|
||||
AI sends images via `<qqimg>path</qqimg>`. Supports local paths and URLs. Formats: jpg/png/gif/webp/bmp.
|
||||
AI can send images directly. Supports local paths and URLs. Formats: jpg/png/gif/webp/bmp.
|
||||
|
||||
<img width="360" src="docs/images/4645f2b3a20822b7f8d6664a708529eb_720.jpg" alt="Image Generation Demo" />
|
||||
|
||||
@@ -109,7 +109,7 @@ AI sends images via `<qqimg>path</qqimg>`. Supports local paths and URLs. Format
|
||||
>
|
||||
> **QQBot**: *(sends a voice message)*
|
||||
|
||||
AI sends voice via `<qqvoice>path</qqvoice>`. Formats: mp3/wav/silk/ogg. No ffmpeg required.
|
||||
AI can send voice messages directly. Formats: mp3/wav/silk/ogg. No ffmpeg required.
|
||||
|
||||
<img width="360" src="docs/images/21dce8bfc553ce23d1bd1b270e9c516c.jpg" alt="TTS Voice Demo" />
|
||||
|
||||
@@ -129,7 +129,7 @@ This capability depends on OpenClaw cron scheduling and proactive messaging. If
|
||||
>
|
||||
> **QQBot**: *(sends a .txt file)*
|
||||
|
||||
AI sends files via `<qqfile>path</qqfile>`. Any format, up to 20MB.
|
||||
AI can send files directly. Any format, up to 20MB.
|
||||
|
||||
<img width="360" src="docs/images/17cada70df90185d45a2d6dd36e92f2f_720.jpg" alt="File Sending Demo" />
|
||||
|
||||
@@ -139,21 +139,61 @@ AI sends files via `<qqfile>path</qqfile>`. Any format, up to 20MB.
|
||||
>
|
||||
> **QQBot**: *(sends a video)*
|
||||
|
||||
AI sends videos via `<qqvideo>path</qqvideo>`. Supports local files and URLs. Large files (>5MB) auto-show upload progress.
|
||||
AI can send videos directly. Supports local files and URLs.
|
||||
|
||||
<img width="360" src="docs/images/85d03b8a216f267ab7b2aee248a18a41_720.jpg" alt="Video Sending Demo" />
|
||||
|
||||
### Rich Media Tag Reference
|
||||
> **Under the hood:** Upload dedup caching, ordered queue delivery, and multi-layer audio format fallback.
|
||||
|
||||
| Tag | Direction | Notes |
|
||||
|-----|-----------|-------|
|
||||
| `<qqimg>path</qqimg>` | Send | jpg/png/gif/webp/bmp, local path or URL |
|
||||
| `<qqvoice>path</qqvoice>` | Send | mp3/wav/silk/ogg, no ffmpeg required |
|
||||
| `<qqfile>path</qqfile>` | Send | Any format, up to 20MB |
|
||||
| `<qqvideo>path</qqvideo>` | Send | Local path or URL |
|
||||
| Voice / File / Image | Receive | Auto-transcribe (STT), auto-download, or vision analysis |
|
||||
### 🛠️ Slash Commands
|
||||
|
||||
> **Under the hood:** 30+ tag variant auto-correction, upload dedup caching, ordered queue delivery, and multi-layer audio format fallback.
|
||||
The plugin provides built-in slash commands that are intercepted before reaching the AI queue, giving instant responses for diagnostics and management.
|
||||
|
||||
#### `/qqbot-ping` — Latency Test
|
||||
|
||||
> **You**: `/qqbot-ping`
|
||||
>
|
||||
> **QQBot**: 🏓 pong!⏱ Latency: 495ms (network: 494ms, plugin: 1ms)
|
||||
|
||||
Measures end-to-end latency from QQ server push to plugin response, broken down into network transport and plugin processing time.
|
||||
|
||||
<img width="360" src="docs/images/slash-ping.jpg" alt="Ping Demo" />
|
||||
|
||||
#### `/qqbot-version` — Version Info
|
||||
|
||||
> **You**: `/qqbot-version`
|
||||
>
|
||||
> **QQBot**: 🦞 Framework: OpenClaw 2026.3.13 / 🤖 Plugin: v1.6.0 / ✅ Up to date
|
||||
|
||||
Shows framework version, plugin version, and update status at a glance.
|
||||
|
||||
<!-- <img width="360" src="" alt="Version Demo" /> -->
|
||||
|
||||
#### `/qqbot-help` — Command List
|
||||
|
||||
> **You**: `/qqbot-help`
|
||||
>
|
||||
> **QQBot**: Lists all available slash commands with descriptions.
|
||||
|
||||
<img width="360" src="docs/images/slash-help.jpg" alt="Help Demo" />
|
||||
|
||||
#### `/qqbot-upgrade` — Upgrade Guide
|
||||
|
||||
> **You**: `/qqbot-upgrade`
|
||||
>
|
||||
> **QQBot**: Shows current version, latest version (if available), and a link to the upgrade guide.
|
||||
|
||||
<img width="360" src="docs/images/slash-upgrade.jpg" alt="Upgrade Demo" />
|
||||
|
||||
#### `/qqbot-logs` — Log Export
|
||||
|
||||
> **You**: `/qqbot-logs`
|
||||
>
|
||||
> **QQBot**: 📋 Logs packaged (~2000 lines), sending file... *(sends a .txt file)*
|
||||
|
||||
Exports the last ~2000 lines of gateway logs as a file for quick troubleshooting.
|
||||
|
||||
<img width="360" src="docs/images/slash-logs.jpg" alt="Logs Demo" />
|
||||
|
||||
---
|
||||
|
||||
@@ -379,7 +419,7 @@ STT supports two-level configuration with priority fallback:
|
||||
- `provider` — references a key in `models.providers` to inherit `baseUrl` and `apiKey`
|
||||
- `voice` — voice variant
|
||||
- Set `enabled: false` to disable (default: `true`)
|
||||
- When configured, AI can use `<qqvoice>` tags to generate and send voice messages
|
||||
- When configured, AI can generate and send voice messages
|
||||
|
||||
---
|
||||
|
||||
|
||||
68
README.zh.md
68
README.zh.md
@@ -94,7 +94,7 @@ QQ 的引用事件通常只携带索引键(如 `REFIDX_xxx`),不直接返
|
||||
>
|
||||
> **QQBot**:画好啦!一只可爱的简笔小猫咪🐱🎨
|
||||
|
||||
AI 通过 `<qqimg>路径</qqimg>` 发送图片,支持本地文件路径和网络 URL。格式:jpg/png/gif/webp/bmp。
|
||||
AI 可直接发送图片,支持本地文件路径和网络 URL。格式:jpg/png/gif/webp/bmp。
|
||||
|
||||
<img width="360" src="docs/images/4645f2b3a20822b7f8d6664a708529eb_720.jpg" alt="发图片演示" />
|
||||
|
||||
@@ -104,7 +104,7 @@ AI 通过 `<qqimg>路径</qqimg>` 发送图片,支持本地文件路径和网
|
||||
>
|
||||
> **QQBot**:*(发送一条语音消息)*
|
||||
|
||||
AI 通过 `<qqvoice>路径</qqvoice>` 发送语音消息。格式:mp3/wav/silk/ogg,无需安装 ffmpeg。
|
||||
AI 可直接发送语音消息。格式:mp3/wav/silk/ogg,无需安装 ffmpeg。
|
||||
|
||||
<img width="360" src="docs/images/21dce8bfc553ce23d1bd1b270e9c516c.jpg" alt="发语音演示" />
|
||||
|
||||
@@ -124,7 +124,7 @@ AI 通过 `<qqvoice>路径</qqvoice>` 发送语音消息。格式:mp3/wav/silk
|
||||
>
|
||||
> **QQBot**:*(发送 .txt 文件)*
|
||||
|
||||
AI 通过 `<qqfile>路径</qqfile>` 发送文件。任意格式,最大 20MB。
|
||||
AI 可直接发送文件。任意格式,最大 20MB。
|
||||
|
||||
<img width="360" src="docs/images/17cada70df90185d45a2d6dd36e92f2f_720.jpg" alt="发文件演示" />
|
||||
|
||||
@@ -134,21 +134,61 @@ AI 通过 `<qqfile>路径</qqfile>` 发送文件。任意格式,最大 20MB。
|
||||
>
|
||||
> **QQBot**:*(发送视频)*
|
||||
|
||||
AI 通过 `<qqvideo>路径</qqvideo>` 发送视频,支持本地文件和公网 URL。大文件(>5MB)自动提示上传进度。
|
||||
AI 可直接发送视频,支持本地文件和公网 URL。
|
||||
|
||||
<img width="360" src="docs/images/85d03b8a216f267ab7b2aee248a18a41_720.jpg" alt="发视频演示" />
|
||||
|
||||
### 富媒体标签参考
|
||||
> **底层细节:** 上传去重缓存、有序队列发送、音频格式多层降级。
|
||||
|
||||
| 标签 | 方向 | 说明 |
|
||||
|------|------|------|
|
||||
| `<qqimg>路径</qqimg>` | 发送 | jpg/png/gif/webp/bmp,本地路径或 URL |
|
||||
| `<qqvoice>路径</qqvoice>` | 发送 | mp3/wav/silk/ogg,无需 ffmpeg |
|
||||
| `<qqfile>路径</qqfile>` | 发送 | 任意格式,最大 20MB |
|
||||
| `<qqvideo>路径</qqvideo>` | 发送 | 本地路径或 URL |
|
||||
| 语音 / 文件 / 图片 | 接收 | 自动转录(STT)、自动下载、或视觉分析 |
|
||||
### 🛠️ 斜杠指令
|
||||
|
||||
> **底层细节:** 30+ 种标签变体自动纠正、上传去重缓存、有序队列发送、音频格式多层降级。
|
||||
插件内置一组斜杠指令,在消息进入 AI 队列前拦截处理,即时响应,用于诊断和管理。
|
||||
|
||||
#### `/qqbot-ping` — 延迟测试
|
||||
|
||||
> **你**:`/qqbot-ping`
|
||||
>
|
||||
> **QQBot**:🏓 pong!⏱ 延迟: 495ms(网络传输: 494ms,插件处理: 1ms)
|
||||
|
||||
测量从 QQ 服务器推送到插件响应的端到端延迟,细分网络传输和插件处理两段耗时。
|
||||
|
||||
<img width="360" src="docs/images/slash-ping.jpg" alt="Ping 演示" />
|
||||
|
||||
#### `/qqbot-version` — 版本信息
|
||||
|
||||
> **你**:`/qqbot-version`
|
||||
>
|
||||
> **QQBot**:🦞 框架: OpenClaw 2026.3.13 / 🤖 插件: v1.6.0 / ✅ 已是最新
|
||||
|
||||
一目了然查看框架版本、插件版本和更新状态。
|
||||
|
||||
<!-- <img width="360" src="" alt="Version 演示" /> -->
|
||||
|
||||
#### `/qqbot-help` — 指令列表
|
||||
|
||||
> **你**:`/qqbot-help`
|
||||
>
|
||||
> **QQBot**:列出所有可用的斜杠指令及说明。
|
||||
|
||||
<img width="360" src="docs/images/slash-help.jpg" alt="Help 演示" />
|
||||
|
||||
#### `/qqbot-upgrade` — 升级指引
|
||||
|
||||
> **你**:`/qqbot-upgrade`
|
||||
>
|
||||
> **QQBot**:显示当前版本、最新版本(如有更新)及升级文档链接。
|
||||
|
||||
<img width="360" src="docs/images/slash-upgrade.jpg" alt="Upgrade Demo" />
|
||||
|
||||
#### `/qqbot-logs` — 日志导出
|
||||
|
||||
> **你**:`/qqbot-logs`
|
||||
>
|
||||
> **QQBot**:📋 日志已打包(约 2000 行),正在发送文件… *(发送 .txt 文件)*
|
||||
|
||||
导出最近约 2000 行网关日志为文件,方便快速排查问题。
|
||||
|
||||
<img width="360" src="docs/images/slash-logs.jpg" alt="Logs 演示" />
|
||||
|
||||
---
|
||||
|
||||
@@ -374,7 +414,7 @@ STT 支持两级配置,按优先级查找:
|
||||
- `provider` — 引用 `models.providers` 中的 key,自动继承 `baseUrl` 和 `apiKey`
|
||||
- `voice` — 语音音色
|
||||
- 设置 `enabled: false` 可禁用(默认:`true`)
|
||||
- 配置后,AI 可使用 `<qqvoice>` 标签生成并发送语音消息
|
||||
- 配置后,AI 可生成并发送语音消息
|
||||
|
||||
---
|
||||
|
||||
|
||||
BIN
docs/images/slash-help.jpg
Normal file
BIN
docs/images/slash-help.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 149 KiB |
BIN
docs/images/slash-logs.jpg
Normal file
BIN
docs/images/slash-logs.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 79 KiB |
BIN
docs/images/slash-ping.jpg
Normal file
BIN
docs/images/slash-ping.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 56 KiB |
BIN
docs/images/slash-upgrade.jpg
Normal file
BIN
docs/images/slash-upgrade.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 102 KiB |
BIN
docs/images/slash-version.jpg
Normal file
BIN
docs/images/slash-version.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 66 KiB |
Reference in New Issue
Block a user