mirror of
https://github.com/LiteyukiStudio/LiteyukiBot.git
synced 2025-07-27 20:20:56 +00:00
📝 初次启动生成默认配置文件时添加 satori 相关配置
📝 将适配器配置初始化和注册移动到 utils.adapter_manager
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
import os
|
||||
from typing import List
|
||||
|
||||
import nonebot
|
||||
import yaml
|
||||
@ -11,12 +12,26 @@ from ..message.tools import random_hex_string
|
||||
config = {} # 全局配置,确保加载后读取
|
||||
|
||||
|
||||
class SatoriNodeConfig(BaseModel):
|
||||
host: str = ""
|
||||
port: str = "5500"
|
||||
path: str = ""
|
||||
token: str = ""
|
||||
|
||||
|
||||
class SatoriConfig(BaseModel):
|
||||
comment: str = "These features are still in development. Do not enable in production environment."
|
||||
enable: bool = False
|
||||
hosts: List[SatoriNodeConfig] = [SatoriNodeConfig()]
|
||||
|
||||
|
||||
class BasicConfig(BaseModel):
|
||||
host: str = "127.0.0.1"
|
||||
port: int = 20216
|
||||
superusers: list[str] = []
|
||||
command_start: list[str] = ["/", ""]
|
||||
nickname: list[str] = [f"LiteyukiBot-{random_hex_string(6)}"]
|
||||
satori: SatoriConfig = SatoriConfig()
|
||||
|
||||
|
||||
def load_from_yaml(file: str) -> dict:
|
||||
|
Reference in New Issue
Block a user