-
-
Notifications
You must be signed in to change notification settings - Fork 126
Go cqhttp
Bluefissure edited this page Sep 12, 2023
·
5 revisions
1. 先请自行下载go-cqhttp (dev版本)
修改config.yml(只需要在意带注释的字段,其余字段请不要更改)
# go-cqhttp 默认配置文件
account: # 账号相关
uin: 1233456 # 机器人的QQ账号
password: '' # 机器人的qq密码(推荐使用密码登录)
encrypt: false
status: 0 # 在线状态 请参考 https://github.com/Mrs4s/go-cqhttp/blob/dev/docs/config.md#在线状态
relogin:
disabled: false
delay: 3
interval: 0
max-times: 0
use-sso-address: true
......3. 从 protocol-versions 目录下载对应版本协议(目前为8.9.73)的 json 文件,置于 data/versions 目录下,并根据协议更改为 1.json 或 6.json。
- 推荐使用密码登录(即填写password字段)
- 当提示“上网环境异常”等字样时,删除目录下的
device.json文件,或切换登录协议,再尝试扫码登录- 更换服务器/迁移bot请备份
device.json文件- 扫码登录时若看不清/看不全/看不见二维码,打开目录下
qrcode.png,扫描即可
关于事件过滤器启动失败: open filter.json: The system cannot find the file specified.报错
一般不用管,若要启用事件过滤器,请看相关文档
找到设备信息 device.json文件,更改protocol字段即可:
| 值 | 类型 | 登录状态 | 限制 |
|---|---|---|---|
| 0 | iPad | 苹果平板在线 | 无 |
| 1 | Android Phone | 安卓手机在线 | 无法接收新版表情如 /吃瓜、/汪汪, 会自动转换为字符串 |
| 2 | Android Watch | 安卓手表在线 | 除Android Phone的限制外, 无法接收 notify 事件、无法接收口令红包、无法接收撤回消息 |
| 3 | MacOS | 苹果电脑在线 | 无 |
| 6 | Android Pad | 安卓平板在线 | 无 |
注意, 根据协议的不同, 各类消息有所限制
更改
protocol字段后需要重新进行登录认证,也需要下载对应协议文件。