/[sudobot]/trunk/src/utils/structures/BaseCLICommand.ts
ViewVC logotype

Contents of /trunk/src/utils/structures/BaseCLICommand.ts

Parent Directory Parent Directory | Revision Log Revision Log


Revision 77 - (show annotations)
Mon Jul 29 17:28:30 2024 UTC (8 months, 1 week ago) by rakin
File MIME type: application/typescript
File size: 562 byte(s)
Added command line system
1 import DiscordClient from "../../client/Client";
2
3 export default abstract class BaseCLICommand {
4 requiredArgs = 0;
5 requiredOptions = 0;
6
7 constructor(protected name: string, protected category: string, protected aliases: string[] = []) {
8
9 }
10
11 getName(): string {
12 return this.name;
13 }
14
15 getCategory(): string {
16 return this.category;
17 }
18
19 getAliases(): string[] {
20 return this.aliases;
21 }
22
23 public abstract run(client: DiscordClient, argv?: string[], args?: string[], options?: string[]): Promise<void>;
24 }

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26