124 lines
3.7 KiB
TypeScript
124 lines
3.7 KiB
TypeScript
import { SlashCommandBuilder, userMention } from "discord.js";
|
|
import { z } from "zod";
|
|
|
|
export const Commands = z.enum(["giessen", "medikamente", "hilfe", "support", "kofi", "disboard", "discadia", "accept", "welcome", "embed", "message", "reminder", "version"]);
|
|
|
|
export const CommandsMeta: Record<z.output<typeof Commands>, { 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 :)"
|
|
},
|
|
support: {
|
|
description: "unterstuetze uns! link zu unserem ko-fi, disboard und discardia c:"
|
|
},
|
|
kofi: {
|
|
description: "link zu unserem ko-fi (spendenportal):"
|
|
},
|
|
disboard: {
|
|
description: "link zu disboard, hier kannst du uns bewerten!"
|
|
},
|
|
discadia: {
|
|
description: "link zu discadia, hier kannst du fuer uns voten!"
|
|
},
|
|
accept: {
|
|
description: "admin use only"
|
|
},
|
|
welcome: {
|
|
description: "admin use only"
|
|
},
|
|
embed: {
|
|
description: "admin use only"
|
|
},
|
|
message: {
|
|
description: "admin use only"
|
|
},
|
|
reminder: {
|
|
description: "admin use only"
|
|
},
|
|
version: {
|
|
description: "admin use only"
|
|
}
|
|
}
|
|
|
|
export type CommandsType = z.output<typeof Commands>;
|
|
|
|
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.support)
|
|
.setDescription(CommandsMeta.support.description),
|
|
new SlashCommandBuilder()
|
|
.setName(Commands.Enum.kofi)
|
|
.setDescription(CommandsMeta.kofi.description),
|
|
new SlashCommandBuilder()
|
|
.setName(Commands.Enum.disboard)
|
|
.setDescription(CommandsMeta.disboard.description),
|
|
new SlashCommandBuilder()
|
|
.setName(Commands.Enum.discadia)
|
|
.setDescription(CommandsMeta.discadia.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)),
|
|
new SlashCommandBuilder()
|
|
.setName(Commands.Enum.message)
|
|
.setDescription(CommandsMeta.message.description)
|
|
.addStringOption(option =>
|
|
option.setName('input')
|
|
.setDescription('input for bot')
|
|
.setRequired(true)),
|
|
new SlashCommandBuilder()
|
|
.setName(Commands.Enum.reminder)
|
|
.setDescription(CommandsMeta.reminder.description)
|
|
.addStringOption(option =>
|
|
option.setName('input')
|
|
.setDescription('input for bot')
|
|
.setRequired(true)),
|
|
new SlashCommandBuilder()
|
|
.setName(Commands.Enum.version)
|
|
.setDescription(CommandsMeta.version.description),
|
|
|
|
].map((command) => command.toJSON());
|
|
|
|
return commands;
|
|
}
|