Problem / use case
Implement a cooldown system to prevent users from spamming commands.
Context:
Without cooldowns, users can spam commands, which can cause performance issues and poor user experience.
Proposed solution
- Identify where commands are executed
- Create a cooldown map (userId → timestamp)
- Before executing a command:
- Check if user is within cooldown period
- If yes:
- If no:
- Execute command and update timestamp
- Make cooldown duration configurable
Alternatives considered
- Commands cannot be spammed
- Users receive a cooldown message
- Cooldown resets after defined time
Additional context
Files / areas to look at:
- Command handler logic
- User interaction handling
Checklist:
- The scope is reasonable for intermediate contributors.
- Acceptance criteria are clear and testable.
- Relevant pointers/links are included.
Checklist
Problem / use case
Implement a cooldown system to prevent users from spamming commands.
Context:
Without cooldowns, users can spam commands, which can cause performance issues and poor user experience.
Proposed solution
Alternatives considered
Additional context
Files / areas to look at:
Checklist:
Checklist