mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2026-09-29 00:32:06 +08:00
36 lines
969 B
Python
36 lines
969 B
Python
import platform
|
|
from pathlib import Path
|
|
|
|
from .utils import ConfigsManager
|
|
|
|
if platform.system() == "Linux":
|
|
import os
|
|
|
|
hostip = (
|
|
os.popen("cat /etc/resolv.conf | grep nameserver | awk '{ print $2 }'")
|
|
.read()
|
|
.replace("\n", "")
|
|
)
|
|
|
|
|
|
# 回复消息名称
|
|
NICKNAME: str = "小真寻"
|
|
|
|
# 数据库(必要)
|
|
# 如果填写了bind就不需要再填写后面的字段了#)
|
|
# 示例:"bind": "postgres://user:password@127.0.0.1:5432/database"
|
|
bind: str = "" # 数据库连接链接
|
|
sql_name: str = "postgres"
|
|
user: str = "" # 数据用户名
|
|
password: str = "" # 数据库密码
|
|
address: str = "" # 数据库地址
|
|
port: str = "" # 数据库端口
|
|
database: str = "" # 数据库名称
|
|
|
|
# 代理,例如 "http://127.0.0.1:7890"
|
|
# 如果是WLS 可以 f"http://{hostip}:7890" 使用寄主机的代理
|
|
SYSTEM_PROXY: str | None = None # 全局代理
|
|
|
|
|
|
Config = ConfigsManager(Path() / "data" / "configs" / "plugins2config.yaml")
|