Commit Graph

5 Commits

Author SHA1 Message Date
pacnpal
febfaaeea5 refactor: Clean up imports in database_commands.py
- Remove unused imports (Tuple, Union)
- Add redbot.core.commands import
- Group imports by standard library, discord, and local modules
- Improve import organization for better readability
2024-11-16 22:10:28 +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