import { LocaleManager } from "../locales/LocaleManager"; import { Locales } from "../locales/Locales"; import { CommandAssignment } from "./CommandAssignments"; import { CommandContext } from "./CommandContext"; import { CommandManager } from "./CommandManager"; export abstract class Command { _titleLocalePath: string = ""; _infoLocalePath: string = ""; assignments: CommandAssignment[] = []; constructor( title: string, info: string) { this._titleLocalePath = title; this._infoLocalePath = info; } getLocalizedTitle():Promise { return LocaleManager.$().get( this._titleLocalePath ); } getLocalizedInfo():Promise { return LocaleManager.$().get( this._infoLocalePath ); } abstract execute( context: CommandContext ): Promise }