Commit Graph

9 Commits

Author SHA1 Message Date
pacnpal
aa61c738a2 fixed more imports 2024-11-17 20:46:22 +00:00
pacnpal
97dd6d72f2 loads of import fixes 2024-11-17 19:47:18 +00:00
pacnpal
62c97f0b01 Converted all 'from videoarchiver.' imports to relative imports 2024-11-17 16:05:12 +00:00
pacnpal
4fe45458bf In the core module:
Updated base.py to use absolute imports
Updated cleanup.py to use absolute imports
Updated events.py to use absolute imports
Updated error_handler.py to use absolute imports
Updated guild.py to use absolute imports
Updated initialization.py to use absolute imports
Updated lifecycle.py to use absolute imports
Updated response_handler.py to use absolute imports
Updated settings.py to use absolute imports
In the core/commands module:
Updated archiver_commands.py to use absolute imports
Updated database_commands.py to use absolute imports
Updated settings_commands.py to use absolute imports
Left init.py unchanged as its relative imports are appropriate
In the processor module:
Updated core.py to use absolute imports
Updated processor/init.py to use absolute imports
Updated queue_handler.py to use absolute imports
Updated queue_processor.py to use absolute imports
Updated status_display.py to use absolute imports
Updated cleanup_manager.py to use absolute imports
2024-11-17 02:58:53 +00:00
pacnpal
b7d99490cf refactor: Clean up imports in settings_commands.py
- Remove unused imports (Union, List)
- Add redbot.core.commands import
- Move core.settings import to top of local imports
- Group imports by standard library, discord, and local modules
- Improve import organization for better readability
2024-11-16 22:13:53 +00:00
pacnpal
775781b325 Improve command handling with better error handling, type hints, and organization
- Add proper error handling with CommandError
- Add proper error context support
- Add better command organization
- Add proper type hints
- Add proper docstrings
- Add better error recovery
- Add proper error context creation
- Add better response handling
- Add proper validation
- Add better logging
- Add proper response types
- Add better error messages
- Add proper status reporting
- Add new status commands
2024-11-16 21:13:08 +00:00
pacnpal
771c32e11b Proper use of hybrid_group for main command groups:
archiver: Main bot control commands
settings: Configuration commands
archivedb: Database management commands
Consistent decorator order across all commands:

@group.command() or @hybrid_group()
@guild_only()
@admin_or_permissions() (where needed)
@app_commands.describe() (for parameters)
Proper parameter descriptions using app_commands.describe for better slash command integration
2024-11-16 17:37:20 +00:00
pacnpal
82244884db Removed deprecated checks imports from redbot.core.commands
Added proper imports from redbot.core.utils.mod
Updated all permission decorators to use admin_or_permissions
2024-11-16 17:19:20 +00:00
pacnpal
537a325807 Core Functionality:
base.py: Streamlined to core cog functionality and lifecycle management
initialization.py: Centralized initialization logic
error_handler.py: Unified error handling
response_handler.py: Consistent response handling
Command Organization:

commands/archiver_commands.py: Core archiver functionality
commands/database_commands.py: Database operations
commands/settings_commands.py: Settings management
All commands properly integrated with the cog using setup functions
Improved Architecture:

Consistent command registration pattern
Better separation of concerns
Maintained all original functionality
Enhanced error handling and response management
Proper command integration with the cog structure
2024-11-16 03:30:11 +00:00