Skip to content

[Feature]: Add command cooldown system #29

@youngcoder45

Description

@youngcoder45

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

  1. Identify where commands are executed
  2. Create a cooldown map (userId → timestamp)
  3. Before executing a command:
    • Check if user is within cooldown period
  4. If yes:
    • Return cooldown message
  5. If no:
    • Execute command and update timestamp
  6. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Priority: MediumNormal priority. Should be addressed in due time.Status: Need ReviewWork completed and awaiting maintainer review.enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions