drop webgui

This commit is contained in:
源文雨 2022-06-11 17:00:22 +08:00
parent 987b505d32
commit 1f640b7644
2 changed files with 1 additions and 19 deletions

View File

@ -36,7 +36,7 @@
## 命令行参数
> `[]`代表是可选参数
```bash
zerobot [-c config.json] [-h] [-s config.json] [-t token] [-u url] [-n nickname] [-p prefix] [-d|w] [-g 监听地址:端口] [qq1 qq2 qq3 ...] [&]
zerobot [-c config.json] [-h] [-s config.json] [-t token] [-u url] [-n nickname] [-p prefix] [-d|w] [qq1 qq2 qq3 ...] [&]
```
- **-c config.json**: 从`config.json`加载`bot`配置
- **-h**: 显示帮助
@ -46,7 +46,6 @@ zerobot [-c config.json] [-h] [-s config.json] [-t token] [-u url] [-n nickname]
- **-n nickname**: 设置默认昵称,默认为`椛椛`
- **-p prefix**: 设置命令前缀,默认为`/`
- **-d|w**: 开启 debug | warning 级别及以上日志输出
- **-g 监听地址:端口**: 在 http://监听地址:端口 上开启 [webgui](https://github.com/FloatTech/bot-manager)
- **qqs**: superusers 的 qq 号
- **&**: 驻留在后台,必须放在最后,仅`Linux`下有效
@ -122,16 +121,6 @@ zerobot [-c config.json] [-h] [-s config.json] [-t token] [-u url] [-n nickname]
</details>
### *高优先级*
<details>
<summary>web管理</summary>
`import _ "github.com/FloatTech/zbputils/control/web"`
- 开启后可执行文件大约增加 5M ,默认注释不开启。如需开启请自行编辑`main.go`取消注释
- 需要配合 [webgui](https://github.com/FloatTech/bot-manager) 使用
</details>
<details>
<summary>聊天</summary>

View File

@ -25,8 +25,6 @@ import (
// vvvvvvvvvvvvvv //
// vvvv //
// webctrl "github.com/FloatTech/zbputils/control/web" // web 后端控制
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/chat" // 基础词库
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/sleep_manage" // 统计睡眠时间
@ -165,8 +163,6 @@ import (
func init() {
sus := make([]int64, 0, 16)
// 解析命令行参数
// 输入 `-g 监听地址:端口` 指定 gui 访问地址,默认 127.0.0.1:3000
// g := flag.String("g", "127.0.0.1:3000", "Set web gui listening address.")
d := flag.Bool("d", false, "Enable debug level log and higher.")
w := flag.Bool("w", false, "Enable warning level log and higher.")
h := flag.Bool("h", false, "Display this help.")
@ -208,9 +204,6 @@ func init() {
// sus = append(sus, 12345678)
// sus = append(sus, 87654321)
// 启用 gui
// webctrl.InitGui(*g)
if *runcfg != "" {
f, err := os.Open(*runcfg)
if err != nil {