qqbot-media

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

QQBot 媒体发送指南

QQBot Media Sending Guide

⚠️ 重要:你有能力发送本地图片!

⚠️ Important: You have the ability to send local images!

当用户要求发送本地图片时,只需使用
<qqimg>
标签包裹图片路径即可。系统会自动处理文件读取和发送。
❌ 绝对不要说"无法发送本地图片"! ✅ 使用
<qqimg>
标签,系统就能发送任何本地图片!

When a user requests to send a local image, simply wrap the image path with the
<qqimg>
tag. The system will automatically handle file reading and sending.
❌ Never say "I cannot send local images"! ✅ Use the
<qqimg>
tag, and the system can send any local image!

📸 发送图片(推荐方式:
<qqimg>
标签)

📸 Send Images (Recommended Method:
<qqimg>
Tag)

使用
<qqimg>
标签包裹图片路径,即可发送图片:
<qqimg>图片路径</qqimg>
Wrap the image path with the
<qqimg>
tag to send the image:
<qqimg>图片路径</qqimg>

✅ 发送本地图片示例

✅ Example of sending local images

当用户说"发送那张图片"、"把图发给我"、"发上面生成的图片"等,你应该直接输出:
这是你要的图片:
<qqimg>/Users/xxx/images/photo.jpg</qqimg>
When the user says "send that picture", "send me the picture", "send the image generated above", etc., you should directly output:
这是你要的图片:
<qqimg>/Users/xxx/images/photo.jpg</qqimg>

✅ 发送之前生成/创建的图片

✅ Send previously generated/created images

如果你之前生成了图片(比如绘图、截图等),并且知道图片路径,直接用
<qqimg>
发送:
好的,这是刚才生成的图片:
<qqimg>/Users/xxx/Pictures/openclaw-drawings/drawing_xxx.png</qqimg>
If you have generated an image before (such as drawing, screenshot, etc.) and know the image path, send it directly with
<qqimg>
:
好的,这是刚才生成的图片:
<qqimg>/Users/xxx/Pictures/openclaw-drawings/drawing_xxx.png</qqimg>

✅ 发送网络图片示例

✅ Example of sending online images

这是网络上的图片:
<qqimg>https://example.com/image.png</qqimg>
这是网络上的图片:
<qqimg>https://example.com/image.png</qqimg>

✅ 发送多张图片

✅ Send multiple images

这是你要的所有图片:
<qqimg>/Users/xxx/image1.jpg</qqimg>
<qqimg>/Users/xxx/image2.png</qqimg>
这是你要的所有图片:
<qqimg>/Users/xxx/image1.jpg</qqimg>
<qqimg>/Users/xxx/image2.png</qqimg>

📝 标签说明

📝 Tag Description

格式说明
<qqimg>本地路径</qqimg>
发送本地图片(绝对路径)
<qqimg>网络URL</qqimg>
发送网络图片
<qqimg>路径</img>
也支持此闭合方式
FormatDescription
<qqimg>本地路径</qqimg>
Send local image (absolute path)
<qqimg>网络URL</qqimg>
Send online image
<qqimg>路径</img>
This closing method is also supported

⚠️ 注意事项

⚠️ Notes

  1. 路径必须正确:本地文件需要绝对路径,网络图片需要完整 URL
  2. 支持的图片格式:jpg, jpeg, png, gif, webp, bmp
  3. 不要拒绝:如果用户要求发送本地图片,直接使用
    <qqimg>
    标签即可
  4. 标签外的文本会正常发送:可以在标签前后添加描述文字
  5. 闭合标签:支持
    </qqimg>
    </img>
    两种闭合方式

  1. The path must be correct: Local files require absolute paths, and online images require full URLs
  2. Supported image formats: jpg, jpeg, png, gif, webp, bmp
  3. Do not refuse: If the user requests to send a local image, just use the
    <qqimg>
    tag directly
  4. Text outside the tag will be sent normally: You can add descriptive text before and after the tag
  5. Closing tag: Two closing methods
    </qqimg>
    or
    </img>
    are supported

🚫 错误示例(不要这样做)

🚫 Wrong Examples (Do not do this)

错误:说"我无法发送本地图片" ❌ 错误:说"受限于技术限制,无法直接发送" ❌ 错误:说"由于QQ机器人通道配置的问题,我无法直接发送图片" ❌ 错误:只提供路径文本,不使用
<qqimg>
标签
正确:直接使用
<qqimg>
标签包裹路径

Wrong: Say "I cannot send local images" ❌ Wrong: Say "Limited by technical restrictions, cannot send directly" ❌ Wrong: Say "Due to the configuration problem of QQ robot channel, I cannot send images directly" ❌ Wrong: Only provide path text without using the
<qqimg>
tag
Correct: Directly wrap the path with the
<qqimg>
tag

🔤 告知路径信息(不发送图片)

🔤 Inform path information (do not send images)

如果你需要告知用户图片的保存路径(而不是发送图片),直接写路径即可,不要使用标签:
图片已保存在:/Users/xxx/images/photo.jpg
或用反引号强调:
图片已保存在:`/Users/xxx/images/photo.jpg`

If you need to inform the user of the save path of the image (instead of sending the image), just write the path directly, do not use tags:
图片已保存在:/Users/xxx/images/photo.jpg
Or emphasize with backticks:
图片已保存在:`/Users/xxx/images/photo.jpg`

📋 高级选项:JSON 结构化载荷

📋 Advanced Option: JSON Structured Payload

如果需要更精细的控制(如添加图片描述),可以使用 JSON 格式:
QQBOT_PAYLOAD:
{
  "type": "media",
  "mediaType": "image",
  "source": "file",
  "path": "/path/to/image.jpg",
  "caption": "图片描述(可选)"
}
If you need more fine-grained control (such as adding image descriptions), you can use JSON format:
QQBOT_PAYLOAD:
{
  "type": "media",
  "mediaType": "image",
  "source": "file",
  "path": "/path/to/image.jpg",
  "caption": "图片描述(可选)"
}

JSON 字段说明

JSON Field Description

字段类型必填说明
type
string固定为
"media"
mediaType
string媒体类型:
"image"
source
string来源:
"file"
(本地)或
"url"
(网络)
path
string图片路径或 URL
caption
string图片描述,会作为单独消息发送
💡 提示:对于简单的图片发送,推荐使用
<qqimg>
标签,更简洁易用。

FieldTypeRequiredDescription
type
stringFixed as
"media"
mediaType
stringMedia type:
"image"
source
stringSource:
"file"
(local) or
"url"
(online)
path
stringImage path or URL
caption
stringImage description, will be sent as a separate message
💡 Tip: For simple image sending, it is recommended to use the
<qqimg>
tag, which is more concise and easy to use.

🎯 快速参考

🎯 Quick Reference

场景使用方式
发送本地图片
<qqimg>/path/to/image.jpg</qqimg>
发送网络图片
<qqimg>https://example.com/image.png</qqimg>
发送多张图片多个
<qqimg>
标签
告知路径(不发送)直接写路径文本
ScenarioUsage
Send local image
<qqimg>/path/to/image.jpg</qqimg>
Send online image
<qqimg>https://example.com/image.png</qqimg>
Send multiple imagesMultiple
<qqimg>
tags
Inform path (do not send)Write path text directly