feat(图片管理): 添加图片尺寸配置支持
在 config.toml 中新增 image_manager 配置块,包含图片高度和宽度设置 修改 ImageManager 类以使用配置中的尺寸,替代硬编码值 添加 ImageManagerModel 配置模型并集成到全局配置中
This commit is contained in:
@@ -49,6 +49,13 @@ class DockerModel(BaseModel):
|
||||
client_cert_path: Optional[str] = None
|
||||
client_key_path: Optional[str] = None
|
||||
|
||||
class ImageManagerModel(BaseModel):
|
||||
"""
|
||||
对应 `config.toml` 中的 `[image_manager]` 配置块。
|
||||
"""
|
||||
image_height: int = 1920
|
||||
image_width: int = 1080
|
||||
|
||||
|
||||
class ConfigModel(BaseModel):
|
||||
"""
|
||||
@@ -58,3 +65,6 @@ class ConfigModel(BaseModel):
|
||||
bot: BotModel
|
||||
redis: RedisModel
|
||||
docker: DockerModel
|
||||
image_manager: ImageManagerModel
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user