@zaofan/dsh-qqbot 1.11.18 → 1.11.19
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.
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
|
|
14
14
|
```
|
|
15
15
|
┌─────────────── 统一能力包(makeExtCaps)───────────────┐
|
|
16
|
-
tools/ env ──┤ text markdown markdownCard media image voice video file│
|
|
16
|
+
tools/ env ──┤ text markdown markdownCard card media image voice video file│
|
|
17
17
|
commands/ ctx ──┤ at api() appId/appSecret store registerInteractionCard │
|
|
18
18
|
botplay/ env ──┤ appendSilent appendWake canAppendSilent │
|
|
19
19
|
hooks/ env ──┤ user owners peer log kernel restart │
|
|
@@ -250,6 +250,7 @@ handler 返回 `{ok:false,...}` 会原样透传,其它值包成 `{ok:true, dat
|
|
|
250
250
|
| 发纯文本 | `await env.text('hi')` | |
|
|
251
251
|
| 发 markdown | `await env.markdown('# 标题')` | 富文本卡片通道,**自带纯文本降级** |
|
|
252
252
|
| 发 markdown+按钮 | `await env.markdownCard(md, keyboard)` | 自己拼 keyboard(≤5 行) |
|
|
253
|
+
| **发图文卡片** | `await env.card({ title, description, url, pic_url })` | 官方 `msg_type=8`(20261021 新增):带封面大图的卡片,比纯链接富态得多。`title` ≤50 字 / `description` ≤200 字 / `url` 与 `pic_url` 必须 https(≤1024)。**卡片发不出去会自动降级成「markdown + 封面图」**,所以返回值 true 只代表"发出去了",不代表"是卡片"。⚠️ 受 QQ 主动消息窗口限制:窗口过期时卡片会被拒(降级),这是平台行为。<br>**完整可抄的示例:插件市场里装「B站分享 · 视频卡片」(`bili-share`)** —— 它做了 B 站搜索 + 详情 + 发卡片 + 降级,源码在 `packs/bili-share/tools/bili_share.mjs`。 |
|
|
253
254
|
| 发富媒体 | `await env.image(src)` / `voice` / `video` / `file` | `src` 可传 URL 字符串或 `{url}` / `{localPath}` |
|
|
254
255
|
| 任意媒体 | `await env.media('file', src)` | kind = image / voice / video / file |
|
|
255
256
|
| @人 | `env.at(openid)` | 返回 `<@openid>` 片段,拼进文本 |
|