This repository has been archived by the owner on Aug 1, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy path搭建指南-Windows.txt
61 lines (48 loc) · 2.44 KB
/
搭建指南-Windows.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
---------------------- 基于Windows ----------------------
------------ Step 1 安装python和依赖库 ------------
安装python3.7+
*(选项一)直接使用anaconda安装python
安装过程参照https://docs.anaconda.com/anaconda/install/windows/
*(选项二)在官网下载安装python https://www.python.org/downloads/windows/
安装后将python.exe所在的文件夹加入环境变量并重启电脑, 用命令提示符替换后文的Anaconda Prompt
安装git (https://git-scm.com/download/win)
下载文件: 右键想存放的文件夹, 选择git bash here, 输入
git clone https://github.com/haowen-li/DicePP.git
如果速度过慢, 可以试试下面这条指令
git clone https://gitclone.com/github.com/haowen-li/DicePP.git
安装python依赖库:
打开Anaconda Prompt, 逐行输入
cd (DicePP所在的目录) 如: cd C:/Workspace
pip install "nonebot[scheduler]"
pip install -r ./DicePP/requirements.txt
如果下载速度过慢,可以换国内镜像,比如清华
pip install -r ./DicePP/requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
------------ Step 2 新建配置文件 ------------
(选项一)
在DicePP文件夹下新建一个文件master_config.txt, 将后缀改为.py, 即master_config.py
用记事本打开,加入如下内容,#后的内容为注释,可以不写,注意引号为英文引号, 文件应另存为UTF-8编码
(选项二)
如果报错信息中含有unicode error的字样,可以从tools文件夹中复制master_config.py文件至根目录,再更改其内容
SELF_ID = '12345678' # 骰娘账号
MASTER = ['87654321'] # Master账号,如有多个,可以写为['87654321', '000000']的格式,注意是英文逗号
MASTER_GROUP = ['666666'] # 管理群号,目前会将加入的群自动播报至管理群,如果不需要则写为[ ]即可
GROUP_PASSWORD = '伊丽傻白' # 好友验证码,必须输入该验证码才会通过好友请求,如果不需要验证码请将其设为空字符串 ''
------------ Step 3 安装并配置go-cqhttp ------------
解压go-cqhttp.exe文件至任意目录(注意版本号可能改变,注意系统是linux还是windows)
DicePP/tool/go-cqhttp-v0.9.29-fix2-windows-amd64.zip
(选项一)
初次运行go-cqhttp.exe生成配置文件
编辑config.json:
修改uin为qq账号,password为密码
将http_config,ws_config,web_ui的enabled属性都设置为false
将ws_reverse_servers的enabled属性设置为true,将reverse_url属性设置为"ws://127.0.0.1:8080/ws/"
注意本身有双引号的写在双引号里,没有则不需双引号
(选项二)
将DicePP/tool/config.json复制到和go-cqhttp.exe所在的目录下
修改uin为qq账号,password为密码: 即把88888888替换为账号, your password替换为密码, 密码要写在引号中
------------ Step 4 运行DicePP和go-cqhttp ------------
1.运行DicePP: 在Anaconda Prompt中输入
cd (DicePP所在的目录) 如: cd C:/Workspace
python ./DicePP/dicepp.py
2.双击运行go-cqhttp.exe
注意dicepp.py和go-cqhttp必须同时运行!