-
Notifications
You must be signed in to change notification settings - Fork 0
Port Privacy Policy Command #58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,102 @@ | ||
| """Privacy policy cog for displaying data handling information. | ||
|
|
||
| This module handles the display of privacy policy information to users. | ||
| """ | ||
|
|
||
| import logging | ||
|
|
||
| import discord | ||
| from discord import app_commands | ||
| from discord.ext import commands | ||
|
|
||
|
|
||
| class Privacy(commands.Cog): | ||
| """Privacy policy and data handling information cog.""" | ||
|
|
||
| def __init__(self, bot: commands.Bot) -> None: | ||
| """Initialize the Privacy cog. | ||
|
|
||
| Args: | ||
| bot: The Discord bot instance | ||
| """ | ||
| self.bot = bot | ||
| self.log = logging.getLogger(__name__) | ||
| self.log.info("Privacy cog initialized") | ||
|
|
||
| @app_commands.command( | ||
| name="privacy", | ||
| description="View our privacy policy and data handling practices", | ||
| ) | ||
| async def privacy(self, interaction: discord.Interaction) -> None: | ||
| """Display privacy policy and data handling information. | ||
|
|
||
| Args: | ||
| interaction: The Discord interaction initiating the command | ||
| """ | ||
| embed = discord.Embed( | ||
| title="Privacy Policy & Data Handling", | ||
| color=discord.Color.blue(), | ||
| description="Here's how we handle your information:", | ||
| ) | ||
|
|
||
| embed.add_field( | ||
| name="📝 Data We Collect", | ||
| value=( | ||
| "**Basic Discord Data:**\n" | ||
| "• Discord User ID\n" | ||
| "• Server (Guild) ID\n" | ||
| "• Channel configurations\n" | ||
| "• Role assignments\n\n" | ||
| "**Academic Profile Data:**\n" | ||
| "• Full name (first, middle, last)\n" | ||
| "• School email address\n" | ||
| "• Student ID number\n" | ||
| "• Major(s)\n" | ||
| "• Expected graduation year\n" | ||
| "• Phone number (optional)\n" | ||
| ), | ||
| inline=False, | ||
| ) | ||
|
|
||
| embed.add_field( | ||
| name="🔒 Data Storage", | ||
| value=("• Data is stored in a secure MongoDB database\n• Regular backups are maintained\n"), | ||
| inline=False, | ||
| ) | ||
|
|
||
| embed.add_field( | ||
| name="👥 Data Access", | ||
| value=( | ||
| "**Who can access your data:**\n" | ||
| "• Club/Organization officers for member management\n" | ||
| "• Server administrators for server settings\n" | ||
| "• Bot developers for maintenance only\n\n" | ||
| "**How your data is used:**\n" | ||
| "• Member verification and tracking\n" | ||
| "• 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, | ||
| ) | ||
|
|
||
| embed.add_field( | ||
| name="❌ Data Deletion", | ||
| value=( | ||
| "You can request data deletion through:\n" | ||
| "• Contacting the bot administrators\n" | ||
| "• Calling /profile delete\n\n" | ||
| "Note: Some basic data may be retained for academic records as required." | ||
| ), | ||
| inline=False, | ||
| ) | ||
|
|
||
| embed.set_footer(text="Last updated: February 2024") | ||
| await interaction.response.send_message(embed=embed, ephemeral=True) | ||
|
|
||
|
|
||
| async def setup(bot: commands.Bot) -> None: | ||
| """Set up the Privacy cog.""" | ||
| await bot.add_cog(Privacy(bot)) | ||
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
issue (bug_risk): String concatenation here drops the space between "parties" and "or".
These adjacent literals are concatenated as-written, producing
"third partiesor used". Add a space to either the end of the first string or the start of the second (e.g.,"third parties "or" or used for marketing purposes.").