UNPKG

msg.ts

Version:

MSG is the framework for make discord bot easily

23 lines 1.08 kB
import Context from './Context'; import { promiseOr } from '../types'; export declare type nameAndDescription = { name: string; description: string; }; export declare type cond = (ctx: Context) => promiseOr<boolean>; export declare type executor = (ctx: Context) => promiseOr<Context>; export declare type condStringOrTrue = string | true; export declare const subCall: (condString: condStringOrTrue, executorCallBack: executor, tag?: Partial<nameAndDescription>) => Command; export declare const indent: (condString: condStringOrTrue, subCommands: Array<Command>) => Command; declare class Command implements Partial<nameAndDescription> { readonly cond: cond; readonly executor: executor; static alwaysTrue: (_: Context) => boolean; static alwaysFalse: (_: Context) => boolean; static empty: (_: Context) => Context; name?: string; description?: string; constructor(cond: cond, executor: executor, tag?: Partial<nameAndDescription>); } export default Command; //# sourceMappingURL=../../src/dist/class/Command.d.ts.map