Commit Graph

170 Commits

Author SHA1 Message Date
Capybara-z a61d93ddcc фикс парсера времени
- фикс парсера времени для старых панелей
2025-02-19 01:31:15 +03:00
Capybara-z 96d738aa9a чистка кода
- Почитсил коментарии.
2025-02-18 23:57:38 +03:00
Capybara-z f87d0c9529 фикс расчета остатка
- Не посмотрел что TOTAL_GB указывается в байтах
2025-02-18 19:40:47 +03:00
Capybara-z 753c408f3e фикс подписок
- Поправлено время для SUPERNODA = False
- Добавлен подсчет использованного трафика для Happ
2025-02-18 17:35:40 +03:00
Capybara-z cc0fc74f82 фикс парсинга времени
- исправлен парсинг времени если передается без запятой
2025-02-18 14:31:43 +03:00
Capybara-z 4a3883ee71 Указал коменты 2025-02-18 13:45:59 +03:00
Capybara-z 3a459b1f61 фикс отображения
- Исправлено отображение с трафиком и без для спуперноды вкл/выкл
- Исправлен парсинг в общем для разных режимов.
2025-02-18 13:30:46 +03:00
Capybara-z 0c0c431e76 Правки для Happ
- Добавлен хедер трафика и даты завершения
2025-02-18 12:12:34 +03:00
Capybara-z 521a930911 поправлены отступы 2025-02-18 11:19:52 +03:00
Capybara-z 3e31b82d55 Фикс отображения данных
- Фикс отображения данных для Happ
2025-02-18 11:17:33 +03:00
Capybara-z 196a5204bb фикс отображения трафика
- Корректное отображения трафика
2025-02-18 10:51:51 +03:00
Capybara-z 061d7870e4 Единое время обновления подписки
- Единое время обновления подписки
2025-02-18 10:30:18 +03:00
Capybara-z 54923177ac фикс часов
- фискс отображения когда остаются только часы
2025-02-18 10:19:05 +03:00
Capybara-z 94f7f65cc3 Фикс подпсиок
- Убираем профиль
- Отказ от SUB_MESSAGE
- Перадача подпсики и времени работы вместо SUB_MESSAGE
- Отдельная итеграция для Happ по хукам.
2025-02-18 09:21:10 +03:00
Vladless 0236b08c31 add_change_domain/bug_fixes_16 2025-02-18 02:05:14 +03:00
Capybara-z b6e7e2e5b2 Апдейт подписок.
- Добавление профиля.
- Выводит имейл и время подписки
- Страны становятся чистыми
- Профиль всегда на 1 месте
- Перемашка стран.
2025-02-17 02:50:21 +03:00
Boris Kovalskii 002f8dc5ae Opimize and fix coupons and refferals 2025-02-16 17:09:16 +10:00
Vladless 469d2c9afe edit_text/lots of improvements 2025-02-16 07:17:35 +03:00
Zakhar Izmaylov fa8c644520 Add client toggle functionality for 3x-ui servers 2025-02-14 23:06:45 +03:00
Vladless da5962e0e2 optimization notifications and get_traffic 2025-02-14 04:36:37 +03:00
Vladless 0da8771a52 NOTIFICATIONS 2.0/bug fixes and improvments 2025-02-14 00:30:06 +03:00
Vladless f5afec997c add traffic statistic/share refferal link and more 2025-02-07 21:38:46 +03:00
Vladless cd23569e24 Improve stability and minor fixes 2025-02-06 19:01:20 +03:00
Vladless 13325fab43 ruff formatting 2025-02-06 13:53:02 +03:00
Vladless 9d4cd6ccb5 Major bug fixes 2025-02-06 02:03:12 +03:00
Vladless d64c927101 minor_fixes 2025-02-03 00:08:55 +03:00
Vladless 70b8aec368 minor fixes 2025-02-02 19:40:17 +03:00
Vladless c8503a1457 change_location/CASHBACK/logging/bug_fixes 2025-02-02 02:42:28 +03:00
Vladless 1b17f0fd71 change_location/CASHBACK/logging/bug_fixes 2025-02-02 02:11:57 +03:00
Zakhar Izmaylov d73a8eacc9 Update server name input handler with session parameter
- Add session parameter to server name input handler
- Modify server name uniqueness check to use session and cluster name
- Improve data retrieval and validation in server creation flow
2025-01-31 10:54:42 +03:00
Zakhar Izmaylov eb03b6014d Fix key renewal and expiry update function signatures
- Update `change_expiry_time` to pass session to `update_key_expiry`
- Adjust `complete_key_renewal` connection closing order
- Minor code structure improvements in key handling functions
2025-01-31 06:44:36 +03:00
Zakhar Izmaylov c8e907edd1 Standardize import order in handler modules
- Reorder imports in multiple handler files to follow a consistent pattern
- Move type-specific imports like Message and CallbackQuery to be more organized
- Ensure clean and uniform import statements across admin and handler modules
2025-01-31 03:01:46 +03:00
Zakhar Izmaylov 6a98f4fb43 Update type hints in admin and handler modules
- Replace types.Message and types.CallbackQuery with explicit Message and CallbackQuery imports
- Improve type annotations in multiple handler files
- Ensure consistent type hinting across admin and handler modules
2025-01-31 02:59:57 +03:00
Zakhar Izmaylov c9afe25c52 Remove check_online_users function and minor import reorganization
- Removed unused check_online_users function from notifications handler
- Reorganized imports in notifications.py and utils.py
- Fixed TimeoutError import in subscriptions.py
2025-01-31 00:08:31 +03:00
Zakhar Izmaylov 83870a2022 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 8ce7ee0ce0 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
GitHub Actions 5f2b40b2d2 Auto-format code with Ruff using pyproject.toml 2025-01-29 04:01:20 +00:00
Zakhar Izmaylov a757852598 Merge branch 'main' of https://github.com/izzzzzi/Solo_bot 2025-01-29 07:01:01 +03:00
Oleg Kraev ee155db444 Merge branch 'main' into dev 2025-01-24 23:35:19 +03:00
Zakhar Izmaylov 46ec8fef50 Update button labels from "🔙 Назад" to "⬅️ Назад" across multiple admin handlers and key management files for improved user interface consistency. This change enhances the visual clarity of navigation options within the application. 2025-01-23 12:06:38 +03:00
Zakhar Izmaylov 0890d326a4 Refactor trial management function names for clarity. Renamed set_trial to update_trial in database.py and updated all related handler calls in start.py, admin_user_editor.py, and trial_key.py to reflect this change. This improves code readability and consistency across the codebase. 2025-01-23 12:03:01 +03:00
Zakhar Izmaylov 5be5cd33f7 Implement new database functions for server and coupon management. Added check_server_name_by_cluster, get_coupon_details, get_referral_by_referred_id, and get_all_keys to enhance data retrieval capabilities. Updated handlers to utilize these new functions, improving code clarity and maintainability. Refactored existing database calls in start.py, utils.py, and keys.py for consistency and better session management. 2025-01-23 11:58:35 +03:00
Zakhar Izmaylov 73a365eeb6 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 906601f5cd Refactor database interaction in key management functions to utilize session objects for improved performance and consistency. Updated get_keys, get_keys_by_server, update_balance, and update_key_expiry functions to accept a session parameter, allowing for better session management across handlers. Adjusted related handler functions to pass the session, enhancing code clarity and maintainability. 2025-01-23 11:06:25 +03:00
Zakhar Izmaylov e42a66dde7 Refactor database interaction functions in database.py and update related handlers. Renamed functions for clarity: save_temporary_data to create_temporary_data, add_blocked_user to create_blocked_user, remove_blocked_user to delete_blocked_user, and delete_coupon_from_db to delete_coupon. Updated trial management function from restore_trial to set_trial to better reflect its purpose. Adjusted corresponding calls in notifications, start, user, and admin handlers for consistency and improved readability. 2025-01-23 10:38:32 +03:00
Zakhar Izmaylov 31dd3d6654 Refactor client management in key_utils.py and trial_key.py to utilize ClientConfig dataclass for improved parameter handling. This change enhances code clarity and maintainability by consolidating client configuration parameters into a single structured object, streamlining the add_client function calls across multiple handlers. 2025-01-23 10:24:16 +03:00
Zakhar Izmaylov 17d519d440 Refactor key retrieval and management logic across multiple handlers. Update get_key_details to include email in the fetched record and replace direct SQL queries with dedicated functions for improved code clarity and maintainability. Add a TODO comment in admin_servers.py for future enhancements. 2025-01-23 08:41:44 +03:00
Zakhar Izmaylov 2d638b0c82 Refactor key management functions to improve database interactions by consolidating key deletion logic into a single function. Introduce timezone-aware expiry date calculations for keys and enhance key retrieval processes across various handlers. Update the start command to utilize a dedicated function for adding connections, ensuring cleaner code and better session management. 2025-01-23 07:49:21 +03:00
Zakhar Izmaylov 311c48edcd Refactor code to utilize aiofiles for asynchronous file handling across multiple modules. Added a new function to remove blocked users from the database and updated user blocking/unblocking logic to use this new function. Improved database interaction in admin panel handlers by passing session objects instead of creating new connections. This enhances performance and maintains consistency in file operations. 2025-01-23 06:34:45 +03:00
GitHub Actions 845a8c8671 Auto-format code with Ruff using pyproject.toml 2025-01-23 03:15:11 +00:00