This commit is contained in:
Holly Stubbs 2023-10-04 16:21:29 +01:00
parent 462d0c879c
commit 78f4a499fa
2 changed files with 6 additions and 3 deletions

View file

@ -6,7 +6,7 @@ import User from "../objects/User";
export default class BaseCommand implements ICommand { export default class BaseCommand implements ICommand {
public shared:Shared; public shared:Shared;
public readonly adminOnly:boolean = false; 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 helpDescription:string = "Command has no description set";
public readonly helpArguments:Array<string> = new Array<string>(); public readonly helpArguments:Array<string> = new Array<string>();

View file

@ -5,6 +5,7 @@
import { readdirSync, lstatSync, readFileSync, writeFileSync } from "fs"; import { readdirSync, lstatSync, readFileSync, writeFileSync } from "fs";
let tsFileData:Array<string> = new Array<string>(); let tsFileData:Array<string> = new Array<string>();
const tsHighPriorityData:Array<string> = new Array<string>();
const tsEvenFirsterData:Array<string> = new Array<string>(); const tsEvenFirsterData:Array<string> = new Array<string>();
const tsVeryFirstData:Array<string> = new Array<string>(); const tsVeryFirstData:Array<string> = new Array<string>();
const tsFirstFileData:Array<string> = new Array<string>(); const tsFirstFileData:Array<string> = new Array<string>();
@ -25,9 +26,11 @@ function readDir(nam:string) {
} else if (file.endsWith(".ts")) { } else if (file.endsWith(".ts")) {
if (file == "Binato.ts") { if (file == "Binato.ts") {
tsLastFileData.push(readFileSync((`${nam}/${file}`).replace("//", "/")).toString()); 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")) { } else if (nam.includes("commands") || file.includes("ConsoleHelper")) {
tsEvenFirsterData.push(readFileSync((`${nam}/${file}`).replace("//", "/")).toString()); 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()); tsVeryFirstData.push(readFileSync((`${nam}/${file}`).replace("//", "/")).toString());
} else if (nam.includes("enum") || nam.includes("packets") || (nam.includes("objects") && !file.includes("FunkyArray") ) || file.includes("SpectatorManager")) { } else if (nam.includes("enum") || nam.includes("packets") || (nam.includes("objects") && !file.includes("FunkyArray") ) || file.includes("SpectatorManager")) {
tsFirstFileData.push(readFileSync((`${nam}/${file}`).replace("//", "/")).toString()); tsFirstFileData.push(readFileSync((`${nam}/${file}`).replace("//", "/")).toString());
@ -40,7 +43,7 @@ function readDir(nam:string) {
readDir("./"); 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"); const combinedFiles = tsFileData.join("\n");