ran prettier lol
All checks were successful
CI / build (push) Successful in 10s

This commit is contained in:
Space-Banane
2026-02-22 15:31:37 +01:00
parent bc58cb7361
commit e1300a98b3
17 changed files with 473 additions and 408 deletions

View File

@@ -1,20 +1,20 @@
import { ChatInputCommandInteraction, SlashCommandBuilder } from "discord.js";
export interface Command {
data: SlashCommandBuilder;
execute: (interaction: ChatInputCommandInteraction) => Promise<void>;
data: SlashCommandBuilder;
execute: (interaction: ChatInputCommandInteraction) => Promise<void>;
}
const commands = new Map<string, Command>();
export function registerCommand(command: Command) {
commands.set(command.data.name, command);
commands.set(command.data.name, command);
}
export function getCommand(name: string): Command | undefined {
return commands.get(name);
return commands.get(name);
}
export function getAllCommands(): Command[] {
return Array.from(commands.values());
return Array.from(commands.values());
}