Skip to content

Commit

Permalink
doc:补充配置说明和示例文档
Browse files Browse the repository at this point in the history
  • Loading branch information
dezhishen committed Mar 4, 2023
1 parent 0fa4ad8 commit 7d4b918
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 17 deletions.
7 changes: 1 addition & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
*.exe
.vscode/launch.json
plugins
fortune
configs
jrrp
bili-live.db
.bot.env
configs/onebot-plus.yaml
20 changes: 19 additions & 1 deletion configs/README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,20 @@
# configs
项目示例配置文件
配置文件读取路径为程序运行目录下的`configs`文件夹下的`onebot-plus.yaml`文件
## onebot-plus.yaml
```
api:
# 调用go-cqhttp的api 配置
type: http
#支持三种方式 http / websocket / websocket-reverse
endpoint: "http(s)://xxxxxxxx"
# 当类型是websocket-reverse时,此项用于声明本服务gin的启动配置例如:`0.0.0.0:6700`或者 `127.0.0.1:6700`
accessToken: "_access_token"
event:
type: "websocket"
# websocket / websocket-reverse / http-reverse
addr: "ws(s)://xxxxxx"
#当类型是websocket-reverse/http-reverse时,此项用于声明本服务gin的启动配置例如:`0.0.0.0:6700`或者 `127.0.0.1:6700`
accessToken: "_access_token"
```
## 注意事项
如果是反向ws或者反向http,需要在go-cqhttp的配置文件中修改配置,用于连接到本服务
9 changes: 0 additions & 9 deletions configs/bot.yml

This file was deleted.

5 changes: 4 additions & 1 deletion examples/README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
# examples
示例文件
示例文件
- 执行` sh build.sh `生成可执行插件
- 修改` main.go `中的插件路径
- 执行` go run main.go `运行

0 comments on commit 7d4b918

Please sign in to comment.