Command framework

This commit is contained in:
2021-12-16 00:21:14 +01:00
parent ced2559551
commit ec595650fd
10 changed files with 183 additions and 15 deletions

19
lib/commands/types.tsx Normal file
View File

@@ -0,0 +1,19 @@
interface Flag {
short: string;
long: string;
desc: string;
}
interface SubCommand {
name: string;
desc: string;
}
export interface Command {
name: string;
hidden?: boolean;
desc: string;
flags?: Flag[];
subcommands?: SubCommand[];
execute: (flags: string[], args: string[], raw: string) => string[];
}