Repository navigation
Discord chat: a welcome message by DM when the chat opens for someone - #447
Conversation
discord_chat_welcome_message is sent once, as a direct message, to each
member whose linked account lets them in, with {username} filled in. Only
people who joined the server in the last 7 days are welcomed, at most 10
per run so a launch rush isn't throttled as spam. A member is marked
welcomed before the message goes out, so closed direct messages aren't
retried every minute. Blank, the default, sends nothing.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BUGDaR7qv2d8CuVp7UGSTs
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 799d828436
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| .first(WELCOMES_PER_RUN) | ||
| .each do |member| | ||
| discord_id = member.dig("user", "id") | ||
| PluginStore.set(STORE, welcome_key(discord_id), true) |
There was a problem hiding this comment.
Record completion only after non-retryable outcomes
If Discord rate-limits this request after call exhausts its retries, returns a transient 5xx response, or the network request raises after this write, the member is permanently recorded as welcomed even though no message arrived; the next scheduled run therefore skips them. Persist the key after a successful send, or after identifying the specific closed-DM response that should not be retried, rather than before every delivery attempt.
Useful? React with 👍 / 👎.
8c72290
into
discord-chat/report-to-moderators
discord_chat_welcome_message(blank = off): one DM per newly let-in member, {username} filled, joined in the last 7 days only, 10 per run, marked done before sending so closed DMs are not retried. Specs: once only, username + no pings, skips suspended/old joins, blank sends nothing.Stacked on discord-chat/report-to-moderators; retargets to main once that merges.
🤖 Generated with Claude Code
https://claude.ai/code/session_01BUGDaR7qv2d8CuVp7UGSTs