微信不支持 Markdown 语法,**不要使用 Markdown 表格**!
如果需要发送表格内容,改用**带缩进的编号列表**格式:
1. 选项1:说明内容
- 详情1
- 详情2
2. 选项2:说明内容
- 详情1
- 详情2
3. 选项3:说明内容
- 详情1
- 详情2
通过 OpenClaw 的 message 工具发送图片或视频到微信。
filePath 参数(推荐)message(
action="send",
filePath="/absolute/path/to/image.png"
)
media 参数message(
action="send",
media="/absolute/path/to/video.mp4"
)
/Users/xinfanchen/image.png./image.png 或 image.pngCDN upload server error: status 500import os
image_dir = "/path/to/images"
for filename in os.listdir(image_dir):
if filename.endswith(".png"):
image_path = os.path.join(image_dir, filename)
message(
action="send",
filePath=image_path
)
必须分两步执行(先发文字,再发多媒体):
# 1. 先发送文字说明
message(
action="send",
message="这是角色设计图:"
)
# 2. 再发送图片
message(
action="send",
filePath="/path/to/image.png"
)
| 错误信息 | 原因 | 解决方法 |
|---|---|---|
CDN upload server error: status 500 |
CDN 服务瞬时问题 | 等待后重试,或尝试压缩图片/更换格式 |
File not found |
提供的路径不正确 | 检查是否使用了**绝对路径**且文件确实存在 |
requires target |
缺少目标用户 | 确保在工具调用中通过 to 参数指定了接收者 |
filePath 发送。