📝 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": { _rate_limit: {
"enabled": false, enabled: false
"frequency": 0, frequency: 1
"bucket_size": 0 bucket_size: 1
}, }
"ignore_invalid_cqcode": false, ignore_invalid_cqcode: false
"force_fragmented": true, force_fragmented: false
"heartbeat_interval": 0, heartbeat_interval: 0
"http_config": { http_config: {
"enabled": false, enabled: false
"host": "0.0.0.0", host: "0.0.0.0"
"port": 5700, port: 5700
"timeout": 0, timeout: 0
"post_urls": {} post_urls: {}
}, }
"ws_config": { ws_config: {
"enabled": false, enabled: false
"host": "0.0.0.0", host: "0.0.0.0"
"port": 6700 port: 6700
}, }
"ws_reverse_servers": [ ws_reverse_servers: [
{ {
"enabled": true, enabled: true
"reverse_url": "ws://127.0.0.1:8080/cqhttp/ws", reverse_url: ws://127.0.0.1:8080/cqhttp/ws
"reverse_api_url": "", reverse_api_url: ws://you_websocket_api.server
"reverse_event_url": "", reverse_event_url: ws://you_websocket_event.server
"reverse_reconnect_interval": 3000 reverse_reconnect_interval: 3000
} }
], ]
"post_message_format": "array", post_message_format: array
"use_sso_address": false, use_sso_address: false
"debug": false, debug: false
"log_level": "", log_level: ""
"web_ui": { web_ui: {
"enabled": true, enabled: false
"host": "0.0.0.0", host: 127.0.0.1
"web_ui_port": 9999, web_ui_port: 9999
"web_input": false 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