From 057206cc15b581707c94b618767d6e1983906712 Mon Sep 17 00:00:00 2001 From: Skylar Grant Date: Sat, 7 Jan 2023 13:35:34 -0500 Subject: [PATCH] Add basic file for the command --- slash-commands/savestrain.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 slash-commands/savestrain.js diff --git a/slash-commands/savestrain.js b/slash-commands/savestrain.js new file mode 100644 index 0000000..662d301 --- /dev/null +++ b/slash-commands/savestrain.js @@ -0,0 +1,17 @@ +const { SlashCommandBuilder } = require('@discordjs/builders'); +const fn = require('../functions.js'); +const { emoji } = require('../strings.json'); + +module.exports = { + data: new SlashCommandBuilder() + .setName('savestrain') + .setDescription('Store a new Strain in the database!') + .addStringOption(option => + option.setName('strain-name') + .setDescription('What is the phrase?') + .setRequired(true)), + async execute(interaction) { + fn.upload.joint(interaction.options.getString('joint-content'), interaction.client); + interaction.reply({ content: `The joint has been rolled${emoji.joint}`, ephemeral: true }); + }, +}; \ No newline at end of file