Google Chat 通道
通过 Google Chat 与 Moltbot 进行交互。
先决条件
- Google Cloud 项目
- 启用的 Google Chat API
- Bot 服务账号
配置
创建 Google Cloud 项目
- 访问 Google Cloud Console
- 创建新项目或选择现有项目
- 启用 Google Chat API
配置 Bot
- 配置 选项卡
- 设置 Bot 名称和头像
- 启用以下功能:
- 在私信中
- 在聊天室中
- 添加连接设置(Webhook URL)
添加通道
bash
moltbot channels add --channel googlechat \
--account default \
--credentials /path/to/credentials.json使用
发送消息
bash
# 发送到聊天室
moltbot message send --channel googlechat --target spaces/space-id --message "Hello Google Chat!"
# 发送到私信
moltbot message send --channel googlechat --target users/user-id --message "Hello!"发送卡片消息
bash
moltbot message send --channel googlechat \
--target spaces/space-id \
--card @/path/to/card.json功能
支持的消息类型
- ✅ 文本消息
- ✅ 卡片消息
- ✅ 图片和附件
- ✅ 链接预览
- ✅ 斜杠命令
- ✅ 表情反应
- ❌ 语音消息
- ❌ 视频通话