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

module.exports = {
	data: new SlashCommandBuilder()
		.setName('use')
		.setDescription('Use a Command')
        .addStringOption(option =>
            option.setName('command')
                .setDescription('What the bot will send')
                .setRequired(true)
                .addChoices(...global.data.getList())
                ),
	async execute(interaction) {
		await interaction.reply(global.data.get(interaction.options.getString('command')));
	},
};