Changed Nessa's Image. Fixed the issue with consent that was causing 400 error. Fixed a missed tab in commands that should fix the issue with updating task error
This commit is contained in:
BIN
Nessa.ico
BIN
Nessa.ico
Binary file not shown.
Before Width: | Height: | Size: 145 KiB After Width: | Height: | Size: 113 KiB |
BIN
Nessa.png
BIN
Nessa.png
Binary file not shown.
Before Width: | Height: | Size: 406 KiB After Width: | Height: | Size: 536 KiB |
@ -174,8 +174,6 @@ class ConsentCommands(app_commands.Group):
|
||||
policy_details = f"""Hi there! So you're looking to hire Nessa, the godess of memory! Let me tell you what you need to know. You need to consent to me storing what you send me in my 'memory' (better known as a database). What I am storing is: Your Disocrd ID, Projects, Tasks, and other data related to your projects. Why I need it? Well, I need your ID so as track your consent to store your data. If I don't have your consent, You can't use my services and your data isn't stored. As far as project and task management is concerned, I store just what you send me. I do not share it with any third-parties. I do not use any external services. I store it in my local 'memory'. Your data is not used for anything else, including but not limited to machine learning. Your data can be removed at any time using the commands. If you wish to opt-out, please use the `/consent opt-out` command. You need anything else, talk to my boss: <@{contact_user_id}> on Discord."""
|
||||
await interaction.response.send_message(policy_details, ephemeral=True)
|
||||
|
||||
|
||||
|
||||
class NessaTracker(app_commands.Group, name="nessa", description="Nessa the Project Tracker."):
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
|
@ -101,11 +101,11 @@ class Nessa(discord.Client):
|
||||
consented = await check_user_consent(interaction.user.id)
|
||||
|
||||
if not consented:
|
||||
# If there is no consent, show the consent dialog,
|
||||
# unless the command is to opt-out, which should be accessible without prior consent.
|
||||
if interaction.command.name == 'opt-out':
|
||||
# Allow users to opt-out directly if they mistakenly initiated any command.
|
||||
# Allow opt-out without consent.
|
||||
return
|
||||
|
||||
# Prompt for consent
|
||||
view = ConsentView()
|
||||
await interaction.response.send_message(
|
||||
"By using the services I, Nessa, provide, you consent to the storage of your data necessary for functionality. Please confirm your consent. See /nessa consent privacy-policy for more details.",
|
||||
@ -116,11 +116,12 @@ class Nessa(discord.Client):
|
||||
if view.value:
|
||||
await store_user_consent(interaction.user.id)
|
||||
else:
|
||||
# This is the correct use of followup after the initial response
|
||||
await interaction.followup.send("Whoops! You have to give me your okay to do store your data before you can use my services!", ephemeral=True)
|
||||
return # Stop processing if they do not consent
|
||||
|
||||
# For opt-in command, check if they're trying to opt-in after opting out.
|
||||
if interaction.command.name == 'opt-in':
|
||||
if consented:
|
||||
# Directly send a response if already consented
|
||||
await interaction.response.send_message("Hey! Thanks, but you've already opted in.", ephemeral=True)
|
||||
return
|
Reference in New Issue
Block a user