UNPKG

@bastion/tesseract

Version:

The heart and soul of the Bastion bot.

52 lines (51 loc) 1.81 kB
import { EventEmitter } from "node:events"; import { ApplicationCommandOptionChoiceData, ApplicationCommandOptionType, ApplicationCommandType, ChannelType, ChatInputCommandInteraction, ContextMenuCommandInteraction, PermissionResolvable } from "discord.js"; interface TesseractCommandParameter { type: ApplicationCommandOptionType; name: string; description: string; required?: boolean; choices?: ApplicationCommandOptionChoiceData[]; options?: TesseractCommandParameter[]; channel_types?: ChannelType[]; min_value?: number; max_value?: number; autocomplete?: boolean; } interface TesseractCommandOptions { type?: ApplicationCommandType; name: string; description: string; enabled?: boolean; options?: TesseractCommandParameter[]; unsafe?: boolean; nsfw?: boolean; scope?: "guild" | "dm"; owner?: boolean; clientPermissions?: PermissionResolvable[]; userPermissions?: PermissionResolvable[]; } export interface TesseractCommandData { type: ApplicationCommandType; name: string; description: string; options?: TesseractCommandParameter[]; } declare abstract class TesseractCommand extends EventEmitter { group?: string; type: ApplicationCommandType; name: string; description: string; enabled?: boolean; options?: TesseractCommandParameter[]; unsafe?: boolean; nsfw?: boolean; owner?: boolean; clientPermissions?: PermissionResolvable[]; userPermissions?: PermissionResolvable[]; constructor(options: TesseractCommandOptions); abstract exec(interaction: ChatInputCommandInteraction<"cached"> | ContextMenuCommandInteraction<"cached">): Promise<unknown> | void; toJSON: () => TesseractCommandData; toString: () => string; } export default TesseractCommand;