mirror of
https://github.com/nx-bat/pet-the-pond.git
synced 2026-09-22 10:29:11 -04:00
(commands): Replace /wipe with /prune.
This commit is contained in:
@@ -4,22 +4,26 @@ import { deleteUser } from "../../utils";
|
|||||||
// ----------
|
// ----------
|
||||||
|
|
||||||
@SlashCommand(
|
@SlashCommand(
|
||||||
new CommandBuilder('wipe', 'Wipe a user from the database.')
|
new CommandBuilder('prune', 'Prune users from the database.')
|
||||||
.setIntegrationTypes(Constants.ApplicationIntegrationType.GuildInstall)
|
.setIntegrationTypes(Constants.ApplicationIntegrationType.GuildInstall)
|
||||||
.setContexts(Constants.InteractionContextType.Guild)
|
.setContexts(Constants.InteractionContextType.Guild)
|
||||||
.setCommandType(Constants.ApplicationCommandType.ChatInput)
|
.setCommandType(Constants.ApplicationCommandType.ChatInput)
|
||||||
.addUserOption('user', 'The user to wipe.', true)
|
.addUserOption('member', 'The member to prune.')
|
||||||
)
|
)
|
||||||
class WipeCommand extends Command<CommandClient> {
|
class PruneCommand extends Command<CommandClient> {
|
||||||
users = ['1363132678022631428'];
|
users = [
|
||||||
|
'1363132678022631428', // nxbat
|
||||||
|
'454653142500507649' // bitdash
|
||||||
|
];
|
||||||
|
|
||||||
async handleCommand(context: CommandClient<any, any>, interaction: CommandInteraction) {
|
async handleCommand(context: CommandClient<any, any>, interaction: CommandInteraction) {
|
||||||
console.log('tes');
|
await interaction.defer(true);
|
||||||
const user = interaction.getRequiredUser('user');
|
|
||||||
|
const user = interaction.getRequiredUser('member');
|
||||||
await deleteUser(user.id);
|
await deleteUser(user.id);
|
||||||
|
|
||||||
await interaction.createMessage({ content: `Successfully wiped: ${interaction.user.mention} (*${interaction.user.username}*)`});
|
await interaction.createMessage({ content: `Pruned: *${user.username}* | ID: ${user.id}` });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default new WipeCommand('wipe');
|
export default new PruneCommand('prune');
|
||||||
Reference in New Issue
Block a user