-
Notifications
You must be signed in to change notification settings - Fork 15
[Feature]: Add command cooldown system #29
Copy link
Copy link
Open
Labels
Priority: MediumNormal priority. Should be addressed in due time.Normal priority. Should be addressed in due time.Status: Need ReviewWork completed and awaiting maintainer review.Work completed and awaiting maintainer review.enhancementNew feature or requestNew feature or request
Description
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:
- Return cooldown message
- 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
- I searched existing issues before opening this.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Priority: MediumNormal priority. Should be addressed in due time.Normal priority. Should be addressed in due time.Status: Need ReviewWork completed and awaiting maintainer review.Work completed and awaiting maintainer review.enhancementNew feature or requestNew feature or request