import type { ButtonInteraction, ModalSubmitInteraction, AnySelectMenuInteraction, AutocompleteInteraction, APIEmbed, Client, Collection, RESTPostAPIApplicationCommandsJSONBody, ApplicationCommandType, ChatInputCommandInteraction, UserContextMenuCommandInteraction, MessageContextMenuCommandInteraction } from 'discord.js'; import type { KythiaContainer } from './KythiaContainer'; import type { KythiaAugmentedEventHandler } from './EventManager'; import type { KythiaLogger } from './KythiaLogger'; import type Kythia from '@src/Kythia'; export type KythiaButtonHandler = (interaction: ButtonInteraction, container: KythiaContainer) => Promise | void; export type KythiaModalHandler = (interaction: ModalSubmitInteraction, container: KythiaContainer) => Promise | void; export type KythiaSelectMenuHandler = (interaction: AnySelectMenuInteraction, container: KythiaContainer) => Promise | void; export type KythiaAutocompleteHandler = (interaction: AutocompleteInteraction, container: KythiaContainer) => Promise | void; export type KythiaTaskHandler = (container: KythiaContainer) => Promise | void; export interface KythiaTaskScheduleOptions { shardOnly?: number | 'lock'; } export type KythiaEventHandler = KythiaAugmentedEventHandler; export type KythiaCommandInteraction = ChatInputCommandInteraction | UserContextMenuCommandInteraction | MessageContextMenuCommandInteraction; export type KythiaCommandHandler = (interaction: KythiaCommandInteraction, container?: KythiaContainer) => Promise | void; export interface SubcommandSummary { group: string; subcommands: string[]; } export interface CommandRegistrationSummary { type: 'single' | 'group'; name: string; folder: string; kind?: 'slash' | 'contextMenu' | 'prefix'; subcommands?: (string | SubcommandSummary)[]; } export interface KythiaCommandModule { data?: RESTPostAPIApplicationCommandsJSONBody; slashCommand?: RESTPostAPIApplicationCommandsJSONBody; contextMenuCommand?: RESTPostAPIApplicationCommandsJSONBody; prefixCommand?: unknown; subcommand?: boolean; autocomplete?: KythiaAutocompleteHandler; execute?: KythiaCommandHandler; featureFlag?: string; disableAutoPrefix?: boolean; mainGuildOnly?: boolean; [key: string]: unknown; } export interface IAddonManager { client: Client; container: KythiaContainer; logger: KythiaLogger; buttonHandlers: Map; modalHandlers: Map; selectMenuHandlers: Map; autocompleteHandlers: Map; taskHandlers: Map; commandCategoryMap: Map; categoryToFeatureMap: Map; embedDrafts: Collection; eventHandlers: Map; registerButtonHandler(customId: string, handler: KythiaButtonHandler): void; registerSelectMenuHandler(customIdPrefix: string, handler: KythiaSelectMenuHandler): void; registerModalHandler(customIdPrefix: string, handler: KythiaModalHandler): void; registerAutocompleteHandler(commandName: string, handler: KythiaAutocompleteHandler): void; registerTaskHandler(taskName: string, handler: KythiaTaskHandler, schedule: string | number, options?: KythiaTaskScheduleOptions): void; registerCommand(module: KythiaCommandModule, filePath: string, commandNamesSet: Set, commandDataForDeployment: RESTPostAPIApplicationCommandsJSONBody[], permissionDefaults?: unknown, options?: unknown): CommandRegistrationSummary | null; loadAddons(kythiaInstance: Kythia): Promise; getHandlers(): { buttonHandlers: Map; modalHandlers: Map; selectMenuHandlers: Map; autocompleteHandlers: Map; taskHandlers: Map; commandCategoryMap: Map; categoryToFeatureMap: Map; eventHandlers: Map; }; } export interface RawCommandData { name?: string; description?: string; permissions?: string | number | bigint | null; guildOnly?: boolean; type?: ApplicationCommandType; } export interface DynamicModule { [key: string]: unknown; } export interface CommandModuleExport extends DynamicModule { slashCommand?: import('discord.js').SlashCommandBuilder; contextMenuCommand?: import('discord.js').ContextMenuCommandBuilder; data?: import('discord.js').SlashCommandBuilder | import('discord.js').ContextMenuCommandBuilder; autocomplete?: KythiaAutocompleteHandler; execute?: KythiaCommandHandler; } export interface AddonExport { name?: string; commands?: CommandModuleExport[]; events?: DynamicModule[]; register?: DynamicModule[]; [key: string]: unknown; } //# sourceMappingURL=AddonManager.d.ts.map