重构机器人
This commit is contained in:
18
config.py
18
config.py
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user