restructure

move to bun workspaces
bump zod
begin adding fluxer
This commit is contained in:
2026-02-17 18:04:32 +01:00
parent 6608bd6ee7
commit 6ce1fdf67d
79 changed files with 1106 additions and 79 deletions
+48
View File
@@ -0,0 +1,48 @@
import { type CommandsType, Commands } from "commands";
import config from "config";
import type { CacheType, ChatInputCommandInteraction, Interaction } from "discord.js";
import { checkPermission } from "permissions";
export class DebugService {
async handleInteraction(
interaction: Interaction<CacheType>
) {
if (interaction.isChatInputCommand()) {
await this.handleChatInputCommand(interaction);
return;
}
}
async handleChatInputCommand(interaction: ChatInputCommandInteraction<CacheType>) {
const commandName = interaction.commandName as CommandsType;
switch (commandName) {
case Commands.Enum.version:
await this.version(interaction);
return;
default:
break;
}
}
async version(interaction: ChatInputCommandInteraction<CacheType>) {
try {
console.log("version command");
if (await checkPermission(interaction.member) !== true) {
await interaction.reply({
content: "du hast keine rechte fuer diesen befehl",
ephemeral: true,
});
return;
}
await interaction.reply({
content: "version: " + config.discord.version,
});
}
catch (error) {
console.error("error while sending version msg:", error);
}
}
}