Skip to content

Add mute reason support#170

Merged
11k merged 1 commit intomasterfrom
feat/mute-reason
Mar 23, 2026
Merged

Add mute reason support#170
11k merged 1 commit intomasterfrom
feat/mute-reason

Conversation

@11k
Copy link
Copy Markdown
Contributor

@11k 11k commented Mar 23, 2026

Summary

  • The mute command now accepts an optional reason after the username (e.g. !mute 10m user spamming links)
  • Updated the mute regex to match the ban command's pattern, supporting perm duration and reason capture group
  • Reason is appended to the mute punishment string when provided: Muting: {user} for {duration}. Reason: {reason}

Test plan

  • Added new mute test file with 4 test cases covering: duration only, duration + reason, default duration, default duration + reason
  • Verify existing ban tests still pass (npm test)
  • Manual test: !mute 10m user reason text includes reason in punishment
  • Manual test: !mute 10m user still works without reason

The mute command now accepts an optional reason after the username,
matching the ban command's behavior. Updated the regex to support
reason capture and perm duration keyword.
@11k 11k added the enhancement New feature or request label Mar 23, 2026
@11k 11k merged commit c1b2d44 into master Mar 23, 2026
2 checks passed
@11k 11k deleted the feat/mute-reason branch March 23, 2026 00:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant