import { SlashCommandBuilder, userMention } from "discord.js"; import { z } from "zod"; export const Commands = z.enum(["giessen", "medikamente", "hilfe", "accept", "welcome", "embed"]); export const CommandsMeta: Record, { description: string }> = { giessen: { description: "giess mich mit etwas wasser :3" }, medikamente: { description: "ich erinnere dich gerne daran, deine medikamente zu nehmen! :)" }, hilfe: { description: "ich schreibe dir auf, was du alles mit mir machen kannst :)" }, accept: { description: "admin use only" }, welcome: { description: "admin use only" }, embed: { description: "admin use only" } } export type CommandsType = z.output; export default function getCommands() { const commands = [ new SlashCommandBuilder() .setName(Commands.Enum.giessen) .setDescription(CommandsMeta.giessen.description), new SlashCommandBuilder() .setName(Commands.Enum.medikamente) .setDescription(CommandsMeta.medikamente.description), new SlashCommandBuilder() .setName(Commands.Enum.hilfe) .setDescription(CommandsMeta.hilfe.description), new SlashCommandBuilder() .setName(Commands.Enum.accept) .setDescription(CommandsMeta.accept.description) .addStringOption(option => option.setName('input') .setDescription('input for bot') .setRequired(true)), new SlashCommandBuilder() .setName(Commands.Enum.welcome) .setDescription(CommandsMeta.welcome.description) .addStringOption(option => option.setName('input') .setDescription('input for bot') .setRequired(true)), new SlashCommandBuilder() .setName(Commands.Enum.embed) .setDescription(CommandsMeta.embed.description) .addStringOption(option => option.setName('title') .setDescription('title') .setRequired(true)) .addStringOption(option => option.setName('description') .setDescription('description') .setRequired(true)) .addBooleanOption(option => option.setName('timestamp') .setDescription('timestamp bool') .setRequired(false)), ].map((command) => command.toJSON()); return commands; }