Repository navigation
Discord chat: "Report to moderators" on any message in the server - #446
TripleU613 wants to merge 3 commits into
Conversation
…ictions discord_chat_mod_log_channel_id posts what the forum does in the server to a moderators-only channel: who got in (with their forum username), who lost access, and timeouts set and lifted. Lines never ping anyone, and a line that fails to post is dropped rather than stopping the sync. discord_chat_sync_timeouts times a linked member out while they're suspended or silenced on the forum, capped at Discord's 28 days and renewed as it runs down. A timeout already within a day of the right end is left alone, so long suspensions aren't rewritten every minute. The forum records the timeouts it set and lifts only those; a moderator's own timeout in the server is never cleared. The server owner is skipped. Both settings default off. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BUGDaR7qv2d8CuVp7UGSTs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BUGDaR7qv2d8CuVp7UGSTs
discord_chat_reports_enabled registers a message command, so right-clicking or long-pressing a message → Apps → "Report to moderators" sends it to the moderators. The reporter gets a private "Sent" reply at once; a job posts the report to the moderators' log channel and messages the forum's moderators group with the reporter and author (and their forum accounts when linked), a link to the message and its text. The reported text is untrusted: on the forum it goes in a plain code block with its own fences defused, accounts are shown as profile links rather than @mentions, and the log line pings nobody. Only reports from the configured server are taken, 5 per member per hour. It works whether or not the slash commands are on; the registered list now comes from Commands.definitions. Off by default. 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: 58293fe057
ℹ️ 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".
| raw: forum_body(args, link, content), | ||
| archetype: Archetype.private_message, | ||
| target_group_names: [moderators.name], |
There was a problem hiding this comment.
Keep restricted-channel content inside its audience
When a report originates in a Discord channel that some forum moderators cannot view, such as an admin-only or private project channel, this unconditionally copies the raw message into a PM for the entire forum moderators group. The only authorization check is the guild ID; neither the interaction handler nor this job restricts source channels or recipients, so reporting widens access to restricted Discord content. Avoid copying the content unless every recipient is authorized for that channel, or constrain reports to an explicit safe channel set.
AGENTS.md reference: AGENTS.md:L9-L9
Useful? React with 👍 / 👎.
Message command (right-click → Apps → Report to moderators). Ephemeral "Sent" reply; a job posts to #mod-log and messages the forum moderators group with the text in a plain code block (no mentions, fences defused). Configured guild only, 5/hour/member, works with slash commands off. Default off (
discord_chat_reports_enabled). Specs for the reply, guild check, off switch, the forum message (no mention notifications) and the log line.Stacked on discord-chat/mod-log-timeouts; retargets to main once that merges.
🤖 Generated with Claude Code
https://claude.ai/code/session_01BUGDaR7qv2d8CuVp7UGSTs