Rework guild-join onboarding message to lead with moderation value and fix delivery gaps - #278
Merged
Merged
Conversation
Co-authored-by: LightSage <46062298+LightSage@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
LightSage
August 27, 2026 01:23
View session
Reviewer's GuideReworks guild onboarding to prioritize moderation setup, adds actionable in-bot guidance and a quick-start link, and prevents silent delivery gaps through owner-DM fallback plus Redis delivery-status tracking. Sequence diagram for reliable guild onboarding deliverysequenceDiagram
participant Discord as Discord
participant Bot as BotMeta
participant Owner as GuildOwner
participant Redis as Redis
Discord->>Bot: on_lightning_guild_add(guild)
Bot->>Bot: attempt_onboarding_send(guild, msg, view)
alt Sendable system or public updates channel
Bot->>Discord: channel.send(msg, view)
Discord-->>Bot: success
Bot->>Bot: record_onboarding_delivery(guild, channel)
Bot->>Redis: set(lightning:onboarding-sent:guild_id, channel, 30 days)
else No channel or channel send fails
Bot->>Bot: attempt_onboarding_dm(guild, msg, view)
alt Cached owner unavailable
Bot->>Discord: fetch_user(guild.owner_id)
Discord-->>Bot: owner
end
Bot->>Owner: send(preamble + msg, view)
alt DM succeeds
Bot->>Bot: record_onboarding_delivery(guild, dm)
Bot->>Redis: set(lightning:onboarding-sent:guild_id, dm, 30 days)
else DM fails or owner unavailable
Bot->>Bot: record_onboarding_delivery(guild, failed)
Bot->>Redis: set(lightning:onboarding-sent:guild_id, failed, 30 days)
end
end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
LightSage
approved these changes
Aug 27, 2026
LightSage
marked this pull request as ready for review
August 27, 2026 01:31
There was a problem hiding this comment.
Hey - I've reviewed your changes and they look great!
Sourcery assessment
Needs a human reviewer. If the new onboarding content, channel selection, or owner-DM fallback is wrong, a message may already have been delivered to guild members or an owner when the change is reverted; reverting cannot unsend it. The impact is bounded to onboarding notifications, with delivery status retained only in Redis for up to 30 days.
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The existing
on_lightning_guild_addonboarding message led with prefix mechanics instead of moderation value, pointed only to external docs instead of an actionable next step, and was silently dropped if the server had no usablesystem_channel/public_updates_channel.Message copy
/automod rules interactiveand/modlog— instead of only linking to documentation.Delivery reliability
attempt_onboarding_sendtriessystem_channelthenpublic_updates_channel, same as before, but now falls back toattempt_onboarding_dm(DMs the guild owner, fetching via API if not cached) when no channel is available or sendable.record_onboarding_deliverywrites achannel/dm/failedstatus to Redis (lightning:onboarding-sent:{guild_id}, 30-day TTL) so delivery gaps are observable instead of failing silently.Summary by Sourcery
Improve guild onboarding by emphasizing moderation value, providing guided setup actions, and making message delivery observable and resilient.
New Features:
Bug Fixes:
Enhancements: