Skip to content

Allow DJs and mods to bypass /randombg cooldown#379

Merged
SyntaxNyah merged 1 commit into
mainfrom
claude/hopeful-brown-ejWnM
Jun 4, 2026
Merged

Allow DJs and mods to bypass /randombg cooldown#379
SyntaxNyah merged 1 commit into
mainfrom
claude/hopeful-brown-ejWnM

Conversation

@SyntaxNyah
Copy link
Copy Markdown
Owner

Summary

Modified the /randombg command to allow DJs and moderators (including shadow mods) to bypass the 5-second cooldown restriction, enabling them to change backgrounds more frequently for event management and testing purposes.

Changes

  • Wrapped the cooldown check in a permission gate that skips rate limiting for users with DJ permission or moderator status
  • The cooldown is now only enforced for regular players, not for staff members
  • Cooldown logic remains unchanged for non-privileged users

Implementation Details

  • Uses existing permissions.HasPermission() and permissions.IsModerator() checks to determine if a user should bypass the cooldown
  • Shadow mods are included in the bypass via the IsModerator() check
  • The 5-second cooldown constant and check-and-update logic remain intact for regular players

https://claude.ai/code/session_01DDQ2h5JvyHVkR4rJQ9eCsc

/randomchar already bypassed the 5-second cooldown for mods and DJs via
IsModerator, which includes the SHADOW bit. /randombg had no such bypass
at all. Mirror the same hasDJ/isMod guard so shadow mods and DJs can
swap backgrounds freely, consistent with /randomchar behaviour.

https://claude.ai/code/session_01DDQ2h5JvyHVkR4rJQ9eCsc
@SyntaxNyah SyntaxNyah merged commit fcd91f3 into main Jun 4, 2026
4 checks passed
@SyntaxNyah SyntaxNyah deleted the claude/hopeful-brown-ejWnM branch June 4, 2026 15:35
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