import type { APIApplicationCommandAutocompleteInteraction, APIChatInputApplicationCommandInteraction, APIMessageComponentButtonInteraction, APIMessageComponentSelectMenuInteraction, APIModalSubmitInteraction, APIUserApplicationCommandInteraction, APIMessageApplicationCommandInteraction } from "discord-api-types/v10"; import type { AnySelectMenuInteraction, AutocompleteInteraction, ButtonInteraction, CacheType, ChatInputCommandInteraction, MessageContextMenuCommandInteraction, ModalSubmitInteraction, UserContextMenuCommandInteraction } from "discord.js"; import type { ArgumentsOf, CommandPayload, ComponentPayload, Runtime } from "./ArgumentsOf.js"; export type ChatInput = { chatInput(interaction: R extends Runtime.Discordjs ? ChatInputCommandInteraction : APIChatInputApplicationCommandInteraction, args: ArgumentsOf, locale: string): Promise | any; }; export type Autocomplete = { autocomplete(interaction: R extends Runtime.Discordjs ? AutocompleteInteraction : APIApplicationCommandAutocompleteInteraction, args: ArgumentsOf, locale: string): Promise | any; }; export type MessageContext = { messageContext(interaction: R extends Runtime.Discordjs ? MessageContextMenuCommandInteraction : APIMessageApplicationCommandInteraction, args: ArgumentsOf, locale: string): Promise | any; }; export type UserContext = { userContext(interaction: R extends Runtime.Discordjs ? UserContextMenuCommandInteraction : APIUserApplicationCommandInteraction, args: ArgumentsOf, locale: string): Promise | any; }; export type Button = { button(interaction: R extends Runtime.Discordjs ? ButtonInteraction : APIMessageComponentButtonInteraction, args: ArgumentsOf, locale: string): Promise | any; }; export type SelectMenu = { selectMenu(interaction: R extends Runtime.Discordjs ? AnySelectMenuInteraction : APIMessageComponentSelectMenuInteraction, args: ArgumentsOf, locale: string): Promise | any; }; export type ModalSubmit = { modalSubmit(interaction: R extends Runtime.Discordjs ? ModalSubmitInteraction : APIModalSubmitInteraction, args: ArgumentsOf, locale: string): Promise | any; }; export type Commands = Autocomplete & ChatInput & MessageContext & UserContext & { [key: string]: any; }; export type Components = Button & ModalSubmit & SelectMenu & { [key: string]: any; }; export declare const enum InteractionType { ApplicationCommand = 0, Component = 1 } export declare const enum CommandMethod { Autocomplete = "autocomplete", ChatInput = "chatInput", MessageContext = "messageContext", UserContext = "userContext" } export declare const enum ComponentMethod { Button = "button", ModalSubmit = "modalSubmit", SelectMenu = "selectMenu" } type CommandMethodParameters = Parameters[T]>; type ComponentMethodParameters = Parameters[T]>; export type InteractionParam = T extends InteractionType.Component ? ComponentMethodParameters[0] : CommandMethodParameters[0]; export type ArgsParam = T extends InteractionType.Component ? C extends ComponentPayload ? ComponentMethodParameters[1] : never : C extends CommandPayload ? CommandMethodParameters[1] : never; export type LocaleParam = T extends InteractionType.Component ? ComponentMethodParameters[2] : CommandMethodParameters[2]; export {}; //# sourceMappingURL=Interaction.d.ts.map