Binato/server/commands/BaseCommand.ts

20 lines
770 B
TypeScript
Raw Normal View History

2023-09-10 12:59:22 +01:00
import ICommand from "../interfaces/ICommand";
import Channel from "../objects/Channel";
import Shared from "../objects/Shared";
import User from "../objects/User";
2023-08-20 13:03:01 +01:00
2023-09-10 12:59:22 +01:00
export default class BaseCommand implements ICommand {
2023-08-20 13:03:01 +01:00
public shared:Shared;
2023-10-04 16:13:16 +01:00
public readonly adminOnly:boolean = false;
2023-10-04 16:21:29 +01:00
public readonly helpText:string = "No help page was found for that command";
2023-08-20 13:03:01 +01:00
public readonly helpDescription:string = "Command has no description set";
public readonly helpArguments:Array<string> = new Array<string>();
public constructor(shared:Shared) {
this.shared = shared;
}
public exec(channel:Channel, sender:User, args:Array<string>) {
2023-10-04 12:28:47 +01:00
channel.SendBotMessage(`Sorry ${sender.username}! This command has no functionality yet. Args: ["${args.join('", "')}"]`);
2023-08-20 13:03:01 +01:00
}
}