Skip to content

feat: adding more complex commands and cooldown mechanisms - #5

Merged
jaredgrxss merged 2 commits into
mainfrom
workingOnComplexCommands
Aug 11, 2025
Merged

feat: adding more complex commands and cooldown mechanisms#5
jaredgrxss merged 2 commits into
mainfrom
workingOnComplexCommands

Conversation

@jaredgrxss

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings August 10, 2025 18:48

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the Discord bot structure by introducing an event-driven architecture with cooldown mechanisms for commands. The main changes separate event handling from the main client logic and add command cooldown functionality.

  • Refactored client initialization to use separate event and command handler modules
  • Added cooldown system with configurable per-command durations
  • Extracted interaction and ready event handlers into separate modules

Reviewed Changes

Copilot reviewed 11 out of 12 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/index.ts Simplified main client setup by delegating to helper modules
src/helpers/events.ts New module for dynamically loading and attaching event listeners
src/helpers/commands.ts Added cooldown tracking functionality and renamed main function
src/events/ready.ts Extracted ready event handler to separate module
src/events/interactionCreate.ts Extracted interaction handling with cooldown checking
src/@types/commands.ts Updated command types to include cooldown property
src/commands/chat-commands/ping.ts Added 10-second cooldown to ping command
Comments suppressed due to low confidence (2)

Comment thread src/events/interactionCreate.ts Outdated
Comment thread src/@types/commands.ts
@jaredgrxss
jaredgrxss force-pushed the workingOnComplexCommands branch from 503d1e6 to 456dea0 Compare August 10, 2025 18:50
@jaredgrxss
jaredgrxss merged commit 4b5b7f5 into main Aug 11, 2025
1 check passed
@jaredgrxss
jaredgrxss deleted the workingOnComplexCommands branch August 11, 2025 02:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants