(commands): Replace /wipe with /prune.

This commit is contained in:
2026-08-26 15:29:43 +08:00
parent c1c7cc9fb4
commit 0ac0dffce4
+29
View File
@@ -0,0 +1,29 @@
import { Command, CommandBuilder, CommandClient, CommandInteraction, Constants, SlashCommand } from "athena-prime";
import { deleteUser } from "../../utils";
// ----------
@SlashCommand(
new CommandBuilder('prune', 'Prune users from the database.')
.setIntegrationTypes(Constants.ApplicationIntegrationType.GuildInstall)
.setContexts(Constants.InteractionContextType.Guild)
.setCommandType(Constants.ApplicationCommandType.ChatInput)
.addUserOption('member', 'The member to prune.')
)
class PruneCommand extends Command<CommandClient> {
users = [
'1363132678022631428', // nxbat
'454653142500507649' // bitdash
];
async handleCommand(context: CommandClient<any, any>, interaction: CommandInteraction) {
await interaction.defer(true);
const user = interaction.getRequiredUser('member');
await deleteUser(user.id);
await interaction.createMessage({ content: `Pruned: *${user.username}* | ID: ${user.id}` });
}
}
export default new PruneCommand('prune');