From 5a5c135c4a5603e31fc049af3f46f2f7bf6c2b9a Mon Sep 17 00:00:00 2001 From: Ethan Beloff Date: Tue, 3 Feb 2026 16:21:55 -0500 Subject: [PATCH 1/3] Add privacy cog --- capy_discord/exts/tools/privacy.py | 100 +++++++++++++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 capy_discord/exts/tools/privacy.py diff --git a/capy_discord/exts/tools/privacy.py b/capy_discord/exts/tools/privacy.py new file mode 100644 index 0000000..3fd6727 --- /dev/null +++ b/capy_discord/exts/tools/privacy.py @@ -0,0 +1,100 @@ +"""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 + +from capy_discord.config import settings + + +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: + await bot.add_cog(Privacy(bot)) \ No newline at end of file From ad7ed62f24a8b61e56f79638ef7cbd7255ae5057 Mon Sep 17 00:00:00 2001 From: Ethan Beloff Date: Tue, 3 Feb 2026 16:30:57 -0500 Subject: [PATCH 2/3] Add privacy command --- capy_discord/exts/tools/privacy.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/capy_discord/exts/tools/privacy.py b/capy_discord/exts/tools/privacy.py index 3fd6727..e346af7 100644 --- a/capy_discord/exts/tools/privacy.py +++ b/capy_discord/exts/tools/privacy.py @@ -2,26 +2,27 @@ 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 -from capy_discord.config import settings - 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", @@ -97,4 +98,5 @@ async def privacy(self, interaction: discord.Interaction) -> None: async def setup(bot: commands.Bot) -> None: - await bot.add_cog(Privacy(bot)) \ No newline at end of file + """Set up the Privacy cog.""" + await bot.add_cog(Privacy(bot)) From 1634d7eebcb56345e19cdd01188f0d22fa22ee06 Mon Sep 17 00:00:00 2001 From: Ethan Beloff Date: Thu, 5 Feb 2026 10:55:33 -0500 Subject: [PATCH 3/3] Improve privacy formatting --- capy_discord/exts/tools/privacy.py | 40 +++++++++++++++++------------- 1 file changed, 23 insertions(+), 17 deletions(-) diff --git a/capy_discord/exts/tools/privacy.py b/capy_discord/exts/tools/privacy.py index e346af7..0f09976 100644 --- a/capy_discord/exts/tools/privacy.py +++ b/capy_discord/exts/tools/privacy.py @@ -36,58 +36,64 @@ async def privacy(self, interaction: discord.Interaction) -> None: embed = discord.Embed( title="Privacy Policy & Data Handling", color=discord.Color.blue(), - description="Here's how we handle your information:", + description="**Here's how we collect and handle your information:**", ) embed.add_field( - name="šŸ“ Data We Collect", + name="Basic Discord Data", + value=("• Discord User ID\n• Server (Guild) ID\n• Channel configurations\n• Role assignments\n\n"), + inline=False, + ) + embed.add_field( + name="Academic Profile Data", 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" + "• Phone number (optional)\n\n" ), inline=False, ) embed.add_field( - name="šŸ”’ Data Storage", - value=("• Data is stored in a secure MongoDB database\n• Regular backups are maintained\n"), + name="How We Store Your Data", + value=("• Data is stored in a secure MongoDB database\n• Regular backups are maintained\n\n"), inline=False, ) embed.add_field( - name="šŸ‘„ Data Access", + name="\n", 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" + "• Bot developers for maintenance only\n" + ), + inline=False, + ) + embed.add_field( + name="How your data is used", + value=( "• 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="Your information is never shared or used for marketing purposes.\n", value=(""), inline=False + ) embed.add_field( - name="āŒ Data Deletion", + name="Data Deletion", value=( "You can request data deletion through:\n" "• Contacting the bot administrators\n" "• Calling /profile delete\n\n" + "\n" "Note: Some basic data may be retained for academic records as required." ), inline=False,