cumsystem
Version:
simple command system and command handler
21 lines (20 loc) • 782 B
TypeScript
import * as Discord from 'discord.js';
import { Command } from './Command';
/**
* A command the function of which returns the message to send back
* @extends Command
*/
export declare class SimpleCommand extends Command {
/**
* Create a command
* @example
* ```typescript
* let command = new CommandSystem.SimpleCommand('test', () => {
* return 'Testing!';
* });
* ```
* @param {string} name The name, also what invokes the command
* @param {Function} cfunction The function to run after the command is ran, returns content that will be sent back to the user, or a promise that returns the content
*/
constructor(name: string, cfunction: (message: Discord.Message, content: string) => any | Promise<any> | undefined);
}