import { AnyPluginData } from "../../plugins/PluginData"; import { BaseSlashCommandOption } from "./slashCommandOptions"; import { ChatInputCommandInteraction } from "discord.js"; export type SlashCommandSignature = Array>; export type OptionsFromSignature = { [Opt in TSignature[number] as Opt["name"]]: Opt["required"] extends true ? ReturnType : ReturnType | null; }; export type SlashCommandMeta, TSignature extends SlashCommandSignature> = { interaction: ChatInputCommandInteraction; options: OptionsFromSignature; pluginData: TPluginData; }; export type SlashCommandFn, TSignature extends SlashCommandSignature> = (meta: SlashCommandMeta) => void | Promise;