diff --git a/src/commands/privacy/optin.ts b/src/commands/privacy/optin.ts index 1dfb7b1..49cf9c6 100644 --- a/src/commands/privacy/optin.ts +++ b/src/commands/privacy/optin.ts @@ -1,10 +1,10 @@ import { Command, CommandBuilder, CommandClient, CommandInteraction, Constants, SlashCommand } from "athena-prime"; -import { getUser, setUserPrivacy } from "../../utils"; +import { getUser, updateUserSettings } from "../../utils"; // ---------- @SlashCommand( - new CommandBuilder('optin', 'Opt into the Pet the Pond event.') + new CommandBuilder('optin', 'Stop counting your pet interactions.') .setIntegrationTypes(Constants.ApplicationIntegrationType.GuildInstall) .setContexts(Constants.InteractionContextType.Guild) .setCommandType(Constants.ApplicationCommandType.ChatInput) @@ -16,7 +16,7 @@ class OptInCommand extends Command { await interaction.defer(true); const _user = await getUser(interaction.user.id); - await setUserPrivacy(_user.user_id, { optin: true }); + await updateUserSettings(interaction.user.id, { participating: true }); await interaction.createMessage({ content: "Successfully opted in. You'll receive points for your pets!", diff --git a/src/commands/privacy/optout.ts b/src/commands/privacy/optout.ts index 16bd197..6839849 100644 --- a/src/commands/privacy/optout.ts +++ b/src/commands/privacy/optout.ts @@ -1,10 +1,10 @@ import { Command, CommandBuilder, CommandClient, CommandInteraction, Constants, SlashCommand } from "athena-prime"; -import { getUser, setUserPrivacy } from "../../utils"; +import { getUser, updateUserSettings } from "../../utils"; // ---------- @SlashCommand( - new CommandBuilder('optout', 'Opt out of the Pet the Pond event.') + new CommandBuilder('optout', 'Stop counting your pet interactions.') .setIntegrationTypes(Constants.ApplicationIntegrationType.GuildInstall) .setContexts(Constants.InteractionContextType.Guild) .setCommandType(Constants.ApplicationCommandType.ChatInput) @@ -15,8 +15,7 @@ class OptOutCommand extends Command { async handleCommand(context: CommandClient, interaction: CommandInteraction) { await interaction.defer(true); - const _user = await getUser(interaction.user.id); - await setUserPrivacy(_user.user_id, { optin: false }); + await updateUserSettings(interaction.user.id, { participating: false }); await interaction.createMessage({ content: "Successfully opted out. You won't receive any points for petting :<" diff --git a/src/commands/profile.ts b/src/commands/profile.ts index 31ecf51..9a42c83 100644 --- a/src/commands/profile.ts +++ b/src/commands/profile.ts @@ -22,7 +22,7 @@ class ProfileCommand extends Command { await interaction.createMessage({ embeds: [{ color: 0xff5555, - description: 'Sorry, I was unable to get your profile. Please try again later.' + description: 'There was an error processing your request. Please try again later.' }] });