(commands): i'm losing my mind.

This commit is contained in:
2026-08-26 15:36:23 +08:00
parent 59518f7b99
commit 53606deabd
3 changed files with 7 additions and 8 deletions
+3 -3
View File
@@ -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<CommandClient> {
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!",
+3 -4
View File
@@ -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<CommandClient> {
async handleCommand(context: CommandClient<any, any>, 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 :<"
+1 -1
View File
@@ -22,7 +22,7 @@ class ProfileCommand extends Command<CommandClient> {
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.'
}]
});