# 安装指南
更新于2021/10/13
# 前置
提示
由于此项目基于 Nonebot2 和 go-cqhttp 开发,所以在开始前,您需要完成对go-cqhttp的安装和配置
go-cqhttp的安装请参照 go-cqhttp 文档 (opens new window)
# 安装
# 将项目 Clone 到本地(默认为最新版本)
git clone https://github.com/HibiKier/zhenxun_bot.git
# 进入 zhenxun_bot 目录
cd zhenxun_bot
# 安装依赖
注意!
请确保您当前的Python版本大于或等于3.8.*
pip install -r requirements.txt
# 安装数据库
提示
此项目以 PostgreSQL 作为数据库,所以您还需要安装 PostgreSQL。
安装过程在此不展示,请自行安装。
# 设置
# 管理员
在.env.dev文件中
SUPERUSERS = [""] # 填写你的QQ
# API和数据库
在configs/config.py文件中
# API KEY
ALAPI_TOKEN: str = "" //#获取ALAPI https://admin.alapi.cn/user/login
# 数据库(必要)
# 如填写bind则不需要再填写后面的字段#)
bind: str = "" //# 数据库连接链接 示例:"bind": "postgresql://user:password@127.0.0.1:5432/database"
sql_name: str = "postgresql" //# 数据库类型 当前仅支持 PostgreSQL
user: str = "" //# 数据用户名
password: str = "" //# 数据库密码
address: str = "" //# 数据库地址
port: str = "" //# 数据库端口
database: str = "" //# 数据库名称
# 运行
python bot.py