mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2026-10-22 20:50:04 +08:00
✨ 支持mysql,psql,sqlite随机函数
This commit is contained in:
@@ -32,6 +32,14 @@ class BotSetting(BaseModel):
|
||||
return random.choice(platform_superuser)
|
||||
return ""
|
||||
|
||||
def get_sql_type(self) -> str:
|
||||
"""获取数据库类型
|
||||
|
||||
返回:
|
||||
str: 数据库类型, postgres, aiomysql, sqlite
|
||||
"""
|
||||
return self.db_url.split(":", 1)[0] if self.db_url else ""
|
||||
|
||||
|
||||
Config = ConfigsManager(Path() / "data" / "configs" / "plugins2config.yaml")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user