feature/capr-26-port-privacy-policy-command - #59
Closed
belofe wants to merge 3 commits into
Closed
Conversation
Contributor
Reviewer's GuideAdds a new Discord cog that exposes a /privacy slash command, returning an ephemeral embed describing the bot’s privacy policy and data handling practices. Sequence diagram for /privacy slash command handlingsequenceDiagram
actor User
participant DiscordClient
participant DiscordAPI
participant Bot
participant PrivacyCog
User->>DiscordClient: Open_slash_commands
User->>DiscordClient: Select_/privacy_and_submit
DiscordClient->>DiscordAPI: Send_interaction_request
DiscordAPI->>Bot: Deliver_interaction
Bot->>PrivacyCog: Invoke_privacy(interaction)
PrivacyCog->>PrivacyCog: Build_privacy_embed
PrivacyCog->>DiscordAPI: interaction.response.send_message(ephemeral_embed)
DiscordAPI->>DiscordClient: Send_ephemeral_message
DiscordClient->>User: Display_ephemeral_privacy_embed
Class diagram for the new Privacy cogclassDiagram
class Bot {
}
class Privacy {
- bot : commands.Bot
- log : logging.Logger
+ __init__(bot)
+ privacy(interaction)
}
class setup {
+ setup(bot)
}
Bot <|.. Privacy : uses
setup ..> Privacy : creates_instance
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Contributor
There was a problem hiding this comment.
Hey - I've found 1 issue, and left some high level feedback:
- The hard-coded privacy policy text and 'Last updated: February 2024' date may become stale; consider pulling this content from a central configuration or constants module so it can be updated without code changes.
- In the '👥 Data Access' field, the concatenated strings 'Your information is never shared with third parties' and 'or used for marketing purposes.' are missing a space between them; use an explicit space or single multiline string to avoid formatting glitches.
- The logging of 'Privacy cog initialized' in the constructor will trigger on every cog load; if this is primarily for debugging, consider lowering the log level or removing it to avoid noisy logs in production.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The hard-coded privacy policy text and 'Last updated: February 2024' date may become stale; consider pulling this content from a central configuration or constants module so it can be updated without code changes.
- In the '👥 Data Access' field, the concatenated strings 'Your information is never shared with third parties' and 'or used for marketing purposes.' are missing a space between them; use an explicit space or single multiline string to avoid formatting glitches.
- The logging of 'Privacy cog initialized' in the constructor will trigger on every cog load; if this is primarily for debugging, consider lowering the log level or removing it to avoid noisy logs in production.
## Individual Comments
### Comment 1
<location> `capy_discord/exts/tools/privacy.py:79-80` </location>
<code_context>
+ "• Event participation management\n"
+ "• Academic program coordination\n"
+ "• Communication within organizations\n\n"
+ "Your information is never shared with third parties"
+ "or used for marketing purposes."
+ ),
+ inline=False,
</code_context>
<issue_to_address>
**issue (bug_risk):** Fix missing space between concatenated string literals in the privacy text.
These adjacent literals are concatenated, producing `third partiesor used...`. Add a space at the end of the first or the start of the second string to correct the text.
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Comment on lines
+79
to
+80
| "Your information is never shared with third parties" | ||
| "or used for marketing purposes." |
Contributor
There was a problem hiding this comment.
issue (bug_risk): Fix missing space between concatenated string literals in the privacy text.
These adjacent literals are concatenated, producing third partiesor used.... Add a space at the end of the first or the start of the second string to correct the text.
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.
Add privacy policy command
Summary by Sourcery
New Features: