summaryrefslogtreecommitdiff
path: root/commands/send.js
blob: a3397844cf4a1c8320596dd008ba077fbe227495 (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('send')
		.setDescription('Send a command')
        .addStringOption(option =>
            option.setName('command')
                .setDescription('Name of the command to send')
                .setRequired(true)
                .addChoices(...global.data.getList())
                ),
	async execute(interaction) {
		await interaction.reply(global.data.get(interaction.options.getString('command')));
	},
};