@robojs/cooldown - Cooldowns & Rate-Limiting Plugin Implementation #453
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
This PR introduces the initial implementation structure for the
@robojs/cooldownplugin as requested in issue #448. This plugin provides comprehensive cooldown and rate-limiting functionality for Robo.js Discord bot commands.What's Included
This initial commit establishes the foundational structure:
Files Added:
Features (as documented):
Implementation Status
✅ Package structure established
✅ Documentation complete
✅ Entry point defined
src/middleware/index.ts- Middleware implementation for automatic cooldown applicationsrc/lib/cooldown-manager.ts- Core cooldown management logic (applyCooldown, getCooldown, setCooldown, resetCooldown, clearAllCooldowns)src/lib/types.ts- Type definitions (CooldownConfig, CooldownScope, CooldownResult)src/commands/- Built-in slash commands (/cooldown check, reset, list)src/api/- API endpoints for @robojs/server integrationsrc/lib/storage.ts- Cooldown data storage implementationNext Steps
The next PR will add the complete TypeScript implementation files to make this plugin fully functional. This structural foundation ensures the plugin follows Robo.js conventions and provides a clear development roadmap.
Related Issue
Closes #448