summaryrefslogtreecommitdiff
path: root/commands/delete.js
blob: 60c541f7f8bb62fd054ca111b9989d92dfdd354a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
const { SlashCommandBuilder } = require('discord.js');

module.exports = {
	data: new SlashCommandBuilder()
		.setName('remove')
		.setDescription('Remove a Command')
        .addStringOption(option =>
            option.setName('command')
                .setDescription('Name of the command to remove')
                .setRequired(true)
                .setChoices(...global.data.getList())
                ),    
	async execute(interaction) {
        global.data.remove(interaction.options.getString('command'))
		await interaction.reply('Removed `'+interaction.options.getString('command')+'`.');
	},
};