支持自定义BOT仓库 (#1051)

This commit is contained in:
Chiupam 2022-01-04 13:26:16 +08:00 committed by GitHub
parent ddee69d291
commit 8c4db8dd40
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 6 deletions

View File

@ -35,6 +35,9 @@ EnableExtraShell="true"
## 是否自动启动bot默认不启动设置为true时自动启动目前需要自行克隆bot仓库所需代码存到ql/repo目录下文件夹命名为dockerbot
AutoStartBot=""
## 是否使用第三方bot默认不使用使用时填入仓库地址存到ql/repo目录下文件夹命名为diybot
BotRepoUrl=""
## 安装bot依赖时指定pip源默认使用清华源如不需要源设置此参数为空
PipMirror="https://pypi.tuna.tsinghua.edu.cn/simple"
@ -52,7 +55,7 @@ export BARK_SOUND=""
## 下方填写推送消息分组,默认为"QingLong"
export BARK_GROUP="QingLong"
## 3. Telegram
## 3. Telegram
## 下方填写自己申请@BotFather的Token如10xxx4:AAFcqxxxxgER5uw
export TG_BOT_TOKEN=""
## 下方填写 @getuseridbot 中获取到的纯数字ID
@ -73,7 +76,7 @@ export TG_PROXY_AUTH=""
## 如需使用,请赋值代理地址链接,并自行解除下一行的注释
export TG_API_HOST=""
## 4. 钉钉
## 4. 钉钉
## 官方文档https://developers.dingtalk.com/document/app/custom-robot-access
## 下方填写token后面的内容只需 https://oapi.dingtalk.com/robot/send?access_token=XXX 等于=符号后面的XXX即可
export DD_BOT_TOKEN=""
@ -104,9 +107,9 @@ export PUSH_PLUS_TOKEN=""
export PUSH_PLUS_USER=""
## 9. go-cqhttp
## gobot_url 推送到个人QQ: http://127.0.0.1/send_private_msg 群http://127.0.0.1/send_group_msg
## gobot_url 推送到个人QQ: http://127.0.0.1/send_private_msg 群http://127.0.0.1/send_group_msg
## gobot_token 填写在go-cqhttp文件设置的访问密钥
## gobot_qq 如果GOBOT_URL设置 /send_private_msg 则需要填入 user_id=个人QQ 相反如果是 /send_group_msg 则需要填入 group_id=QQ群
## gobot_qq 如果GOBOT_URL设置 /send_private_msg 则需要填入 user_id=个人QQ 相反如果是 /send_group_msg 则需要填入 group_id=QQ群
## go-cqhttp相关API https://docs.go-cqhttp.org/api
export GOBOT_URL=""
export GOBOT_TOKEN=""

View File

@ -3,8 +3,14 @@
## 导入通用变量与函数
dir_shell=/ql/shell
. $dir_shell/share.sh
url="${github_proxy_url}https://github.com/SuMaiKaDe/bot.git"
repo_path="${dir_repo}/dockerbot"
if [[ -z ${BotRepoUrl} ]]; then
url="${github_proxy_url}https://github.com/SuMaiKaDe/bot.git"
repo_path="${dir_repo}/dockerbot"
else
url=${BotRepoUrl}
repo_path="${dir_repo}/diybot"
fi
echo -e "\n1、安装bot依赖...\n"
apk --no-cache add -f zlib-dev gcc jpeg-dev python3-dev musl-dev freetype-dev