import { AutocompleteInteraction } from "discord.js"; import { AuroraClient } from "@/lib/BotClient"; import { logger } from "@shared/lib/logger"; /** * Handles autocomplete interactions for slash commands */ export class AutocompleteHandler { static async handle(interaction: AutocompleteInteraction): Promise { const command = AuroraClient.commands.get(interaction.commandName); if (!command || !command.autocomplete) { return; } try { await command.autocomplete(interaction); } catch (error) { logger.error("bot", `Error handling autocomplete for ${interaction.commandName}`, error); } } }