Added a privacy-policy command to Dolly. Also Fixed up How the consent is worded.

This commit is contained in:
Dan
2024-05-05 14:26:58 -04:00
parent 4ab30887d9
commit e5a189d9cb
2 changed files with 15 additions and 1 deletions

View File

@ -4,6 +4,12 @@ from .database import add_project, get_project_id, get_project_name, add_task_to
from .consent import check_user_consent, store_user_consent, revoke_user_consent
from datetime import datetime
import logging
from dotenv import load_dotenv
import os
load_dotenv()
contact_user_id = int(os.getenv("AUTHORIZED_USER_ID"))
logger = logging.getLogger('Dolly')
@ -122,6 +128,14 @@ class ConsentCommands(app_commands.Group):
async def opt_out(self, interaction: discord.Interaction):
await revoke_user_consent(interaction.user.id)
await interaction.response.send_message("You have opted out of data storage. You will no longer be able to use the bot.", ephemeral=True)
@app_commands.command(name="privacy-policy", description="View the bot's data handling policy.")
async def privacy_policy(self, interaction: discord.Interaction):
# Replace 'YOUR_USER_ID' with the actual numeric ID of the user 'advtech'
policy_details = f"""Your data, including your Discord ID, task entries, and other related data, is collected for the purpose of providing task management functionalities. All data is stored securely and is not shared with third parties. You can withdraw your consent at any time by using the `/opt-out` command. For any data requests or inquiries, please contact <@{contact_user_id}> on Discord."""
await interaction.response.send_message(policy_details, ephemeral=True)
class DollyTracker(app_commands.Group, name="dolly", description="Dolly the Project Tracker."):
def __init__(self):

View File

@ -45,7 +45,7 @@ class Dolly(discord.Client):
return
view = ConsentView()
await interaction.response.send_message(
"By using this bot, you consent to the storage of your data necessary for functionality. Please confirm your consent.",
"By using this bot, you consent to the storage of your data necessary for functionality. Please confirm your consent. See /dolly consent privacy-policy for more details.",
view=view,
ephemeral=True
)