added createEmbed

This commit is contained in:
2025-01-07 00:31:01 +01:00
parent 78a65511c2
commit 62b3eb070b
8 changed files with 252 additions and 37 deletions

View File

@@ -1,7 +1,7 @@
import { SlashCommandBuilder, userMention } from "discord.js";
import { z } from "zod";
export const Commands = z.enum(["giessen", "medikamente", "hilfe", "accept"]);
export const Commands = z.enum(["giessen", "medikamente", "hilfe", "accept", "welcome", "embed"]);
export const CommandsMeta: Record<z.output<typeof Commands>, { description: string }> = {
giessen: {
@@ -15,6 +15,12 @@ export const CommandsMeta: Record<z.output<typeof Commands>, { description: stri
},
accept: {
description: "admin use only"
},
welcome: {
description: "admin use only"
},
embed: {
description: "admin use only"
}
}
@@ -38,6 +44,29 @@ export default function getCommands() {
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;