You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
flowchart LR
A["Tokio interval (15 min)"]
B["Check Redis last standup"]
C["Send Discord 'Codebloom Standup' embed"]
D["Set last standup in Redis"]
E["No-op"]
F["Load env credentials"]
G1["Init Redis client"]
H1["Init Discord client (background)"]
A --> B
B -- "due today?" --> C
C --> D
B -- "not due" --> E
F --> G1
F --> H1
When no prior standup timestamp exists in Redis, the bot passes the current time to is_time_to_send_standup_message, which makes it think a standup was already sent today, preventing the first message from ever sending. Initialize with a past timestamp or accept Option<DateTime> in the check.
The Discord gateway intents are set to GUILD_MEMBERS only, which is privileged and likely unnecessary. Use minimal required intents (e.g., GUILDS or non_privileged) to reliably receive interactions and reduce permission scope.
Only a production env file is encrypted (internal/standup-bot/.env.production). To meet AC (use staging credentials and deploy via Coolify), add a staging env (internal/standup-bot/.env.staging) and ensure Coolify wiring references it; otherwise risk using production creds.
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: When there is no prior standup time in Redis, passing Utc::now() makes the function think a message was already sent today, blocking the first send. Treat the "no record" case as "not sent today" by passing a timestamp from a prior day. This ensures the bot sends on first eligible tick. [possible issue, importance: 9]
Suggested change
None => {
if !is_time_to_send_standup_message(Utc::now()){
return;
}
}
None => {
// No prior send recorded; treat as not sent today and allow send if it's the right window.
if !is_time_to_send_standup_message(Utc::now() - chrono::Duration::days(1)){
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: Using the privileged GUILD_MEMBERS intent is unnecessary here and can prevent the gateway from working if not enabled in the Discord portal. Switch to the non-privileged GUILDS intent to reliably receive readiness and interaction events without extra configuration. [general, importance: 8]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
755
Description of changes
Checklist before review
Screenshots
Dev
Staging