Skip to content

Harass nonmembers - #177

Merged
5731la merged 3 commits into
mainfrom
harass-nonmembers
Sep 2, 2026
Merged

Harass nonmembers#177
5731la merged 3 commits into
mainfrom
harass-nonmembers

Conversation

@5731la

@5731la 5731la commented Sep 2, 2026

Copy link
Copy Markdown
Member

Requested by @leahkvares

@5731la
5731la requested review from c0unts and a lite review from Copilot September 2, 2026 16:53
@5731la
5731la requested a review from a team as a code owner September 2, 2026 16:53

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.

🟡 Changes recommended

The new handler has avoidable performance/operational issues (verification check ordering, silent channel lookup failures, goroutine capture/memory pressure) and documentation claims that currently overstate behavior guarantees.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Adds a new MessageCreate handler to automatically prompt unverified Discord users to run /member, with per-user exponential backoff and temporary timeouts to prevent repeated posting until verification.

Changes:

  • Introduces MemberNudge handler with role-based + data-layer verification checks, exponential backoff, Discord timeouts, and delayed message cleanup.
  • Registers the new handler in the command handler registry.
File summaries
File Description
commands/handlers/memberNudge.go Adds the nudge/backoff/timeout logic for unverified users posting outside bot-help.
commands/enabled.go Registers the memberNudge handler so it is attached to the bot session.
Review details

Suppressed comments (1)

commands/handlers/memberNudge.go:142

  • The doc comment says posting in bot-help “clears any active timeout”, but nudgeClear only clears timeouts when a nudge state (and its guild ID) is present. Either broaden the behavior or adjust the docs to match the actual best-effort semantics.
// minute after each nudge, both the bot's reply and the triggering user
// message are deleted. Nagging stops once the user is verified or posts in
// bot-help, which also clears any active timeout. Applying the timeout
// requires MODERATE_MEMBERS permission; when it fails, the in-memory backoff
// gate continues to throttle re-nudges as a fallback.
  • Files reviewed: 2/2 changed files
  • Comments generated: 5
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread commands/handlers/memberNudge.go
Comment thread commands/handlers/memberNudge.go Outdated
Comment thread commands/handlers/memberNudge.go
Comment thread commands/handlers/memberNudge.go Outdated
Comment thread commands/handlers/memberNudge.go Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

@c0unts c0unts 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.

lgtm

@5731la
5731la merged commit 19bec62 into main Sep 2, 2026
5 checks passed
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