Skip to content

Discord chat: a welcome message by DM when the chat opens for someone - #447

Merged
TripleU613 merged 1 commit into
discord-chat/report-to-moderatorsfrom
discord-chat/welcome-dm
Nov 25, 2026
Merged

TripleU613 merged 1 commit into
discord-chat/report-to-moderatorsfrom
discord-chat/welcome-dm

Conversation

@TripleU613

Copy link
Copy Markdown
Owner

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

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
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-25T18:49:37.430471Z 799d828 PR opened
🔒 Security Review ✅ Completed 2026-11-25T18:51:51.715176Z 799d828 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 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)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

@TripleU613
TripleU613 merged commit 8c72290 into discord-chat/report-to-moderators Nov 25, 2026
8 checks passed
@TripleU613
TripleU613 deleted the discord-chat/welcome-dm branch November 25, 2026 18:58
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.

1 participant