UNPKG

@zerospacegg/vynthra

Version:
37 lines (32 loc) 1.18 kB
import type { Client, SlashCommandBuilder, CommandInteraction, ChatInputCommandInteraction, SlashCommandSubcommandsOnlyBuilder, SlashCommandSubcommandBuilder, } from "discord.js"; export interface BotCommand { data: SlashCommandBuilder | SlashCommandSubcommandsOnlyBuilder; execute: (interaction: ChatInputCommandInteraction) => Promise<void>; } export interface BotSubcommand { name: string; description: string; builder: ( subcommand: SlashCommandSubcommandBuilder, ) => SlashCommandSubcommandBuilder; execute: (interaction: ChatInputCommandInteraction) => Promise<void>; } export interface BotConfig { token: string; clientId: string; guildId?: string; // Optional: for guild-specific commands during development rootCommandName?: string; // Optional: defaults to "zsgg" rootCommandDescription?: string; // Optional: defaults to "Search ZeroSpace.gg game data" subcommands?: BotSubcommand[]; // Optional: additional subcommands to register disableBuiltinCommands?: boolean; // Optional: set to true to disable Vynthra's built-in subcommands } export interface BotClient extends Client { commands: Map<string, BotCommand>; }