feat(telegram_bot): Add Cloud Mail configuration and batch team processing
- Add Cloud Mail API configuration support (api_base, api_auth, domains) in config.py - Implement run_teams_by_count() function for processing specified number of teams with smart filtering - Add Cloud Mail management commands: /cloudmail, /cloudmail_token, /cloudmail_api, /cloudmail_domains - Add callback handlers for run_all, run, and cloudmail interactive operations - Refactor /run command to use interactive selection for count and email service instead of direct argument - Update bot command descriptions and help text to reflect new functionality - Add Cloud Mail domain management and token configuration capabilities - Enable batch processing with progress tracking and automatic team completion detection
This commit is contained in:
@@ -307,6 +307,7 @@ def reload_config() -> dict:
|
||||
"""
|
||||
global _cfg, _raw_teams, TEAMS
|
||||
global EMAIL_PROVIDER, INCLUDE_TEAM_OWNERS, AUTH_PROVIDER
|
||||
global EMAIL_API_BASE, EMAIL_API_AUTH, EMAIL_DOMAINS, EMAIL_DOMAIN
|
||||
global BROWSER_HEADLESS, ACCOUNTS_PER_TEAM
|
||||
global GPTMAIL_API_KEYS, GPTMAIL_DOMAINS, GPTMAIL_PREFIX
|
||||
global PROXY_ENABLED, PROXIES
|
||||
@@ -361,6 +362,13 @@ def reload_config() -> dict:
|
||||
GPTMAIL_DOMAINS = _gptmail.get("domains", [])
|
||||
GPTMAIL_API_KEYS = _gptmail.get("api_keys", []) or ["gpt-test"]
|
||||
|
||||
# Cloud Mail (email) 配置
|
||||
_email = _cfg.get("email", {})
|
||||
EMAIL_API_BASE = _email.get("api_base", "")
|
||||
EMAIL_API_AUTH = _email.get("api_auth", "")
|
||||
EMAIL_DOMAINS = _email.get("domains", []) or ([_email["domain"]] if _email.get("domain") else [])
|
||||
EMAIL_DOMAIN = EMAIL_DOMAINS[0] if EMAIL_DOMAINS else ""
|
||||
|
||||
# 代理配置
|
||||
_proxy_enabled_top = _cfg.get("proxy_enabled")
|
||||
_proxy_enabled_browser = _cfg.get("browser", {}).get("proxy_enabled")
|
||||
|
||||
Reference in New Issue
Block a user