Commit Graph

116 Commits

Author SHA1 Message Date
Zakhar Izmaylov 7bfbf89054 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 bb803ab145 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 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
Zakhar Izmaylov c4d3c921bd 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
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 44cadc29ba Refactor file handling to use aiofiles for asynchronous operations
- Replaced synchronous file reading with asynchronous file handling using aiofiles in multiple handlers and the backup module.
- Improved performance and responsiveness when sending images and backups by utilizing async file operations.
- Ensured consistent use of BufferedInputFile across all relevant functions for better code maintainability.
2025-01-21 12:03:56 +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 a9e111bd4f Add captcha functionality to start command handler
- Included captcha router in main handlers.
- Integrated captcha generation in the start command, conditional on CAPTCHA_ENABLE setting.
2025-01-20 22:27:39 +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 6484bf2c6e TV/Send_message/custom_refferal_level/buttons 2024-12-28 22:46:20 +03:00
Vladless 4951a5cf78 minor update 2024-12-23 01:23:34 +03:00
Vladless 5e904f3045 gift_code/buttons/commands 2024-12-23 01:14:28 +03:00
Vladless 2becee7f02 fix_refferal/GIFTS/redirect/name_sub and more 2024-12-19 20:39:07 +03:00
Vladless ae22950ce3 fix_refferal/GIFTS/redirect/name_sub and more 2024-12-19 20:37:41 +03:00
crell2100 0b0b002c82 donats_enable->donations_enable (rename variable) 2024-12-16 16:40:01 +03:00
crell2100 0e4f59a242 Merge branch 'main' into main 2024-12-15 22:51:32 +03:00
crell2100 051714e613 add DONATS_ENABLE variable 2024-12-15 22:30:20 +03:00
crell2100 c780b1ffd7 add CHANEL_EXISTS variable 2024-12-15 18:07:52 +03:00
Zakhar Izmaylov 76d72ba203 Migrate to ruff 2024-12-13 12:09:20 +03:00
Vladislav Lisitsyn 4792abc6d5 Merge pull request #113 from Vladless/hteppl-optimize-sources
Hteppl optimize sources
2024-12-10 04:14:24 +02:00
Vladless 42ac740589 pic for tariffs 2024-12-10 05:13:54 +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 240ad42beb preview pc_instruction disable 2024-12-06 01:42:14 +03:00
Vladless ff37c48579 change version 2024-12-04 03:10:15 +03:00
Vladless 8b6afcf571 pc button for trial_key 2024-12-02 03:37:28 +03:00
Vladless 74353143cf add/delete servers in admin 2024-12-02 03:25:06 +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 fa2b45104c Update button texts in start and admin user editor handlers for improved navigation. Change "Личный кабинет" to "Поддержка" in start.py and adjust "Назад" callback data in admin_user_editor.py for consistency. 2024-11-25 00:16:12 +03:00
Vladless d34f49c9b2 3.2 2024-11-24 23:10:22 +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 041c8e1511 Fix srssion 2024-11-24 11:26:54 +03:00
Zakhar Izmaylov 270f01511d Update id 2024-11-24 11:07:52 +03:00
Zakhar Izmaylov a352901d85 Fix 2024-11-24 10:54:08 +03:00
Zakhar Izmaylov bc77c6a5ff Fix typing 2024-11-24 01:19:00 +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 8a9825f629 Fix ref 2024-11-22 17:45:38 +03:00
Zakhar Izmaylov fb34af114f Update logger 2024-11-20 15:46:46 +03:00
Vladless a58e45133a fix bugs 2024-11-20 00:18:29 +03:00
Vladislav Lisitsyn f16226e48e Update start.py 2024-11-19 11:52:06 +03:00
Zakhar Izmaylov 23ec7e3ccb Formatting 2024-11-17 16:15:51 +03:00
Zakhar Izmaylov a46e8d3a5a Fix admin 2024-11-17 16:10:58 +03:00
Zakhar Izmaylov d5dbb39444 Add default admin 2024-11-17 16:01:18 +03:00
Zakhar Izmaylov 0f0af0c194 Fix start 2024-11-17 15:53:31 +03:00