const { ButtonKit } = require('commandkit'); const { SlashCommandBuilder, ActionRowBuilder, ButtonStyle, EmbedBuilder } = require("discord.js"); const modcaseModel = require("../../models/modcase") module.exports = { data: new SlashCommandBuilder() .setName("warn") .setDescription("warns a user") .addUserOption(option => option.setName("user").setDescription("the user that you wish to warn").setRequired(true)) .addStringOption(option => option.setName("reason").setDescription("the reason that you wish to warn").setRequired(false)), /** * @typedef {Object} RunOptions * @property {import("discord.js").Interaction} interaction */ /** * * @param {RunOptions} options * @returns */ run: async ({ interaction }) => { try { const serverEmbed = new EmbedBuilder() .setTitle("Action Executed") .setDescription("moderation action successful") .addFields( { name: "reason", value: (interaction.options.get("reason").value || "No reason provided") }, { name: "case_id", value: "to be implemented" } ) .setColor("Yellow") await interaction.reply({embeds: [serverEmbed]}) } catch (error) { console.log(error) } } }