Refactor command handling and enhance plugin validation

- Removed redundant command list in config example for clarity.
- Improved plugin validation by adding checks for required attributes and types, ensuring better error handling during plugin instantiation.
- Enhanced rate limiter classes to track total sends and throttled attempts, providing statistics for better monitoring.
- Updated command implementations to include metadata for better organization and clarity in command handling.
This commit is contained in:
agessaman committed 2026-01-01 12:03:54 -08:00
1 parent e5f98d69e6
commit 5ae67bc071
6 files changed
+261 -40

No files matched your search

+6 -1
View File
@@ -11,9 +11,14 @@ from ..models import MeshMessage
class SunCommand(BaseCommand):
"""Command to get sun information"""
# Plugin metadata
name = "sun"
keywords = ['sun']
description = "Get sunrise/sunset times"
category = "solar"
def __init__(self, bot):
super().__init__(bot)
self.keywords = ['sun']
async def execute(self, message: MeshMessage) -> bool:
"""Execute the sun command"""