From 065522723e00547748d0694c1ae7717be5878255 Mon Sep 17 00:00:00 2001 From: Nix Krystik Date: Wed, 26 Aug 2026 14:07:00 +0800 Subject: [PATCH] wipe. --- src/commands/admin/{remove.ts => wipe.ts} | 15 ++++++++------- src/commands/index.ts | 4 ++-- 2 files changed, 10 insertions(+), 9 deletions(-) rename src/commands/admin/{remove.ts => wipe.ts} (53%) diff --git a/src/commands/admin/remove.ts b/src/commands/admin/wipe.ts similarity index 53% rename from src/commands/admin/remove.ts rename to src/commands/admin/wipe.ts index 403a5f3..90a32d7 100644 --- a/src/commands/admin/remove.ts +++ b/src/commands/admin/wipe.ts @@ -4,21 +4,22 @@ import { deleteUser } from "../../utils"; // ---------- @SlashCommand( - new CommandBuilder('remove', 'Remove a user from the database.') + new CommandBuilder('wipe', 'Wipe a user from the database.') .setIntegrationTypes(Constants.ApplicationIntegrationType.GuildInstall) .setContexts(Constants.InteractionContextType.Guild) .setCommandType(Constants.ApplicationCommandType.ChatInput) - .addUserOption('user', 'The user to remove.', true) + .addUserOption('user', 'The user to wipe.', true) ) -class RemoveCommand extends Command { +class WipeCommand extends Command { users = ['1363132678022631428']; async handleCommand(context: CommandClient, interaction: CommandInteraction) { - await interaction.defer(true); + console.log('tes'); + const user = interaction.getRequiredUser('user'); + await deleteUser(user.id); - await deleteUser(interaction.getRequiredUser('user').id); - await interaction.createMessage({ content: `Successfully removed: ${interaction.user.mention} (*${interaction.user.username}*)`}); + await interaction.createMessage({ content: `Successfully wiped: ${interaction.user.mention} (*${interaction.user.username}*)`}); } } -export default new RemoveCommand('remove'); +export default new WipeCommand('wipe'); diff --git a/src/commands/index.ts b/src/commands/index.ts index 8cd5a6b..3f25e44 100644 --- a/src/commands/index.ts +++ b/src/commands/index.ts @@ -1,9 +1,9 @@ import init from "./admin/init"; -import remove from "./admin/remove"; +import wipe from "./admin/wipe"; import optin from "./privacy/optin"; import optout from "./privacy/optout"; import profile from "./profile"; // ---------- -export default [init, optin, optout, profile, remove]; +export default [init, optin, optout, profile, wipe];