目 录CONTENT

文章目录

真寻Bot-QQ机器人配置指南

Administrator
2021-08-09 / 0 评论 / 0 点赞 / 947 阅读 / 2289 字

准备环境

  • python3.8+

开始部署

1. 配置 go-cqhttp

    1. 在 https://github.com/Mrs4s/go-cqhttp 下载Releases最新版本:
mkdir go-cqhttp && cd go-cqhttp
curl -LJO https://download.fastgit.org/Mrs4s/go-cqhttp/releases/download/v1.0.0-beta5/go-cqhttp_linux_amd64.tar.gz
tar -xzvf go-cqhttp_linux_amd64.tar.gz
rm -rf go-cqhttp_linux_amd64.tar.gz
./go-cqhttp
  • [x] 运行后选择 > 3: 反向 Websocket 通信 , 回车

    1. 将gocq的配置文件config.yml中的 universal: ws://your_websocket_universal.server 改为 universal: ws://127.0.0.1:8080/cqhttp/ws
    1. 重新运行 ./go-cqhttp QQ小号扫码登陆,不要退出! 🐷 出现 connection refused 报错不要管,这是因为反向通信没有监听到 绪山真寻Bot 的请求,继续往下。

2. 配置 绪山真寻Bot

    1. 新开命令窗口,克隆源代码到本地 zhenxun_bot 文件夹
git clone https://github.com/HibiKier/zhenxun_bot.git
cd zhenxun_bot
    1. 安装依赖 (建议python3.8以上版本避免报错) python3 --version pip install -r requirements.txt
    1. 进行基础配置 请查看 配置 部分

    查看文件 ls -a 修改文件 vim .env.dev 需要熟悉 vim 命令 数据库配置 见另一篇文章 数据库配置

    1. 开始运行 python3 bot.py 等待自动下载配置完数据库资源文件即可食用 🐷 手动更新python3.9的同学可试试 python3.9 bot.py
0
  1. 支付宝打赏

    qrcode alipay
  2. 微信打赏

    qrcode weixin
  3. QQ打赏

    qrcode qq

评论区