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:
@ -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