重构机器人

This commit is contained in:
dela
2026-01-30 10:48:56 +08:00
parent 81577a3a59
commit 9b7ecb7b80
17 changed files with 1270 additions and 1 deletions

View File

@@ -287,6 +287,24 @@ class AppConfig(BaseSettings):
description="HTTP 请求超时时间(秒)"
)
# ========== Telegram Bot 配置 ==========
telegram_bot_token: Optional[str] = Field(
default=None,
description="Telegram Bot Token (从 @BotFather 获取)"
)
telegram_allowed_users: str = Field(
default="",
description="允许使用 Bot 的用户 ID逗号分隔"
)
telegram_admin_users: str = Field(
default="",
description="管理员用户 ID逗号分隔拥有更高权限"
)
telegram_bot_enabled: bool = Field(
default=True,
description="是否启用 Telegram Bot"
)
@field_validator("proxy_pool")
@classmethod
def validate_proxy_pool(cls, v: str) -> str: