{ "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "additionalProperties": false, "properties": { "connection": { "type": "string", "enum": [ "ws", "wss" ], "default": "ws", "description": "connection: ws (forward WS client, default) or wss (reverse WS via httpHostToken)" }, "reconnect_interval": { "type": "number", "default": 5000 }, "heartbeat_interval": { "type": "number", "default": 30000 }, "endpoints": { "type": "array", "minItems": 1, "description": "多账号:一个插件实例挂多个 endpoint。每项与顶层字段同构(id 必填,其余覆盖顶层)", "items": { "type": "object", "additionalProperties": false, "properties": { "connection": { "type": "string", "enum": [ "ws", "wss" ] }, "url": { "type": "string", "description": "OneBot implementation WebSocket URL (required for connection: ws)" }, "path": { "type": "string", "description": "WS path for reverse-wss (connection: wss)" }, "access_token": { "type": "string", "description": "OneBot access token" }, "reconnect_interval": { "type": "number" }, "heartbeat_interval": { "type": "number" }, "commandPrefix": { "type": "string" }, "id": { "type": "string", "description": "OneBot11 bot name" }, "nickname": { "type": [ "string", "null" ], "description": "账号昵称兜底", "x-i18n": { "en": { "description": "Fallback account nickname" } } }, "profile": { "$ref": "#/$defs/selfProfileFallback", "description": "账号资料兜底", "x-i18n": { "en": { "description": "Fallback account profile" } } } }, "required": [ "id" ] }, "x-i18n": { "en": { "description": "Multiple accounts: mount multiple endpoints in one plugin instance. Each entry uses the top-level fields; id is required and other fields override defaults." } } }, "commandPrefix": { "type": "string", "default": "", "description": "命令前缀(默认 '' 无前缀,任意文本按命令匹配;如 '/' 要求 / 开头)。endpoints[i] 可逐项覆盖", "x-i18n": { "en": { "description": "Command prefix. The default empty string allows unprefixed commands; '/' requires a leading slash. Each endpoints[i] can override it." } } }, "nickname": { "type": [ "string", "null" ], "description": "账号昵称兜底", "x-i18n": { "en": { "description": "Fallback account nickname" } } }, "profile": { "$ref": "#/$defs/selfProfileFallback", "description": "账号资料兜底", "x-i18n": { "en": { "description": "Fallback account profile" } } } }, "required": [ "endpoints" ], "$defs": { "selfProfileFallback": { "type": "object", "additionalProperties": false, "properties": { "gender": { "type": [ "string", "null" ], "enum": [ "male", "female", "other", "unknown", null ] }, "age": { "type": [ "integer", "null" ], "minimum": 0 }, "birthday": { "type": [ "string", "null" ], "pattern": "^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$" }, "signature": { "type": [ "string", "null" ] }, "avatar": { "type": [ "string", "null" ], "pattern": "^(https?://[^\\s/?#]+(?:[/?#].*)?|)$" }, "interests": { "type": [ "array", "null" ], "items": { "type": "string" } }, "bio": { "type": [ "string", "null" ] } } } } }