UNPKG

sdhandler

Version:
31 lines (30 loc) 1.27 kB
import type { CommandInteractionOptionResolver, GuildMember, Message, PermissionResolvable, TextBasedChannel, ApplicationCommandType, ApplicationCommandOptionData, ChatInputCommandInteraction, UserContextMenuCommandInteraction, MessageContextMenuCommandInteraction } from "discord.js"; import type { SDClient } from "../structures/Client"; import type { CommandMode } from "../structures/enums"; interface InitOptions { client: SDClient; } declare type InitFunction = (options: InitOptions) => any; interface ExecuteOptions { client: SDClient; message?: Message; interaction?: ChatInputCommandInteraction | MessageContextMenuCommandInteraction | UserContextMenuCommandInteraction; options?: CommandInteractionOptionResolver; args?: string[]; member: GuildMember; channel: TextBasedChannel; } declare type ExecuteFunction = (options: ExecuteOptions) => any; export declare type CommandOptions = { name: string; description?: string; permissions?: PermissionResolvable; mode: CommandMode; type?: ApplicationCommandType; requiredRoles?: string[]; aliases?: string[]; options?: ApplicationCommandOptionData[]; init?: InitFunction; execute: ExecuteFunction; }; export {};