feat: Introduce a dedicated autocomplete handler for commands and refactor the inventory use command to utilize it.

This commit is contained in:
syntaxbullet
2025-12-18 14:34:47 +01:00
parent 3a96b67e89
commit 8c1f80981b
3 changed files with 37 additions and 37 deletions

View File

@@ -1,8 +1,9 @@
import type { ChatInputCommandInteraction, ClientEvents, SlashCommandBuilder, SlashCommandOptionsOnlyBuilder, SlashCommandSubcommandsOnlyBuilder } from "discord.js";
import type { AutocompleteInteraction, ChatInputCommandInteraction, ClientEvents, SlashCommandBuilder, SlashCommandOptionsOnlyBuilder, SlashCommandSubcommandsOnlyBuilder } from "discord.js";
export interface Command {
data: SlashCommandBuilder | SlashCommandOptionsOnlyBuilder | SlashCommandSubcommandsOnlyBuilder;
execute: (interaction: ChatInputCommandInteraction) => Promise<void> | void;
autocomplete?: (interaction: AutocompleteInteraction) => Promise<void> | void;
category?: string;
}