Zakhar Izmaylov
bf35156455
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
GitHub Actions
720c145aa3
Auto-format code with Ruff using pyproject.toml
2025-01-30 20:36:20 +00:00
Zakhar Izmaylov
580ce90442
Remove unused is_bot_blocked function from notifications handler
2025-01-30 23:36:02 +03:00
Zakhar Izmaylov
239426f6d5
Merge branch 'main' of https://github.com/izzzzzi/Solo_bot
2025-01-30 23:35:50 +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
Capybara-z
89394ef630
Задержка перед удалением подписки.
...
Добавлена переменная:
DELETE_KEYS_DELAY = 0 # Задержка в секундах перед удалением ключа после истечения. Установите 0, если функция не требуется.
При ее работе не удаляет ключ, а ждет опредленное время.
Поправлена работа def handle_expired_keys, ранее брался запас 45 мин для выгрузки, сейчас EXPIRED_KEYS_CHECK_INTERVAL * 1.5 для корректной проверки и запаса при повторных проверках.
При работе DELETE_KEYS_DELAY добавляется кнопка продления.
2025-01-30 21:48:19 +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
8818d91232
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
0aab2096a5
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
a1d051a3f1
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
GitHub Actions
1596c85bee
Auto-format code with Ruff using pyproject.toml
2025-01-23 03:15:11 +00:00
Zakhar Izmaylov
ad9c49f841
Merge branch 'main' of https://github.com/izzzzzi/Solo_bot
2025-01-23 06:14:33 +03:00
Vladless
b81a0f289f
location-selection/major_update_notifications/gifts and more fixes
2025-01-21 22:43:18 +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
b63c3fb115
Update work from blocked_users
2025-01-20 03:47:16 +03:00
Zakhar Izmaylov
3d7684b72b
Small fix
2025-01-19 08:49:46 +03:00
Vladless
9db8fdf79b
expired_time
2025-01-16 04:03:53 +03:00
Vladless
981dc0db01
pytz for notifications
2025-01-16 01:50:34 +03:00
Vladless
8fdc78c2e8
FlowPayRenew/fixNotify/pay_history/custom/statistic/minorFixes
2025-01-14 04:06:55 +03:00
Zakhar Izmaylov
9a823eddf3
Add check_users_and_update_blocked
2025-01-11 20:29:01 +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
Zakhar Izmaylov
932ef51de4
Add update_all_keys
2025-01-05 23:32:18 +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
4e09e04dd9
Move keys utils into utils folder
2024-12-08 05:11:31 +03:00
hteppl
1d915f849c
Move util-related files into separated folder + refactor imports
2024-12-08 04:57:20 +03:00
Vladless
bfdf5f9f41
servers in database
2024-12-01 23:24:53 +03:00
Vladless
11c84eae82
notification inactive users
2024-12-01 22:24:00 +03:00
Vladless
21e82eed79
notifications
2024-11-26 17:48:41 +03:00
Vladless
ca1a279144
fix renew
2024-11-26 17:30:41 +03:00
Zakhar Izmaylov
cd411c6b49
Fix start
2024-11-26 03:21:43 +03:00
Zakhar Izmaylov
9acc9d8304
Small fix
2024-11-26 02:54:32 +03:00
Zakhar Izmaylov
cb19c3829f
Enhanced notifications and admin: CSV export for users/payments, better feedback/navigation, DEV_MODE checks for notifications, .csv in .gitignore, fixed trial expiry with TRIAL_TIME.
2024-11-26 02:52:15 +03:00
Zakhar Izmaylov
cbd0902e42
Refactor notification and admin user editor handlers to improve user feedback. Comment out inactive trial user notifications in notifications.py. Enhance error messages with consistent "Назад" button for better navigation in admin_user_editor.py.
2024-11-25 00:29:06 +03:00
Zakhar Izmaylov
bac2dbaf85
Refactor import statements in notification, profile, key management, and keys handlers for improved organization and consistency. Ensure RENEWAL_PLANS is included in all relevant files.
2024-11-24 23:45:38 +03:00
Zakhar Izmaylov
f9e29f4fa9
Refactor notification and profile handlers to include RENEWAL_PLANS from config. Update key management and keys handlers to streamline imports and enhance code organization.
2024-11-24 23:45:27 +03:00
Zakhar Izmaylov
052124d483
Refactor database and notification handlers for improved readability and consistency. Clean up import statements, enhance logging messages, and streamline function calls across multiple files. Ensure proper session handling in payment processing functions.
2024-11-24 20:29:22 +03:00
Zakhar Izmaylov
11d7005954
Enhance notification system for inactive trial users by adding notification time checks and logging. Implement functionality to record notifications sent to users, ensuring they are notified no more than once every 24 hours.
2024-11-24 20:02:40 +03:00
Zakhar Izmaylov
7893be6ef8
Refactor referral system to support multi-level bonuses and enhance logging. Update database interactions for referral handling and statistics retrieval. Change key display format in notifications and admin user editor for better readability.
2024-11-24 19:38:59 +03:00
Zakhar Izmaylov
c3e052f73c
notify_inactive_trial_users
2024-11-24 11:58:43 +03:00
Zakhar Izmaylov
a352901d85
Fix
2024-11-24 10:54:08 +03:00
Zakhar Izmaylov
8e5ce5768a
Fix get_trial
2024-11-24 10:35:12 +03:00
Zakhar Izmaylov
8f8e89667d
Update InlineKeyboardBuilder
2024-11-24 01:57:42 +03:00
Zakhar Izmaylov
c35d067306
Add notify_inactive_trial_users
2024-11-24 01:34:39 +03:00
Zakhar Izmaylov
31eb551b6d
Refactoring
2024-11-24 01:18:42 +03:00
Zakhar Izmaylov
9673f10af7
Update config
2024-11-22 21:24:55 +03:00
Zakhar Izmaylov
26e8e91cb7
Update push
2024-11-22 01:12:19 +03:00