Skip to content

🐛 fix: correct timeout duration calculation in repel command#18

Merged
hmd-ali merged 2 commits into
mainfrom
fix/repel-timeout
Oct 19, 2025
Merged

🐛 fix: correct timeout duration calculation in repel command#18
hmd-ali merged 2 commits into
mainfrom
fix/repel-timeout

Conversation

@hmd-ali

@hmd-ali hmd-ali commented Oct 19, 2025

Copy link
Copy Markdown
Contributor

No description provided.

@hmd-ali hmd-ali requested review from Copilot and wiktoriavh October 19, 2025 18:50

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull Request Overview

Fixes unit handling in the repel moderation command so the timeout duration passed to the API is correct.

  • Passes duration directly to the timeout API rather than multiplying by an hour constant.
  • Keeps return value unchanged.

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread src/commands/moderation/repel.ts Outdated
Comment on lines 120 to 121
await target.timeout(duration, 'Repel command executed');
return duration;

Copilot AI Oct 19, 2025

Copy link

Choose a reason for hiding this comment

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

[nitpick] Please document the unit of duration (e.g., milliseconds) in the handleTimeout contract and ensure the return value unit is explicitly stated. Adding a brief JSDoc on the function (or renaming the parameter to durationMs) will prevent future unit confusion.

Copilot uses AI. Check for mistakes.
@hmd-ali hmd-ali merged commit dd54101 into main Oct 19, 2025
1 check passed
@hmd-ali hmd-ali deleted the fix/repel-timeout branch October 19, 2025 19:03
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.

3 participants