Commit Graph

26 Commits

Author SHA1 Message Date
izzzzzi d0125c1f33 Добавлена обработка исключений в асинхронных задачах с помощью return_exceptions=True 2025-03-04 00:57:41 +05:00
Vladless bded99263a refactoring and minor improvements 2025-02-25 19:56:42 +03:00
izzzzzi 79982f5aa6 Рефакторинг и оптимизация импортов в модулях проекта
- Упорядочивание и группировка импортов в соответствии с PEP 8
- Удаление неиспользуемых импортов
- Перемещение локальных импортов в начало списка
- Добавление пустых строк для улучшения читаемости
- Систематизация порядка импортов в различных модулях проекта
2025-02-25 04:14:58 +05:00
Vladless 769f5eaf9a minor improvements 2025-02-21 22:36:03 +03:00
Vladless 4b503ce31a edit_text/lots of improvements 2025-02-16 07:17:35 +03:00
Zakhar Izmaylov 310aa9bce6 Add client toggle functionality for 3x-ui servers 2025-02-14 23:06:45 +03:00
Vladless 3de049e436 NOTIFICATIONS 2.0/bug fixes and improvments 2025-02-14 00:30:06 +03:00
Vladless 7623f339bc ruff formatting 2025-02-06 13:53:02 +03:00
Zakhar Izmaylov 899da825cb Refactor and improve security with cryptographically secure random generation
- Replace `random` module with `secrets` for cryptographically secure random choices
- Update type hints for async API methods in client.py
- Optimize file reading with aiofiles in multiple handlers
- Improve error handling and logging in various modules
- Update Python target version to 3.12 in pyproject.toml
- Remove unused imports and improve code quality
2025-01-30 22:35:09 +03:00
Zakhar Izmaylov b1739cf4ea Optimize import statements and remove unused imports across multiple files
This commit focuses on cleaning up import statements by:
- Removing unused imports
- Organizing import order
- Removing redundant imports
- Ensuring consistent import style across different modules
2025-01-29 07:15:20 +03:00
Zakhar Izmaylov c2ba4e9ab6 Refactor server management and database interactions. Renamed get_servers_from_db to get_servers for clarity and updated related handlers to utilize session management. Refactored add_server_to_db to create_server for consistency. Improved code readability and maintainability across coupon and notification handlers by streamlining database calls and enhancing error handling. 2025-01-23 11:36:15 +03:00
Zakhar Izmaylov 33f98276ce Enhance database interaction in coupon and server management. Updated check_unique_server_name to accept session and cluster name parameters for improved uniqueness checks. Introduced new functions: get_coupon_by_code, delete_server, create_coupon_usage, check_coupon_usage, and update_coupon_usage_count for better coupon management. Refactored handlers to utilize these new functions, improving code clarity and maintainability. 2025-01-23 11:28:21 +03:00
Zakhar Izmaylov 4addb772a0 Add server management functionality by introducing add_server_to_db function for streamlined database interactions. Refactor server addition logic in sync_servers_with_db and admin handlers to utilize the new function, enhancing code clarity and session management. 2025-01-23 08:03:58 +03:00
Zakhar Izmaylov a2c71a49f2 Refactor and clean up code formatting across multiple files
- Consolidated and simplified code formatting by removing unnecessary line breaks and improving readability in various functions.
- Updated the handling of backup file sending in backup.py for better clarity.
- Streamlined error handling and logging messages in several handlers to enhance consistency.
- Adjusted the Makefile to exclude specific files during Ruff checks and formatting.
- Made minor adjustments to function signatures and parameter handling for improved clarity and consistency.

This commit enhances code maintainability and readability without altering functionality.
2025-01-21 08:57:12 +03:00
Zakhar Izmaylov 9da808a024 Delete parse_mode 2025-01-15 02:15:21 +03:00
Vladless 8fdc78c2e8 FlowPayRenew/fixNotify/pay_history/custom/statistic/minorFixes 2025-01-14 04:06:55 +03:00
Zakhar Izmaylov 0d82294bdb Add antiflood and lint 2025-01-10 14:51:13 +03:00
Vladless 10df771a15 fiatCryptobot/flowPayments/Buttons/fixNotify/BanOfUsers/fixTrial and more 2025-01-09 02:40:39 +03:00
Vladless ae22950ce3 fix_refferal/GIFTS/redirect/name_sub and more 2024-12-19 20:37:41 +03:00
Zakhar Izmaylov 76d72ba203 Migrate to ruff 2024-12-13 12:09:20 +03:00
Vladless 7c883b07f9 Revert "Merge pull request #112 from Vladless/hteppl-optimize-sources"
This reverts commit fa681fac92, reversing
changes made to b31c9d2e10.
2024-12-10 03:53:07 +03:00
hteppl 1d915f849c Move util-related files into separated folder + refactor imports 2024-12-08 04:57:20 +03:00
Vladless 360d73dd26 ping servers and notifications 2024-12-06 05:19:44 +03:00
Vladless 14400018c9 ping servers and notifications 2024-12-06 04:48:58 +03:00
Vladless b58079d86f Clusters on/off in config 2024-12-02 04:58:14 +03:00
Vladless d7d0e3da42 autoconfig servers in database 2024-12-01 23:24:13 +03:00