feat(discord): post reopen notice when keeping threads alive - #103
Conversation
BK1031
commented
Aug 8, 2026
- Post a message in the thread after Sentinel auto-unarchives it, explaining the reopen and that locking a thread before closing opts it out of keepalive
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 95c303dac7
ℹ️ 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".
| return | ||
| } | ||
| logger.SugarLogger.Infof("thread keepalive: unarchived thread %s (%s)", thread.ID, thread.Name) | ||
| if _, err := Discord.ChannelMessageSend(thread.ID, threadReopenNotice); err != nil { |
There was a problem hiding this comment.
Require permission to post the reopen notice
When the bot has only the documented MANAGE_THREADS permission, unarchiving succeeds but this request can fail with 403 Missing Permissions: creating a message in a thread requires the separate SEND_MESSAGES_IN_THREADS permission, which MANAGE_THREADS does not imply. Consequently, deployments configured according to this function's stated requirement never deliver the newly added notice; ensure the bot is granted the additional permission and document it here.
Useful? React with 👍 / 👎.