diff --git a/src/commands/utility/help.ts b/src/commands/utility/help.ts index 9a0bf7c..17cea29 100644 --- a/src/commands/utility/help.ts +++ b/src/commands/utility/help.ts @@ -26,7 +26,8 @@ const command: Command = { const ownerCmds: string[] = []; client.commands.forEach((cmd) => { - const entry = `• **/${cmd.data.name}**: ${cmd.data.description}`; + const desc = 'description' in cmd.data ? cmd.data.description : 'Kontextmenü-Befehl'; + const entry = `• **/${cmd.data.name}**: ${desc}`; if (cmd.category === 'Public') { publicCmds.push(entry); diff --git a/src/events/interactionCreate.ts b/src/events/interactionCreate.ts index 39dcd1e..7341f0f 100644 --- a/src/events/interactionCreate.ts +++ b/src/events/interactionCreate.ts @@ -1,4 +1,4 @@ -import { Events, Interaction } from 'discord.js'; +import { Events, Interaction, ChatInputCommandInteraction, MessageContextMenuCommandInteraction } from 'discord.js'; import { ExtendedClient } from '../structures/ExtendedClient.js'; import { DB } from '../structures/Database.js'; diff --git a/src/structures/Command.ts b/src/structures/Command.ts index b42278d..59c2511 100644 --- a/src/structures/Command.ts +++ b/src/structures/Command.ts @@ -1,18 +1,11 @@ import { - ChatInputCommandInteraction, - SlashCommandBuilder, - SlashCommandOptionsOnlyBuilder, - SlashCommandSubcommandsOnlyBuilder, - ContextMenuCommandBuilder, - MessageContextMenuCommandInteraction, - ModalSubmitInteraction -} from 'discord.js'; -import { ExtendedClient } from './ExtendedClient.js'; + ExtendedClient +} from './ExtendedClient.js'; export interface Command { - data: SlashCommandBuilder | SlashCommandOptionsOnlyBuilder | SlashCommandSubcommandsOnlyBuilder | ContextMenuCommandBuilder; + data: any; category: 'Owner' | 'Admin' | 'Public'; - execute: (interaction: ChatInputCommandInteraction | MessageContextMenuCommandInteraction, client: ExtendedClient) => Promise; - handleModal?: (interaction: ModalSubmitInteraction, client: ExtendedClient) => Promise; + execute: (interaction: any, client: ExtendedClient) => Promise; + handleModal?: (interaction: any, client: ExtendedClient) => Promise; cooldown?: number; }