📝 update doc

This commit is contained in:
yanyongyu 2020-12-07 22:15:26 +08:00
parent 8443c01303
commit f220a01a30
2 changed files with 48 additions and 49 deletions

View File

@ -79,57 +79,57 @@ QQ 协议端举例:
2. 运行 exe 文件或者使用 `./go-cqhttp` 启动 2. 运行 exe 文件或者使用 `./go-cqhttp` 启动
3. 生成默认配置文件并修改默认配置 3. 生成默认配置文件并修改默认配置
```json{2,3,35-36,42} ```hjson{2,3,35-36,42}
{ {
"uin": "你的QQ号", uin: 机器人QQ号
"password": "你的密码", password: 机器人密码
"encrypt_password": false, encrypt_password: false
"password_encrypted": "", password_encrypted: ""
"enable_db": true, enable_db: true
"access_token": "", access_token: ""
"relogin": { relogin: {
"enabled": true, enabled: true
"relogin_delay": 3, relogin_delay: 3
"max_relogin_times": 0 max_relogin_times: 0
},
"_rate_limit": {
"enabled": false,
"frequency": 0,
"bucket_size": 0
},
"ignore_invalid_cqcode": false,
"force_fragmented": true,
"heartbeat_interval": 0,
"http_config": {
"enabled": false,
"host": "0.0.0.0",
"port": 5700,
"timeout": 0,
"post_urls": {}
},
"ws_config": {
"enabled": false,
"host": "0.0.0.0",
"port": 6700
},
"ws_reverse_servers": [
{
"enabled": true,
"reverse_url": "ws://127.0.0.1:8080/cqhttp/ws",
"reverse_api_url": "",
"reverse_event_url": "",
"reverse_reconnect_interval": 3000
} }
], _rate_limit: {
"post_message_format": "array", enabled: false
"use_sso_address": false, frequency: 1
"debug": false, bucket_size: 1
"log_level": "", }
"web_ui": { ignore_invalid_cqcode: false
"enabled": true, force_fragmented: false
"host": "0.0.0.0", heartbeat_interval: 0
"web_ui_port": 9999, http_config: {
"web_input": false enabled: false
host: "0.0.0.0"
port: 5700
timeout: 0
post_urls: {}
}
ws_config: {
enabled: false
host: "0.0.0.0"
port: 6700
}
ws_reverse_servers: [
{
enabled: true
reverse_url: ws://127.0.0.1:8080/cqhttp/ws
reverse_api_url: ws://you_websocket_api.server
reverse_event_url: ws://you_websocket_event.server
reverse_reconnect_interval: 3000
}
]
post_message_format: array
use_sso_address: false
debug: false
log_level: ""
web_ui: {
enabled: false
host: 127.0.0.1
web_ui_port: 9999
web_input: false
} }
} }
``` ```

View File

@ -417,7 +417,6 @@ class Matcher(metaclass=MatcherMeta):
handler = self.handlers.pop(0) handler = self.handlers.pop(0)
signature = inspect.signature(handler) signature = inspect.signature(handler)
BotType = signature.parameters.get("bot").annotation BotType = signature.parameters.get("bot").annotation
print(BotType)
if BotType is not inspect.Parameter.empty and inspect.isclass( if BotType is not inspect.Parameter.empty and inspect.isclass(
BotType) and not isinstance(bot, BotType): BotType) and not isinstance(bot, BotType):
continue continue