14 Commits

Author SHA1 Message Date
agessaman
bb1dd95f1c Refactor timezone handling across commands and utilities
- Introduced a new utility function `get_config_timezone` to centralize timezone retrieval and validation from the bot's configuration.
- Updated various commands and the scheduler to utilize the new function, ensuring consistent timezone handling and fallback mechanisms.
- Removed direct dependencies on `pytz` in favor of a more flexible approach that supports both `pytz` and `zoneinfo` for timezone management.
- Enhanced logging for invalid timezone configurations to improve troubleshooting.
2026-02-22 11:53:33 -08:00
agessaman
ffdc906b22 fix: Update help text for commands to avoid truncation and tx issues 2026-01-26 21:11:36 -08:00
agessaman
04478acf51 feat: Refactor geocoding and country/state handling in commands
- Updated utility functions to improve country name validation, ensuring accurate identification of country names and US states.
- Enhanced geocoding logic in multiple command classes to handle default state and country configurations more effectively.
- Modified error messages to reflect the correct region based on user input, improving user experience.
- Added short usage descriptions for satellite pass commands in multiple languages, enhancing internationalization support.
2026-01-19 22:01:47 -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
cc3fffeb54 feat: Add command enable/disable configuration for various commands
- Implemented a configuration option for enabling or disabling commands across multiple command classes.
- Each command now checks its enabled state before execution, improving control over command availability.
- Updated the configuration loading mechanism to retrieve the enabled state from the config file for commands like Advert, AQI, Catfact, and others.
2026-01-10 09:33:15 -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
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
6de424f894 Refactor geocoding methods in commands to utilize shared utility functions for improved consistency and efficiency. Introduce geocode_zipcode_sync and geocode_city_sync for streamlined location retrieval, enhancing error handling and caching mechanisms. Update AQI, solar forecast, and weather commands to leverage these new methods, reducing code duplication and improving maintainability. 2025-11-26 15:29:37 -08:00
agessaman
92f063b4bc Add Nominatim rate limiting and caching enhancements across commands. Introduce NominatimRateLimiter for API compliance, update geocoding methods to utilize rate-limited calls, and extend caching duration for geocoding results to 30 days. Refactor command implementations to improve efficiency and prevent duplicate API requests. 2025-11-26 14:34:45 -08:00
agessaman
82ee7fd793 improved zipcode handling in aqi command, improved emoji handling in hello command 2025-09-28 15:20:25 -07:00
agessaman
e292b6e040 Update AQI command to use OpenMeteo API and enhance location handling 2025-09-27 12:39:33 -07:00
agessaman
de92fdfdd2 Reorganize API keys under [External_Data] section
- Move n2yo_api_key and airnow_api_key from [Solar_Config] to [External_Data]
- Update code references to use [External_Data] section instead of [Solar_Config]
- Update config.ini.example to match the new organization
- Improve error message to specify the correct config section
- This provides better organization with all external API keys in one place
2025-09-06 11:37:45 -07:00
agessaman
8beede60b1 added aqi command 2025-09-05 22:12:51 -07:00