fix #421: 增加全局响应延迟与处理不及消息的丢弃

This commit is contained in:
源文雨
2022-10-28 17:41:28 +08:00
parent 7895e48420
commit 3c03a308b3
4 changed files with 28 additions and 20 deletions

View File

@@ -36,16 +36,18 @@
## 命令行参数
> `[]`代表是可选参数
```bash
zerobot [-c config.json] [-h] [-s config.json] [-t token] [-u url] [-n nickname] [-p prefix] [-d|w] [qq1 qq2 qq3 ...] [&]
zerobot [-h] [-n nickname] [-t token] [-u url] [-p prefix] [-d|w] [-c|s config.json] [-l latency] [-r ringlen] [qq1 qq2 qq3 ...] [&]
```
- **-c config.json**: 从`config.json`加载`bot`配置
- **-h**: 显示帮助
- **-s config.json**: 保存现在`bot`配置到`config.json`
- **-n nickname**: 设置默认昵称,默认为`椛椛`
- **-t token**: 设置`AccessToken`,默认为空
- **-u url**: 设置`Url`,默认为`ws://127.0.0.1:6700`
- **-n nickname**: 设置默认昵称,默认为`椛椛`
- **-p prefix**: 设置命令前缀,默认为`/`
- **-d|w**: 开启 debug | warning 级别及以上日志输出
- **-c config.json**: 从`config.json`加载`bot`配置
- **-s config.json**: 保存现在`bot`配置到`config.json`
- **-l latency**: 全局处理延时
- **-r ringlen**: 接收消息环缓冲区大小
- **qqs**: superusers 的 qq 号
- **&**: 驻留在后台,必须放在最后,仅`Linux`下有效
@@ -61,7 +63,9 @@ zerobot [-c config.json] [-h] [-s config.json] [-t token] [-u url] [-n nickname]
"アトリ"
],
"command_prefix": "/",
"super_users": []
"super_users": [],
"ring_len": 4096,
"latency": 1000000000
},
"ws": [
{