@pierok/commandhandler
Version:
This is a simple and unique package which makes creating commands using .js and .ts a whole lot easier and make the code look cleaner.
17 lines (16 loc) • 565 B
TypeScript
import { ChatInputCommandInteraction, Client, GuildMember, PermissionResolvable, ChatInputApplicationCommandData } from "discord.js";
export interface RunOptions {
client: Client;
interaction: ChatInputCommandInteraction & {
member: GuildMember;
};
args: string[];
}
export type RunFunction = (options: RunOptions) => any;
export type CommandOptions = {
userPermissions?: PermissionResolvable[];
run: RunFunction;
} & ChatInputApplicationCommandData;
export declare class Command {
constructor(commandOptions: CommandOptions);
}