这篇文章上次修改于 327 天前,可能其部分内容已经发生变化,如有疑问可询问作者。
最近心情不好,找个机器人发泄发泄。
安装准备
酷Q Air
CoolQ HTTP API 插件
Nonebot框架
程序目录
├── /nonebot/
├── bot.py
├── config.py
└── /plugins/
PS:plugins目录存放自定义插件
修改文件
1、按照config.py中的提示修改超级用户QQ等信息。
2、修改【酷Q Air\data\app\io.github.richardchien.coolqhttpapi\config\QQ号.json】文件如下
{
"host": "[::]",
"port": 5700,
"use_http": true,
"ws_host": "[::]",
"ws_port": 6700,
"use_ws": false,
"ws_reverse_url": "",
"ws_reverse_api_url": "ws://127.0.0.1:8080/ws/api/",
"ws_reverse_event_url": "ws://127.0.0.1:8080/ws/event/",
"ws_reverse_reconnect_interval": 3000,
"ws_reverse_reconnect_on_code_1000": true,
"use_ws_reverse": true,
"post_url": "",
"access_token": "",
"secret": "",
"post_message_format": "string",
"serve_data_files": false,
"update_source": "china",
"update_channel": "stable",
"auto_check_update": false,
"auto_perform_update": false,
"show_log_console": true,
"log_level": "info"
}
使用教程
1、运行 酷Q Air,启用 CoolQ HTTP API 插件
2、运行程序目录中的bot.py
程序源码
https://gitee.com/nonebot_2010/plugins
温馨提示
部分代码为网上收集,著作权归原作者所有。
参考链接
https://nonebot.cqp.moe/api.html
https://github.com/xiaoyou66/QQrobot
没有评论