MOOver.js/commands/say.js
ZyLacx d2a87e6f10 MOOver 2.0
Slashcommands added hehehehehe
2022-02-12 14:04:18 +01:00

21 lines
No EOL
657 B
JavaScript

const { SlashCommandBuilder } = require('@discordjs/builders');
module.exports = {
data: new SlashCommandBuilder()
.setName('say')
.setDescription('Make me say something!')
.addStringOption(options =>
options.setName('what')
.setDescription('What will you make me say this time? 🙃')
.setRequired(true)),
async execute(interaction) {
await say(interaction);
await interaction.reply({ content: 'Said and done', ephemeral: true });
},
};
function say(interaction) {
const message = interaction.options.getString('what');
message.trim();
interaction.channel.send(message);
}