diff --git a/server/commands/BaseCommand.ts b/server/commands/BaseCommand.ts index 1d91599..26c9d7e 100644 --- a/server/commands/BaseCommand.ts +++ b/server/commands/BaseCommand.ts @@ -6,7 +6,7 @@ import User from "../objects/User"; export default class BaseCommand implements ICommand { public shared:Shared; public readonly adminOnly:boolean = false; - public readonly helpText = "No help page was found for that command"; + public readonly helpText:string = "No help page was found for that command"; public readonly helpDescription:string = "Command has no description set"; public readonly helpArguments:Array = new Array(); diff --git a/tooling/fileSmasher.ts b/tooling/fileSmasher.ts index 2d49b83..3055cd9 100644 --- a/tooling/fileSmasher.ts +++ b/tooling/fileSmasher.ts @@ -5,6 +5,7 @@ import { readdirSync, lstatSync, readFileSync, writeFileSync } from "fs"; let tsFileData:Array = new Array(); +const tsHighPriorityData:Array = new Array(); const tsEvenFirsterData:Array = new Array(); const tsVeryFirstData:Array = new Array(); const tsFirstFileData:Array = new Array(); @@ -25,9 +26,11 @@ function readDir(nam:string) { } else if (file.endsWith(".ts")) { if (file == "Binato.ts") { tsLastFileData.push(readFileSync((`${nam}/${file}`).replace("//", "/")).toString()); + } else if (file.includes("BaseCommand")) { + tsHighPriorityData.push(readFileSync((`${nam}/${file}`).replace("//", "/")).toString()); } else if (nam.includes("commands") || file.includes("ConsoleHelper")) { tsEvenFirsterData.push(readFileSync((`${nam}/${file}`).replace("//", "/")).toString()); - } else if (file.includes("FunkyArray") || file.includes("ChatManager") || file.includes("MultiplayerManager") || file === "Bot.ts") { + } else if (file.includes("FunkyArray") || file.includes("ChatManager") || file.includes("MultiplayerManager") || file === "BaseCommand.ts" || file.includes("Bot.ts")) { tsVeryFirstData.push(readFileSync((`${nam}/${file}`).replace("//", "/")).toString()); } else if (nam.includes("enum") || nam.includes("packets") || (nam.includes("objects") && !file.includes("FunkyArray") ) || file.includes("SpectatorManager")) { tsFirstFileData.push(readFileSync((`${nam}/${file}`).replace("//", "/")).toString()); @@ -40,7 +43,7 @@ function readDir(nam:string) { readDir("./"); -tsFileData = tsFileData.concat(tsEvenFirsterData).concat(tsVeryFirstData).concat(tsFirstFileData).concat(tsEverythingElse).concat(tsLastFileData); +tsFileData = tsFileData.concat(tsHighPriorityData).concat(tsEvenFirsterData).concat(tsVeryFirstData).concat(tsFirstFileData).concat(tsEverythingElse).concat(tsLastFileData); const combinedFiles = tsFileData.join("\n");