feat(email_domains): Add domain validation and improve domain management
- Add validate_domain_format() function with comprehensive domain format validation * Validates domain structure (must contain dot, valid characters, proper TLD length) * Normalizes domain format (adds @ prefix, removes quotes/special chars) * Returns validation status with detailed error messages - Update add_email_domains() to use new validation function * Track invalid domains separately in return tuple * Return (added, skipped, invalid, total) instead of (added, skipped, total) * Improve error handling and domain normalization - Add get_file_domains_count() function to retrieve txt file domain count - Update clear_email_domains() to return count of cleared domains - Enhance telegram_bot.py command menu organization * Add s2a command handler and callback for S2A service management panel * Reorganize bot commands with category comments (基础信息, 任务控制, 配置管理, etc.) * Add missing commands: clean_errors, clean_teams, iban_list, iban_add, iban_clear, domain_list, domain_add, domain_del, domain_clear, team_fingerprint, team_register, s2a - Update domain_add command help text with format requirements - Improve code documentation and consistency across both files
This commit is contained in:
1080
telegram_bot.py
1080
telegram_bot.py
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user