10 Commits

Author SHA1 Message Date
agessaman
1b5a3dbd0e Improve message handling across multiple commands to respect per-user rate limits
- Updated the `send_response` method calls in various command classes to include a `skip_user_rate_limit` parameter for message continuations, ensuring that the per-user rate limit applies only to the first message.
- This change improves user experience by allowing seamless message continuations without unnecessary rate limiting.
2026-02-18 09:16:42 -08:00
agessaman
2e4d7d0db4 Refactor configuration handling for joke commands
- Standardized the configuration keys for joke commands by replacing `joke_enabled` and `dadjoke_enabled` with a unified `enabled` key in the configuration files.
- Updated the validation logic to warn users when both legacy `[Jokes]` and new `[Joke_Command]`/`[DadJoke_Command]` sections are present, suggesting the removal of the legacy section.
- Enhanced the command classes to support fallback mechanisms for legacy configuration keys, ensuring backward compatibility.
- Added tests to verify the correct behavior of the new configuration handling and legacy support.
2026-02-12 20:31:18 -08:00
Adam Gessaman
6d2346ae45 Add config validation and standardize command sections
- Add modules/config_validation.py and validate_config.py CLI to flag
  non-standard section names (e.g. WebViewer -> Web_Viewer).
- Migrate JokeCommand/DadJokeCommand to Joke_Command/DadJoke_Command with
  legacy [Jokes] fallback in base_command.get_config_value.
- Merge [Jokes] into [Joke_Command]/[DadJoke_Command] in config.ini.example
  and add 3-line stubs for minimal-option commands.
- Add webviewer to camel_case_map; add --validate-config to meshcore_bot.py.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 17:35:18 -08:00
agessaman
d2abc49048 feat: Enhance command documentation and usage information
- Updated the `generate_html` function to include detailed command usage information, including syntax, examples, and parameters for better user guidance.
- Added CSS styles for improved presentation of command usage and parameters in the generated website documentation.
- Enhanced command classes with structured documentation fields, allowing for consistent and informative command descriptions across the platform.
2026-01-15 20:04:58 -08:00
agessaman
a32fe0dcfd docs: Add docstrings and type hints across modules for improved clarity and maintainability. 2026-01-01 20:12:49 -08:00
agessaman
72b7ebbb1e Refactor cooldown management in command classes to utilize centralized tracking
- Removed per-command user cooldown tracking from individual command classes.
- Implemented a unified cooldown management system in BaseCommand for both global and per-user cooldowns.
- Updated command execution methods to call the new centralized cooldown handling, improving code clarity and reducing redundancy.
- Enhanced error handling and logging during cooldown checks to ensure robust command execution.
2026-01-01 12:39:46 -08:00
agessaman
35bc6260a4 Enhance command configuration and logging for joke commands
- Added configuration sections for joke and dadjoke commands in config.ini.example, allowing channel restrictions for command usage.
- Updated BaseCommand to derive configuration section names for commands, improving consistency in command management.
- Implemented channel access checks in can_execute methods for JokeCommand and DadJokeCommand to ensure commands are only executed in allowed channels.
- Improved error logging in FeedManager and MessageScheduler to include database path information for better debugging.
2025-12-27 08:21:51 -08:00
agessaman
32929dedad Update CommandManager with internet connectivity checks for commands
- Introduced caching mechanisms for internet connectivity status in CommandManager to optimize performance and reduce redundant checks.
- Updated command execution logic to skip commands requiring internet access when connectivity is unavailable, improving user experience and error handling.
- Added synchronous and asynchronous utility functions for checking internet connectivity in utils.py.
- Marked relevant commands (e.g., AlertCommand, AqiCommand, DadJokeCommand) as requiring internet access to ensure proper execution conditions.
2025-12-17 12:38:54 -08:00
agessaman
be630c00e6 Enhance joke command with length handling and update configuration settings for jokes. Modify help command to support message context for help text retrieval. 2025-09-09 21:28:07 -07:00
agessaman
5d89778ad8 Add joke command settings and enhance weather command keyword matching 2025-09-08 20:13:17 -07:00