nodbot/slash-commands/strain.js

19 lines
592 B
JavaScript

const { SlashCommandBuilder } = require('@discordjs/builders');
const fn = require('../functions.js');
module.exports = {
data: new SlashCommandBuilder()
.setName('strain')
.setDescription('Look up information about a cannabis strain.')
.addStringOption(option =>
option
.setName('name')
.setDescription('Strain Name')
.setRequired(true)
.setAutocomplete(true)),
async execute(interaction) {
await interaction.deferReply();
const reply = await fn.download.strain(interaction.options.getString('name'), interaction);
await interaction.editReply(reply);
},
};